Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Fix custom named spawneggs
Dieser Commit ist enthalten in:
Ursprung
8c706b665c
Commit
87f083460c
@ -136,6 +136,7 @@ public class ItemRewriter {
|
||||
}
|
||||
|
||||
public static void toServer(Item item) {
|
||||
System.out.println(item);
|
||||
if (item != null) {
|
||||
if (item.getId() == Material.MONSTER_EGG.getId() && item.getData() == 0) {
|
||||
CompoundTag tag = item.getTag();
|
||||
@ -147,8 +148,9 @@ public class ItemRewriter {
|
||||
if (ENTTIY_NAME_TO_ID.containsKey(id.getValue()))
|
||||
data = ENTTIY_NAME_TO_ID.get(id.getValue());
|
||||
}
|
||||
tag.remove("EntityTag");
|
||||
}
|
||||
item.setTag(null);
|
||||
item.setTag(tag);
|
||||
item.setData((short) data);
|
||||
}
|
||||
if (item.getId() == Material.POTION.getId()) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren