Update some names

This commit is contained in:
Sollace 2021-02-17 21:46:07 +02:00
parent fbbbe9a5c1
commit ee3fdc14c9
7 changed files with 16 additions and 16 deletions

View file

@ -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();

View file

@ -38,7 +38,7 @@ public class MagicAuraSoundInstance extends MovingSoundInstance {
@Override
public void tick() {
Optional<SimpleEnchantment.Data> data = living.getEnchants().getOrEmpty(UEnchantments.GEM_LOCATION);
Optional<SimpleEnchantment.Data> data = living.getEnchants().getOrEmpty(UEnchantments.GEM_FINDER);
Vec3d pos = living.getOriginVector();
x = pos.x;

View file

@ -24,7 +24,7 @@ public class WantItNeedItSensor extends Sensor<LivingEntity> {
entity.getBrain().getOptionalMemory(MemoryModuleType.VISIBLE_MOBS).ifPresent(targets -> {
Optional<LivingEntity> 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);

View file

@ -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;
}
}

View file

@ -44,7 +44,7 @@ public class WantItTakeItGoal extends Goal {
if (target == null || !WantItNeedItTargetGoal.canTarget(target)) {
Optional<ItemEntity> 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);

View file

@ -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.

View file

@ -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",