本文整理匯總了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);
}