Class ItemStackHandlerItemDisplayData
java.lang.Object
team.lodestar.lodestone.modules.toolkit.inventory.ItemStackHandlerItemDisplayData
- All Implemented Interfaces:
LodestoneBlockEntityTicker.BlockEntityTickerAttachment
public class ItemStackHandlerItemDisplayData
extends Object
implements LodestoneBlockEntityTicker.BlockEntityTickerAttachment
A class designed to help with tracking and then displaying items rotating around an object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LodestoneItemStackBlockHandlerprotected floatprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddNewItem(int index, net.minecraft.world.item.ItemStack stack) floatgetAngleForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) final net.minecraft.world.phys.Vec3final net.minecraft.world.phys.Vec3getDisplayCenter(float partialTicks) net.minecraft.world.phys.Vec3getDisplayCenter(LodestoneBlockEntity parent, float partialTicks) floatgetDistanceForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) getEntry(int i) Optional<net.minecraft.world.phys.Vec3> getItemPosition(int index) net.minecraft.world.phys.Vec3net.minecraft.world.phys.Vec3getItemPosition(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry dataEntry, float partialTicks) floatgetItemRotationRateForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) floatgetItemScaleForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) floatgetLiftForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) floatgetTurn(float partialTicks) floatfloathandleAngleCorrection(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total, float targetAngle) voidonContentsChanged(int slot) voidtick(LodestoneBlockEntity parent, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
Field Details
-
handler
-
dataEntries
-
oldTurn
protected float oldTurn -
turn
protected float turn
-
-
Constructor Details
-
ItemStackHandlerItemDisplayData
-
-
Method Details
-
onContentsChanged
public void onContentsChanged(int slot) -
tick
public void tick(LodestoneBlockEntity parent, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Specified by:
tickin interfaceLodestoneBlockEntityTicker.BlockEntityTickerAttachment
-
getEntry
-
getDataEntries
-
addNewItem
public ItemStackHandlerItemDisplayData.ItemDisplayDataEntry addNewItem(int index, net.minecraft.world.item.ItemStack stack) -
getDisplayCenter
public final net.minecraft.world.phys.Vec3 getDisplayCenter() -
getDisplayCenter
public final net.minecraft.world.phys.Vec3 getDisplayCenter(float partialTicks) -
getDisplayCenter
public net.minecraft.world.phys.Vec3 getDisplayCenter(LodestoneBlockEntity parent, float partialTicks) -
getItemPosition
-
getItemPosition
public net.minecraft.world.phys.Vec3 getItemPosition(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry dataEntry) -
getItemPosition
public net.minecraft.world.phys.Vec3 getItemPosition(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry dataEntry, float partialTicks) -
getTurnRate
public float getTurnRate() -
handleAngleCorrection
public float handleAngleCorrection(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total, float targetAngle) -
getItemScaleForItem
public float getItemScaleForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) -
getAngleForItem
public float getAngleForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) -
getDistanceForItem
public float getDistanceForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) -
getLiftForItem
public float getLiftForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) -
getItemRotationRateForItem
public float getItemRotationRateForItem(ItemStackHandlerItemDisplayData.ItemDisplayDataEntry item, int index, float total) -
getTurn
public float getTurn(float partialTicks)
-