Record Class BreastDataComponent
java.lang.Object
java.lang.Record
com.wildfire.common.entitydata.BreastDataComponent
public record BreastDataComponent(float breastSize, float cleavage, org.joml.Vector3fc offsets, boolean jacket, @Nullable net.minecraft.world.item.component.CustomData nbtComponent)
extends Record
Data component-like class for storing player breast settings on armor equipped onto armor stands
Note that while this is treated similarly to any other data component for performance reasons,
this is written under the custom NBT data component for compatibility with
vanilla clients on servers.
The key this is stored under in the custom NBT data component varies based on mod version; newer versions will
use the mod ID (female_gender_mod), while older versions use WildfireGender.
-
Constructor Summary
ConstructorsConstructorDescriptionBreastDataComponent(float breastSize, float cleavage, org.joml.Vector3fc offsets, boolean jacket, @Nullable net.minecraft.world.item.component.CustomData nbtComponent) Creates an instance of aBreastDataComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thebreastSizerecord component.floatcleavage()Returns the value of thecleavagerecord component.final booleanIndicates whether some other object is "equal to" this one.static @Nullable BreastDataComponentfromComponent(@Nullable net.minecraft.world.item.component.CustomData component) static @Nullable BreastDataComponentfromPlayer(net.minecraft.world.entity.player.Player player, PlayerConfigHolder config) final inthashCode()Returns a hash code value for this object.booleanjacket()Returns the value of thejacketrecord component.@Nullable net.minecraft.world.item.component.CustomDataReturns the value of thenbtComponentrecord component.org.joml.Vector3fcoffsets()Returns the value of theoffsetsrecord component.static voidremoveFromStack(net.minecraft.world.item.ItemStack stack) final StringtoString()Returns a string representation of this record class.voidwrite(net.minecraft.world.item.ItemStack stack) static voidwriteToStack(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack)
-
Constructor Details
-
BreastDataComponent
public BreastDataComponent(float breastSize, float cleavage, org.joml.Vector3fc offsets, boolean jacket, @Nullable net.minecraft.world.item.component.CustomData nbtComponent) Creates an instance of aBreastDataComponentrecord class.- Parameters:
breastSize- the value for thebreastSizerecord componentcleavage- the value for thecleavagerecord componentoffsets- the value for theoffsetsrecord componentjacket- the value for thejacketrecord componentnbtComponent- the value for thenbtComponentrecord component
-
-
Method Details
-
fromPlayer
public static @Nullable BreastDataComponent fromPlayer(net.minecraft.world.entity.player.Player player, PlayerConfigHolder config) -
fromComponent
public static @Nullable BreastDataComponent fromComponent(@Nullable net.minecraft.world.item.component.CustomData component) -
write
public void write(net.minecraft.world.item.ItemStack stack) -
writeToStack
public static void writeToStack(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack) -
removeFromStack
public static void removeFromStack(net.minecraft.world.item.ItemStack stack) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
breastSize
public float breastSize()Returns the value of thebreastSizerecord component.- Returns:
- the value of the
breastSizerecord component
-
cleavage
public float cleavage()Returns the value of thecleavagerecord component.- Returns:
- the value of the
cleavagerecord component
-
offsets
public org.joml.Vector3fc offsets()Returns the value of theoffsetsrecord component.- Returns:
- the value of the
offsetsrecord component
-
jacket
public boolean jacket()Returns the value of thejacketrecord component.- Returns:
- the value of the
jacketrecord component
-
nbtComponent
public @Nullable net.minecraft.world.item.component.CustomData nbtComponent()Returns the value of thenbtComponentrecord component.- Returns:
- the value of the
nbtComponentrecord component
-