Use properly renamed entity type constants

This commit is contained in:
KennyTV 2020-04-22 19:30:41 +02:00
parent 0cb41c970b
commit 4d701b1c4e
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
6 changed files with 11 additions and 11 deletions

View File

@ -116,7 +116,7 @@ public class EntityPackets1_13 extends LegacyEntityRewriter<Protocol1_12_2To1_13
});
// Spawn Experience Orb
registerExtraTracker(0x01, Entity1_13Types.EntityType.XP_ORB);
registerExtraTracker(0x01, Entity1_13Types.EntityType.EXPERIENCE_ORB);
// Spawn Global Entity
registerExtraTracker(0x02, Entity1_13Types.EntityType.LIGHTNING_BOLT);
@ -293,8 +293,8 @@ public class EntityPackets1_13 extends LegacyEntityRewriter<Protocol1_12_2To1_13
// Fishy
mapEntity(Entity1_13Types.EntityType.COD_MOB, Entity1_13Types.EntityType.SQUID).mobName("Cod");
mapEntity(Entity1_13Types.EntityType.SALMON_MOB, Entity1_13Types.EntityType.SQUID).mobName("Salmon");
mapEntity(Entity1_13Types.EntityType.PUFFER_FISH, Entity1_13Types.EntityType.SQUID).mobName("Puffer Fish");
mapEntity(Entity1_13Types.EntityType.SALMON, Entity1_13Types.EntityType.SQUID).mobName("Salmon");
mapEntity(Entity1_13Types.EntityType.PUFFERFISH, Entity1_13Types.EntityType.SQUID).mobName("Puffer Fish");
mapEntity(Entity1_13Types.EntityType.TROPICAL_FISH, Entity1_13Types.EntityType.SQUID).mobName("Tropical Fish");
// Phantom

View File

@ -133,7 +133,7 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
case HOPPER_MINECART:
data = 5;
break;
case COMMANDBLOCK_MINECART:
case COMMAND_BLOCK_MINECART:
data = 6;
break;
}
@ -213,7 +213,7 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
map(Type.DOUBLE); // Needs to be mapped for the position cache
map(Type.DOUBLE);
map(Type.DOUBLE);
handler(wrapper -> addTrackedEntity(wrapper, wrapper.get(Type.VAR_INT, 0), Entity1_14Types.EntityType.XP_ORB));
handler(wrapper -> addTrackedEntity(wrapper, wrapper.get(Type.VAR_INT, 0), Entity1_14Types.EntityType.EXPERIENCE_ORB));
}
});
@ -383,7 +383,7 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
return meta;
});
registerMetaHandler().filter(Entity1_14Types.EntityType.FIREWORKS_ROCKET, 8).handle(e -> {
registerMetaHandler().filter(Entity1_14Types.EntityType.FIREWORK_ROCKET, 8).handle(e -> {
Metadata meta = e.getData();
meta.setMetaType(MetaType1_13_2.VarInt);
Integer value = (Integer) meta.getValue();

View File

@ -63,7 +63,7 @@ public class EntityPackets1_13_1 extends LegacyEntityRewriter<Protocol1_13To1_13
});
// Spawn Experience Orb
registerExtraTracker(0x01, Entity1_13Types.EntityType.XP_ORB);
registerExtraTracker(0x01, Entity1_13Types.EntityType.EXPERIENCE_ORB);
// Spawn Global Entity
registerExtraTracker(0x02, Entity1_13Types.EntityType.LIGHTNING_BOLT);

View File

@ -6,7 +6,7 @@ public class EntityTypeMapping {
// There's only the bee, so not much to do here
public static int getOldEntityId(int entityId) {
if (entityId == 4) return Entity1_14Types.EntityType.PUFFER_FISH.getId(); // Flying pufferfish!
if (entityId == 4) return Entity1_14Types.EntityType.PUFFERFISH.getId(); // Flying pufferfish!
return entityId >= 5 ? entityId - 1 : entityId;
}
}

View File

@ -124,7 +124,7 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
});
// Spawn Experience Orb
registerExtraTracker(0x01, Entity1_15Types.EntityType.XP_ORB);
registerExtraTracker(0x01, Entity1_15Types.EntityType.EXPERIENCE_ORB);
// Spawn Global Object
registerExtraTracker(0x02, Entity1_15Types.EntityType.LIGHTNING_BOLT);
@ -230,7 +230,7 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
registerMetaHandler().filter(Entity1_15Types.EntityType.BEE, 15).removed();
registerMetaHandler().filter(Entity1_15Types.EntityType.BEE, 16).removed();
mapEntity(Entity1_15Types.EntityType.BEE, Entity1_15Types.EntityType.PUFFER_FISH).jsonName("Bee").spawnMetadata(storage -> {
mapEntity(Entity1_15Types.EntityType.BEE, Entity1_15Types.EntityType.PUFFERFISH).jsonName("Bee").spawnMetadata(storage -> {
storage.add(new Metadata(14, MetaType1_14.Boolean, false));
storage.add(new Metadata(15, MetaType1_14.VarInt, 2));
});

View File

@ -20,7 +20,7 @@ public class EntityPackets1_14_1 extends LegacyEntityRewriter<Protocol1_14To1_14
@Override
protected void registerPackets() {
registerExtraTracker(0x01, Entity1_14Types.EntityType.XP_ORB);
registerExtraTracker(0x01, Entity1_14Types.EntityType.EXPERIENCE_ORB);
registerExtraTracker(0x02, Entity1_14Types.EntityType.LIGHTNING_BOLT);
registerExtraTracker(0x04, Entity1_14Types.EntityType.PAINTING);
registerExtraTracker(0x05, Entity1_14Types.EntityType.PLAYER);