本文整理汇总了Java中net.minecraft.network.play.server.S22PacketMultiBlockChange.func_148921_d方法的典型用法代码示例。如果您正苦于以下问题:Java S22PacketMultiBlockChange.func_148921_d方法的具体用法?Java S22PacketMultiBlockChange.func_148921_d怎么用?Java S22PacketMultiBlockChange.func_148921_d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.network.play.server.S22PacketMultiBlockChange
的用法示例。
在下文中一共展示了S22PacketMultiBlockChange.func_148921_d方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleMultiBlockChange
import net.minecraft.network.play.server.S22PacketMultiBlockChange; //导入方法依赖的package包/类
/**
* Received from the servers PlayerManager if between 1 and 64 blocks in a chunk are changed. If only one block
* requires an update, the server sends S23PacketBlockChange and if 64 or more blocks are changed, the server sends
* S21PacketChunkData
*/
public void handleMultiBlockChange(S22PacketMultiBlockChange p_147287_1_)
{
int var2 = p_147287_1_.func_148920_c().chunkXPos * 16;
int var3 = p_147287_1_.func_148920_c().chunkZPos * 16;
if (p_147287_1_.func_148921_d() != null)
{
DataInputStream var4 = new DataInputStream(new ByteArrayInputStream(p_147287_1_.func_148921_d()));
try
{
for (int var5 = 0; var5 < p_147287_1_.func_148922_e(); ++var5)
{
short var6 = var4.readShort();
short var7 = var4.readShort();
int var8 = var7 >> 4 & 4095;
int var9 = var7 & 15;
int var10 = var6 >> 12 & 15;
int var11 = var6 >> 8 & 15;
int var12 = var6 & 255;
this.clientWorldController.func_147492_c(var10 + var2, var12, var11 + var3, Block.getBlockById(var8), var9);
}
}
catch (IOException var13)
{
;
}
}
}
示例2: handleMultiBlockChange
import net.minecraft.network.play.server.S22PacketMultiBlockChange; //导入方法依赖的package包/类
public void handleMultiBlockChange(S22PacketMultiBlockChange p_147287_1_)
{
int i = p_147287_1_.func_148920_c().chunkXPos * 16;
int j = p_147287_1_.func_148920_c().chunkZPos * 16;
if (p_147287_1_.func_148921_d() != null)
{
DataInputStream datainputstream = new DataInputStream(new ByteArrayInputStream(p_147287_1_.func_148921_d()));
try
{
for (int k = 0; k < p_147287_1_.func_148922_e(); ++k)
{
short short1 = datainputstream.readShort();
short short2 = datainputstream.readShort();
int l = short2 >> 4 & 4095;
int i1 = short2 & 15;
int j1 = short1 >> 12 & 15;
int k1 = short1 >> 8 & 15;
int l1 = short1 & 255;
this.clientWorldController.func_147492_c(j1 + i, l1, k1 + j, Block.getBlockById(l), i1);
}
}
catch (IOException ioexception)
{
;
}
}
}