Skip to content

Commit

Permalink
Adjust a file name.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glyceryl6 committed Aug 18, 2024
1 parent b36bc10 commit c88ae7e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/cn/teampancake/theaurorian/TheAurorian.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -12,11 +11,11 @@
public class AurorianVillager extends Villager {

public AurorianVillager(EntityType<? extends AurorianVillager> 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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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<VillagerType> VILLAGER_TYPES = DeferredRegister.create(BuiltInRegistries.VILLAGER_TYPE.key(), TheAurorian.MOD_ID);
public static final DeferredHolder<VillagerType, VillagerType> AURORIAN_PLAINS = VILLAGER_TYPES.register("aurorian_plain", () -> create("aurorian_plain"));

private static VillagerType create(String key) {
return new VillagerType(key);
}
public static final DeferredHolder<VillagerType, VillagerType> AURORIAN_PLAINS = VILLAGER_TYPES.register("aurorian_plain", () -> new VillagerType("aurorian_plain"));

}

0 comments on commit c88ae7e

Please sign in to comment.