Class PneumaticTubeBlockEntity.Input
java.lang.Object
com.petrolpark.petrolsparts.content.pneumatic_tube.PneumaticTubeBlockEntity.Input
- All Implemented Interfaces:
net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
- Enclosing class:
PneumaticTubeBlockEntity
public class PneumaticTubeBlockEntity.Input
extends Object
implements net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intfinal com.mojang.serialization.Codec<PneumaticTubeBlockEntity.Input.StackTransporting> protected final Queue<PneumaticTubeBlockEntity.Input.StackTransporting> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeNBT(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt) voidintcom.simibubi.create.foundation.item.ItemHelper.ExtractionCountModebooleaninput()Try and input an Itemprotected voidnet.minecraft.nbt.CompoundTagserializeNBT(net.minecraft.core.HolderLookup.Provider registries) voidtick()protected voidtransport(net.minecraft.world.item.ItemStack stack) Animate this Pneumatic Tube as if it is transporting an Item, even if it is not.void
-
Field Details
-
STACK_TRANSPORTING_CODEC
public final com.mojang.serialization.Codec<PneumaticTubeBlockEntity.Input.StackTransporting> STACK_TRANSPORTING_CODEC -
stacksTransporting
-
distanceMovedPerTick
protected int distanceMovedPerTick -
inputCooldown
protected int inputCooldown
-
-
Constructor Details
-
Input
protected Input()
-
-
Method Details
-
enclosing
-
getOrCreateOutput
-
getStacksTransporting
-
tick
public void tick() -
input
public boolean input()Try and input an Item- Returns:
- Whether an Item was transported, meaning the delay to wait to try and transport again should be reset
-
transport
protected void transport(net.minecraft.world.item.ItemStack stack) -
transportAnimationOnly
Animate this Pneumatic Tube as if it is transporting an Item, even if it is not.- Returns:
- Callback to remove the animated Stack
-
getModeToExtract
public com.simibubi.create.foundation.item.ItemHelper.ExtractionCountMode getModeToExtract() -
getAmountToExtract
public int getAmountToExtract() -
dropItems
public void dropItems() -
updateFromSpeed
public void updateFromSpeed() -
resetInputCooldown
protected void resetInputCooldown() -
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT(net.minecraft.core.HolderLookup.Provider registries) - Specified by:
serializeNBTin interfacenet.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
deserializeNBT
public void deserializeNBT(net.minecraft.core.HolderLookup.Provider registries, net.minecraft.nbt.CompoundTag nbt) - Specified by:
deserializeNBTin interfacenet.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-