Class BlockEntityPurifier
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.blockentity.BlockEntityPurifier
- All Implemented Interfaces:
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
Tile for the
BlockPurifier..-
Nested Class Summary
Nested ClassesNested 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 TypeFieldDescriptionThe additional item rotation.The next additional item rotation.The previous additional item rotation.floatfloatfloatstatic final intfloatfloatfloatfloatfloatstatic final intThe additional slot.static final intThe purify item slot.static final intThe amount of slots.Book bounce tick count.intfloatFields 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
ConstructorsConstructorDescriptionBlockEntityPurifier(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) Make a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.cyclops.cyclopscore.inventory.SimpleInventorycreateInventory(int inventorySize, int stackSize) protected org.cyclops.cyclopscore.fluid.SingleUseTankcreateTank(int tankSize) net.minecraft.world.item.ItemStackGet the book item.intGet the amount of contained buckets.intGet the rest of the fluid that can not fit in a bucket.intSet the maximum amount of contained buckets.net.minecraft.world.item.ItemStackGet the purify item.floatGet the random rotation for displaying the item.voidvoidvoidsetAdditionalItem(net.minecraft.world.item.ItemStack itemStack) Set the book item.voidsetBuckets(int buckets, int rest) Set the amount of contained buckets.voidsetPurifyItem(net.minecraft.world.item.ItemStack itemStack) Set the purify item.voidvoidMethods inherited from class org.cyclops.evilcraft.core.blockentity.BlockEntityTankInventory
addFluidHandlerCapabilities, addItemHandlerCapabilities, getInventory, getTank, read, saveAdditionalMethods inherited from class org.cyclops.cyclopscore.blockentity.CyclopsBlockEntity
addCapabilityInternal, addCapabilitySided, canInteractWith, getCapability, getRotation, 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, getPersistentData, getPosFromTag, 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
-
SLOTS
public static final int SLOTSThe amount of slots.- See Also:
-
SLOT_PURIFY
public static final int SLOT_PURIFYThe purify item slot.- See Also:
-
SLOT_ADDITIONAL
public static final int SLOT_ADDITIONALThe additional slot.- See Also:
-
MAX_BUCKETS
public static final int MAX_BUCKETS- See Also:
-
tickCount
Book bounce tick count. -
additionalRotation2
The next additional item rotation. -
additionalRotationPrev
The previous additional item rotation. -
additionalRotation
The additional item rotation. -
time
public int time -
flip
public float flip -
oFlip
public float oFlip -
flipT
public float flipT -
flipA
public float flipA -
open
public float open -
oOpen
public float oOpen -
rot
public float rot -
oRot
public float oRot -
tRot
public float tRot
-
-
Constructor Details
-
BlockEntityPurifier
public BlockEntityPurifier(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) Make a new instance.
-
-
Method Details
-
createInventory
protected org.cyclops.cyclopscore.inventory.SimpleInventory createInventory(int inventorySize, int stackSize) - Overrides:
createInventoryin classBlockEntityTankInventory
-
createTank
protected org.cyclops.cyclopscore.fluid.SingleUseTank createTank(int tankSize) - Overrides:
createTankin classBlockEntityTankInventory
-
getActions
-
onActionFinished
public void onActionFinished() -
getBucketsFloored
public int getBucketsFloored()Get the amount of contained buckets.- Returns:
- The amount of buckets.
-
getBucketsRest
public int getBucketsRest()Get the rest of the fluid that can not fit in a bucket. Use this insetBuckets(int, int)as rest.- Returns:
- The rest of the fluid.
-
setBuckets
public void setBuckets(int buckets, int rest) Set the amount of contained buckets. This will also change the inner tank.- Parameters:
buckets- The amount of buckets.rest- The rest of the fluid.
-
getMaxBuckets
public int getMaxBuckets()Set the maximum amount of contained buckets.- Returns:
- The maximum amount of buckets.
-
getPurifyItem
public net.minecraft.world.item.ItemStack getPurifyItem()Get the purify item.- Returns:
- The purify item.
-
setPurifyItem
public void setPurifyItem(net.minecraft.world.item.ItemStack itemStack) Set the purify item.- Parameters:
itemStack- The purify item.
-
getAdditionalItem
public net.minecraft.world.item.ItemStack getAdditionalItem()Get the book item.- Returns:
- The book item.
-
setAdditionalItem
public void setAdditionalItem(net.minecraft.world.item.ItemStack itemStack) Set the book item.- Parameters:
itemStack- The book item.
-
showEffect
public void showEffect() -
showEnchantingEffect
public void showEnchantingEffect() -
getRandomRotation
public float getRandomRotation()Get the random rotation for displaying the item.- Returns:
- The random rotation.
-
onTankChanged
public void onTankChanged()- Overrides:
onTankChangedin classBlockEntityTankInventory
-