Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-08 13:52:51 +02:00
fix cats and ocelots
Dieser Commit ist enthalten in:
Ursprung
114dbedfb7
Commit
3d1aa03abb
@ -34,6 +34,7 @@ public class EntityTypeMapping {
|
||||
oldEntityToOldObject.put(type1_13.getId(), object1_13.getId());
|
||||
}
|
||||
}
|
||||
entityTypes.put(50, 48); // ocelot
|
||||
}
|
||||
|
||||
public static Optional<Integer> getOldId(int type1_14) {
|
||||
|
@ -292,10 +292,7 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
|
||||
setDisplayNameJson(true);
|
||||
setDisplayNameMetaType(MetaType1_13_2.OptChat);
|
||||
|
||||
regEntType(EntityType1_14.EntityType.CAT, EntityType1_14.EntityType.OCELOT).mobName("Cat").spawnMetadata(e -> {
|
||||
// e.add(new Metadata(13, MetaType1_13_2.Byte, (byte) 0x4)); // Tamed cat
|
||||
});
|
||||
regEntType(EntityType1_14.EntityType.OCELOT, EntityType1_14.EntityType.OCELOT).mobName("Ocelot");
|
||||
regEntType(EntityType1_14.EntityType.CAT, EntityType1_14.EntityType.OCELOT).mobName("Cat");
|
||||
regEntType(EntityType1_14.EntityType.TRADER_LLAMA, EntityType1_14.EntityType.LLAMA).mobName("Trader Llama");
|
||||
regEntType(EntityType1_14.EntityType.FOX, EntityType1_14.EntityType.WOLF).mobName("Fox");
|
||||
regEntType(EntityType1_14.EntityType.PANDA, EntityType1_14.EntityType.POLAR_BEAR).mobName("Panda");
|
||||
@ -336,7 +333,6 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.PANDA, 19).removed();
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.PANDA, 20).removed();
|
||||
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.CAT, 17).removed();
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.CAT, 18).removed();
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.CAT, 19).removed();
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.CAT, 20).removed();
|
||||
@ -434,6 +430,24 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
|
||||
}
|
||||
return meta;
|
||||
});
|
||||
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.OCELOT, 13).handle(e -> {
|
||||
Metadata meta = e.getData();
|
||||
meta.setId(15);
|
||||
meta.setMetaType(MetaType1_13_2.VarInt);
|
||||
meta.setValue(0);
|
||||
return meta;
|
||||
});
|
||||
|
||||
registerMetaHandler().filter(EntityType1_14.EntityType.CAT).handle(e -> {
|
||||
Metadata meta = e.getData();
|
||||
if (meta.getId() == 15) {
|
||||
meta.setValue(1);
|
||||
} else if (meta.getId() == 13) {
|
||||
meta.setValue((byte) ((byte) meta.getValue() & 0x4));
|
||||
}
|
||||
return meta;
|
||||
});
|
||||
}
|
||||
|
||||
public int villagerDataToProfession(VillagerData data) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren