Record Class WorldFluid
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.world.WorldFluid
- Record Components:
source- whether the block is a source block (it can be picked up), not flowing fluid
A fluid in a world block, as the platform names it (e.g.
minecraft:water): the core gives
these ids no meaning (E5).-
Constructor Summary
ConstructorsConstructorDescriptionWorldFluid(@NotNull net.kyori.adventure.key.Key fluid, boolean source) Creates an instance of aWorldFluidrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull net.kyori.adventure.key.Keyfluid()Returns the value of thefluidrecord component.final inthashCode()Returns a hash code value for this object.booleansource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WorldFluid
public WorldFluid(@NotNull @NotNull net.kyori.adventure.key.Key fluid, boolean source) Creates an instance of aWorldFluidrecord class.- Parameters:
fluid- the value for thefluidrecord componentsource- the value for thesourcerecord component
-
-
Method Details
-
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. -
fluid
@NotNull public @NotNull net.kyori.adventure.key.Key fluid()Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-
source
-