|
25 | 25 |
|
26 | 26 | package org.geysermc.geyser.entity; |
27 | 27 |
|
28 | | -import org.geysermc.geyser.entity.type.AbstractWindChargeEntity; |
29 | | -import org.geysermc.geyser.entity.factory.EntityFactory; |
30 | | -import org.geysermc.geyser.entity.type.living.monster.raid.RavagerEntity; |
31 | | -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType; |
32 | | -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata; |
33 | | -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.FloatEntityMetadata; |
34 | | -import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; |
35 | 28 | import org.cloudburstmc.protocol.bedrock.data.entity.EntityDataTypes; |
36 | 29 | import org.cloudburstmc.protocol.bedrock.data.entity.EntityFlag; |
| 30 | +import org.geysermc.geyser.entity.factory.EntityFactory; |
37 | 31 | import org.geysermc.geyser.entity.properties.GeyserEntityProperties; |
38 | | -import org.geysermc.geyser.entity.type.*; |
39 | | -import org.geysermc.geyser.entity.type.living.*; |
40 | | -import org.geysermc.geyser.entity.type.living.animal.*; |
41 | | -import org.geysermc.geyser.entity.type.living.animal.horse.*; |
| 32 | +import org.geysermc.geyser.entity.type.AbstractArrowEntity; |
| 33 | +import org.geysermc.geyser.entity.type.AbstractWindChargeEntity; |
| 34 | +import org.geysermc.geyser.entity.type.AreaEffectCloudEntity; |
| 35 | +import org.geysermc.geyser.entity.type.ArrowEntity; |
| 36 | +import org.geysermc.geyser.entity.type.BoatEntity; |
| 37 | +import org.geysermc.geyser.entity.type.ChestBoatEntity; |
| 38 | +import org.geysermc.geyser.entity.type.CommandBlockMinecartEntity; |
| 39 | +import org.geysermc.geyser.entity.type.DisplayBaseEntity; |
| 40 | +import org.geysermc.geyser.entity.type.EnderCrystalEntity; |
| 41 | +import org.geysermc.geyser.entity.type.Entity; |
| 42 | +import org.geysermc.geyser.entity.type.EvokerFangsEntity; |
| 43 | +import org.geysermc.geyser.entity.type.ExpOrbEntity; |
| 44 | +import org.geysermc.geyser.entity.type.FallingBlockEntity; |
| 45 | +import org.geysermc.geyser.entity.type.FireballEntity; |
| 46 | +import org.geysermc.geyser.entity.type.FireworkEntity; |
| 47 | +import org.geysermc.geyser.entity.type.FishingHookEntity; |
| 48 | +import org.geysermc.geyser.entity.type.FurnaceMinecartEntity; |
| 49 | +import org.geysermc.geyser.entity.type.InteractionEntity; |
| 50 | +import org.geysermc.geyser.entity.type.ItemEntity; |
| 51 | +import org.geysermc.geyser.entity.type.ItemFrameEntity; |
| 52 | +import org.geysermc.geyser.entity.type.LeashKnotEntity; |
| 53 | +import org.geysermc.geyser.entity.type.LightningEntity; |
| 54 | +import org.geysermc.geyser.entity.type.LivingEntity; |
| 55 | +import org.geysermc.geyser.entity.type.MinecartEntity; |
| 56 | +import org.geysermc.geyser.entity.type.PaintingEntity; |
| 57 | +import org.geysermc.geyser.entity.type.SpawnerMinecartEntity; |
| 58 | +import org.geysermc.geyser.entity.type.TNTEntity; |
| 59 | +import org.geysermc.geyser.entity.type.TextDisplayEntity; |
| 60 | +import org.geysermc.geyser.entity.type.ThrowableEntity; |
| 61 | +import org.geysermc.geyser.entity.type.ThrowableItemEntity; |
| 62 | +import org.geysermc.geyser.entity.type.ThrownPotionEntity; |
| 63 | +import org.geysermc.geyser.entity.type.TridentEntity; |
| 64 | +import org.geysermc.geyser.entity.type.WitherSkullEntity; |
| 65 | +import org.geysermc.geyser.entity.type.living.AbstractFishEntity; |
| 66 | +import org.geysermc.geyser.entity.type.living.AgeableEntity; |
| 67 | +import org.geysermc.geyser.entity.type.living.AllayEntity; |
| 68 | +import org.geysermc.geyser.entity.type.living.ArmorStandEntity; |
| 69 | +import org.geysermc.geyser.entity.type.living.BatEntity; |
| 70 | +import org.geysermc.geyser.entity.type.living.DolphinEntity; |
| 71 | +import org.geysermc.geyser.entity.type.living.GlowSquidEntity; |
| 72 | +import org.geysermc.geyser.entity.type.living.IronGolemEntity; |
| 73 | +import org.geysermc.geyser.entity.type.living.MagmaCubeEntity; |
| 74 | +import org.geysermc.geyser.entity.type.living.MobEntity; |
| 75 | +import org.geysermc.geyser.entity.type.living.SlimeEntity; |
| 76 | +import org.geysermc.geyser.entity.type.living.SnowGolemEntity; |
| 77 | +import org.geysermc.geyser.entity.type.living.SquidEntity; |
| 78 | +import org.geysermc.geyser.entity.type.living.TadpoleEntity; |
| 79 | +import org.geysermc.geyser.entity.type.living.animal.ArmadilloEntity; |
| 80 | +import org.geysermc.geyser.entity.type.living.animal.AxolotlEntity; |
| 81 | +import org.geysermc.geyser.entity.type.living.animal.BeeEntity; |
| 82 | +import org.geysermc.geyser.entity.type.living.animal.ChickenEntity; |
| 83 | +import org.geysermc.geyser.entity.type.living.animal.CowEntity; |
| 84 | +import org.geysermc.geyser.entity.type.living.animal.FoxEntity; |
| 85 | +import org.geysermc.geyser.entity.type.living.animal.FrogEntity; |
| 86 | +import org.geysermc.geyser.entity.type.living.animal.GoatEntity; |
| 87 | +import org.geysermc.geyser.entity.type.living.animal.HoglinEntity; |
| 88 | +import org.geysermc.geyser.entity.type.living.animal.MooshroomEntity; |
| 89 | +import org.geysermc.geyser.entity.type.living.animal.OcelotEntity; |
| 90 | +import org.geysermc.geyser.entity.type.living.animal.PandaEntity; |
| 91 | +import org.geysermc.geyser.entity.type.living.animal.PigEntity; |
| 92 | +import org.geysermc.geyser.entity.type.living.animal.PolarBearEntity; |
| 93 | +import org.geysermc.geyser.entity.type.living.animal.PufferFishEntity; |
| 94 | +import org.geysermc.geyser.entity.type.living.animal.RabbitEntity; |
| 95 | +import org.geysermc.geyser.entity.type.living.animal.SheepEntity; |
| 96 | +import org.geysermc.geyser.entity.type.living.animal.SnifferEntity; |
| 97 | +import org.geysermc.geyser.entity.type.living.animal.StriderEntity; |
| 98 | +import org.geysermc.geyser.entity.type.living.animal.TropicalFishEntity; |
| 99 | +import org.geysermc.geyser.entity.type.living.animal.TurtleEntity; |
| 100 | +import org.geysermc.geyser.entity.type.living.animal.horse.AbstractHorseEntity; |
| 101 | +import org.geysermc.geyser.entity.type.living.animal.horse.CamelEntity; |
| 102 | +import org.geysermc.geyser.entity.type.living.animal.horse.ChestedHorseEntity; |
| 103 | +import org.geysermc.geyser.entity.type.living.animal.horse.HorseEntity; |
| 104 | +import org.geysermc.geyser.entity.type.living.animal.horse.LlamaEntity; |
| 105 | +import org.geysermc.geyser.entity.type.living.animal.horse.SkeletonHorseEntity; |
| 106 | +import org.geysermc.geyser.entity.type.living.animal.horse.TraderLlamaEntity; |
| 107 | +import org.geysermc.geyser.entity.type.living.animal.horse.ZombieHorseEntity; |
42 | 108 | import org.geysermc.geyser.entity.type.living.animal.tameable.CatEntity; |
43 | 109 | import org.geysermc.geyser.entity.type.living.animal.tameable.ParrotEntity; |
44 | 110 | import org.geysermc.geyser.entity.type.living.animal.tameable.TameableEntity; |
45 | 111 | import org.geysermc.geyser.entity.type.living.animal.tameable.WolfEntity; |
46 | 112 | import org.geysermc.geyser.entity.type.living.merchant.AbstractMerchantEntity; |
47 | 113 | import org.geysermc.geyser.entity.type.living.merchant.VillagerEntity; |
48 | | -import org.geysermc.geyser.entity.type.living.monster.*; |
| 114 | +import org.geysermc.geyser.entity.type.living.monster.AbstractSkeletonEntity; |
| 115 | +import org.geysermc.geyser.entity.type.living.monster.BasePiglinEntity; |
| 116 | +import org.geysermc.geyser.entity.type.living.monster.BlazeEntity; |
| 117 | +import org.geysermc.geyser.entity.type.living.monster.BoggedEntity; |
| 118 | +import org.geysermc.geyser.entity.type.living.monster.BreezeEntity; |
| 119 | +import org.geysermc.geyser.entity.type.living.monster.CreeperEntity; |
| 120 | +import org.geysermc.geyser.entity.type.living.monster.ElderGuardianEntity; |
| 121 | +import org.geysermc.geyser.entity.type.living.monster.EnderDragonEntity; |
| 122 | +import org.geysermc.geyser.entity.type.living.monster.EnderDragonPartEntity; |
| 123 | +import org.geysermc.geyser.entity.type.living.monster.EndermanEntity; |
| 124 | +import org.geysermc.geyser.entity.type.living.monster.GhastEntity; |
| 125 | +import org.geysermc.geyser.entity.type.living.monster.GiantEntity; |
| 126 | +import org.geysermc.geyser.entity.type.living.monster.GuardianEntity; |
| 127 | +import org.geysermc.geyser.entity.type.living.monster.MonsterEntity; |
| 128 | +import org.geysermc.geyser.entity.type.living.monster.PhantomEntity; |
| 129 | +import org.geysermc.geyser.entity.type.living.monster.PiglinEntity; |
| 130 | +import org.geysermc.geyser.entity.type.living.monster.ShulkerEntity; |
| 131 | +import org.geysermc.geyser.entity.type.living.monster.SkeletonEntity; |
| 132 | +import org.geysermc.geyser.entity.type.living.monster.SpiderEntity; |
| 133 | +import org.geysermc.geyser.entity.type.living.monster.VexEntity; |
| 134 | +import org.geysermc.geyser.entity.type.living.monster.WardenEntity; |
| 135 | +import org.geysermc.geyser.entity.type.living.monster.WitherEntity; |
| 136 | +import org.geysermc.geyser.entity.type.living.monster.ZoglinEntity; |
| 137 | +import org.geysermc.geyser.entity.type.living.monster.ZombieEntity; |
| 138 | +import org.geysermc.geyser.entity.type.living.monster.ZombieVillagerEntity; |
| 139 | +import org.geysermc.geyser.entity.type.living.monster.ZombifiedPiglinEntity; |
49 | 140 | import org.geysermc.geyser.entity.type.living.monster.raid.PillagerEntity; |
50 | 141 | import org.geysermc.geyser.entity.type.living.monster.raid.RaidParticipantEntity; |
| 142 | +import org.geysermc.geyser.entity.type.living.monster.raid.RavagerEntity; |
51 | 143 | import org.geysermc.geyser.entity.type.living.monster.raid.SpellcasterIllagerEntity; |
52 | 144 | import org.geysermc.geyser.entity.type.living.monster.raid.VindicatorEntity; |
53 | 145 | import org.geysermc.geyser.entity.type.player.PlayerEntity; |
54 | 146 | import org.geysermc.geyser.registry.Registries; |
55 | 147 | import org.geysermc.geyser.translator.text.MessageTranslator; |
| 148 | +import org.geysermc.geyser.util.EnvironmentUtils; |
| 149 | +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType; |
| 150 | +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata; |
| 151 | +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.FloatEntityMetadata; |
| 152 | +import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; |
56 | 153 |
|
57 | 154 | public final class EntityDefinitions { |
58 | 155 | public static final EntityDefinition<AllayEntity> ALLAY; |
@@ -1025,7 +1122,10 @@ public final class EntityDefinitions { |
1025 | 1122 | .identifier("minecraft:armor_stand") // Emulated |
1026 | 1123 | .build(false); // Never sent over the network |
1027 | 1124 |
|
1028 | | - Registries.JAVA_ENTITY_IDENTIFIERS.get().put("minecraft:marker", null); // We don't need an entity definition for this as it is never sent over the network |
| 1125 | + // causes the registries to load |
| 1126 | + if (!EnvironmentUtils.isUnitTesting) { |
| 1127 | + Registries.JAVA_ENTITY_IDENTIFIERS.get().put("minecraft:marker", null); // We don't need an entity definition for this as it is never sent over the network |
| 1128 | + } |
1029 | 1129 | } |
1030 | 1130 |
|
1031 | 1131 | public static void init() { |
|
0 commit comments