3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-08 09:10:10 +01:00

Use properly renamed entity type constants

Dieser Commit ist enthalten in:
KennyTV 2020-04-22 19:30:41 +02:00
Ursprung 0cb41c970b
Commit 4d701b1c4e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
6 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen

Datei anzeigen

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

Datei anzeigen

@ -133,7 +133,7 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
case HOPPER_MINECART: case HOPPER_MINECART:
data = 5; data = 5;
break; break;
case COMMANDBLOCK_MINECART: case COMMAND_BLOCK_MINECART:
data = 6; data = 6;
break; 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); // Needs to be mapped for the position cache
map(Type.DOUBLE); map(Type.DOUBLE);
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; 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(); Metadata meta = e.getData();
meta.setMetaType(MetaType1_13_2.VarInt); meta.setMetaType(MetaType1_13_2.VarInt);
Integer value = (Integer) meta.getValue(); Integer value = (Integer) meta.getValue();

Datei anzeigen

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

Datei anzeigen

@ -6,7 +6,7 @@ public class EntityTypeMapping {
// There's only the bee, so not much to do here // There's only the bee, so not much to do here
public static int getOldEntityId(int entityId) { 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; return entityId >= 5 ? entityId - 1 : entityId;
} }
} }

Datei anzeigen

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

Datei anzeigen

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