Class ScrollValueBehaviour
java.lang.Object
com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
com.simibubi.create.foundation.blockEntity.behaviour.scrollValue.ScrollValueBehaviour
- All Implemented Interfaces:
ClipboardCloneable,ValueSettingsBehaviour
- Direct Known Subclasses:
BrassDiodeScrollValueBehaviour,BulkScrollValueBehaviour,KineticScrollValueBehaviour,ScrollOptionBehaviour,ValveHandleBlockEntity.ValveHandleScrollValueBehaviour
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsBehaviour
ValueSettingsBehaviour.ValueSettings -
Field Summary
FieldsModifier and TypeFieldDescriptionnet.minecraft.network.chat.Componentprotected intstatic final BehaviourType<ScrollValueBehaviour> intFields inherited from class com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
blockEntity -
Constructor Summary
ConstructorsConstructorDescriptionScrollValueBehaviour(net.minecraft.network.chat.Component label, SmartBlockEntity be, ValueBoxTransform slot) -
Method Summary
Modifier and TypeMethodDescriptionbetween(int min, int max) createBoard(net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hitResult) getType()intgetValue()booleanisActive()booleanonlyActiveWhen(Supplier<Boolean> condition) booleanvoidonShortInteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction side, net.minecraft.world.phys.BlockHitResult hitResult) voidread(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) voidsetLabel(net.minecraft.network.chat.Component label) voidsetValue(int value) voidsetValueSettings(net.minecraft.world.entity.player.Player player, ValueSettingsBehaviour.ValueSettings valueSetting, boolean ctrlDown) booleantestHit(net.minecraft.world.phys.Vec3 hit) withCallback(Consumer<Integer> valueCallback) withClientCallback(Consumer<Integer> valueCallback) withFormatter(Function<Integer, String> formatter) 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, lazyTick, onBlockChanged, onNeighborChanged, setLazyTickRate, tick, unload, writeSafeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.simibubi.create.foundation.blockEntity.behaviour.ValueSettingsBehaviour
acceptsValueSettings, bypassesInput, getClipboardKey, mayInteract, netId, newSettingHovered, playFeedbackSound, readFromClipboard, writeToClipboard
-
Field Details
-
TYPE
-
max
protected int max -
value
public int value -
label
public net.minecraft.network.chat.Component label
-
-
Constructor Details
-
ScrollValueBehaviour
public ScrollValueBehaviour(net.minecraft.network.chat.Component label, SmartBlockEntity be, ValueBoxTransform slot)
-
-
Method Details
-
isSafeNBT
public boolean isSafeNBT()- Overrides:
isSafeNBTin classBlockEntityBehaviour
-
write
public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
writein classBlockEntityBehaviour
-
read
public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket) - Overrides:
readin classBlockEntityBehaviour
-
withClientCallback
-
withCallback
-
between
-
requiresWrench
-
withFormatter
-
onlyActiveWhen
-
setValue
public void setValue(int value) -
getValue
public int getValue() -
formatValue
-
getType
- Specified by:
getTypein classBlockEntityBehaviour
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceValueSettingsBehaviour
-
testHit
public boolean testHit(net.minecraft.world.phys.Vec3 hit) - Specified by:
testHitin interfaceValueSettingsBehaviour
-
setLabel
public void setLabel(net.minecraft.network.chat.Component label) -
getSlotPositioning
- Specified by:
getSlotPositioningin interfaceValueSettingsBehaviour
-
createBoard
public ValueSettingsBoard createBoard(net.minecraft.world.entity.player.Player player, net.minecraft.world.phys.BlockHitResult hitResult) - Specified by:
createBoardin interfaceValueSettingsBehaviour
-
setValueSettings
public void setValueSettings(net.minecraft.world.entity.player.Player player, ValueSettingsBehaviour.ValueSettings valueSetting, boolean ctrlDown) - Specified by:
setValueSettingsin interfaceValueSettingsBehaviour
-
getValueSettings
- Specified by:
getValueSettingsin interfaceValueSettingsBehaviour
-
onlyVisibleWithWrench
public boolean onlyVisibleWithWrench()- Specified by:
onlyVisibleWithWrenchin interfaceValueSettingsBehaviour
-
onShortInteract
public void onShortInteract(net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand, net.minecraft.core.Direction side, net.minecraft.world.phys.BlockHitResult hitResult) - Specified by:
onShortInteractin interfaceValueSettingsBehaviour
-