Package net.frozenblock.lib.sculk.api
Record Class BooleanPropertySculkBehavior
java.lang.Object
java.lang.Record
net.frozenblock.lib.sculk.api.BooleanPropertySculkBehavior
- All Implemented Interfaces:
net.minecraft.world.level.block.SculkBehaviour
public record BooleanPropertySculkBehavior(net.minecraft.world.level.block.state.properties.BooleanProperty changingProperty, boolean propertySetValue)
extends Record
implements net.minecraft.world.level.block.SculkBehaviour
-
Field Summary
Fields inherited from interface net.minecraft.world.level.block.SculkBehaviour
DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionBooleanPropertySculkBehavior(net.minecraft.world.level.block.state.properties.BooleanProperty changingProperty, boolean propertySetValue) Creates an instance of aBooleanPropertySculkBehaviorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanattemptSpreadVein(net.minecraft.world.level.LevelAccessor level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state, @Nullable Collection<net.minecraft.core.Direction> directions, boolean markForPostProcessing) intattemptUseCharge(net.minecraft.world.level.block.SculkSpreader.ChargeCursor cursor, net.minecraft.world.level.LevelAccessor level, @NotNull net.minecraft.core.BlockPos catalystPos, @NotNull net.minecraft.util.RandomSource random, @NotNull net.minecraft.world.level.block.SculkSpreader spreadManager, boolean shouldConvertToBlock) net.minecraft.world.level.block.state.properties.BooleanPropertyReturns the value of thechangingPropertyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thepropertySetValuerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.SculkBehaviour
canChangeBlockStateOnSpread, depositCharge, getSculkSpreadDelay, onDischarged, updateDecayDelay
-
Constructor Details
-
BooleanPropertySculkBehavior
public BooleanPropertySculkBehavior(net.minecraft.world.level.block.state.properties.BooleanProperty changingProperty, boolean propertySetValue) Creates an instance of aBooleanPropertySculkBehaviorrecord class.- Parameters:
changingProperty- the value for thechangingPropertyrecord componentpropertySetValue- the value for thepropertySetValuerecord component
-
-
Method Details
-
attemptUseCharge
public int attemptUseCharge(net.minecraft.world.level.block.SculkSpreader.ChargeCursor cursor, net.minecraft.world.level.LevelAccessor level, @NotNull @NotNull net.minecraft.core.BlockPos catalystPos, @NotNull @NotNull net.minecraft.util.RandomSource random, @NotNull @NotNull net.minecraft.world.level.block.SculkSpreader spreadManager, boolean shouldConvertToBlock) - Specified by:
attemptUseChargein interfacenet.minecraft.world.level.block.SculkBehaviour
-
attemptSpreadVein
public boolean attemptSpreadVein(net.minecraft.world.level.LevelAccessor level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable Collection<net.minecraft.core.Direction> directions, boolean markForPostProcessing) - Specified by:
attemptSpreadVeinin interfacenet.minecraft.world.level.block.SculkBehaviour
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
changingProperty
public net.minecraft.world.level.block.state.properties.BooleanProperty changingProperty()Returns the value of thechangingPropertyrecord component.- Returns:
- the value of the
changingPropertyrecord component
-
propertySetValue
public boolean propertySetValue()Returns the value of thepropertySetValuerecord component.- Returns:
- the value of the
propertySetValuerecord component
-