public class WPObjectUtils
extends java.lang.Object
Constructor and Description |
---|
WPObjectUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
placeBlock(MinecraftWorld world,
int x,
int y,
int height,
Material material,
int leafDecayMode,
boolean waterloggedLeaves,
boolean connectBlocks,
boolean manageWaterlogged)
Place a block in a
MinecraftWorld , taking into account what is already there, and automatically managing
a number of material aspects. |
static boolean |
wouldConnect(Material blockTypeOne,
Material blockTypeTwo)
Determine whether two blocks would connect to each other in some way (forming a fence, for instance).
|
public static void placeBlock(MinecraftWorld world, int x, int y, int height, Material material, int leafDecayMode, boolean waterloggedLeaves, boolean connectBlocks, boolean manageWaterlogged)
MinecraftWorld
, taking into account what is already there, and automatically managing
a number of material aspects.world
- The world in which to place the block.x
- The X coordinate at which to place the block.y
- The Y coordinate (Z in Minecraft) at which to place the block.height
- The height (Y coordinate in Minecraft) at which to place the block.material
- The material to place.leafDecayMode
- The leaf decay mode to apply, as one of the LEAF_DECAY_*
constants in WPObject
.waterloggedLeaves
- Whether the platform to which the block will be exported supports waterlogged leaf blocks.connectBlocks
- Whether any connections of the block (such as fence posts might make) to surrounding objects should be automatically managed.manageWaterlogged
- Whether the waterlogged
property of the block should be automatically adjusted according to whether the existing block contains wate.