3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Fix custom named spawneggs

Dieser Commit ist enthalten in:
Matsv 2016-04-02 15:02:41 +02:00
Ursprung 8c706b665c
Commit 87f083460c

Datei anzeigen

@ -136,6 +136,7 @@ public class ItemRewriter {
} }
public static void toServer(Item item) { public static void toServer(Item item) {
System.out.println(item);
if (item != null) { if (item != null) {
if (item.getId() == Material.MONSTER_EGG.getId() && item.getData() == 0) { if (item.getId() == Material.MONSTER_EGG.getId() && item.getData() == 0) {
CompoundTag tag = item.getTag(); CompoundTag tag = item.getTag();
@ -147,8 +148,9 @@ public class ItemRewriter {
if (ENTTIY_NAME_TO_ID.containsKey(id.getValue())) if (ENTTIY_NAME_TO_ID.containsKey(id.getValue()))
data = ENTTIY_NAME_TO_ID.get(id.getValue()); data = ENTTIY_NAME_TO_ID.get(id.getValue());
} }
tag.remove("EntityTag");
} }
item.setTag(null); item.setTag(tag);
item.setData((short) data); item.setData((short) data);
} }
if (item.getId() == Material.POTION.getId()) { if (item.getId() == Material.POTION.getId()) {