@Override
public void updateEntity(@Nonnull World world) {
super.updateEntity(world);
if (world.isRemote) {
return;
}
// filledFromThisTick.clear();
updateStartPushDir();
doExtract();
if (stateDirty) {
getBundle().dirty();
stateDirty = false;
lastSyncRatio = tank.getFilledRatio();
} else if ((lastSyncRatio != tank.getFilledRatio() && world.getTotalWorldTime() % 2 == 0)) {
// need to send a custom packet as we don't want want to trigger a full chunk update, just
// need to get the required values to the entity renderer
BlockPos pos = getBundle().getLocation();
PacketHandler.INSTANCE.sendToAllAround(new PacketConduitFluidLevel(this),
new TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64));
lastSyncRatio = tank.getFilledRatio();
}
}
LiquidConduit.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:EnderIO
作者:
评论列表
文章目录