Class BlockStateModifyCallback
java.lang.Object
dev.latvian.mods.kubejs.block.callback.BlockStateModifyCallback
- Direct Known Subclasses:
BlockStateMirrorCallback,BlockStateModifyPlacementCallback,BlockStateRotateCallback
-
Constructor Summary
ConstructorsConstructorDescriptionBlockStateModifyCallback(net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescription<T extends Comparable<T>>
BlockStateModifyCallbackcycle(net.minecraft.world.level.block.state.properties.Property<T> property) <T extends Comparable<T>>
Tget(net.minecraft.world.level.block.state.properties.Property<T> property) <T extends Comparable<T>>
Optional<T> getOptionalValue(net.minecraft.world.level.block.state.properties.Property<T> property) Collection<net.minecraft.world.level.block.state.properties.Property<?>> net.minecraft.world.level.block.state.BlockStategetState()<T extends Comparable<T>>
TgetValue(net.minecraft.world.level.block.state.properties.Property<T> property) Map<net.minecraft.world.level.block.state.properties.Property<?>, Comparable<?>> <T extends Comparable<T>>
booleanhasProperty(net.minecraft.world.level.block.state.properties.Property<T> property) mirror(net.minecraft.world.level.block.Mirror mirror) populateNeighbours(Map<Map<net.minecraft.world.level.block.state.properties.Property<?>, Comparable<?>>, net.minecraft.world.level.block.state.BlockState> map) rotate(net.minecraft.world.level.block.Rotation rotation) set(net.minecraft.world.level.block.state.properties.BooleanProperty property, boolean value) <T extends Enum<T> & net.minecraft.util.StringRepresentable>
BlockStateModifyCallback<T extends Comparable<T>,V extends T>
BlockStateModifyCallbacksetValue(net.minecraft.world.level.block.state.properties.Property<T> property, V comparable) toString()updateShape(net.minecraft.core.Direction direction, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.LevelAccessor levelAccessor, net.minecraft.core.BlockPos blockPos, net.minecraft.core.BlockPos blockPos2)
-
Constructor Details
-
BlockStateModifyCallback
public BlockStateModifyCallback(net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
cycle
@Info("Cycles the property") public <T extends Comparable<T>> BlockStateModifyCallback cycle(net.minecraft.world.level.block.state.properties.Property<T> property) -
getState
@Info("Gets the state. If it has been modified, gets the new state") public net.minecraft.world.level.block.state.BlockState getState() -
toString
-
getProperties
@Info("Get the properties this block has that can be changed") public Collection<net.minecraft.world.level.block.state.properties.Property<?>> getProperties() -
hasProperty
@Info("Checks if this block has the specified property") public <T extends Comparable<T>> boolean hasProperty(net.minecraft.world.level.block.state.properties.Property<T> property) -
getValue
@Info("Gets the value of the passed in property") public <T extends Comparable<T>> T getValue(net.minecraft.world.level.block.state.properties.Property<T> property) -
get
@Info("Gets the value of the pased in property") public <T extends Comparable<T>> T get(net.minecraft.world.level.block.state.properties.Property<T> property) -
getOptionalValue
@Info("Gets the value of the passed in property as an Optional. If the property does not exist in this block the Optional will be empty") public <T extends Comparable<T>> Optional<T> getOptionalValue(net.minecraft.world.level.block.state.properties.Property<T> property) -
setValue
@Info("Sets the value of the specified property") public <T extends Comparable<T>,V extends T> BlockStateModifyCallback setValue(net.minecraft.world.level.block.state.properties.Property<T> property, V comparable) -
set
@Info("Sets the value of the specified boolean property") public BlockStateModifyCallback set(net.minecraft.world.level.block.state.properties.BooleanProperty property, boolean value) -
set
@Info("Sets the value of the specified integer property") public BlockStateModifyCallback set(net.minecraft.world.level.block.state.properties.IntegerProperty property, Integer value) -
set
@Info("Sets the value of the specified enum property") public <T extends Enum<T> & net.minecraft.util.StringRepresentable> BlockStateModifyCallback set(net.minecraft.world.level.block.state.properties.EnumProperty<T> property, String value) -
populateNeighbours
public BlockStateModifyCallback populateNeighbours(Map<Map<net.minecraft.world.level.block.state.properties.Property<?>, Comparable<?>>, net.minecraft.world.level.block.state.BlockState> map) -
getValues
@Info("Get a map of this blocks properties to it\'s value") public Map<net.minecraft.world.level.block.state.properties.Property<?>,Comparable<?>> getValues() -
rotate
@Info("Rotate the block using the specified Rotation") public BlockStateModifyCallback rotate(net.minecraft.world.level.block.Rotation rotation) -
mirror
@Info("Mirror the block using the specified Mirror") public BlockStateModifyCallback mirror(net.minecraft.world.level.block.Mirror mirror) -
updateShape
@Info("Updates the shape of this block. Mostly used in waterloggable blocks to update the water flow") public BlockStateModifyCallback updateShape(net.minecraft.core.Direction direction, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.LevelAccessor levelAccessor, net.minecraft.core.BlockPos blockPos, net.minecraft.core.BlockPos blockPos2)
-