Class BlockEntityColossalChest
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
org.cyclops.colossalchests.blockentity.BlockEntityColossalChest
- All Implemented Interfaces:
net.minecraft.world.inventory.MenuConstructor,net.minecraft.world.level.block.entity.LidBlockEntity,net.minecraft.world.MenuProvider,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>,org.cyclops.cyclopscore.blockentity.IBlockEntityDelayedTickable,org.cyclops.cyclopscore.persist.IDirtyMarkListener,org.cyclops.cyclopscore.persist.nbt.INBTProvider
public class BlockEntityColossalChest
extends org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
implements net.minecraft.world.MenuProvider, net.minecraft.world.level.block.entity.LidBlockEntity
A machine that can infuse things with blood.
-
Nested Class Summary
Nested 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
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionBlockEntityColossalChest(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInterface(net.minecraft.core.Vec3i blockPos) protected intbooleancanInteractWith(net.minecraft.world.entity.player.Player entityPlayer) protected org.cyclops.cyclopscore.inventory.LargeInventoryprotected org.cyclops.cyclopscore.inventory.LargeInventorynet.minecraft.world.inventory.AbstractContainerMenucreateMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) static voiddetectStructure(net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos location, net.minecraft.core.Vec3i size, boolean valid, net.minecraft.core.BlockPos originCorner) Callback for when a structure has been detected for a spirit furnace block.protected void<T> net.minecraftforge.common.util.LazyOptional<T>getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.core.Direction facing) net.minecraft.network.chat.ComponentList<net.minecraft.core.Vec3i>org.cyclops.cyclopscore.inventory.INBTInventoryorg.cyclops.cyclopscore.inventory.SimpleInventorystatic net.minecraft.core.Vec3ifloatgetOpenNess(float value) net.minecraft.world.phys.AABBnet.minecraft.world.phys.Vec3net.minecraft.core.Directionnet.minecraft.core.Vec3igetSize()intnet.minecraft.network.protocol.game.ClientboundBlockEntityDataPacketnet.minecraft.nbt.CompoundTagbooleanprotected booleanbooleanstatic voidlidAnimateTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, BlockEntityColossalChest blockEntity) voidread(net.minecraft.nbt.CompoundTag tag) voidvoidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsetCenter(net.minecraft.world.phys.Vec3 center) voidsetCustomName(net.minecraft.network.chat.Component name) voidsetInventory(org.cyclops.cyclopscore.inventory.SimpleInventory inventory) voidsetLastValidInventory(org.cyclops.cyclopscore.inventory.SimpleInventory lastValidInventory) voidsetMaterial(ChestMaterial material) voidsetRenderOffset(net.minecraft.world.phys.Vec3 renderOffset) voidsetRotation(net.minecraft.core.Direction rotation) voidsetSize(net.minecraft.core.Vec3i size) Set the size.protected voidsignalOpenCount(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, int p_155336_, int value) voidstartOpen(net.minecraft.world.entity.player.Player player) voidstopOpen(net.minecraft.world.entity.player.Player player) booleantriggerEvent(int eventType, int value) Methods inherited from class org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
addCapabilityInternal, addCapabilitySided, getStoredCapabilities, getUpdateBackoff, getUpdateBackoffTicks, invalidateCaps, load, onDataPacket, onDirty, onLoad, onUpdateReceived, readGeneratedFieldsFromNBT, sendUpdate, setUpdateBackoff, shouldSendUpdate, transformFacingForRotation, unsetSendUpdate, writeGeneratedFieldsToNBT, writeToItemStackMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getTileData, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemovedMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.cyclopscore.blockentity.IBlockEntityDelayedTickable
reduceUpdateBackoff, sendImmediateUpdateMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, handleUpdateTag, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
BlockEntityColossalChest
public BlockEntityColossalChest(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
getSize
public net.minecraft.core.Vec3i getSize()- Returns:
- the size
-
setSize
public void setSize(net.minecraft.core.Vec3i size) Set the size. This will also handle the change in inventory size.- Parameters:
size- the size to set
-
setMaterial
-
getMaterial
-
getLastValidInventory
public org.cyclops.cyclopscore.inventory.SimpleInventory getLastValidInventory() -
setLastValidInventory
public void setLastValidInventory(org.cyclops.cyclopscore.inventory.SimpleInventory lastValidInventory) -
getSizeSingular
public int getSizeSingular() -
isClientSide
protected boolean isClientSide() -
constructInventory
protected org.cyclops.cyclopscore.inventory.LargeInventory constructInventory() -
constructInventoryDebug
protected org.cyclops.cyclopscore.inventory.LargeInventory constructInventoryDebug() -
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
read
public void read(net.minecraft.nbt.CompoundTag tag) - Overrides:
readin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Overrides:
getUpdatePacketin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
calculateInventorySize
protected int calculateInventorySize() -
setInventory
public void setInventory(org.cyclops.cyclopscore.inventory.SimpleInventory inventory) -
ensureInventoryInitialized
protected void ensureInventoryInitialized() -
getInventory
public org.cyclops.cyclopscore.inventory.INBTInventory getInventory() -
getCapability
public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.core.Direction facing) - Specified by:
getCapabilityin interfacenet.minecraftforge.common.capabilities.ICapabilityProvider- Overrides:
getCapabilityin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
canInteractWith
public boolean canInteractWith(net.minecraft.world.entity.player.Player entityPlayer) - Overrides:
canInteractWithin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
getRenderBoundingBox
public net.minecraft.world.phys.AABB getRenderBoundingBox()- Specified by:
getRenderBoundingBoxin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity
-
setCenter
public void setCenter(net.minecraft.world.phys.Vec3 center) -
setRotation
public void setRotation(net.minecraft.core.Direction rotation) -
getRotation
public net.minecraft.core.Direction getRotation()- Overrides:
getRotationin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
getRenderOffset
public net.minecraft.world.phys.Vec3 getRenderOffset() -
setRenderOffset
public void setRenderOffset(net.minecraft.world.phys.Vec3 renderOffset) -
detectStructure
public static void detectStructure(net.minecraft.world.level.LevelReader world, net.minecraft.core.BlockPos location, net.minecraft.core.Vec3i size, boolean valid, net.minecraft.core.BlockPos originCorner) Callback for when a structure has been detected for a spirit furnace block.- Parameters:
world- The world.location- The location of one block of the structure.size- The size of the structure.valid- If the structure is being validated(/created), otherwise invalidated.originCorner- The origin corner
-
isStructureComplete
public boolean isStructureComplete()- Returns:
- If the structure is valid.
-
getMaxSize
public static net.minecraft.core.Vec3i getMaxSize() -
hasCustomName
public boolean hasCustomName() -
setCustomName
public void setCustomName(net.minecraft.network.chat.Component name) -
addInterface
public void addInterface(net.minecraft.core.Vec3i blockPos) -
getInterfaceLocations
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()- Specified by:
getDisplayNamein interfacenet.minecraft.world.MenuProvider
-
createMenu
@Nullable public net.minecraft.world.inventory.AbstractContainerMenu createMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) - Specified by:
createMenuin interfacenet.minecraft.world.inventory.MenuConstructor
-
triggerEvent
public boolean triggerEvent(int eventType, int value) - Overrides:
triggerEventin classnet.minecraft.world.level.block.entity.BlockEntity
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player player) -
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player player) -
recheckOpen
public void recheckOpen() -
signalOpenCount
protected void signalOpenCount(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, int p_155336_, int value) -
lidAnimateTick
public static void lidAnimateTick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, BlockEntityColossalChest blockEntity) -
getOpenNess
public float getOpenNess(float value) - Specified by:
getOpenNessin interfacenet.minecraft.world.level.block.entity.LidBlockEntity
-