|
4 | 4 | import ace.actually.pirates.entities.pirate_default.PirateEntity;
|
5 | 5 | import ace.actually.pirates.entities.pirate_skeleton.SkeletonPirateEntity;
|
6 | 6 | import ace.actually.pirates.util.CrewSpawnType;
|
7 |
| -import ace.actually.pirates.util.ModProperties; |
| 7 | +import ace.actually.pirates.util.CrewTypes; |
8 | 8 | import net.minecraft.block.BlockState;
|
9 | 9 | import net.minecraft.block.entity.BlockEntity;
|
10 | 10 | import net.minecraft.enchantment.Enchantments;
|
11 | 11 | import net.minecraft.entity.Entity;
|
12 | 12 | import net.minecraft.entity.EntityType;
|
13 | 13 | import net.minecraft.entity.EquipmentSlot;
|
14 |
| -import net.minecraft.entity.mob.MobEntity; |
15 | 14 | import net.minecraft.entity.passive.VillagerEntity;
|
16 | 15 | import net.minecraft.item.ItemStack;
|
17 | 16 | import net.minecraft.item.Items;
|
@@ -97,12 +96,12 @@ private static BlockPos checkForBlocksToCrew (World world, BlockPos origin) {
|
97 | 96 |
|
98 | 97 | private static Entity getEntityFromState(World world, BlockEntity be) {
|
99 | 98 | Entity crew = null;
|
100 |
| - if (be.getCachedState().get(ModProperties.CREW_SPAWN_TYPE) == CrewSpawnType.PIRATE) { |
| 99 | + if (be.getCachedState().get(CrewTypes.CREW_SPAWN_TYPE) == CrewSpawnType.PIRATE) { |
101 | 100 | crew = new PirateEntity(world, checkForBlocksToCrew(world, be.getPos()));
|
102 | 101 | crew.equipStack(EquipmentSlot.MAINHAND, new ItemStack(Items.BOW));
|
103 |
| - } else if (be.getCachedState().get(ModProperties.CREW_SPAWN_TYPE) == CrewSpawnType.VILLAGER) { |
| 102 | + } else if (be.getCachedState().get(CrewTypes.CREW_SPAWN_TYPE) == CrewSpawnType.VILLAGER) { |
104 | 103 | crew = new VillagerEntity(EntityType.VILLAGER, world, VillagerType.forBiome(world.getBiome(be.getPos())));
|
105 |
| - } else if (be.getCachedState().get(ModProperties.CREW_SPAWN_TYPE) == CrewSpawnType.SKELETON_PIRATE) { |
| 104 | + } else if (be.getCachedState().get(CrewTypes.CREW_SPAWN_TYPE) == CrewSpawnType.SKELETON_PIRATE) { |
106 | 105 | BlockPos blockToCrew = checkForBlocksToCrew(world, be.getPos());
|
107 | 106 | crew = new SkeletonPirateEntity(world, blockToCrew);
|
108 | 107 | ItemStack itemStack = new ItemStack(Items.BOW);
|
|
0 commit comments