Skip to content

Commit ba4ed22

Browse files
committed
rename interface
1 parent 5d9010f commit ba4ed22

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/main/java/ace/actually/pirates/blocks/CrewSpawnerBlock.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import ace.actually.pirates.Pirates;
44
import ace.actually.pirates.blocks.entity.CrewSpawnerBlockEntity;
5-
import ace.actually.pirates.util.ModProperties;
5+
import ace.actually.pirates.util.CrewTypes;
66
import net.minecraft.block.*;
77
import net.minecraft.block.entity.BlockEntity;
88
import net.minecraft.block.entity.BlockEntityTicker;
@@ -30,7 +30,7 @@ public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
3030

3131
@Override
3232
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
33-
builder.add(Properties.CONDITIONAL).add(ModProperties.CREW_SPAWN_TYPE);
33+
builder.add(Properties.CONDITIONAL).add(CrewTypes.CREW_SPAWN_TYPE);
3434
}
3535

3636
@Nullable

src/main/java/ace/actually/pirates/blocks/entity/CrewSpawnerBlockEntity.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
import ace.actually.pirates.entities.pirate_default.PirateEntity;
55
import ace.actually.pirates.entities.pirate_skeleton.SkeletonPirateEntity;
66
import ace.actually.pirates.util.CrewSpawnType;
7-
import ace.actually.pirates.util.ModProperties;
7+
import ace.actually.pirates.util.CrewTypes;
88
import net.minecraft.block.BlockState;
99
import net.minecraft.block.entity.BlockEntity;
1010
import net.minecraft.enchantment.Enchantments;
1111
import net.minecraft.entity.Entity;
1212
import net.minecraft.entity.EntityType;
1313
import net.minecraft.entity.EquipmentSlot;
14-
import net.minecraft.entity.mob.MobEntity;
1514
import net.minecraft.entity.passive.VillagerEntity;
1615
import net.minecraft.item.ItemStack;
1716
import net.minecraft.item.Items;
@@ -97,12 +96,12 @@ private static BlockPos checkForBlocksToCrew (World world, BlockPos origin) {
9796

9897
private static Entity getEntityFromState(World world, BlockEntity be) {
9998
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) {
101100
crew = new PirateEntity(world, checkForBlocksToCrew(world, be.getPos()));
102101
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) {
104103
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) {
106105
BlockPos blockToCrew = checkForBlocksToCrew(world, be.getPos());
107106
crew = new SkeletonPirateEntity(world, blockToCrew);
108107
ItemStack itemStack = new ItemStack(Items.BOW);

src/main/java/ace/actually/pirates/util/ModProperties.java src/main/java/ace/actually/pirates/util/CrewTypes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
import net.minecraft.state.property.EnumProperty;
44

5-
public interface ModProperties {
5+
public interface CrewTypes {
66
EnumProperty<CrewSpawnType> CREW_SPAWN_TYPE = EnumProperty.of("crew_spawn_type", CrewSpawnType.class);
77
}

0 commit comments

Comments
 (0)