From ee3fdc14c9f1fe5858eb562babd96380242d107e Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 17 Feb 2021 21:46:07 +0200 Subject: [PATCH] Update some names --- .../java/com/minelittlepony/unicopia/Unicopia.java | 2 +- .../unicopia/client/sound/MagicAuraSoundInstance.java | 2 +- .../unicopia/entity/ai/WantItNeedItSensor.java | 2 +- .../unicopia/entity/ai/WantItNeedItTargetGoal.java | 2 +- .../unicopia/entity/ai/WantItTakeItGoal.java | 4 ++-- .../unicopia/item/enchantment/UEnchantments.java | 10 +++++----- src/main/resources/assets/unicopia/lang/en_us.json | 10 +++++----- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/Unicopia.java b/src/main/java/com/minelittlepony/unicopia/Unicopia.java index 9eb625e1..35327e64 100644 --- a/src/main/java/com/minelittlepony/unicopia/Unicopia.java +++ b/src/main/java/com/minelittlepony/unicopia/Unicopia.java @@ -42,7 +42,7 @@ public class Unicopia implements ModInitializer { ((BlockDestructionManager.Source)w).getDestructionManager().tick(); }); ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(TreeTypeLoader.INSTANCE); - ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(UEnchantments.POISON_JOKE); + ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(UEnchantments.POISONED_JOKE); UItems.bootstrap(); UPotions.bootstrap(); diff --git a/src/main/java/com/minelittlepony/unicopia/client/sound/MagicAuraSoundInstance.java b/src/main/java/com/minelittlepony/unicopia/client/sound/MagicAuraSoundInstance.java index 816e8cb5..09658567 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/sound/MagicAuraSoundInstance.java +++ b/src/main/java/com/minelittlepony/unicopia/client/sound/MagicAuraSoundInstance.java @@ -38,7 +38,7 @@ public class MagicAuraSoundInstance extends MovingSoundInstance { @Override public void tick() { - Optional data = living.getEnchants().getOrEmpty(UEnchantments.GEM_LOCATION); + Optional data = living.getEnchants().getOrEmpty(UEnchantments.GEM_FINDER); Vec3d pos = living.getOriginVector(); x = pos.x; diff --git a/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItSensor.java b/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItSensor.java index 8ade9ffd..01139651 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItSensor.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItSensor.java @@ -24,7 +24,7 @@ public class WantItNeedItSensor extends Sensor { entity.getBrain().getOptionalMemory(MemoryModuleType.VISIBLE_MOBS).ifPresent(targets -> { Optional target = targets.stream() - .filter(e -> (EnchantmentHelper.getEquipmentLevel(UEnchantments.DESIRED, e) * 10) >= entity.distanceTo(e)) + .filter(e -> (EnchantmentHelper.getEquipmentLevel(UEnchantments.WANT_IT_NEED_IT, e) * 10) >= entity.distanceTo(e)) .findFirst(); entity.getBrain().remember(MemoryModuleType.ATTACK_TARGET, target); diff --git a/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItTargetGoal.java b/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItTargetGoal.java index 59ee3c86..9490d2ae 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItTargetGoal.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItNeedItTargetGoal.java @@ -53,7 +53,7 @@ public class WantItNeedItTargetGoal extends Goal { } static boolean canTarget(LivingEntity e) { - return EnchantmentHelper.getEquipmentLevel(UEnchantments.DESIRED, e) > 0; + return EnchantmentHelper.getEquipmentLevel(UEnchantments.WANT_IT_NEED_IT, e) > 0; } } diff --git a/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItTakeItGoal.java b/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItTakeItGoal.java index 0c2064b1..97a947a0 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItTakeItGoal.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/ai/WantItTakeItGoal.java @@ -44,7 +44,7 @@ public class WantItTakeItGoal extends Goal { if (target == null || !WantItNeedItTargetGoal.canTarget(target)) { Optional item = VecHelper.findInRange(mob, mob.world, mob.getPos(), 16, - e -> !e.removed && e instanceof ItemEntity && EnchantmentHelper.getLevel(UEnchantments.DESIRED, ((ItemEntity)e).getStack()) > 0) + e -> !e.removed && e instanceof ItemEntity && EnchantmentHelper.getLevel(UEnchantments.WANT_IT_NEED_IT, ((ItemEntity)e).getStack()) > 0) .stream() .map(e -> (ItemEntity)e) .sorted(Comparator.comparing((Entity e) -> mob.distanceTo(e))) @@ -115,7 +115,7 @@ public class WantItTakeItGoal extends Goal { if (mob.world.random.nextInt(20) == 0) { for (EquipmentSlot slot : EquipmentSlot.values()) { ItemStack stack = target.getEquippedStack(slot); - if (EnchantmentHelper.getLevel(UEnchantments.DESIRED, stack) > 0) { + if (EnchantmentHelper.getLevel(UEnchantments.WANT_IT_NEED_IT, stack) > 0) { target.equipStack(slot, ItemStack.EMPTY); AwaitTickQueue.scheduleTask(mob.world, w -> { mob.tryEquip(stack); diff --git a/src/main/java/com/minelittlepony/unicopia/item/enchantment/UEnchantments.java b/src/main/java/com/minelittlepony/unicopia/item/enchantment/UEnchantments.java index e2a61d6b..6cfc1744 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/enchantment/UEnchantments.java +++ b/src/main/java/com/minelittlepony/unicopia/item/enchantment/UEnchantments.java @@ -23,7 +23,7 @@ public interface UEnchantments { /** * Makes a sound when there are interesting blocks in your area. */ - Enchantment GEM_LOCATION = register("gem_location", new GemFindingEnchantment()); + Enchantment GEM_FINDER = register("gem_finder", new GemFindingEnchantment()); /** * Protects against wall collisions and earth pony attacks! @@ -43,7 +43,7 @@ public interface UEnchantments { * * Weapons will become stronger the more allies you have around. */ - Enchantment COLLABORATOR = register("collaborator", new CollaboratorEnchantment()); + Enchantment HERDS = register("herds", new CollaboratorEnchantment()); /** * Alters gravity @@ -58,19 +58,19 @@ public interface UEnchantments { * * Mobs really want your candy. You'd better give it to them. */ - Enchantment DESIRED = register("desired", new WantItNeedItEnchantment()); + Enchantment WANT_IT_NEED_IT = register("want_it_need_it", new WantItNeedItEnchantment()); /** * Hahaha geddit? * * Random things happen. */ - PoisonedJokeEnchantment POISON_JOKE = register("poison_joke", new PoisonedJokeEnchantment()); + PoisonedJokeEnchantment POISONED_JOKE = register("poisoned_joke", new PoisonedJokeEnchantment()); /** * Who doesn't like a good freakout? */ - Enchantment STRESS = register("stress", new StressfulEnchantment()); + Enchantment STRESSED = register("stressed", new StressfulEnchantment()); /** * This item just wants to be held. diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 6419dbf2..3028af3f 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -164,15 +164,15 @@ "key.unicopia.hud_page_dn": "Hud Previous Page", "key.unicopia.hud_page_up": "Hud Next Page", - "enchantment.unicopia.gem_location": "Gem Locator", + "enchantment.unicopia.gem_finder": "Gem Finder", "enchantment.unicopia.padded": "Padded", "enchantment.unicopia.clingy": "Clings", "enchantment.unicopia.repulsion": "Repulsive", "enchantment.unicopia.heavy": "Heavy", - "enchantment.unicopia.collaborator": "Collaborator", - "enchantment.unicopia.desired": "Want It Need It", - "enchantment.unicopia.poison_joke": "Poisoned Joke", - "enchantment.unicopia.stress": "Stressful", + "enchantment.unicopia.herds": "Herds", + "enchantment.unicopia.want_it_need_it": "Want It Need It", + "enchantment.unicopia.poisoned_joke": "Poisoned Joke", + "enchantment.unicopia.stressed": "Stressed", "commands.race.success.self": "Your race has been updated", "commands.race.success.otherself": "%1$s changed race to %2$s",