MainProxy.sendPacketToAllWatchingChunk(this.container.xCoord, this.container.zCoord, MainProxy.getDimensionForWorld(this.getWorld()), (PacketHandler.getPacket(PipePositionPacket.class).setSpeed(item.getSpeed()).setPosition(item.getPosition()).setInput(item.input).setOutput(item.output).setTravelId(item.getId()).setTilePos(container)));
}
public void handleItemPositionPacket(int travelId, ForgeDirection input, ForgeDirection output, float speed, float position) {
WeakReference<LPTravelingItemClient> ref = LPTravelingItem.clientList.get(travelId);
LPTravelingItemClient item = null;
if(ref != null) item = ref.get();
if(item == null) {
sendItemContentRequest(travelId);
item = new LPTravelingItemClient(travelId, position, input, output);
item.setSpeed(speed);
LPTravelingItem.clientList.put(travelId, new WeakReference<LPTravelingItemClient>(item));
} else {
if(item.getContainer() instanceof LogisticsTileGenericPipe) {
((PipeTransportLogistics)((LogisticsTileGenericPipe)item.getContainer()).pipe.transport).items.scheduleRemoval(item);
((PipeTransportLogistics)((LogisticsTileGenericPipe)item.getContainer()).pipe.transport).items.removeScheduledItems();
}
item.updateInformation(input, output, speed, position);
}
//update lastTicked so we don't double-move items
item.lastTicked = MainProxy.getGlobalTick();
if(items.get(travelId) == null) {
items.add(item);