Class ScrollValueBehaviour
java.lang.Object
com.simibubi.create.foundation.tileEntity.TileEntityBehaviour
com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollValueBehaviour
- Direct Known Subclasses:
BulkScrollValueBehaviour,ScrollOptionBehaviour
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.simibubi.create.foundation.tileEntity.TileEntityBehaviour
tileEntity -
Constructor Summary
ConstructorsConstructorDescriptionScrollValueBehaviour(net.minecraft.network.chat.Component label, SmartTileEntity te, ValueBoxTransform slot) -
Method Summary
Modifier and TypeMethodDescriptionbetween(int min, int max) getType()intgetValue()voidbooleanisActive()booleanmoveText(net.minecraft.world.phys.Vec3 shift) onlyActiveWhen(Supplier<Boolean> condition) voidread(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) voidsetLabel(net.minecraft.network.chat.Component label) voidsetValue(int value) booleantestHit(net.minecraft.world.phys.Vec3 hit) voidtick()withCallback(Consumer<Integer> valueCallback) withClientCallback(Consumer<Integer> valueCallback) withFormatter(Function<Integer, String> formatter) voidwrite(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) Methods inherited from class com.simibubi.create.foundation.tileEntity.TileEntityBehaviour
destroy, destroy, get, get, getPos, getRequiredItems, getWorld, lazyTick, onBlockChanged, onNeighborChanged, remove, setLazyTickRate
-
Field Details
-
TYPE
-
value
public int value -
scrollableValue
public int scrollableValue
-
-
Constructor Details
-
ScrollValueBehaviour
public ScrollValueBehaviour(net.minecraft.network.chat.Component label, SmartTileEntity te, ValueBoxTransform slot)
-
-
Method Details
-
isSafeNBT
public boolean isSafeNBT()- Overrides:
isSafeNBTin classTileEntityBehaviour
-
write
public void write(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) - Overrides:
writein classTileEntityBehaviour
-
read
public void read(net.minecraft.nbt.CompoundTag nbt, boolean clientPacket) - Overrides:
readin classTileEntityBehaviour
-
tick
public void tick()- Overrides:
tickin classTileEntityBehaviour
-
withClientCallback
-
withCallback
-
between
-
moveText
-
requiresWrench
-
withFormatter
-
withUnit
-
onlyActiveWhen
-
withStepFunction
public ScrollValueBehaviour withStepFunction(Function<ScrollValueBehaviour.StepContext, Integer> step) -
initialize
public void initialize()- Overrides:
initializein classTileEntityBehaviour
-
setValue
public void setValue(int value) -
getValue
public int getValue() -
formatValue
-
getType
- Specified by:
getTypein classTileEntityBehaviour
-
isActive
public boolean isActive() -
testHit
public boolean testHit(net.minecraft.world.phys.Vec3 hit) -
setLabel
public void setLabel(net.minecraft.network.chat.Component label)
-