mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-07 10:02:01 +01:00
fix wandering traders + trades
This commit is contained in:
parent
24bfa82c0c
commit
1dc4a771a3
@ -253,7 +253,7 @@ public class Protocol1_13_2To1_14 extends BackwardsProtocol {
|
||||
registerIncoming(State.PLAY, 0x1E, 0x1C); // r
|
||||
registerIncoming(State.PLAY, 0x1F, 0x1D); // r
|
||||
registerIncoming(State.PLAY, 0x20, 0x1E); // r
|
||||
// registerIncoming(State.PLAY, 0x21, 0x1F); // r TDO fix
|
||||
registerIncoming(State.PLAY, 0x21, 0x1F); // r
|
||||
registerIncoming(State.PLAY, 0x22, 0x20); // r
|
||||
registerIncoming(State.PLAY, 0x23, 0x21); // r
|
||||
|
||||
|
@ -170,10 +170,10 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
wrapper.write(Type.STRING, "minecraft:trader_list");
|
||||
wrapper.read(Type.STRING); // Remove channel
|
||||
// wrapper.read(Type.STRING); // Remove channel
|
||||
|
||||
int windowId = wrapper.read(Type.INT);
|
||||
wrapper.write(Type.VAR_INT, windowId);
|
||||
int windowId = wrapper.read(Type.VAR_INT);
|
||||
wrapper.write(Type.INT, windowId);
|
||||
|
||||
int size = wrapper.passthrough(Type.UNSIGNED_BYTE);
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
@ -128,8 +128,12 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
|
||||
);
|
||||
Optional<Integer> oldId = EntityTypeMapping.getOldId(type);
|
||||
if (!oldId.isPresent()) {
|
||||
if (!hasData(entityType))
|
||||
Optional<EntityData> oldType = getEntityData(entityType);if (!oldType.isPresent()) {
|
||||
ViaBackwards.getPlatform().getLogger().warning("Could not find 1.13.2 entity type for 1.14 entity type " + type + "/" + entityType);
|
||||
wrapper.cancel();
|
||||
}else{
|
||||
wrapper.set(Type.VAR_INT, 1, oldType.get().getReplacementId());
|
||||
}
|
||||
} else {
|
||||
wrapper.set(Type.VAR_INT, 1, oldId.get());
|
||||
}
|
||||
@ -297,6 +301,7 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
|
||||
regEntType(EntityType1_14.EntityType.FOX, EntityType1_14.EntityType.WOLF).mobName("Fox");
|
||||
regEntType(EntityType1_14.EntityType.PANDA, EntityType1_14.EntityType.POLAR_BEAR).mobName("Panda");
|
||||
regEntType(EntityType1_14.EntityType.PILLAGER, EntityType1_14.EntityType.VILLAGER).mobName("Pillager");
|
||||
regEntType(EntityType1_14.EntityType.WANDERING_TRADER, EntityType1_14.EntityType.VILLAGER).mobName("Wandering Trader");
|
||||
regEntType(EntityType1_14.EntityType.RAVAGER, EntityType1_14.EntityType.COW).mobName("Ravager");
|
||||
|
||||
registerMetaHandler().handle(e -> {
|
||||
|
Loading…
Reference in New Issue
Block a user