Class McBlock
java.lang.Object
com.shanebeestudios.nms.api.world.block.McBlock
Wrapper for Minecraft Block
 
Provides easy-to-use mapped methods for Blocks
Keep in mind, a Minecraft Block differs from a Bukkit Block, A Minecraft Block is actually a TYPE, not a reference to a block in the world.
- 
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.item.ItemasItem()Get the Item version of this BlockfloatGet the explosion resistance of this BlockfloatGet the friction of this BlockfloatGet the jump factor of this BlockfloatGet the speed factor of this BlockbooleanCheck if this Block has collisionbooleanCheck if this Block is destroyablestatic McBlockwrap(net.minecraft.world.level.block.Block block) Wrap a Minecraft Block as an McBlockstatic McBlockWrap a Bukkit Block as an McBlock 
- 
Method Details
- 
wrap
Wrap a Minecraft Block as an McBlock- Parameters:
 block- Minecraft block to wrap- Returns:
 - Wrapper for Minecraft Block
 
 - 
wrap
Wrap a Bukkit Block as an McBlockBeing different Block classes, this essentially grabs the type of a Bukkit Block
- Parameters:
 bukkitBlock- Bukkit Block to wrap- Returns:
 - Wrapper for Minecraft Block
 
 - 
asItem
@Nullable public @Nullable net.minecraft.world.item.Item asItem()Get the Item version of this Block- Returns:
 - Item version of this Block
 
 - 
getFriction
public float getFriction()Get the friction of this Block- Returns:
 - Friction of this block
 
 - 
getExplosionResistance
public float getExplosionResistance()Get the explosion resistance of this Block- Returns:
 - Explosion resistance of this Block
 
 - 
getJumpFactor
public float getJumpFactor()Get the jump factor of this Block- Returns:
 - Jump factor of this Block
 
 - 
getSpeedFactor
public float getSpeedFactor()Get the speed factor of this Block- Returns:
 - Speed factor of this Block
 
 - 
hasCollision
public boolean hasCollision()Check if this Block has collision- Returns:
 - True if Block has collision
 
 - 
isDestroyable
public boolean isDestroyable()Check if this Block is destroyable- Returns:
 - True if Block is destroyable
 
 
 -