You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EnchantmentActiveCheckLootCondition class contains an active record component of boolean type, which produces a method with the same name. In addition, this class contains a method mapped as active returning an instance of the LootCondition.Builder class. These methods cannot coexist, so one should be renamed.
To illustrate this issue, the method conflict can be reproduced with a simpler example. The following class does not compile:
public record TestClass(booleanactive) {
publicstaticTestClassactive() {
returnnewTestClass(true);
}
}
For example, javac will produce the following error:
TestClass.java:2: error: invalid accessor method in record TestClass
public static TestClass active() {
^
(return type of accessor method active() must match the type of record component active)
The text was updated successfully, but these errors were encountered:
The
EnchantmentActiveCheckLootCondition
class contains anactive
record component of boolean type, which produces a method with the same name. In addition, this class contains a method mapped asactive
returning an instance of theLootCondition.Builder
class. These methods cannot coexist, so one should be renamed.To illustrate this issue, the method conflict can be reproduced with a simpler example. The following class does not compile:
For example,
javac
will produce the following error:The text was updated successfully, but these errors were encountered: