Record Class EffectPhysicsState
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.movement.replay.EffectPhysicsState
public record EffectPhysicsState(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, EffectPhysicsState.Value> values)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final classThe blend copy is owned but excluded from physical equality; rendering does not author movement commands. -
Constructor Summary
ConstructorsConstructorDescriptionEffectPhysicsState(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, EffectPhysicsState.Value> values) Creates an instance of aEffectPhysicsStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyChanges(EffectPhysicsState previous, Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, net.minecraft.world.effect.MobEffectInstance> effects) static EffectPhysicsStatecapture(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, net.minecraft.world.effect.MobEffectInstance> effects) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrestore(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, net.minecraft.world.effect.MobEffectInstance> effects) final StringtoString()Returns a string representation of this record class.Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, EffectPhysicsState.Value> values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
EffectPhysicsState
public EffectPhysicsState(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, EffectPhysicsState.Value> values) Creates an instance of aEffectPhysicsStaterecord class.- Parameters:
values- the value for thevaluesrecord component
-
-
Method Details
-
capture
public static EffectPhysicsState capture(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, net.minecraft.world.effect.MobEffectInstance> effects) -
restore
public void restore(Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, net.minecraft.world.effect.MobEffectInstance> effects) -
applyChanges
public void applyChanges(EffectPhysicsState previous, Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, net.minecraft.world.effect.MobEffectInstance> effects) -
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
values
public Map<net.minecraft.core.Holder<net.minecraft.world.effect.MobEffect>, EffectPhysicsState.Value> values()Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-