Class AbstractPneumaticCraftBlock

java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
me.desht.pneumaticcraft.common.block.AbstractPneumaticCraftBlock
All Implemented Interfaces:
IPneumaticWrenchable, IPneumaticCraftProbeable, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeBlock
Direct Known Subclasses:
AbstractAssemblyIOUnitBlock, AbstractCamouflageBlock, AbstractPressureWallBlock, AerialInterfaceBlock, AirCannonBlock, AirCompressorBlock, AphorismTileBlock, AssemblyControllerBlock, AssemblyDrillBlock, AssemblyLaserBlock, AssemblyPlatformBlock, CompressedIronBlock, CreativeCompressedIronBlock, CreativeCompressorBlock, DisplayTableBlock, DrillPipeBlock, DroneInterfaceBlock, ElectrostaticCompressorBlock, ElevatorFrameBlock, EmptySpawnerBlock, EtchingTankBlock, FluidMixerBlock, FluidTankBlock, FluxCompressorBlock, GasLiftBlock, HeatSinkBlock, KeroseneLampBlock, LiquidCompressorBlock, OmnidirectionalHopperBlock, PneumaticDoorBlock, PneumaticDynamoBlock, PressureChamberInterfaceBlock, PressureChamberValveBlock, PressurizedSpawnerBlock, ProgrammableControllerBlock, ProgrammerBlock, RefineryControllerBlock, RefineryOutputBlock, ReinforcedChestBlock, SecurityStationBlock, SentryTurretBlock, SmartChestBlock, SpawnerExtractorBlock, ThermalCompressorBlock, ThermalLaggingBlock, ThermopneumaticProcessingPlantBlock, TubeJunctionBlock, UniversalSensorBlock, UVLightBoxBlock, VacuumPumpBlock, VacuumTrapBlock, VortexTubeBlock, WallLampBlock

