Package com.petrolpark.tube
Class TubeBehaviour
java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
com.petrolpark.tube.TubeBehaviour
public class TubeBehaviour
extends com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected intprotected net.minecraft.core.BlockPosprotected TubeSplineprotected final ITubeBlockEntitystatic final com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<TubeBehaviour>Fields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
blockEntity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect(TubeSpline spline) voidvoiddisconnect(Consumer<BigItemStack> leftoverItemsConsumer) static Optional<TubeBehaviour>get(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) net.minecraft.core.BlockPoscom.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<TubeBehaviour>getType()booleanvoidplaySound(boolean destroy) voidread(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) booleanreconnect(net.minecraft.world.entity.player.Player player, boolean tryOtherIfNotController) voidreconnectClient(TubeSpline oldSpline, net.minecraft.world.item.ItemStack stack) voidvoidtick()voidwrite(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) Methods inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
destroy, get, get, getPos, getRequiredItems, getWorld, initialize, isSafeNBT, lazyTick, onBlockChanged, onNeighborChanged, setLazyTickRate, unload
-
Field Details
-
TYPE
public static final com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<TubeBehaviour> TYPE -
tubeBlockEntity
-
controller
protected boolean controller -
initializationTicks
protected int initializationTicks -
spline
-
otherEndPos
protected net.minecraft.core.BlockPos otherEndPos -
disconnecting
protected boolean disconnecting
-
-
Constructor Details
-
TubeBehaviour
public TubeBehaviour(BE be)
-
-
Method Details
-
isController
public boolean isController() -
getSpline
-
getOtherEndPos
public net.minecraft.core.BlockPos getOtherEndPos() -
connect
-
disconnect
public void disconnect() -
disconnect
-
sendDestroyTubeParticles
public void sendDestroyTubeParticles() -
playSound
public void playSound(boolean destroy) -
reconnect
public boolean reconnect(net.minecraft.world.entity.player.Player player, boolean tryOtherIfNotController) -
reconnectClient
-
getRequiredStack
-
get
public static Optional<TubeBehaviour> get(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) -
tick
public void tick()- Overrides:
tickin classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-
read
public void read(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) - Overrides:
readin classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-
write
public void write(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) - Overrides:
writein classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-
getType
- Specified by:
getTypein classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-