Class PoleHelper<T extends Comparable<T>>

java.lang.Object
com.simibubi.create.foundation.placement.PoleHelper<T>
All Implemented Interfaces:
net.createmod.catnip.placement.IPlacementHelper
Direct Known Subclasses:
GantryShaftBlock.PlacementHelper, PistonExtensionPoleBlock.PlacementHelper

public abstract class PoleHelper<T extends Comparable<T>> extends Object implements net.createmod.catnip.placement.IPlacementHelper
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction.Axis>
     
    protected final net.minecraft.world.level.block.state.properties.Property<T>
     
    protected final Predicate<net.minecraft.world.level.block.state.BlockState>
     

    Fields inherited from interface net.createmod.catnip.placement.IPlacementHelper

    ID
  • Constructor Summary

    Constructors
    Constructor
    Description
    PoleHelper(Predicate<net.minecraft.world.level.block.state.BlockState> statePredicate, Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction.Axis> axisFunction, net.minecraft.world.level.block.state.properties.Property<T> property)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    attachedPoles(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction)
     
    net.createmod.catnip.placement.PlacementOffset
    getOffset(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.BlockHitResult ray)
     
    Predicate<net.minecraft.world.level.block.state.BlockState>
     
    boolean
    matchesAxis(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction.Axis axis)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.createmod.catnip.placement.IPlacementHelper

    displayGhost, getItemPredicate, getOffset, matchesItem, matchesState, renderAt
  • Field Details

    • statePredicate

      protected final Predicate<net.minecraft.world.level.block.state.BlockState> statePredicate
    • property

      protected final net.minecraft.world.level.block.state.properties.Property<T extends Comparable<T>> property
    • axisFunction

      protected final Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction.Axis> axisFunction
  • Constructor Details

    • PoleHelper

      public PoleHelper(Predicate<net.minecraft.world.level.block.state.BlockState> statePredicate, Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.core.Direction.Axis> axisFunction, net.minecraft.world.level.block.state.properties.Property<T> property)
  • Method Details

    • matchesAxis

      public boolean matchesAxis(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction.Axis axis)
    • attachedPoles

      public int attachedPoles(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction)
    • getStatePredicate

      public Predicate<net.minecraft.world.level.block.state.BlockState> getStatePredicate()
      Specified by:
      getStatePredicate in interface net.createmod.catnip.placement.IPlacementHelper
    • getOffset

      public net.createmod.catnip.placement.PlacementOffset getOffset(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.BlockHitResult ray)
      Specified by:
      getOffset in interface net.createmod.catnip.placement.IPlacementHelper