Class ExpandPistonStructureResolver
java.lang.Object
com.blamejared.crafttweaker.natives.block.type.piston.ExpandPistonStructureResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.DirectiongetPushDirection(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Gets the direction that the piston is moving.static List<net.minecraft.core.BlockPos>getToDestroy(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Gets the blocks that will be destroyed by pushing the piston.static List<net.minecraft.core.BlockPos>getToPush(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Gets the blocks that will be pushed.static booleanresolve(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Calculates and caches the blocks to push and the blocks to destroy.
-
Constructor Details
-
ExpandPistonStructureResolver
public ExpandPistonStructureResolver()
-
-
Method Details
-
resolve
public static boolean resolve(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Calculates and caches the blocks to push and the blocks to destroy.- Returns:
- True if blocks should move, false otherwise
-
getPushDirection
public static net.minecraft.core.Direction getPushDirection(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Gets the direction that the piston is moving.This is usually the direction that the piston block is facing, however if the piston is retracting, the direction is the opposite.
- Returns:
- The direction that the piston is moving.
-
getToPush
public static List<net.minecraft.core.BlockPos> getToPush(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Gets the blocks that will be pushed.- Returns:
- The blocks that will be pushed.
-
getToDestroy
public static List<net.minecraft.core.BlockPos> getToDestroy(net.minecraft.world.level.block.piston.PistonStructureResolver internal) Gets the blocks that will be destroyed by pushing the piston.- Returns:
- The blocks that will be destroyed.
-