Class BlockEntitySpiritReanimator
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.evilcraft.core.blockentity.BlockEntityTankInventory
org.cyclops.evilcraft.core.blockentity.BlockEntityTickingTankInventory<T>
org.cyclops.evilcraft.core.blockentity.BlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
org.cyclops.evilcraft.blockentity.BlockEntitySpiritReanimator
- All Implemented Interfaces:
net.minecraft.world.inventory.MenuConstructor,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,IUpgradable<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
public class BlockEntitySpiritReanimator
extends BlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
implements net.minecraft.world.MenuProvider
A furnace that is able to cook spirits for their inner entity drops.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityWorking
BlockEntityWorking.Inventory<T extends BlockEntityWorking<T,?>>, BlockEntityWorking.TickerServer<T extends BlockEntityWorking<T, O>, O> Nested classes/interfaces inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTickingTankInventory
BlockEntityTickingTankInventory.TickerClient<T extends BlockEntityTickingTankInventory<T>>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
FieldsModifier and TypeFieldDescriptionstatic final intThe capacity of the tank.static org.cyclops.evilcraft.blockentity.BlockEntitySpiritReanimator.Metadatastatic final intThe id of the box slot.static final intThe id of the fluid container drainer slot.static final intThe id of the egg slot.static final intThe total amount of slots in this machine.static final intThe id of the output slot.static intstatic final Upgrades.UpgradeEventTypestatic final Upgrades.UpgradeEventTypeFields inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityWorking
hasJustWorked, INVENTORY_SIZE_UPGRADES, upgradeBehaviourFields inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTickingTankInventory
currentState, previousStateFields inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTankInventory
tankSizeFields 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
ConstructorsConstructorDescriptionBlockEntitySpiritReanimator(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) Make a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbooleancanWork()Check if this tile is valid and can start working.protected org.cyclops.cyclopscore.inventory.SimpleInventorycreateInventory(int inventorySize, int stackSize) net.minecraft.world.inventory.AbstractContainerMenucreateMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.entity.player.Player playerEntity) protected org.cyclops.cyclopscore.fluid.SingleUseTankcreateTank(int tankSize) static net.minecraft.world.item.ItemGet the allowed cooking item for this furnace.intGet the id of the box slot.net.minecraft.network.chat.Componentnet.minecraft.world.entity.EntityType<?>Get the entity type that is contained in a box.net.minecraft.core.Directionorg.cyclops.evilcraft.blockentity.BlockEntitySpiritReanimator.Metadataprotected intvoidWhat needs to happen when the (numerical) state is changed.Methods inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityWorking
getBasicInventorySize, getNewState, getRequiredWorkTicks, getTankTierMultiplier, getUpgradeBehaviour, getUpgradeItems, getUpgradeLevel, getUpgradeLevels, getUpgradeType, getWorkTick, getWorkTickScaled, hasJustWorked, isVisuallyWorking, isWorking, onUpgradeSlotChanged, resetUpgradeLevels, resetWork, resetWorkMethods inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTickingTankInventory
addTicker, getCurrentState, getTickers, read, saveAdditionalMethods inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTankInventory
addFluidHandlerCapabilities, getInventory, getTank, onTankChangedMethods inherited from class org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
addCapabilityInternal, addCapabilitySided, canInteractWith, getCapability, getStoredCapabilities, getUpdateBackoff, getUpdateBackoffTicks, getUpdatePacket, getUpdateTag, 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, setRemoved, triggerEventMethods 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, getRenderBoundingBox, handleUpdateTag, requestModelDataUpdate, serializeNBT
-
Field Details
-
SLOT_CONTAINER
public static final int SLOT_CONTAINERThe id of the fluid container drainer slot.- See Also:
-
SLOT_BOX
public static final int SLOT_BOXThe id of the box slot.- See Also:
-
SLOT_EGG
public static final int SLOT_EGGThe id of the egg slot.- See Also:
-
SLOTS_OUTPUT
public static final int SLOTS_OUTPUTThe id of the output slot.- See Also:
-
SLOTS
public static final int SLOTSThe total amount of slots in this machine.- See Also:
-
METADATA
public static org.cyclops.evilcraft.blockentity.BlockEntitySpiritReanimator.Metadata METADATA -
LIQUID_PER_SLOT
public static final int LIQUID_PER_SLOTThe capacity of the tank.- See Also:
-
TICKERS
public static int TICKERS -
UPGRADEEVENT_SPEED
-
UPGRADEEVENT_BLOODUSAGE
-
-
Constructor Details
-
BlockEntitySpiritReanimator
public BlockEntitySpiritReanimator(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) Make a new instance.
-
-
Method Details
-
addItemHandlerCapabilities
protected void addItemHandlerCapabilities()- Overrides:
addItemHandlerCapabilitiesin classBlockEntityTankInventory
-
createInventory
protected org.cyclops.cyclopscore.inventory.SimpleInventory createInventory(int inventorySize, int stackSize) - Overrides:
createInventoryin classBlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
-
getRotation
public net.minecraft.core.Direction getRotation()- Overrides:
getRotationin classorg.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
-
createTank
protected org.cyclops.cyclopscore.fluid.SingleUseTank createTank(int tankSize) - Overrides:
createTankin classBlockEntityTankInventory
-
getWorkTicker
protected int getWorkTicker()- Specified by:
getWorkTickerin classBlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
-
getEntityType
@Nullable public net.minecraft.world.entity.EntityType<?> getEntityType()Get the entity type that is contained in a box.- Returns:
- The entity type or null if no box or invalid box.
-
getAllowedCookItem
public static net.minecraft.world.item.Item getAllowedCookItem()Get the allowed cooking item for this furnace.- Returns:
- The allowed item.
-
getConsumeSlot
public int getConsumeSlot()Get the id of the box slot.- Returns:
- id of the box slot.
-
getTileWorkingMetadata
public org.cyclops.evilcraft.blockentity.BlockEntitySpiritReanimator.Metadata getTileWorkingMetadata()- Specified by:
getTileWorkingMetadatain classBlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
-
canWork
public boolean canWork()Description copied from class:BlockEntityWorkingCheck if this tile is valid and can start working. Mostly defined by environmental parameters.- Specified by:
canWorkin classBlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble> - Returns:
- If it is valid and can work.
-
onStateChanged
public void onStateChanged()Description copied from class:BlockEntityTickingTankInventoryWhat needs to happen when the (numerical) state is changed.- Overrides:
onStateChangedin classBlockEntityWorking<BlockEntitySpiritReanimator,org.apache.commons.lang3.mutable.MutableDouble>
-
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
-
getDisplayName
public net.minecraft.network.chat.Component getDisplayName()- Specified by:
getDisplayNamein interfacenet.minecraft.world.MenuProvider
-