Java Code Examples for codechicken.lib.packet.PacketCustom#sendToChunk()
The following examples show how to use
codechicken.lib.packet.PacketCustom#sendToChunk() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TileEnderChest.java From EnderStorage with MIT License | 5 votes |
@Override public boolean rotate() { if (!world.isRemote) { rotation = (rotation + 1) % 4; PacketCustom.sendToChunk(getUpdatePacket(), world, pos.getX() >> 4, pos.getZ() >> 4); } return true; }
Example 2
Source File: TileEnderTank.java From EnderStorage with MIT License | 5 votes |
@Override public boolean rotate() { if (!world.isRemote) { rotation = (rotation + 1) % 4; PacketCustom.sendToChunk(getUpdatePacket(), world, pos.getX() >> 4, pos.getZ() >> 4); } return true; }
Example 3
Source File: TileEnderTank.java From EnderStorage with MIT License | 5 votes |
@Override public void sendSyncPacket() { PacketCustom packet = new PacketCustom(EnderStorageNetwork.NET_CHANNEL, 5); packet.writePos(getPos()); packet.writeFluidStack(s_liquid); packet.sendToChunk(TileEnderTank.this); }
Example 4
Source File: TileEnderChest.java From EnderStorage with MIT License | 5 votes |
@Override public boolean rotate() { if(!worldObj.isRemote) { rotation = (rotation+1)%4; PacketCustom.sendToChunk(getDescriptionPacket(), worldObj, xCoord>>4, zCoord>>4); } return true; }
Example 5
Source File: TileEnderTank.java From EnderStorage with MIT License | 5 votes |
@Override public void sendSyncPacket() { PacketCustom packet = new PacketCustom(EnderStorageSPH.channel, 5); packet.writeCoord(xCoord, yCoord, zCoord); packet.writeFluidStack(s_liquid); packet.sendToChunk(worldObj, xCoord >> 4, zCoord >> 4); }
Example 6
Source File: TileEnderTank.java From EnderStorage with MIT License | 5 votes |
@Override public boolean rotate() { if (!worldObj.isRemote) { rotation = (rotation + 1) % 4; PacketCustom.sendToChunk(getDescriptionPacket(), worldObj, xCoord >> 4, zCoord >> 4); } return true; }
Example 7
Source File: TileLiquidTranslocator.java From Translocators with MIT License | 5 votes |
private void sendTransferPacket(ArrayList<LiquidTransfer> transfers) { PacketCustom packet = new PacketCustom(TranslocatorSPH.channel, 2); packet.writeCoord(xCoord, yCoord, zCoord); packet.writeByte(transfers.size()); for(LiquidTransfer t : transfers) { packet.writeByte(t.key); packet.writeFluidStack(t.liquid); } packet.sendToChunk(worldObj, xCoord>>4, zCoord>>4); }
Example 8
Source File: TileItemTranslocator.java From Translocators with MIT License | 5 votes |
private void sendTransferPacket(int i, int j, ItemStack add) { PacketCustom packet = new PacketCustom(TranslocatorSPH.channel, 2); packet.writeCoord(xCoord, yCoord, zCoord); packet.writeByte(i << 4 | j); packet.writeItemStack(add); packet.sendToChunk(worldObj, xCoord>>4, zCoord>>4); }
Example 9
Source File: WRAddonSPH.java From WirelessRedstone with MIT License | 5 votes |
public static void sendSpawnREP(EntityREP activeREP) { PacketCustom packet = new PacketCustom(WirelessRedstoneCore.channel, 59); packet.writeBoolean(true); packet.writeInt(activeREP.getEntityId()); packet.writeInt(activeREP.shootingEntity.getEntityId()); packet.sendToChunk(activeREP.worldObj, (int) activeREP.posX >> 4, (int) activeREP.posZ >> 4); }
Example 10
Source File: WRAddonSPH.java From WirelessRedstone with MIT License | 5 votes |
public static void sendKillREP(EntityREP entityREP) { PacketCustom packet = new PacketCustom(WirelessRedstoneCore.channel, 59); packet.writeBoolean(false); packet.writeInt(entityREP.getEntityId()); packet.sendToChunk(entityREP.worldObj, (int) entityREP.posX >> 4, (int) entityREP.posZ >> 4); }
Example 11
Source File: WRAddonSPH.java From WirelessRedstone with MIT License | 5 votes |
public static void sendThrowTracker(EntityWirelessTracker tracker, EntityPlayer thrower) { PacketCustom packet = new PacketCustom(WirelessRedstoneCore.channel, 61); packet.writeBoolean(true); packet.writeInt(tracker.getEntityId()); packet.writeInt(thrower.getEntityId()); packet.writeShort(tracker.freq); packet.sendToChunk(thrower.worldObj, (int) thrower.posX >> 4, (int) thrower.posZ >> 4); }
Example 12
Source File: WRCoreSPH.java From WirelessRedstone with MIT License | 5 votes |
public static void sendWirelessBolt(WirelessBolt bolt) { PacketCustom packet = new PacketCustom(WirelessRedstoneCore.channel, 8); packet.writeFloat((float) bolt.start.x); packet.writeFloat((float) bolt.start.y); packet.writeFloat((float) bolt.start.z); packet.writeFloat((float) bolt.end.x); packet.writeFloat((float) bolt.end.y); packet.writeFloat((float) bolt.end.z); packet.writeLong(bolt.seed); packet.sendToChunk(bolt.world, (int) bolt.start.x >> 4, (int) bolt.start.z >> 4); }
Example 13
Source File: TileEnderTank.java From EnderStorage with MIT License | 4 votes |
private void sendSyncPacket() { PacketCustom packet = new PacketCustom(EnderStorageNetwork.NET_CHANNEL, 6); packet.writePos(getPos()); packet.writeBoolean(a_pressure); packet.sendToChunk(TileEnderTank.this); }
Example 14
Source File: TileEnderTank.java From EnderStorage with MIT License | 4 votes |
private void sendSyncPacket() { PacketCustom packet = new PacketCustom(EnderStorageSPH.channel, 6); packet.writeCoord(xCoord, yCoord, zCoord); packet.writeBoolean(a_pressure); packet.sendToChunk(worldObj, xCoord >> 4, zCoord >> 4); }