3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-03 14:50:19 +01:00

Add overrides for backwards compatibility (testing needed) and reorder a bit

Dieser Commit ist enthalten in:
Eclipse 2024-05-11 10:28:01 +00:00
Ursprung 86518d5f39
Commit 22f5ad12a8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 441A0B7FDD01D03A
2 geänderte Dateien mit 137 neuen und 14 gelöschten Zeilen

Datei anzeigen

@ -86,6 +86,74 @@ public interface NonVanillaCustomItemData extends CustomItemData {
@Override @Override
Builder name(@NonNull String name); Builder name(@NonNull String name);
@Override
Builder customItemOptions(@NonNull CustomItemOptions customItemOptions);
@Override
Builder displayName(@NonNull String displayName);
@Override
Builder icon(@NonNull String icon);
@Override
Builder allowOffhand(boolean allowOffhand);
@Override
Builder displayHandheld(boolean displayHandheld);
@Override
Builder creativeCategory(int creativeCategory);
@Override
Builder creativeGroup(@Nullable String creativeGroup);
@Override
Builder textureSize(int textureSize);
@Override
Builder renderOffsets(@Nullable CustomRenderOffsets renderOffsets);
@Override
Builder tags(@Nullable Set<String> tags);
@Override
Builder stackSize(@NonNegative int stackSize);
@Override
Builder maxDamage(int maxDamage);
@Override
Builder attackDamage(int attackDamage);
@Override
Builder toolType(@Nullable String toolType);
@Override
Builder toolTier(@Nullable String toolTier);
@Override
Builder armorType(@Nullable String armorType);
@Override
Builder protectionValue(int protectionValue);
@Override
Builder hat(boolean isHat);
@Override
Builder foil(boolean isFoil);
@Override
Builder edible(boolean isEdible);
@Override
Builder canAlwaysEat(boolean canAlwaysEat);
@Override
default Builder tool(boolean isTool) {
return displayHandheld(isTool);
}
Builder identifier(@NonNull String identifier); Builder identifier(@NonNull String identifier);
Builder javaId(@NonNegative int javaId); Builder javaId(@NonNegative int javaId);

Datei anzeigen

@ -105,6 +105,16 @@ public final class GeyserNonVanillaCustomItemData extends GeyserCustomItemData i
return this; return this;
} }
@Override
public Builder displayName(@NonNull String displayName) {
return (Builder) super.displayName(displayName);
}
@Override
public Builder icon(@NonNull String icon) {
return (Builder) super.icon(icon);
}
@Override @Override
public Builder allowOffhand(boolean allowOffhand) { public Builder allowOffhand(boolean allowOffhand) {
return (Builder) super.allowOffhand(allowOffhand); return (Builder) super.allowOffhand(allowOffhand);
@ -116,13 +126,13 @@ public final class GeyserNonVanillaCustomItemData extends GeyserCustomItemData i
} }
@Override @Override
public Builder displayName(@NonNull String displayName) { public Builder creativeCategory(int creativeCategory) {
return (Builder) super.displayName(displayName); return (Builder) super.creativeCategory(creativeCategory);
} }
@Override @Override
public Builder icon(@NonNull String icon) { public Builder creativeGroup(@Nullable String creativeGroup) {
return (Builder) super.icon(icon); return (Builder) super.creativeGroup(creativeGroup);
} }
@Override @Override
@ -140,6 +150,61 @@ public final class GeyserNonVanillaCustomItemData extends GeyserCustomItemData i
return (Builder) super.tags(tags); return (Builder) super.tags(tags);
} }
@Override
public Builder stackSize(int stackSize) {
return (Builder) super.stackSize(stackSize);
}
@Override
public Builder maxDamage(int maxDamage) {
return (Builder) super.maxDamage(maxDamage);
}
@Override
public Builder attackDamage(int attackDamage) {
return (Builder) super.attackDamage(attackDamage);
}
@Override
public Builder toolType(@Nullable String toolType) {
return (Builder) super.toolType(toolType);
}
@Override
public Builder toolTier(@Nullable String toolTier) {
return (Builder) super.toolTier(toolTier);
}
@Override
public Builder armorType(@Nullable String armorType) {
return (Builder) super.armorType(armorType);
}
@Override
public Builder protectionValue(int protectionValue) {
return (Builder) super.protectionValue(protectionValue);
}
@Override
public Builder hat(boolean isHat) {
return (Builder) super.hat(isHat);
}
@Override
public Builder foil(boolean isFoil) {
return (Builder) super.foil(isFoil);
}
@Override
public Builder edible(boolean isEdible) {
return (Builder) super.edible(isEdible);
}
@Override
public Builder canAlwaysEat(boolean canAlwaysEat) {
return (Builder) super.canAlwaysEat(canAlwaysEat);
}
@Override @Override
public Builder identifier(@NonNull String identifier) { public Builder identifier(@NonNull String identifier) {
this.identifier = identifier; this.identifier = identifier;
@ -164,16 +229,6 @@ public final class GeyserNonVanillaCustomItemData extends GeyserCustomItemData i
return this; return this;
} }
@Override
public Builder creativeCategory(int creativeCategory) {
return (Builder) super.creativeCategory(creativeCategory);
}
@Override
public Builder creativeGroup(@Nullable String creativeGroup) {
return (Builder) super.creativeGroup(creativeGroup);
}
@Override @Override
public Builder chargeable(boolean isChargeable) { public Builder chargeable(boolean isChargeable) {
this.chargeable = isChargeable; this.chargeable = isChargeable;