Class FlagPoleBehaviour
java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
petrolpark.mc.library.compat.create.core.world.block.entity.behaviour.FlagPoleBehaviour
public class FlagPoleBehaviour
extends com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
Behaviour for Create Block Entities which can hold the Flags of the ItemStack used to place them.
Implementers must handle transferring those Flags themselves, probably here,
and the BlockItem must be tagged with petrolpark:flaggable. They must also handle transferring the Flags back to the Item when mined.
This is however all done automatically (in addition to this Behaviour being added) for any instances of a KineticBlock with a KineticBlockEntity whose BlockEntityType is in the tag petrolpark:flaggable_kinetic.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final GenericFlagPolestatic final com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<FlagPoleBehaviour> Fields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
blockEntity -
Constructor Summary
ConstructorsConstructorDescriptionFlagPoleBehaviour(com.simibubi.create.foundation.blockEntity.SmartBlockEntity be) -
Method Summary
Modifier and TypeMethodDescriptioncom.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<?> getType()voidread(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) voidsetFromItem(net.minecraft.world.item.ItemStack stack) voidwrite(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, 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, tick, unload, writeSafe
-
Field Details
-
TYPE
public static final com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<FlagPoleBehaviour> TYPE -
flagPole
-
-
Constructor Details
-
FlagPoleBehaviour
public FlagPoleBehaviour(com.simibubi.create.foundation.blockEntity.SmartBlockEntity be)
-
-
Method Details
-
getFlagPole
-
setFromItem
public void setFromItem(net.minecraft.world.item.ItemStack stack) -
read
public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
readin classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-
write
public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
writein classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-
getType
public com.simibubi.create.foundation.blockEntity.behaviour.BehaviourType<?> getType()- Specified by:
getTypein classcom.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
-