Class AbstractCamouflageBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
me.desht.pneumaticcraft.common.block.AbstractPneumaticCraftBlock
me.desht.pneumaticcraft.common.block.AbstractCamouflageBlock
- All Implemented Interfaces:
IPneumaticWrenchable,IPneumaticCraftProbeable,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeBlock
- Direct Known Subclasses:
ChargingStationBlock,ElevatorBaseBlock,ElevatorCallerBlock,HeatPipeBlock,PneumaticDoorBaseBlock,PressureTubeBlock
Base class for blocks which may be camouflaged, storing the camouflaged block state in the
CAMO_STATE model property.
-
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.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.client.model.data.ModelProperty<net.minecraft.world.level.BlockGetter>static final net.minecraftforge.client.model.data.ModelProperty<net.minecraft.core.BlockPos>static final net.minecraftforge.client.model.data.ModelProperty<net.minecraft.world.level.block.state.BlockState>Fields inherited from class me.desht.pneumaticcraft.common.block.AbstractPneumaticCraftBlock
CONNECTION_PROPERTIES, DOWN, EAST, NORTH, SOUTH, UP, WESTFields 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_LIGHTFields 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
ConstructorsModifierConstructorDescriptionprotectedAbstractCamouflageBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties props) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.shapes.VoxelShapegetCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) net.minecraft.world.phys.shapes.VoxelShapegetInteractionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos) intgetLightBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) net.minecraft.world.phys.shapes.VoxelShapegetOcclusionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos) net.minecraft.world.phys.shapes.VoxelShapegetShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) protected net.minecraft.world.phys.shapes.VoxelShapegetUncamouflagedCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) protected net.minecraft.world.phys.shapes.VoxelShapegetUncamouflagedRaytraceShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos) protected net.minecraft.world.phys.shapes.VoxelShapegetUncamouflagedRenderShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos) abstract net.minecraft.world.phys.shapes.VoxelShapegetUncamouflagedShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) The equivalent ofBlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext), but for uncamouflaged camo blocks.booleanbooleanonDestroyedByPlayer(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, boolean willHarvest, net.minecraft.world.level.material.FluidState fluid) Methods inherited from class me.desht.pneumaticcraft.common.block.AbstractPneumaticCraftBlock
addExtraInformation, appendHoverText, canRotateToTopOrBottom, connectionProperty, createBlockStateDefinition, doOpenGui, getAnalogOutputSignal, getRenderShape, getRotation, getRotation, getStateForPlacement, hasAnalogOutputSignal, isPathfindable, isRotatable, mirror, neighborChanged, onNeighborChange, onRemove, onWrenched, playerDestroy, reversePlacementRotation, rotate, rotateCustom, rotateForgeWay, setPlacedBy, setRotation, updateShape, useMethods 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, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMaterialColor, entityInside, getBlockSupportShape, getDestroyProgress, getDirectSignal, getDrops, getFluidState, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getPistonPushReaction, getSeed, getShadeBrightness, getSignal, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, onPlace, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useShapeForLightOcclusionMethods 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, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, 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, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
-
Field Details
-
CAMO_STATE
public static final net.minecraftforge.client.model.data.ModelProperty<net.minecraft.world.level.block.state.BlockState> CAMO_STATE -
BLOCK_ACCESS
public static final net.minecraftforge.client.model.data.ModelProperty<net.minecraft.world.level.BlockGetter> BLOCK_ACCESS -
BLOCK_POS
public static final net.minecraftforge.client.model.data.ModelProperty<net.minecraft.core.BlockPos> BLOCK_POS
-
-
Constructor Details
-
AbstractCamouflageBlock
protected AbstractCamouflageBlock(net.minecraft.world.level.block.state.BlockBehaviour.Properties props)
-
-
Method Details
-
onDestroyedByPlayer
public boolean onDestroyedByPlayer(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, boolean willHarvest, net.minecraft.world.level.material.FluidState fluid) -
getShape
public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) - Overrides:
getShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getCollisionShape
public net.minecraft.world.phys.shapes.VoxelShape getCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) - Overrides:
getCollisionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getInteractionShape
public net.minecraft.world.phys.shapes.VoxelShape getInteractionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos) - Overrides:
getInteractionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getOcclusionShape
public net.minecraft.world.phys.shapes.VoxelShape getOcclusionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter worldIn, net.minecraft.core.BlockPos pos) - Overrides:
getOcclusionShapein classnet.minecraft.world.level.block.state.BlockBehaviour
-
getLightBlock
public int getLightBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos) - Overrides:
getLightBlockin classnet.minecraft.world.level.block.state.BlockBehaviour
-
hasDynamicShape
public boolean hasDynamicShape()- Overrides:
hasDynamicShapein classnet.minecraft.world.level.block.Block
-
getUncamouflagedShape
public abstract net.minecraft.world.phys.shapes.VoxelShape getUncamouflagedShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) The equivalent ofBlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext), but for uncamouflaged camo blocks.- Parameters:
state- the blockstatereader- the worldpos- the block posctx- the selection context- Returns:
- the block's actual shape, when it isn't camouflaged
-
getUncamouflagedCollisionShape
protected net.minecraft.world.phys.shapes.VoxelShape getUncamouflagedCollisionShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos, net.minecraft.world.phys.shapes.CollisionContext ctx) -
getUncamouflagedRenderShape
protected net.minecraft.world.phys.shapes.VoxelShape getUncamouflagedRenderShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos) -
getUncamouflagedRaytraceShape
protected net.minecraft.world.phys.shapes.VoxelShape getUncamouflagedRaytraceShape(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos)
-