JavaScript is disabled on your browser.
Record Components:
supportedItems
-
primaryItems
-
weight
-
maxLevel
-
minCost
-
maxCost
-
anvilCost
-
slots
-
Enclosing class:
Enchantment
Mappings:
Namespace
Name
named
net/minecraft/enchantment/Enchantment$Definition
intermediary
net/minecraft/class_1887$class_9427
official
czm$c
named
supportedItems
intermediary
comp_2506
official
b
named
primaryItems
intermediary
comp_2507
official
c
named
weight
intermediary
comp_2508
official
d
named
maxLevel
intermediary
comp_2509
official
e
named
minCost
intermediary
comp_2510
official
f
named
maxCost
intermediary
comp_2511
official
g
named
anvilCost
intermediary
comp_2512
official
h
named
slots
intermediary
comp_2513
official
i
Field Summary
Fields
private final int
The field for the
anvilCost
record component.
The field for the
maxCost
record component.
private final int
The field for the
maxLevel
record component.
The field for the
minCost
record component.
The field for the
slots
record component.
private final int
The field for the
weight
record component.
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Concrete Methods
int
Returns the value of the
anvilCost
record component.
final boolean
Indicates whether some other object is "equal to" this one.
final int
Returns a hash code value for this object.
Returns the value of the
maxCost
record component.
int
Returns the value of the
maxLevel
record component.
Returns the value of the
minCost
record component.
Returns the value of the
slots
record component.
Returns a string representation of this record class.
int
Returns the value of the
weight
record component.
Field Details
weight
private final int weight
The field for the
weight
record component.
maxLevel
private final int maxLevel
The field for the
maxLevel
record component.
minCost
The field for the
minCost
record component.
maxCost
The field for the
maxCost
record component.
anvilCost
private final int anvilCost
The field for the
anvilCost
record component.
slots
The field for the
slots
record component.
CODEC
Mappings:
Namespace
Name
Mixin selector
named
CODEC
Lnet/minecraft/enchantment/Enchantment$Definition;CODEC:Lcom/mojang/serialization/MapCodec;
intermediary
field_51650
Lnet/minecraft/class_1887$class_9427;field_51650:Lcom/mojang/serialization/MapCodec;
official
a
Lczm$c;a:Lcom/mojang/serialization/MapCodec;
Method Details
toString
public final String 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.
Specified by:
toString
in class Record
Returns:
a string representation of this object
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.
Specified by:
hashCode
in class Record
Returns:
a hash code value for this object
equals
public final boolean equals (Object object)
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 with
Objects::equals(Object,Object)
; primitive components are compared with '=='.
Specified by:
equals
in class Record
Parameters:
object
- the object with which to compare
Returns:
true
if this object is the same as the object
argument; false
otherwise.
supportedItems
Returns:
the value of the supportedItems
record component
primaryItems
Returns:
the value of the primaryItems
record component
weight
public int weight ()
Returns the value of the
weight
record component.
Returns:
the value of the weight
record component
maxLevel
public int maxLevel ()
Returns the value of the
maxLevel
record component.
Returns:
the value of the maxLevel
record component
minCost
Returns the value of the
minCost
record component.
Returns:
the value of the minCost
record component
maxCost
Returns the value of the
maxCost
record component.
Returns:
the value of the maxCost
record component
anvilCost
public int anvilCost ()
Returns the value of the
anvilCost
record component.
Returns:
the value of the anvilCost
record component
slots
Returns the value of the
slots
record component.
Returns:
the value of the slots
record component