Split up and reorganise WizardryUtilities

This commit is contained in:
Electroblob77
2020-06-13 23:29:01 +01:00
parent 57e96458d5
commit 238b9d04bb
189 changed files with 1724 additions and 1731 deletions
@@ -6,11 +6,8 @@ import electroblob.wizardry.item.SpellActions;
import electroblob.wizardry.registry.WizardryItems;
import electroblob.wizardry.registry.WizardryPotions;
import electroblob.wizardry.registry.WizardrySounds;
import electroblob.wizardry.util.AllyDesignationSystem;
import electroblob.wizardry.util.ParticleBuilder;
import electroblob.wizardry.util.*;
import electroblob.wizardry.util.ParticleBuilder.Type;
import electroblob.wizardry.util.SpellModifiers;
import electroblob.wizardry.util.WizardryUtilities;
import net.minecraft.entity.*;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.entity.passive.EntitySheep;
@@ -50,7 +47,7 @@ public class MindControl extends SpellRay {
@Override
protected boolean onEntityHit(World world, Entity target, Vec3d hit, EntityLivingBase caster, Vec3d origin, int ticksInUse, SpellModifiers modifiers){
if(WizardryUtilities.isLiving(target)){
if(EntityUtils.isLiving(target)){
if(!canControl(target)){
if(!world.isRemote){
@@ -71,7 +68,7 @@ public class MindControl extends SpellRay {
}
if(target instanceof EntitySheep && ((EntitySheep)target).getFleeceColor() == EnumDyeColor.BLUE
&& WizardryUtilities.canDamageBlocks(caster, world)){
&& EntityUtils.canDamageBlocks(caster, world)){
if(!world.isRemote) ((EntitySheep)target).setFleeceColor(EnumDyeColor.RED); // Wololo!
world.playSound(caster.posX, caster.posY, caster.posZ, SoundEvents.EVOCATION_ILLAGER_PREPARE_WOLOLO, WizardrySounds.SPELLS, 1, 1, false);
}
@@ -135,7 +132,7 @@ public class MindControl extends SpellRay {
// As of 1.1, this now uses the creature's follow range, like normal targeting. It also
// no longer lasts until the creature dies; instead it is a potion effect which continues to
// set the target until it wears off.
List<EntityLivingBase> possibleTargets = WizardryUtilities.getEntitiesWithinRadius(
List<EntityLivingBase> possibleTargets = EntityUtils.getEntitiesWithinRadius(
target.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).getAttributeValue(),
target.posX, target.posY, target.posZ, world);
@@ -172,7 +169,7 @@ public class MindControl extends SpellRay {
if(entityNBT != null && entityNBT.hasUniqueId(MindControl.NBT_KEY)){
Entity caster = WizardryUtilities.getEntityByUUID(world, entityNBT.getUniqueId(MindControl.NBT_KEY));
Entity caster = EntityUtils.getEntityByUUID(world, entityNBT.getUniqueId(MindControl.NBT_KEY));
if(caster instanceof EntityLivingBase){