Class ExpandFallingBlockEntity

java.lang.Object
com.blamejared.crafttweaker.natives.entity.type.misc.ExpandFallingBlockEntity

@ZenRegister public class ExpandFallingBlockEntity extends Object
DocParam:
this FallingBlockEntity.fall(level, new BlockPos(1, 2, 3), <blockstate:minecraft:dirt>)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    callOnBrokenAfterFall(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.world.level.block.Block fallableBlock, net.minecraft.core.BlockPos position)
    Triggers the given Fallable's onBrokenAfterFall method using this entity.
    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.
    static net.minecraft.world.level.block.state.BlockState
    getBlockState(net.minecraft.world.entity.item.FallingBlockEntity internal)
    Gets the BlockState of this falling entity.
    static net.minecraft.core.BlockPos
    getStartPos(net.minecraft.world.entity.item.FallingBlockEntity internal)
    Gets the position that this entity was spawned at.
    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.
    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.
    static void
    setStartPos(net.minecraft.world.entity.item.FallingBlockEntity internal, net.minecraft.core.BlockPos pos)
    Sets the position that this entity was spawned at.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 <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 given Fallable's onBrokenAfterFall method using this entity.
      Parameters:
      fallableBlock - The fallable block.
      position - The position that the block fell at.
      DocParam:
      fallableBlock <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.