Package noppes.npcs.api
Interface IBlock
- 
- All Known Subinterfaces:
- IBlockScripted
 
 public interface IBlock
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanCollide()booleancanCollide(double maxVolume)doublegetBlockBoundsMaxX()doublegetBlockBoundsMaxY()doublegetBlockBoundsMaxZ()doublegetBlockBoundsMinX()doublegetBlockBoundsMinY()doublegetBlockBoundsMinZ()IContainergetContainer()java.lang.StringgetDisplayName()net.minecraft.block.BlockgetMCBlock()net.minecraft.tileentity.TileEntitygetMCTileEntity()java.lang.StringgetName()IPosgetPosition()ITileEntitygetTileEntity()INbtgetTileEntityNBT()IWorldgetWorld()intgetX()intgetY()intgetZ()booleanhasTileEntity()booleanisAir()booleanisContainer()voidremove()Deletes the block, setting it to air.IBlocksetBlock(java.lang.String blockName)IBlocksetBlock(IBlock block)voidsetBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)booleansetPosition(int x, int y, int z)booleansetPosition(int x, int y, int z, IWorld world)booleansetPosition(IPos pos)booleansetPosition(IPos pos, IWorld world)Moves the block to a new position in the given world.voidsetTileEntity(ITileEntity tileEntity)
 
- 
- 
- 
Method Detail- 
getXint getX() 
 - 
getYint getY() 
 - 
getZint getZ() 
 - 
getPositionIPos getPosition() - Returns:
- An IPos object with the block's XYZ position.
 
 - 
setPositionboolean setPosition(IPos pos, IWorld world) Moves the block to a new position in the given world. The old position is replaced with air.- Parameters:
- pos- The new position of the block
- world- The destination world of the block
- Returns:
- Whether the block was successfully placed
 
 - 
setPositionboolean setPosition(IPos pos) 
 - 
setPositionboolean setPosition(int x, int y, int z, IWorld world)
 - 
setPositionboolean setPosition(int x, int y, int z)
 - 
getNamejava.lang.String getName() - Returns:
- The block name as it appears in the block registry. Return example: "minecraft:stone"
 
 - 
removevoid remove() Deletes the block, setting it to air.
 - 
isAirboolean isAir() 
 - 
setBlockIBlock setBlock(java.lang.String blockName) - Parameters:
- blockName- The name of the block to be set in place of this block.
- Returns:
- The new block set in place of this block as an IBlock object.
 
 - 
setBlockIBlock setBlock(IBlock block) - Parameters:
- block- Input IBlock object to replace this block.
- Returns:
- The new block set in place of the previous block.
 
 - 
isContainerboolean isContainer() - Returns:
- True if the block can contain items like a chest does.
 
 - 
getContainerIContainer getContainer() - Returns:
- The container object of this block. If this block is not a container, an exception will be thrown.
 
 - 
getWorldIWorld getWorld() - Returns:
- An IWorld object of the world this block is in.
 
 - 
hasTileEntityboolean hasTileEntity() - Returns:
- True if this block has a tile entity. Blocks with custom data like signs, player skulls, chests, etc. will have tile entities.
 
 - 
getTileEntityITileEntity getTileEntity() - Returns:
- An ITileEntity object which can modify this block's tile entity.
 
 - 
setTileEntityvoid setTileEntity(ITileEntity tileEntity) - Parameters:
- tileEntity- Replaces this block's tile entity based on the data given by this parameter.
 
 - 
getMCTileEntitynet.minecraft.tileentity.TileEntity getMCTileEntity() - Returns:
- An obfuscated MC object for the block's tile entity.
 
 - 
getMCBlocknet.minecraft.block.Block getMCBlock() - Returns:
- An obfuscated MC block object.
 
 - 
getDisplayNamejava.lang.String getDisplayName() 
 - 
getTileEntityNBTINbt getTileEntityNBT() - Returns:
- An INbt object which can modify the block's tile entity's NBT data.
 
 - 
canCollideboolean canCollide(double maxVolume) - Parameters:
- maxVolume- The volume threshold to determine whether this block's bounding box collides, if it has one.
- Returns:
- Whether this block can be collided with
 
 - 
canCollideboolean canCollide() 
 - 
setBoundsvoid setBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
 - 
getBlockBoundsMinXdouble getBlockBoundsMinX() 
 - 
getBlockBoundsMinYdouble getBlockBoundsMinY() 
 - 
getBlockBoundsMinZdouble getBlockBoundsMinZ() 
 - 
getBlockBoundsMaxXdouble getBlockBoundsMaxX() 
 - 
getBlockBoundsMaxYdouble getBlockBoundsMaxY() 
 - 
getBlockBoundsMaxZdouble getBlockBoundsMaxZ() 
 
- 
 
-