Class AbstractAssemblyRobotBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractTickingBlockEntity
me.desht.pneumaticcraft.common.block.entity.AbstractAssemblyRobotBlockEntity
- All Implemented Interfaces:
IAssemblyMachine,IGUIButtonSensitive,ILuaMethodProvider,IResettable,IDescSynced,IUpgradeHolder,net.minecraft.world.Nameable,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Direct Known Subclasses:
AssemblyDrillBlockEntity,AssemblyIOUnitBlockEntity,AssemblyLaserBlockEntity
public abstract class AbstractAssemblyRobotBlockEntity
extends AbstractTickingBlockEntity
implements IAssemblyMachine, IResettable
-
Nested Class Summary
Nested classes/interfaces inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
AbstractPneumaticCraftBlockEntity.UpgradeHandlerNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal float[]final float[]protected floatFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleannet.minecraft.world.phys.AABBvoidbooleangotoNeighbour(me.desht.pneumaticcraft.common.block.entity.AbstractAssemblyRobotBlockEntity.TargetDirections newDirections) Instruct the robot arm to start moving to the neighbour in the given direction(s).voidload(net.minecraft.nbt.CompoundTag tag) voidonNeighborBlockUpdate(net.minecraft.core.BlockPos fromPos) Called when a neighboring block changes state (i.e.voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsetControllerPos(net.minecraft.core.BlockPos controllerPos) Inform this machine of its controller's position.voidsetSpeed(float speed) Sets the speed of the machine, used when Speed Upgrades are inserted in the Assembly ControllervoidCalled on both server and client, before anything elseMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractTickingBlockEntity
tickClient, tickCommonPost, tickServerMethods inherited from class me.desht.pneumaticcraft.common.block.entity.AbstractPneumaticCraftBlockEntity
addLuaMethods, countPlayersUsing, getCachedNeighbor, getCapability, getContentsToDrop, getCurrentRecipeIdSynced, getCustomName, getDescriptionFields, getDisplayName, getHeatCap, getInventoryCap, getLuaMethodRegistry, getModelData, getName, getPeripheralType, getPosition, getPrimaryInventory, getRotation, getSpeedMultiplierFromUpgrades, getSpeedUsageMultiplierFromUpgrades, getUpdateTag, getUpgradeCache, getUpgradeHandler, getUpgrades, handleGUIButtonPress, handleUpdateTag, isGuiUseableByPlayer, nonNullLevel, onBlockRotated, onDescUpdate, onGuiUpdate, onLoad, onNeighborTileUpdate, onUpgradesChanged, readFromPacket, requestModelDataUpdate, sendDescriptionPacket, serializeExtraItemData, setChanged, setCustomName, setPreserveStateOnBreak, setRemoved, shouldPreserveStateOnBreak, shouldRerenderChunkOnDescUpdate, shouldSyncField, updateNeighbours, writeToPacketMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getTileData, getType, getUpdatePacket, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setLevel, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.common.block.entity.IAssemblyMachine
getAssemblyType, isIdleMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, onDataPacket, serializeNBTMethods inherited from interface me.desht.pneumaticcraft.common.block.entity.IResettable
resetMethods inherited from interface net.minecraft.world.Nameable
hasCustomName
-
Field Details
-
oldAngles
public final float[] oldAngles -
angles
public final float[] angles -
speed
protected float speed
-
-
Method Details
-
setControllerPos
public void setControllerPos(net.minecraft.core.BlockPos controllerPos) Description copied from interface:IAssemblyMachineInform this machine of its controller's position.- Specified by:
setControllerPosin interfaceIAssemblyMachine- Parameters:
controllerPos- the controller's blockpos
-
onNeighborBlockUpdate
public void onNeighborBlockUpdate(net.minecraft.core.BlockPos fromPos) Description copied from class:AbstractPneumaticCraftBlockEntityCalled when a neighboring block changes state (i.e. blockstate update)- Overrides:
onNeighborBlockUpdatein classAbstractPneumaticCraftBlockEntity- Parameters:
fromPos- the blockpos of the block that caused this update
-
tickCommonPre
public void tickCommonPre()Description copied from class:AbstractTickingBlockEntityCalled on both server and client, before anything else- Overrides:
tickCommonPrein classAbstractTickingBlockEntity
-
gotoHomePosition
public void gotoHomePosition() -
gotoNeighbour
public boolean gotoNeighbour(@Nonnull me.desht.pneumaticcraft.common.block.entity.AbstractAssemblyRobotBlockEntity.TargetDirections newDirections) Instruct the robot arm to start moving to the neighbour in the given direction(s).- Parameters:
newDirections- the direction(s) to move in- Returns:
- true if the neighbour is diagonal to this arm
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classAbstractPneumaticCraftBlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classAbstractPneumaticCraftBlockEntity
-
canMoveToDiagonalNeighbours
protected abstract boolean canMoveToDiagonalNeighbours() -
getRenderBoundingBox
public net.minecraft.world.phys.AABB getRenderBoundingBox()- Specified by:
getRenderBoundingBoxin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity
-
setSpeed
public void setSpeed(float speed) Description copied from interface:IAssemblyMachineSets the speed of the machine, used when Speed Upgrades are inserted in the Assembly Controller- Specified by:
setSpeedin interfaceIAssemblyMachine- Parameters:
speed- the speed
-