本文整理汇总了Java中net.minecraft.util.ChunkCoordinates.set方法的典型用法代码示例。如果您正苦于以下问题:Java ChunkCoordinates.set方法的具体用法?Java ChunkCoordinates.set怎么用?Java ChunkCoordinates.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.util.ChunkCoordinates
的用法示例。
在下文中一共展示了ChunkCoordinates.set方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTrunkBlockPosBySide
import net.minecraft.util.ChunkCoordinates; //导入方法依赖的package包/类
public ChunkCoordinates getTrunkBlockPosBySide(World world, int x, int y, int z, int side) {
ChunkCoordinates ret = new ChunkCoordinates(x, y, z);
switch (side) {
case 5:
ret.set(x - 1, y, z);
return ret;
case 4:
ret.set(x + 1, y, z);
return ret;
case 2:
ret.set(x, y, z + 1);
return ret;
case 3:
ret.set(x, y, z - 1);
return ret;
}
return null;
}
示例2: getTrunkBlockPosByRotation
import net.minecraft.util.ChunkCoordinates; //导入方法依赖的package包/类
public ChunkCoordinates getTrunkBlockPosByRotation(World world, int x, int y, int z, int rotation) {
ChunkCoordinates ret = new ChunkCoordinates(x, y, z);
switch (rotation) {
case 1:
ret.set(x - 1, y, z);
return ret;
case 3:
ret.set(x + 1, y, z);
return ret;
case 0:
ret.set(x, y, z + 1);
return ret;
case 2:
ret.set(x, y, z - 1);
return ret;
}
return null;
}
示例3: handle
import net.minecraft.util.ChunkCoordinates; //导入方法依赖的package包/类
@Override
public void handle(ByteBuf in, EntityPlayer player) {
int dimension = in.readInt();
int posX = in.readInt();
int posY = in.readInt();
int posZ = in.readInt();
int skylightSubtracted = in.readInt();
float thunderingStrength = in.readFloat();
float rainingStrength = in.readFloat();
long worldTime = in.readLong();
WorldClient proxyworld = ProxyWorldManager.getProxyworld(dimension);
if (proxyworld == null) return;
if (proxyworld.provider.dimensionId != dimension) return;
ChunkCoordinates cc = new ChunkCoordinates();
cc.set(posX, posY, posZ);
Collection<WorldView> views = ProxyWorldManager.getWorldViews(dimension);
for (WorldView view : views) {
view.updateWorldSpawn(cc);
}
proxyworld.setSpawnLocation(posX, posY, posZ);
proxyworld.skylightSubtracted = skylightSubtracted;
proxyworld.thunderingStrength = thunderingStrength;
proxyworld.setRainStrength(rainingStrength);
proxyworld.setWorldTime(worldTime);
}