本文整理匯總了Java中net.minecraft.client.network.NetHandlerPlayClient.addToSendQueue方法的典型用法代碼示例。如果您正苦於以下問題:Java NetHandlerPlayClient.addToSendQueue方法的具體用法?Java NetHandlerPlayClient.addToSendQueue怎麽用?Java NetHandlerPlayClient.addToSendQueue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.client.network.NetHandlerPlayClient
的用法示例。
在下文中一共展示了NetHandlerPlayClient.addToSendQueue方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onGuiClosed
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
/**
* Called when the screen is unloaded. Used to disable keyboard repeat events
*/
public void onGuiClosed()
{
Keyboard.enableRepeatEvents(false);
NetHandlerPlayClient nethandlerplayclient = this.mc.getNetHandler();
if (nethandlerplayclient != null)
{
nethandlerplayclient.addToSendQueue(new C12PacketUpdateSign(this.tileSign.getPos(), this.tileSign.signText));
}
this.tileSign.setEditable(true);
}
示例2: sendSign
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
public static void sendSign(final @Nonnull EntryId entryId, final @Nonnull TileEntitySign sourceentity) {
entryId.toEntity(sourceentity);
sourceentity.markDirty();
final NetHandlerPlayClient nethandlerplayclient = Client.mc.getNetHandler();
if (nethandlerplayclient!=null)
nethandlerplayclient.addToSendQueue(new C12PacketUpdateSign(sourceentity.xCoord, sourceentity.yCoord, sourceentity.zCoord, sourceentity.signText));
sourceentity.setEditable(true);
}
示例3: onUpdate
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
@Override
public void onUpdate() {
if (WurstClient.INSTANCE.mods.getModByClass(YesCheatMod.class).isActive()) {
NetHandlerPlayClient sendQueue = Minecraft.getMinecraft().thePlayer.sendQueue;
sendQueue.addToSendQueue(
new C0BPacketEntityAction(Minecraft.getMinecraft().thePlayer, Action.START_SNEAKING));
sendQueue.addToSendQueue(
new C0BPacketEntityAction(Minecraft.getMinecraft().thePlayer, Action.STOP_SNEAKING));
} else {
Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(
new C0BPacketEntityAction(Minecraft.getMinecraft().thePlayer, Action.START_SNEAKING));
}
}
示例4: onGuiClosed
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
/**
* "Called when the screen is unloaded. Used to disable keyboard repeat events."
*/
public void onGuiClosed()
{
Keyboard.enableRepeatEvents(false);
NetHandlerPlayClient var1 = this.mc.getNetHandler();
if (var1 != null)
{
var1.addToSendQueue(new C12PacketUpdateSign(this.field_146848_f.field_145851_c, this.field_146848_f.field_145848_d, this.field_146848_f.field_145849_e, this.field_146848_f.field_145915_a));
}
this.field_146848_f.func_145913_a(true);
}
示例5: mineBlock
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
public void mineBlock(World world, int x, int y, int z, int meta, EntityPlayer player, Block block)
{
// Workaround for dropping experience
boolean silktouch = EnchantmentHelper.getSilkTouchModifier(player);
int fortune = EnchantmentHelper.getFortuneModifier(player);
int exp = block.getExpDrop(world, meta, fortune);
block.onBlockHarvested(world, x, y, z, meta, player);
if (block.removedByPlayer(world, player, x, y, z, true))
{
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
block.harvestBlock(world, player, x, y, z, meta);
// Workaround for dropping experience
if (!silktouch)
block.dropXpOnBlockBreak(world, x, y, z, exp);
if (world.isRemote)
{
INetHandler handler = FMLClientHandler.instance().getClientPlayHandler();
if (handler != null && handler instanceof NetHandlerPlayClient)
{
NetHandlerPlayClient handlerClient = (NetHandlerPlayClient) handler;
handlerClient.addToSendQueue(new C07PacketPlayerDigging(0, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
handlerClient.addToSendQueue(new C07PacketPlayerDigging(2, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
}
}
}
}
示例6: mineBlock
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
public void mineBlock(World world, int x, int y, int z, int meta, EntityPlayer player, Block block)
{
// Workaround for dropping experience
boolean silktouch = EnchantmentHelper.getSilkTouchModifier(player);
int fortune = EnchantmentHelper.getFortuneModifier(player);
int exp = block.getExpDrop(world, meta, fortune);
block.onBlockHarvested(world, x, y, z, meta, player);
if (block.removedByPlayer(world, player, x, y, z, true))
{
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
block.harvestBlock(world, player, x, y, z, meta);
// Workaround for dropping experience
if (!silktouch)
block.dropXpOnBlockBreak(world, x, y, z, exp);
if (world.isRemote)
{
INetHandler handler = FMLClientHandler.instance().getClientPlayHandler();
if (handler != null && handler instanceof NetHandlerPlayClient)
{
NetHandlerPlayClient handlerClient = (NetHandlerPlayClient) handler;
handlerClient.addToSendQueue(new C07PacketPlayerDigging(0, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
handlerClient.addToSendQueue(new C07PacketPlayerDigging(2, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
}
}
else if (Config.noisyBlocks)
{
world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
}
}
}
示例7: onGuiClosed
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
public void onGuiClosed()
{
Keyboard.enableRepeatEvents(false);
NetHandlerPlayClient nethandlerplayclient = this.mc.getNetHandler();
if (nethandlerplayclient != null)
{
nethandlerplayclient.addToSendQueue(new C12PacketUpdateSign(this.tileSign.xCoord, this.tileSign.yCoord, this.tileSign.zCoord, this.tileSign.signText));
}
this.tileSign.setEditable(true);
}
示例8: wakeFromSleep
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
private void wakeFromSleep()
{
NetHandlerPlayClient nethandlerplayclient = this.mc.thePlayer.sendQueue;
nethandlerplayclient.addToSendQueue(new C0BPacketEntityAction(this.mc.thePlayer, C0BPacketEntityAction.Action.STOP_SLEEPING));
}
示例9: switchJunction
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
public static void switchJunction(NetHandlerPlayClient net, boolean state) {
ensurePlay(net.getNetworkManager().channel());
net.addToSendQueue(state ? WRAP_ON_C : WRAP_OFF_C);
}
示例10: func_146418_g
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
private void func_146418_g()
{
NetHandlerPlayClient var1 = this.mc.thePlayer.sendQueue;
var1.addToSendQueue(new C0BPacketEntityAction(this.mc.thePlayer, 3));
}
示例11: func_146418_g
import net.minecraft.client.network.NetHandlerPlayClient; //導入方法依賴的package包/類
private void func_146418_g()
{
NetHandlerPlayClient nethandlerplayclient = this.mc.thePlayer.sendQueue;
nethandlerplayclient.addToSendQueue(new C0BPacketEntityAction(this.mc.thePlayer, 3));
}