Class ExpandPistonEvent
java.lang.Object
com.blamejared.crafttweaker.natives.event.block.piston.ExpandPistonEvent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.DirectiongetDirection(net.minecraftforge.event.level.PistonEvent internal) Gets the direction that the piston is facing.static net.minecraft.core.BlockPosgetFaceOffsetPos(net.minecraftforge.event.level.PistonEvent internal) Gets the position that the piston is facing towards.static net.minecraft.world.level.LevelgetLevel(net.minecraftforge.event.level.BlockEvent internal) static net.minecraftforge.event.level.PistonEvent.PistonMoveTypegetPistonMoveType(net.minecraftforge.event.level.PistonEvent internal) Gets the move type of the piston (is it extending or retracting).static net.minecraft.world.level.block.piston.PistonStructureResolvergetStructureHelper(net.minecraftforge.event.level.PistonEvent internal) Gets a **nullable** structure resolver that can be used to get all the blocks that will be affected by the piston.
-
Constructor Details
-
ExpandPistonEvent
public ExpandPistonEvent()
-
-
Method Details
-
getLevel
public static net.minecraft.world.level.Level getLevel(net.minecraftforge.event.level.BlockEvent internal) -
getDirection
public static net.minecraft.core.Direction getDirection(net.minecraftforge.event.level.PistonEvent internal) Gets the direction that the piston is facing.- Returns:
- the direction tha the piston is facing.
-
getFaceOffsetPos
public static net.minecraft.core.BlockPos getFaceOffsetPos(net.minecraftforge.event.level.PistonEvent internal) Gets the position that the piston is facing towards.- Returns:
- The position that the piston is facing towards.
-
getPistonMoveType
public static net.minecraftforge.event.level.PistonEvent.PistonMoveType getPistonMoveType(net.minecraftforge.event.level.PistonEvent internal) Gets the move type of the piston (is it extending or retracting).- Returns:
- The move type of the piston.
-
getStructureHelper
public static net.minecraft.world.level.block.piston.PistonStructureResolver getStructureHelper(net.minecraftforge.event.level.PistonEvent internal) Gets a **nullable** structure resolver that can be used to get all the blocks that will be affected by the piston.Be sure to call the `resolve()` method on the structure resolver
- Returns:
- A structure resolver.
-