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(); ((BlockDestructionManager.Source)w).getDestructionManager().tick();
}); });
ResourceManagerHelper.get(ResourceType.SERVER_DATA).registerReloadListener(TreeTypeLoader.INSTANCE); 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(); UItems.bootstrap();
UPotions.bootstrap(); UPotions.bootstrap();

View file

@ -38,7 +38,7 @@ public class MagicAuraSoundInstance extends MovingSoundInstance {
@Override @Override
public void tick() { 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(); Vec3d pos = living.getOriginVector();
x = pos.x; x = pos.x;

View file

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

View file

@ -53,7 +53,7 @@ public class WantItNeedItTargetGoal extends Goal {
} }
static boolean canTarget(LivingEntity e) { 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)) { if (target == null || !WantItNeedItTargetGoal.canTarget(target)) {
Optional<ItemEntity> item = VecHelper.findInRange(mob, mob.world, mob.getPos(), 16, 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() .stream()
.map(e -> (ItemEntity)e) .map(e -> (ItemEntity)e)
.sorted(Comparator.comparing((Entity e) -> mob.distanceTo(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) { if (mob.world.random.nextInt(20) == 0) {
for (EquipmentSlot slot : EquipmentSlot.values()) { for (EquipmentSlot slot : EquipmentSlot.values()) {
ItemStack stack = target.getEquippedStack(slot); 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); target.equipStack(slot, ItemStack.EMPTY);
AwaitTickQueue.scheduleTask(mob.world, w -> { AwaitTickQueue.scheduleTask(mob.world, w -> {
mob.tryEquip(stack); mob.tryEquip(stack);

View file

@ -23,7 +23,7 @@ public interface UEnchantments {
/** /**
* Makes a sound when there are interesting blocks in your area. * 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! * 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. * Weapons will become stronger the more allies you have around.
*/ */
Enchantment COLLABORATOR = register("collaborator", new CollaboratorEnchantment()); Enchantment HERDS = register("herds", new CollaboratorEnchantment());
/** /**
* Alters gravity * Alters gravity
@ -58,19 +58,19 @@ public interface UEnchantments {
* *
* Mobs really want your candy. You'd better give it to them. * 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? * Hahaha geddit?
* *
* Random things happen. * 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? * 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. * 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_dn": "Hud Previous Page",
"key.unicopia.hud_page_up": "Hud Next 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.padded": "Padded",
"enchantment.unicopia.clingy": "Clings", "enchantment.unicopia.clingy": "Clings",
"enchantment.unicopia.repulsion": "Repulsive", "enchantment.unicopia.repulsion": "Repulsive",
"enchantment.unicopia.heavy": "Heavy", "enchantment.unicopia.heavy": "Heavy",
"enchantment.unicopia.collaborator": "Collaborator", "enchantment.unicopia.herds": "Herds",
"enchantment.unicopia.desired": "Want It Need It", "enchantment.unicopia.want_it_need_it": "Want It Need It",
"enchantment.unicopia.poison_joke": "Poisoned Joke", "enchantment.unicopia.poisoned_joke": "Poisoned Joke",
"enchantment.unicopia.stress": "Stressful", "enchantment.unicopia.stressed": "Stressed",
"commands.race.success.self": "Your race has been updated", "commands.race.success.self": "Your race has been updated",
"commands.race.success.otherself": "%1$s changed race to %2$s", "commands.race.success.otherself": "%1$s changed race to %2$s",