Class ExpandFallingBlockEntity
java.lang.Object
com.blamejared.crafttweaker.natives.entity.type.misc.ExpandFallingBlockEntity
- DocParam:
- this FallingBlockEntity.fall(level, new BlockPos(1, 2, 3), invalid input: '<'blockstate:minecraft:dirt>)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcallOnBrokenAfterFall(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.world.level.block.Block fallableBlock, net.minecraft.core.BlockPos position) Triggers the givenFallable'sonBrokenAfterFallmethod using this entity.static net.minecraft.world.entity.item.FallingBlockEntityfall(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Spawns a new falling block entity at the given position with the given blockstate.static net.minecraft.world.level.block.state.BlockStategetBlockState(net.minecraft.world.entity.item.FallingBlockEntity internal) Gets the BlockState of this falling entity.static net.minecraft.core.BlockPosgetStartPos(net.minecraft.world.entity.item.FallingBlockEntity internal) Gets the position that this entity was spawned at.static voidsetBlockState(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.world.level.block.state.BlockState state) Sets the BlockState of this falling entity.static voidsetHurtsEntities(net.minecraft.world.entity.item.FallingBlockEntity internal, float damagePerDistance, int maxDamage) Sets that entities should be hurt by this block, as well as setting how much damage is done.static voidsetStartPos(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.core.BlockPos pos) Sets the position that this entity was spawned at.
-
Constructor Details
-
ExpandFallingBlockEntity
public ExpandFallingBlockEntity()
-
-
Method Details
-
fall
public static net.minecraft.world.entity.item.FallingBlockEntity fall(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Spawns a new falling block entity at the given position with the given blockstate.- Parameters:
level- The level to spawn the entity in.pos- The position to spawn the entity at.state- The blockstate of the falling block.- Returns:
- The entity that was spawned.
- DocParam:
- level level, pos new BlockPos(1, 2, 3), state invalid input: '<'blockstate:minecraft:dirt>
-
setStartPos
public static void setStartPos(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.core.BlockPos pos) Sets the position that this entity was spawned at.this is mainly used for the rendering of the entity
- Parameters:
pos- the position that the entity was spawned at.- DocParam:
- pos new BlockPos(1, 2, 3)
-
getStartPos
public static net.minecraft.core.BlockPos getStartPos(net.minecraft.world.entity.item.FallingBlockEntity internal) Gets the position that this entity was spawned at.- Returns:
- The position that the entity was spawned at.
-
callOnBrokenAfterFall
public static void callOnBrokenAfterFall(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.world.level.block.Block fallableBlock, net.minecraft.core.BlockPos position) Triggers the givenFallable'sonBrokenAfterFallmethod using this entity.- Parameters:
fallableBlock- The fallable block.position- The position that the block fell at.- DocParam:
- fallableBlock invalid input: '<'block:minecraft:sand>, position new BlockPos(1, 2, 3)
-
setHurtsEntities
public static void setHurtsEntities(net.minecraft.world.entity.item.FallingBlockEntity internal, float damagePerDistance, int maxDamage) Sets that entities should be hurt by this block, as well as setting how much damage is done.- Parameters:
damagePerDistance- The damage done per distance fell.maxDamage- The max amount of damage that can be caused by this entity.- DocParam:
- damagePerDistance 0.5, maxDamage 5
-
getBlockState
public static net.minecraft.world.level.block.state.BlockState getBlockState(net.minecraft.world.entity.item.FallingBlockEntity internal) Gets the BlockState of this falling entity.- Returns:
- The BlockState of this falling entity
-
setBlockState
public static void setBlockState(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.world.level.block.state.BlockState state) Sets the BlockState of this falling entity.
-