diff --git a/src/main/java/cn/teampancake/theaurorian/TheAurorian.java b/src/main/java/cn/teampancake/theaurorian/TheAurorian.java index 082b0ec4..3448ed40 100644 --- a/src/main/java/cn/teampancake/theaurorian/TheAurorian.java +++ b/src/main/java/cn/teampancake/theaurorian/TheAurorian.java @@ -64,7 +64,7 @@ public TheAurorian(IEventBus modEventBus, ModContainer modContainer) { TAStructurePlacementTypes.STRUCTURE_PLACEMENT_TYPES.register(modEventBus); TAEnchantmentEffectTypes.ENCHANTMENT_ENTITY_EFFECT_TYPES.register(modEventBus); TALootItemConditions.LOOT_CONDITION_TYPES.register(modEventBus); - TAVillagerType.VILLAGER_TYPES.register(modEventBus); + TAVillagerTypes.VILLAGER_TYPES.register(modEventBus); TABiomeLayers.BIOME_LAYER_TYPES.register(modEventBus); TAMobEffects.MOB_EFFECTS.register(modEventBus); TAVillagerProfession.register(modEventBus); diff --git a/src/main/java/cn/teampancake/theaurorian/common/entities/npc/AurorianVillager.java b/src/main/java/cn/teampancake/theaurorian/common/entities/npc/AurorianVillager.java index 4c4c729d..cd2a1d74 100644 --- a/src/main/java/cn/teampancake/theaurorian/common/entities/npc/AurorianVillager.java +++ b/src/main/java/cn/teampancake/theaurorian/common/entities/npc/AurorianVillager.java @@ -1,8 +1,7 @@ package cn.teampancake.theaurorian.common.entities.npc; -import cn.teampancake.theaurorian.common.registry.TAVillagerType; -import net.minecraft.world.entity.EntityType; -import net.minecraft.world.entity.Mob; +import cn.teampancake.theaurorian.common.registry.TAVillagerTypes; +import net.minecraft.world.entity.*; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.npc.Villager; @@ -12,11 +11,11 @@ public class AurorianVillager extends Villager { public AurorianVillager(EntityType entityType, Level level) { - super(entityType, level, TAVillagerType.AURORIAN_PLAINS.get()); + super(entityType, level, TAVillagerTypes.AURORIAN_PLAINS.get()); } public static AttributeSupplier.@NotNull Builder createAttributes() { - return Mob.createMobAttributes().add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.FOLLOW_RANGE, 48.0); + return Mob.createMobAttributes().add(Attributes.MOVEMENT_SPEED, 0.5D).add(Attributes.FOLLOW_RANGE, 48.0D); } } \ No newline at end of file diff --git a/src/main/java/cn/teampancake/theaurorian/common/registry/TAVillagerType.java b/src/main/java/cn/teampancake/theaurorian/common/registry/TAVillagerTypes.java similarity index 79% rename from src/main/java/cn/teampancake/theaurorian/common/registry/TAVillagerType.java rename to src/main/java/cn/teampancake/theaurorian/common/registry/TAVillagerTypes.java index c9722879..ea0563d0 100644 --- a/src/main/java/cn/teampancake/theaurorian/common/registry/TAVillagerType.java +++ b/src/main/java/cn/teampancake/theaurorian/common/registry/TAVillagerTypes.java @@ -6,13 +6,9 @@ import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredRegister; -public class TAVillagerType { +public class TAVillagerTypes { public static final DeferredRegister VILLAGER_TYPES = DeferredRegister.create(BuiltInRegistries.VILLAGER_TYPE.key(), TheAurorian.MOD_ID); - public static final DeferredHolder AURORIAN_PLAINS = VILLAGER_TYPES.register("aurorian_plain", () -> create("aurorian_plain")); - - private static VillagerType create(String key) { - return new VillagerType(key); - } + public static final DeferredHolder AURORIAN_PLAINS = VILLAGER_TYPES.register("aurorian_plain", () -> new VillagerType("aurorian_plain")); } \ No newline at end of file