public abstract class AbstractPneumaticCraftBlock extends net.minecraft.world.level.block.Block implements IPneumaticWrenchable, IPneumaticCraftProbeable
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block

    net.minecraft.world.level.block.Block.BlockStatePairKey

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    net.minecraft.world.level.block.state.BlockBehaviour.BlockStateBase, net.minecraft.world.level.block.state.BlockBehaviour.OffsetType, net.minecraft.world.level.block.state.BlockBehaviour.Properties, net.minecraft.world.level.block.state.BlockBehaviour.StateArgumentPredicate<A extends Object>, net.minecraft.world.level.block.state.BlockBehaviour.StatePredicate
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.level.block.state.properties.BooleanProperty[]
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     
    static final net.minecraft.world.level.block.state.properties.BooleanProperty
     

    Fields inherited from class net.minecraft.world.level.block.Block

    BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPS, UPDATE_SUPPRESS_LIGHT

    Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractPneumaticCraftBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addExtraInformation(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.BlockGetter world, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.item.TooltipFlag flag)
     
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.BlockGetter world, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.item.TooltipFlag flag)
     
    protected boolean
     
    static net.minecraft.world.level.block.state.properties.BooleanProperty
    connectionProperty(net.minecraft.core.Direction dir)
     
    protected void
    createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> builder)
     
    protected void
    doOpenGui(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.level.block.entity.BlockEntity te)
    Default open gui method just sends the BE's blockpos.
    int
    getAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos)
     
    net.minecraft.world.level.block.RenderShape
    getRenderShape(net.minecraft.world.level.block.state.BlockState state)
     
    net.minecraft.core.Direction
    getRotation(net.minecraft.world.level.block.state.BlockState state)
     
    protected net.minecraft.core.Direction
    getRotation(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos)
     
    net.minecraft.world.level.block.state.BlockState
    getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext ctx)
     
    boolean
    hasAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState pState)
     
    boolean
    isPathfindable(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.pathfinder.PathComputationType type)
     
    boolean
     
    net.minecraft.world.level.block.state.BlockState
    mirror(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Mirror mirrorIn)
     
    void
    neighborChanged(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Block block, net.minecraft.core.BlockPos fromPos, boolean isMoving)
     
    void
    onNeighborChange(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos tilePos)
     
    void
    onRemove(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState newState, boolean isMoving)
     
    boolean
    onWrenched(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, net.minecraft.world.InteractionHand hand)
     
    void
    playerDestroy(net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.entity.BlockEntity te, net.minecraft.world.item.ItemStack stack)
     
    protected boolean
    Does the block face the same way as the player when placed, or opposite?
    net.minecraft.world.level.block.state.BlockState
    rotate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation)
     
    protected boolean
    rotateCustom(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side)
    Can be overridden to implement custom rotation behaviour for a block.
    protected boolean
     
    void
    setPlacedBy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
     
    protected void
    setRotation(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction rotation)
     
    net.minecraft.world.level.block.state.BlockState
    updateShape(net.minecraft.world.level.block.state.BlockState stateIn, net.minecraft.core.Direction facing, net.minecraft.world.level.block.state.BlockState facingState, net.minecraft.world.level.LevelAccessor worldIn, net.minecraft.core.BlockPos currentPos, net.minecraft.core.BlockPos facingPos)
     
    net.minecraft.world.InteractionResult
    use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult brtr)
     

    Methods inherited from class net.minecraft.world.level.block.Block

    animateTick, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf

    Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour

    attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMaterialColor, entityInside, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getPistonPushReaction, getSeed, getShadeBrightness, getShape, getSignal, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, onPlace, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusion

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock

    addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
  • Field Details

    • UP

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty UP
    • DOWN

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty DOWN
    • NORTH

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty NORTH
    • EAST

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty EAST
    • SOUTH

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty SOUTH
    • WEST

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty WEST
    • CONNECTION_PROPERTIES

      public static final net.minecraft.world.level.block.state.properties.BooleanProperty[] CONNECTION_PROPERTIES
  • Constructor Details

    • AbstractPneumaticCraftBlock

      protected AbstractPneumaticCraftBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties props)
  • Method Details

    • use

      public net.minecraft.world.InteractionResult use(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.world.phys.BlockHitResult brtr)
      Overrides:
      use in class net.minecraft.world.level.block.state.BlockBehaviour
    • doOpenGui

      protected void doOpenGui(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.level.block.entity.BlockEntity te)
      Default open gui method just sends the BE's blockpos. Override if more server->client data needs to be serialised, and handle deserialisation in the corresponding container constructor.
      Parameters:
      player - the server player
      te - the block entity, which is known to be an INamedContainerProvider
    • getStateForPlacement

      @Nullable public net.minecraft.world.level.block.state.BlockState getStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext ctx)
      Overrides:
      getStateForPlacement in class net.minecraft.world.level.block.Block
    • reversePlacementRotation

      protected boolean reversePlacementRotation()
      Does the block face the same way as the player when placed, or opposite?
      Returns:
      whether or not the block should be rotated 180 degrees on placement
    • setPlacedBy

      public void setPlacedBy(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.item.ItemStack stack)
      Overrides:
      setPlacedBy in class net.minecraft.world.level.block.Block
    • connectionProperty

      public static net.minecraft.world.level.block.state.properties.BooleanProperty connectionProperty(net.minecraft.core.Direction dir)
    • getRotation

      protected net.minecraft.core.Direction getRotation(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos)
    • getRotation

      public net.minecraft.core.Direction getRotation(net.minecraft.world.level.block.state.BlockState state)
    • setRotation

      protected void setRotation(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction rotation)
    • isRotatable

      public boolean isRotatable()
    • canRotateToTopOrBottom

      protected boolean canRotateToTopOrBottom()
    • createBlockStateDefinition

      protected void createBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block,net.minecraft.world.level.block.state.BlockState> builder)
      Overrides:
      createBlockStateDefinition in class net.minecraft.world.level.block.Block
    • rotate

      public net.minecraft.world.level.block.state.BlockState rotate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation)
      Overrides:
      rotate in class net.minecraft.world.level.block.state.BlockBehaviour
    • mirror

      public net.minecraft.world.level.block.state.BlockState mirror(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Mirror mirrorIn)
      Overrides:
      mirror in class net.minecraft.world.level.block.state.BlockBehaviour
    • onWrenched

      public boolean onWrenched(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side, net.minecraft.world.InteractionHand hand)
      Specified by:
      onWrenched in interface IPneumaticWrenchable
    • rotateForgeWay

      protected boolean rotateForgeWay()
    • rotateCustom

      protected boolean rotateCustom(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction side)
      Can be overridden to implement custom rotation behaviour for a block.
      Parameters:
      world - the world
      pos - block position
      state - block state
      side - the side clicked
      Returns:
      true when the method is overridden, to disable default rotation behaviour
    • onNeighborChange

      public void onNeighborChange(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos tilePos)
      Specified by:
      onNeighborChange in interface net.minecraftforge.common.extensions.IForgeBlock
    • neighborChanged

      public void neighborChanged(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.Block block, net.minecraft.core.BlockPos fromPos, boolean isMoving)
      Overrides:
      neighborChanged in class net.minecraft.world.level.block.state.BlockBehaviour
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.BlockGetter world, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.item.TooltipFlag flag)
      Overrides:
      appendHoverText in class net.minecraft.world.level.block.Block
    • addExtraInformation

      protected void addExtraInformation(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.BlockGetter world, List<net.minecraft.network.chat.Component> curInfo, net.minecraft.world.item.TooltipFlag flag)
    • hasAnalogOutputSignal

      public boolean hasAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState pState)
      Overrides:
      hasAnalogOutputSignal in class net.minecraft.world.level.block.state.BlockBehaviour
    • getAnalogOutputSignal

      public int getAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos)
      Overrides:
      getAnalogOutputSignal in class net.minecraft.world.level.block.state.BlockBehaviour
    • getRenderShape

      public net.minecraft.world.level.block.RenderShape getRenderShape(net.minecraft.world.level.block.state.BlockState state)
      Overrides:
      getRenderShape in class net.minecraft.world.level.block.state.BlockBehaviour
    • onRemove

      public void onRemove(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState newState, boolean isMoving)
      Overrides:
      onRemove in class net.minecraft.world.level.block.state.BlockBehaviour
    • updateShape

      public net.minecraft.world.level.block.state.BlockState updateShape(net.minecraft.world.level.block.state.BlockState stateIn, net.minecraft.core.Direction facing, net.minecraft.world.level.block.state.BlockState facingState, net.minecraft.world.level.LevelAccessor worldIn, net.minecraft.core.BlockPos currentPos, net.minecraft.core.BlockPos facingPos)
      Overrides:
      updateShape in class net.minecraft.world.level.block.state.BlockBehaviour
    • isPathfindable

      public boolean isPathfindable(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos, net.minecraft.world.level.pathfinder.PathComputationType type)
      Overrides:
      isPathfindable in class net.minecraft.world.level.block.state.BlockBehaviour
    • playerDestroy

      public void playerDestroy(net.minecraft.world.level.Level worldIn, net.minecraft.world.entity.player.Player player, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.level.block.entity.BlockEntity te, net.minecraft.world.item.ItemStack stack)
      Overrides:
      playerDestroy in class net.minecraft.world.level.block.Block