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.flag.FeatureElement, net.minecraft.world.level.block.BucketPickup, net.minecraft.world.level.block.LiquidBlockContainer, net.minecraft.world.level.block.SimpleWaterloggedBlock, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeBlock, net.minecraftforge.common.extensions.IForgeBucketPickup
Direct Known Subclasses:
ChargingStationBlock, ElevatorBaseBlock, ElevatorCallerBlock, HeatPipeBlock, PneumaticDoorBaseBlock, PressureTubeBlock

public abstract class AbstractCamouflageBlock extends AbstractPneumaticCraftBlock
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.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.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, WEST

    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, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    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)
     
    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)
     
    int
    getLightBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos pos)
     
    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)
     
    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)
     
    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)
     
    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)
     
    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)
     
    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 of BlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext), but for uncamouflaged camo blocks.
    boolean
     
    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)
     

    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, 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, withPropertiesOf

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

    attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMaterialColor, entityInside, getBlockSupportShape, getDestroyProgress, getDirectSignal, getDrops, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getPistonPushReaction, getSeed, getShadeBrightness, getSignal, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isSignalSource, onPlace, onProjectileHit, randomTick, requiredFeatures, 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.minecraft.world.flag.FeatureElement

    isEnabled

    Methods 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

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

    getPickupSound

    Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock

    getPickupSound
  • 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:
      getShape in class net.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:
      getCollisionShape in class net.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:
      getInteractionShape in class net.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:
      getOcclusionShape in class net.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:
      getLightBlock in class net.minecraft.world.level.block.state.BlockBehaviour
    • hasDynamicShape

      public boolean hasDynamicShape()
      Overrides:
      hasDynamicShape in class net.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 of BlockBehaviour.getShape(BlockState, BlockGetter, BlockPos, CollisionContext), but for uncamouflaged camo blocks.
      Parameters:
      state - the blockstate
      reader - the world
      pos - the block pos
      ctx - 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)