mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-23 12:25:24 +01:00
Fix 1.14->1.13 entity id rewriting
This commit is contained in:
parent
e3faa0d77d
commit
25220621e7
@ -86,7 +86,7 @@ public class EntityPackets1_13 extends LegacyEntityRewriter<Protocol1_12_2To1_13
|
||||
Optional<Entity1_13Types.ObjectType> optionalType = Entity1_13Types.ObjectType.findById(wrapper.get(Type.BYTE, 0));
|
||||
if (!optionalType.isPresent()) return;
|
||||
|
||||
final Entity1_13Types.ObjectType type = optionalType.get();
|
||||
Entity1_13Types.ObjectType type = optionalType.get();
|
||||
if (type == Entity1_13Types.ObjectType.FALLING_BLOCK) {
|
||||
int blockState = wrapper.get(Type.INT, 0);
|
||||
int combined = BlockItemPackets1_13.toOldId(blockState);
|
||||
|
@ -327,6 +327,8 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
|
||||
|
||||
@Override
|
||||
protected void registerRewrites() {
|
||||
mapTypes(Entity1_14Types.EntityType.values(), Entity1_13Types.EntityType.class);
|
||||
|
||||
mapEntity(Entity1_14Types.EntityType.CAT, Entity1_14Types.EntityType.OCELOT).jsonName("Cat");
|
||||
mapEntity(Entity1_14Types.EntityType.TRADER_LLAMA, Entity1_14Types.EntityType.LLAMA).jsonName("Trader Llama");
|
||||
mapEntity(Entity1_14Types.EntityType.FOX, Entity1_14Types.EntityType.WOLF).jsonName("Fox");
|
||||
@ -335,8 +337,6 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
|
||||
mapEntity(Entity1_14Types.EntityType.WANDERING_TRADER, Entity1_14Types.EntityType.VILLAGER).jsonName("Wandering Trader");
|
||||
mapEntity(Entity1_14Types.EntityType.RAVAGER, Entity1_14Types.EntityType.COW).jsonName("Ravager");
|
||||
|
||||
mapTypes(Entity1_14Types.EntityType.values(), Entity1_13Types.EntityType.class);
|
||||
|
||||
registerMetaHandler().handle(e -> {
|
||||
Metadata meta = e.getData();
|
||||
int typeId = meta.getMetaType().getTypeID();
|
||||
|
Loading…
Reference in New Issue
Block a user