void shareTransforms() {
boolean needSync = (transformSynced.getGrandUnifiedDistance(transform) != 0 || velocitySynced.getGrandUnifiedDistance(velocity) != 0) && !hasOrders();
if (!needSync) return;
try {
ByteBuf output = Unpooled.buffer();
Core.network.prefixEntityPacket(output, this, SyncMessages.TRANSFORMS);
putTransforms(new DataOutByteBuf(output, Side.SERVER));
FMLProxyPacket toSend = Core.network.entityPacket(output);
Core.network.broadcastPacket(null, new Coord(this), toSend);
} catch (IOException e) {
e.printStackTrace();
return;
}
transformSynced = transform.copy();
velocitySynced = velocity.copy();
}
DimensionSliceEntity.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:Factorization
作者:
评论列表
文章目录