2019-08-03 03:38:09 +00:00
|
|
|
/*
|
2020-01-09 03:05:42 +00:00
|
|
|
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
|
2019-08-03 03:38:09 +00:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*
|
|
|
|
* @author GeyserMC
|
|
|
|
* @link https://github.com/GeyserMC/Geyser
|
|
|
|
*/
|
|
|
|
|
|
|
|
package org.geysermc.connector.entity.type;
|
|
|
|
|
|
|
|
import lombok.Getter;
|
2019-12-01 00:19:03 +00:00
|
|
|
import org.geysermc.connector.entity.*;
|
|
|
|
import org.geysermc.connector.entity.living.*;
|
2020-03-06 23:29:11 +00:00
|
|
|
import org.geysermc.connector.entity.living.animal.*;
|
2020-04-07 20:12:55 +00:00
|
|
|
import org.geysermc.connector.entity.living.animal.horse.*;
|
2020-04-09 20:06:00 +00:00
|
|
|
import org.geysermc.connector.entity.living.animal.tameable.*;
|
2020-04-09 23:33:52 +00:00
|
|
|
import org.geysermc.connector.entity.living.merchant.*;
|
2020-01-09 02:35:00 +00:00
|
|
|
import org.geysermc.connector.entity.living.monster.*;
|
|
|
|
import org.geysermc.connector.entity.living.monster.raid.AbstractIllagerEntity;
|
2020-10-09 00:40:50 +00:00
|
|
|
import org.geysermc.connector.entity.living.monster.raid.PillagerEntity;
|
2020-01-09 02:35:00 +00:00
|
|
|
import org.geysermc.connector.entity.living.monster.raid.RaidParticipantEntity;
|
|
|
|
import org.geysermc.connector.entity.living.monster.raid.SpellcasterIllagerEntity;
|
2020-11-20 19:56:39 +00:00
|
|
|
import org.geysermc.connector.entity.player.PlayerEntity;
|
2019-08-03 03:38:09 +00:00
|
|
|
|
|
|
|
@Getter
|
|
|
|
public enum EntityType {
|
|
|
|
|
2019-12-01 00:19:03 +00:00
|
|
|
CHICKEN(AnimalEntity.class, 10, 0.7f, 0.4f),
|
|
|
|
COW(AnimalEntity.class, 11, 1.4f, 0.9f),
|
2020-03-06 23:29:11 +00:00
|
|
|
PIG(PigEntity.class, 12, 0.9f),
|
2020-01-09 02:26:44 +00:00
|
|
|
SHEEP(SheepEntity.class, 13, 1.3f, 0.9f),
|
2020-03-06 23:29:11 +00:00
|
|
|
WOLF(WolfEntity.class, 14, 0.85f, 0.6f),
|
2020-05-05 05:09:36 +00:00
|
|
|
VILLAGER(VillagerEntity.class, 15, 1.8f, 0.6f, 0.6f, 1.62f, "minecraft:villager_v2"),
|
2020-11-11 18:13:13 +00:00
|
|
|
MOOSHROOM(MooshroomEntity.class, 16, 1.4f, 0.9f),
|
2020-05-11 05:09:16 +00:00
|
|
|
SQUID(SquidEntity.class, 17, 0.8f),
|
2019-12-22 17:35:22 +00:00
|
|
|
RABBIT(RabbitEntity.class, 18, 0.5f, 0.4f),
|
2020-11-11 18:13:13 +00:00
|
|
|
BAT(BatEntity.class, 19, 0.9f, 0.5f),
|
2019-12-01 00:19:03 +00:00
|
|
|
IRON_GOLEM(GolemEntity.class, 20, 2.7f, 1.4f),
|
2020-11-11 18:13:13 +00:00
|
|
|
SNOW_GOLEM(SnowGolemEntity.class, 21, 1.9f, 0.7f),
|
2020-03-06 23:29:11 +00:00
|
|
|
OCELOT(OcelotEntity.class, 22, 0.35f, 0.3f),
|
2019-12-04 00:49:13 +00:00
|
|
|
HORSE(HorseEntity.class, 23, 1.6f, 1.3965f),
|
2019-12-01 00:19:03 +00:00
|
|
|
DONKEY(ChestedHorseEntity.class, 24, 1.6f, 1.3965f),
|
|
|
|
MULE(ChestedHorseEntity.class, 25, 1.6f, 1.3965f),
|
|
|
|
SKELETON_HORSE(AbstractHorseEntity.class, 26, 1.6f, 1.3965f),
|
|
|
|
ZOMBIE_HORSE(AbstractHorseEntity.class, 27, 1.6f, 1.3965f),
|
2020-03-06 23:29:11 +00:00
|
|
|
POLAR_BEAR(PolarBearEntity.class, 28, 1.4f, 1.3f),
|
2019-12-14 17:40:04 +00:00
|
|
|
LLAMA(LlamaEntity.class, 29, 1.87f, 0.9f),
|
2020-05-05 05:09:36 +00:00
|
|
|
TRADER_LLAMA(TraderLlamaEntity.class, 29, 1.187f, 0.9f, 0f, 0f, "minecraft:llama"),
|
2020-04-09 20:06:00 +00:00
|
|
|
PARROT(ParrotEntity.class, 30, 0.9f, 0.5f),
|
2019-12-01 00:19:03 +00:00
|
|
|
DOLPHIN(WaterEntity.class, 31, 0.6f, 0.9f),
|
|
|
|
ZOMBIE(ZombieEntity.class, 32, 1.8f, 0.6f, 0.6f, 1.62f),
|
2020-05-17 06:26:13 +00:00
|
|
|
GIANT(GiantEntity.class, 32, 1.8f, 0.6f, 0.6f, 1.62f, "minecraft:zombie"),
|
2020-03-06 23:29:11 +00:00
|
|
|
CREEPER(CreeperEntity.class, 33, 1.7f, 0.6f, 0.6f, 1.62f),
|
2019-12-01 00:19:03 +00:00
|
|
|
SKELETON(AbstractSkeletonEntity.class, 34, 1.8f, 0.6f, 0.6f, 1.62f),
|
2020-03-06 23:29:11 +00:00
|
|
|
SPIDER(SpiderEntity.class, 35, 0.9f, 1.4f, 1.4f, 1f),
|
2020-06-30 12:20:03 +00:00
|
|
|
ZOMBIFIED_PIGLIN(ZombifiedPiglinEntity.class, 36, 1.95f, 0.6f, 0.6f, 1.62f, "minecraft:zombie_pigman"),
|
2020-05-08 03:57:08 +00:00
|
|
|
SLIME(SlimeEntity.class, 37, 0.51f),
|
2020-04-14 20:58:41 +00:00
|
|
|
ENDERMAN(EndermanEntity.class, 38, 2.9f, 0.6f),
|
2019-12-01 00:19:03 +00:00
|
|
|
SILVERFISH(MonsterEntity.class, 39, 0.3f, 0.4f),
|
|
|
|
CAVE_SPIDER(MonsterEntity.class, 40, 0.5f, 0.7f),
|
2020-11-05 23:42:33 +00:00
|
|
|
GHAST(GhastEntity.class, 41, 4.0f),
|
2020-07-07 23:27:12 +00:00
|
|
|
MAGMA_CUBE(MagmaCubeEntity.class, 42, 0.51f),
|
2020-03-06 23:29:11 +00:00
|
|
|
BLAZE(BlazeEntity.class, 43, 1.8f, 0.6f),
|
2020-11-12 00:28:45 +00:00
|
|
|
ZOMBIE_VILLAGER(ZombieVillagerEntity.class, 44, 1.8f, 0.6f, 0.6f, 1.62f, "minecraft:zombie_villager_v2"),
|
2019-12-01 00:19:03 +00:00
|
|
|
WITCH(RaidParticipantEntity.class, 45, 1.8f, 0.6f, 0.6f, 1.62f),
|
|
|
|
STRAY(AbstractSkeletonEntity.class, 46, 1.8f, 0.6f, 0.6f, 1.62f),
|
|
|
|
HUSK(ZombieEntity.class, 47, 1.8f, 0.6f, 0.6f, 1.62f),
|
|
|
|
WITHER_SKELETON(AbstractSkeletonEntity.class, 48, 2.4f, 0.7f),
|
2020-03-06 23:29:11 +00:00
|
|
|
GUARDIAN(GuardianEntity.class, 49, 0.85f),
|
2020-05-18 04:35:26 +00:00
|
|
|
ELDER_GUARDIAN(ElderGuardianEntity.class, 50, 1.9975f),
|
2019-12-01 00:19:03 +00:00
|
|
|
NPC(PlayerEntity.class, 51, 1.8f, 0.6f, 0.6f, 1.62f),
|
2020-05-11 05:09:16 +00:00
|
|
|
WITHER(WitherEntity.class, 52, 3.5f, 0.9f),
|
2020-10-29 22:35:46 +00:00
|
|
|
ENDER_DRAGON(EnderDragonEntity.class, 53, 0f, 0f),
|
2020-04-16 12:36:03 +00:00
|
|
|
SHULKER(ShulkerEntity.class, 54, 1f, 1f),
|
2019-12-01 00:19:03 +00:00
|
|
|
ENDERMITE(MonsterEntity.class, 55, 0.3f, 0.4f),
|
|
|
|
AGENT(Entity.class, 56, 0f),
|
|
|
|
VINDICATOR(AbstractIllagerEntity.class, 57, 1.8f, 0.6f, 0.6f, 1.62f),
|
2020-10-09 00:40:50 +00:00
|
|
|
PILLAGER(PillagerEntity.class, 114, 1.8f, 0.6f, 0.6f, 1.62f),
|
2019-12-01 00:19:03 +00:00
|
|
|
WANDERING_TRADER(AbstractMerchantEntity.class, 118, 1.8f, 0.6f, 0.6f, 1.62f),
|
|
|
|
PHANTOM(FlyingEntity.class, 58, 0.5f, 0.9f, 0.9f, 0.6f),
|
|
|
|
RAVAGER(RaidParticipantEntity.class, 59, 1.9f, 1.2f),
|
2019-08-03 03:38:09 +00:00
|
|
|
|
2020-05-11 05:09:16 +00:00
|
|
|
ARMOR_STAND(ArmorStandEntity.class, 61, 1.975f, 0.5f),
|
2019-12-01 00:19:03 +00:00
|
|
|
TRIPOD_CAMERA(Entity.class, 62, 0f),
|
|
|
|
PLAYER(PlayerEntity.class, 63, 1.8f, 0.6f, 0.6f, 1.62f),
|
2020-12-09 20:09:14 +00:00
|
|
|
ITEM(ItemEntity.class, 64, 0.25f, 0.25f, 0.25f, 0.125f),
|
2020-05-23 20:56:49 +00:00
|
|
|
PRIMED_TNT(TNTEntity.class, 65, 0.98f, 0.98f, 0.98f, 0f, "minecraft:tnt"),
|
2020-04-07 19:45:59 +00:00
|
|
|
FALLING_BLOCK(FallingBlockEntity.class, 66, 0.98f, 0.98f),
|
2019-12-01 00:19:03 +00:00
|
|
|
MOVING_BLOCK(Entity.class, 67, 0f),
|
2020-05-23 20:56:49 +00:00
|
|
|
THROWN_EXP_BOTTLE(ThrowableEntity.class, 68, 0.25f, 0.25f, 0f, 0f, "minecraft:xp_bottle"),
|
2020-05-05 05:09:36 +00:00
|
|
|
EXPERIENCE_ORB(ExpOrbEntity.class, 69, 0f, 0f, 0f, 0f, "minecraft:xp_orb"),
|
2020-05-17 06:26:13 +00:00
|
|
|
EYE_OF_ENDER(Entity.class, 70, 0.25f, 0.25f, 0f, 0f, "minecraft:eye_of_ender_signal"),
|
2020-06-01 19:57:27 +00:00
|
|
|
END_CRYSTAL(EnderCrystalEntity.class, 71, 2.0f, 2.0f, 2.0f, 0f, "minecraft:ender_crystal"),
|
2020-05-23 21:33:39 +00:00
|
|
|
FIREWORK_ROCKET(FireworkEntity.class, 72, 0.25f, 0.25f, 0.25f, 0f, "minecraft:fireworks_rocket"),
|
2020-05-20 17:39:58 +00:00
|
|
|
TRIDENT(TridentEntity.class, 73, 0f, 0f, 0f, 0f, "minecraft:thrown_trident"),
|
2020-11-11 18:13:13 +00:00
|
|
|
TURTLE(TurtleEntity.class, 74, 0.4f, 1.2f),
|
2020-03-06 23:29:11 +00:00
|
|
|
CAT(CatEntity.class, 75, 0.35f, 0.3f),
|
2020-05-11 05:09:16 +00:00
|
|
|
SHULKER_BULLET(Entity.class, 76, 0.3125f),
|
2020-05-05 05:09:36 +00:00
|
|
|
FISHING_BOBBER(FishingHookEntity.class, 77, 0f, 0f, 0f, 0f, "minecraft:fishing_hook"),
|
2019-12-01 00:19:03 +00:00
|
|
|
CHALKBOARD(Entity.class, 78, 0f),
|
2020-05-11 05:09:16 +00:00
|
|
|
DRAGON_FIREBALL(ItemedFireballEntity.class, 79, 1.0f),
|
2020-05-20 17:39:58 +00:00
|
|
|
ARROW(TippedArrowEntity.class, 80, 0.25f, 0.25f),
|
|
|
|
SPECTRAL_ARROW(AbstractArrowEntity.class, 80, 0.25f, 0.25f, 0.25f, 0f, "minecraft:arrow"),
|
2020-05-11 05:09:16 +00:00
|
|
|
SNOWBALL(ThrowableEntity.class, 81, 0.25f),
|
2020-05-23 20:56:49 +00:00
|
|
|
THROWN_EGG(ThrowableEntity.class, 82, 0.25f, 0.25f, 0.25f, 0f, "minecraft:egg"),
|
2019-12-01 00:19:03 +00:00
|
|
|
PAINTING(PaintingEntity.class, 83, 0f),
|
2020-05-23 21:39:17 +00:00
|
|
|
MINECART(MinecartEntity.class, 84, 0.7f, 0.98f, 0.98f, 0.35f),
|
2020-05-11 05:09:16 +00:00
|
|
|
FIREBALL(ItemedFireballEntity.class, 85, 1.0f),
|
2020-05-23 20:56:49 +00:00
|
|
|
THROWN_POTION(ThrowableEntity.class, 86, 0.25f, 0.25f, 0.25f, 0f, "minecraft:splash_potion"),
|
|
|
|
THROWN_ENDERPEARL(ThrowableEntity.class, 87, 0.25f, 0.25f, 0.25f, 0f, "minecraft:ender_pearl"),
|
2020-05-15 17:50:34 +00:00
|
|
|
LEASH_KNOT(LeashKnotEntity.class, 88, 0.5f, 0.375f),
|
2020-11-05 23:42:33 +00:00
|
|
|
WITHER_SKULL(WitherSkullEntity.class, 89, 0.3125f),
|
2020-05-23 21:39:17 +00:00
|
|
|
BOAT(BoatEntity.class, 90, 0.7f, 1.6f, 1.6f, 0.35f),
|
2020-11-05 23:42:33 +00:00
|
|
|
WITHER_SKULL_DANGEROUS(WitherSkullEntity.class, 91, 0f),
|
2019-12-01 00:19:03 +00:00
|
|
|
LIGHTNING_BOLT(Entity.class, 93, 0f),
|
2020-05-11 05:09:16 +00:00
|
|
|
SMALL_FIREBALL(ItemedFireballEntity.class, 94, 0.3125f),
|
|
|
|
AREA_EFFECT_CLOUD(AreaEffectCloudEntity.class, 95, 0.5f, 1.0f),
|
2020-05-23 21:39:17 +00:00
|
|
|
MINECART_HOPPER(MinecartEntity.class, 96, 0.7f, 0.98f, 0.98f, 0.35f, "minecraft:hopper_minecart"),
|
|
|
|
MINECART_TNT(MinecartEntity.class, 97, 0.7f, 0.98f, 0.98f, 0.35f, "minecraft:tnt_minecart"),
|
|
|
|
MINECART_CHEST(MinecartEntity.class, 98, 0.7f, 0.98f, 0.98f, 0.35f, "minecraft:chest_minecart"),
|
2020-06-01 01:46:36 +00:00
|
|
|
MINECART_FURNACE(FurnaceMinecartEntity.class, 98, 0.7f, 0.98f, 0.98f, 0.35f, "minecraft:minecart"),
|
2020-06-02 23:16:04 +00:00
|
|
|
MINECART_SPAWNER(SpawnerMinecartEntity.class, 98, 0.7f, 0.98f, 0.98f, 0.35f, "minecraft:minecart"),
|
2020-09-15 00:54:19 +00:00
|
|
|
MINECART_COMMAND_BLOCK(CommandBlockMinecartEntity.class, 100, 0.7f, 0.98f, 0.98f, 0.35f, "minecraft:command_block_minecart"),
|
2019-12-01 00:19:03 +00:00
|
|
|
LINGERING_POTION(ThrowableEntity.class, 101, 0f),
|
2020-05-11 05:09:16 +00:00
|
|
|
LLAMA_SPIT(Entity.class, 102, 0.25f),
|
2020-06-02 23:16:04 +00:00
|
|
|
EVOKER_FANGS(Entity.class, 103, 0.8f, 0.5f, 0.5f, 0f, "minecraft:evocation_fang"),
|
|
|
|
EVOKER(SpellcasterIllagerEntity.class, 104, 1.95f, 0.6f, 0.6f, 0f, "minecraft:evocation_illager"),
|
2020-11-11 18:13:13 +00:00
|
|
|
VEX(VexEntity.class, 105, 0.8f, 0.4f),
|
2019-12-01 00:19:03 +00:00
|
|
|
ICE_BOMB(Entity.class, 106, 0f),
|
|
|
|
BALLOON(Entity.class, 107, 0f), //TODO
|
2020-04-20 05:29:36 +00:00
|
|
|
PUFFERFISH(PufferFishEntity.class, 108, 0.7f, 0.7f),
|
2019-12-01 00:19:03 +00:00
|
|
|
SALMON(AbstractFishEntity.class, 109, 0.5f, 0.7f),
|
|
|
|
DROWNED(ZombieEntity.class, 110, 1.95f, 0.6f),
|
2020-05-05 05:09:36 +00:00
|
|
|
TROPICAL_FISH(TropicalFishEntity.class, 111, 0.6f, 0.6f, 0f, 0f, "minecraft:tropicalfish"),
|
2019-12-01 00:19:03 +00:00
|
|
|
COD(AbstractFishEntity.class, 112, 0.25f, 0.5f),
|
2020-03-06 23:29:11 +00:00
|
|
|
PANDA(PandaEntity.class, 113, 1.25f, 1.125f, 1.825f),
|
|
|
|
FOX(FoxEntity.class, 121, 0.5f, 1.25f),
|
2020-06-21 02:46:09 +00:00
|
|
|
BEE(BeeEntity.class, 122, 0.6f, 0.6f),
|
2020-07-08 16:36:26 +00:00
|
|
|
STRIDER(StriderEntity.class, 125, 1.7f, 0.9f, 0f, 0f, "minecraft:strider"),
|
2020-11-12 00:28:45 +00:00
|
|
|
HOGLIN(HoglinEntity.class, 124, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:hoglin"),
|
2020-07-08 16:36:26 +00:00
|
|
|
ZOGLIN(ZoglinEntity.class, 126, 1.4f, 1.3965f, 1.3965f, 0f, "minecraft:zoglin"),
|
|
|
|
PIGLIN(PiglinEntity.class, 123, 1.95f, 0.6f, 0.6f, 0f, "minecraft:piglin"),
|
2020-07-20 23:45:38 +00:00
|
|
|
PIGLIN_BRUTE(BasePiglinEntity.class, 127, 1.95f, 0.6f, 0.6f, 0f, "minecraft:piglin_brute"),
|
2020-05-02 20:44:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Item frames are handled differently since they are a block in Bedrock.
|
|
|
|
*/
|
2020-05-13 21:08:32 +00:00
|
|
|
ITEM_FRAME(ItemFrameEntity.class, 0, 0, 0),
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Not an entity in Bedrock, so we replace it with a Pillager
|
|
|
|
*/
|
2020-10-29 22:35:46 +00:00
|
|
|
ILLUSIONER(AbstractIllagerEntity.class, 114, 1.8f, 0.6f, 0.6f, 1.62f, "minecraft:pillager"),
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Not an entity in Bedrock, but used for the Ender Dragon's multiple hitboxes
|
|
|
|
*/
|
|
|
|
ENDER_DRAGON_PART(EnderDragonPartEntity.class, 32, 0, 0, 0, 0, "minecraft:armor_stand");
|
2019-08-03 03:38:09 +00:00
|
|
|
|
2020-05-18 04:35:01 +00:00
|
|
|
private static final EntityType[] VALUES = values();
|
|
|
|
|
2019-12-01 00:19:03 +00:00
|
|
|
private Class<? extends Entity> entityClass;
|
2019-08-03 03:38:09 +00:00
|
|
|
private final int type;
|
|
|
|
private final float height;
|
|
|
|
private final float width;
|
|
|
|
private final float length;
|
|
|
|
private final float offset;
|
2020-05-05 05:09:36 +00:00
|
|
|
private String identifier;
|
2019-08-03 03:38:09 +00:00
|
|
|
|
2019-12-01 00:19:03 +00:00
|
|
|
EntityType(Class<? extends Entity> entityClass, int type, float height) {
|
2020-05-11 05:09:16 +00:00
|
|
|
this(entityClass, type, height, height);
|
2019-08-03 03:38:09 +00:00
|
|
|
}
|
|
|
|
|
2019-12-01 00:19:03 +00:00
|
|
|
EntityType(Class<? extends Entity> entityClass, int type, float height, float width) {
|
|
|
|
this(entityClass, type, height, width, width);
|
2019-08-03 03:38:09 +00:00
|
|
|
}
|
|
|
|
|
2019-12-01 00:19:03 +00:00
|
|
|
EntityType(Class<? extends Entity> entityClass, int type, float height, float width, float length) {
|
|
|
|
this(entityClass, type, height, width, length, 0f);
|
2019-08-03 03:38:09 +00:00
|
|
|
}
|
|
|
|
|
2019-12-01 00:19:03 +00:00
|
|
|
EntityType(Class<? extends Entity> entityClass, int type, float height, float width, float length, float offset) {
|
2020-05-05 05:09:36 +00:00
|
|
|
this(entityClass, type, height, width, length, offset, null);
|
|
|
|
|
|
|
|
this.identifier = "minecraft:" + name().toLowerCase();
|
|
|
|
}
|
|
|
|
|
|
|
|
EntityType(Class<? extends Entity> entityClass, int type, float height, float width, float length, float offset, String identifier) {
|
2019-12-01 00:19:03 +00:00
|
|
|
this.entityClass = entityClass;
|
2019-08-03 03:38:09 +00:00
|
|
|
this.type = type;
|
|
|
|
this.height = height;
|
|
|
|
this.width = width;
|
|
|
|
this.length = length;
|
|
|
|
this.offset = offset + 0.00001f;
|
2020-05-05 05:09:36 +00:00
|
|
|
this.identifier = identifier;
|
2019-08-03 03:38:09 +00:00
|
|
|
}
|
2020-05-18 04:35:01 +00:00
|
|
|
|
|
|
|
public static EntityType getFromIdentifier(String identifier) {
|
|
|
|
for (EntityType type : VALUES) {
|
|
|
|
if (type.identifier.equals(identifier)) {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
2019-08-03 03:38:09 +00:00
|
|
|
}
|