1.21.6 dev
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
This commit is contained in:
committed by
Nassim Jahnke
parent
39203a65e0
commit
a24f9b204c
@@ -317,7 +317,7 @@ public class MaterialTags {
|
||||
*/
|
||||
public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs"))
|
||||
.endsWith("_SPAWN_EGG")
|
||||
.ensureSize("SPAWN_EGGS", 81).lock();
|
||||
.ensureSize("SPAWN_EGGS", 82).lock();
|
||||
|
||||
/**
|
||||
* Covers all colors of stained glass.
|
||||
|
||||
@@ -15,45 +15,46 @@ import org.jspecify.annotations.Nullable;
|
||||
@NullMarked
|
||||
public final class GoalKey<T extends Mob> {
|
||||
|
||||
private final Class<T> entityClass;
|
||||
private final NamespacedKey namespacedKey;
|
||||
private final Class<T> type;
|
||||
private final NamespacedKey key;
|
||||
|
||||
private GoalKey(Class<T> entityClass, NamespacedKey namespacedKey) {
|
||||
this.entityClass = entityClass;
|
||||
this.namespacedKey = namespacedKey;
|
||||
private GoalKey(Class<T> type, NamespacedKey key) {
|
||||
this.type = type;
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public Class<T> getEntityClass() {
|
||||
return this.entityClass;
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public NamespacedKey getNamespacedKey() {
|
||||
return this.namespacedKey;
|
||||
return this.key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || this.getClass() != o.getClass()) return false;
|
||||
|
||||
GoalKey<?> goalKey = (GoalKey<?>) o;
|
||||
return Objects.equals(this.entityClass, goalKey.entityClass) &&
|
||||
Objects.equals(this.namespacedKey, goalKey.namespacedKey);
|
||||
return Objects.equals(this.type, goalKey.type) &&
|
||||
Objects.equals(this.key, goalKey.key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.entityClass, this.namespacedKey);
|
||||
return Objects.hash(this.type, this.key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringJoiner(", ", GoalKey.class.getSimpleName() + "[", "]")
|
||||
.add("entityClass=" + this.entityClass)
|
||||
.add("namespacedKey=" + this.namespacedKey)
|
||||
.add("type=" + this.type)
|
||||
.add("key=" + this.key)
|
||||
.toString();
|
||||
}
|
||||
|
||||
public static <A extends Mob> GoalKey<A> of(Class<A> entityClass, NamespacedKey namespacedKey) {
|
||||
return new GoalKey<>(entityClass, namespacedKey);
|
||||
public static <A extends Mob> GoalKey<A> of(Class<A> type, NamespacedKey key) {
|
||||
return new GoalKey<>(type, key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user