Class AbstractPneumaticCraftBlock
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<net.minecraft.world.level.block.Block>
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,net.minecraftforge.registries.IForgeRegistryEntry<net.minecraft.world.level.block.Block>
- Direct Known Subclasses:
AbstractAssemblyIOUnitBlock,AbstractCamouflageBlock,AbstractPNCBlockWithBoundingBlocks,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,ManualCompressorBlock,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.BlockStatePairKeyNested 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.StatePredicateNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.world.level.block.state.properties.BooleanProperty[]static final net.minecraft.world.level.block.state.properties.BooleanPropertystatic final net.minecraft.world.level.block.state.properties.BooleanPropertystatic final net.minecraft.world.level.block.state.properties.BooleanPropertystatic final net.minecraft.world.level.block.state.properties.BooleanPropertystatic final net.minecraft.world.level.block.state.properties.BooleanPropertystatic final net.minecraft.world.level.block.state.properties.BooleanPropertyFields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, RANDOM, 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_LIGHTFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPneumaticCraftBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties props) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddExtraInformation(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) voidappendHoverText(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 booleanstatic net.minecraft.world.level.block.state.properties.BooleanPropertyconnectionProperty(net.minecraft.core.Direction dir) protected voidcreateBlockStateDefinition(net.minecraft.world.level.block.state.StateDefinition.Builder<net.minecraft.world.level.block.Block, net.minecraft.world.level.block.state.BlockState> builder) protected voiddoOpenGui(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.level.block.entity.BlockEntity te) Default open gui method just sends the BE's blockpos.intgetAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState pState, net.minecraft.world.level.Level pLevel, net.minecraft.core.BlockPos pPos) net.minecraft.world.level.block.RenderShapegetRenderShape(net.minecraft.world.level.block.state.BlockState state) net.minecraft.core.DirectiongetRotation(net.minecraft.world.level.block.state.BlockState state) protected net.minecraft.core.DirectiongetRotation(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) net.minecraft.world.level.block.state.BlockStategetStateForPlacement(net.minecraft.world.item.context.BlockPlaceContext ctx) booleanhasAnalogOutputSignal(net.minecraft.world.level.block.state.BlockState pState) booleanisPathfindable(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) booleannet.minecraft.world.level.block.state.BlockStatemirror(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Mirror mirrorIn) voidneighborChanged(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) voidonNeighborChange(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos tilePos) voidonRemove(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) booleanonWrenched(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) voidplayerDestroy(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 booleanDoes the block face the same way as the player when placed, or opposite?net.minecraft.world.level.block.state.BlockStaterotate(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.Rotation rotation) protected booleanrotateCustom(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 booleanvoidsetPlacedBy(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 voidsetRotation(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction rotation) net.minecraft.world.level.block.state.BlockStateupdateShape(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.InteractionResultuse(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, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods 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, getOffsetType, getPistonPushReaction, getSeed, getShadeBrightness, getShape, getSignal, getVisualShape, isAir, isCollisionShapeFullBlock, isSignalSource, onPlace, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusionMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, 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:
usein classnet.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 playerte- 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:
getStateForPlacementin classnet.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:
setPlacedByin classnet.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:
createBlockStateDefinitionin classnet.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:
rotatein classnet.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:
mirrorin classnet.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:
onWrenchedin interfaceIPneumaticWrenchable
-
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 worldpos- block positionstate- block stateside- 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:
onNeighborChangein interfacenet.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:
neighborChangedin classnet.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:
appendHoverTextin classnet.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:
hasAnalogOutputSignalin classnet.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:
getAnalogOutputSignalin classnet.minecraft.world.level.block.state.BlockBehaviour
-
getRenderShape
public net.minecraft.world.level.block.RenderShape getRenderShape(net.minecraft.world.level.block.state.BlockState state) - Overrides:
getRenderShapein classnet.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:
onRemovein classnet.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:
updateShapein classnet.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:
isPathfindablein classnet.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:
playerDestroyin classnet.minecraft.world.level.block.Block
-