Normalise null checking in sounds

This commit is contained in:
fullwall 2016-06-09 19:01:25 +08:00
parent 844e0aa7ef
commit 94648aa53e
35 changed files with 178 additions and 408 deletions

View File

@ -16,7 +16,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.EntityBat;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -62,17 +61,13 @@ public class BatController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -125,9 +120,7 @@ public class BatController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -16,7 +16,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.EntityBlaze;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -61,17 +60,13 @@ public class BlazeController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -124,9 +119,7 @@ public class BlazeController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityCaveSpider;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -70,17 +69,13 @@ public class CaveSpiderController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -149,9 +144,7 @@ public class CaveSpiderController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityChicken;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -81,17 +80,13 @@ public class ChickenController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -160,9 +155,7 @@ public class ChickenController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityCow;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -82,17 +81,13 @@ public class CowController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -161,9 +156,7 @@ public class CowController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -22,7 +22,6 @@ import net.minecraft.server.v1_10_R1.EntityLightning;
import net.minecraft.server.v1_10_R1.EnumHand;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -81,16 +80,13 @@ public class CreeperController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return (SoundEffect) (npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString()));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -159,8 +155,7 @@ public class CreeperController extends MobEntityController {
@Override
protected SoundEffect G() {
return (SoundEffect) (npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString()));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -16,7 +16,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.EntityEnderDragon;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -61,17 +60,13 @@ public class EnderDragonController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -123,9 +118,7 @@ public class EnderDragonController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityEnderman;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -70,17 +69,13 @@ public class EndermanController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -148,9 +143,7 @@ public class EndermanController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityEndermite;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -70,17 +69,13 @@ public class EndermiteController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -148,9 +143,7 @@ public class EndermiteController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -16,7 +16,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.EntityGhast;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -48,16 +47,12 @@ public class GhastController extends MobEntityController {
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -115,9 +110,7 @@ public class GhastController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityGiantZombie;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class GiantController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class GiantController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityGuardian;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class GuardianController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -135,9 +130,7 @@ public class GuardianController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -20,7 +20,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityHorse;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -77,16 +76,12 @@ public class HorseController extends MobEntityController {
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -163,9 +158,7 @@ public class HorseController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityIronGolem;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class IronGolemController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class IronGolemController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -19,7 +19,6 @@ import net.citizensnpcs.util.nms.PlayerControllerMove;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityMagmaCube;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -59,17 +58,13 @@ public class MagmaCubeController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -137,9 +132,7 @@ public class MagmaCubeController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityMushroomCow;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -68,17 +67,13 @@ public class MushroomCowController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -146,9 +141,7 @@ public class MushroomCowController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityOcelot;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -67,17 +66,13 @@ public class OcelotController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -145,10 +140,7 @@ public class OcelotController extends MobEntityController {
@Override
protected SoundEffect G() {
MinecraftKey a = SoundEffect.a.b(super.G());
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, a == null ? "" : a.toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -19,7 +19,6 @@ import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityLightning;
import net.minecraft.server.v1_10_R1.EntityPig;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -68,17 +67,13 @@ public class PigController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -147,9 +142,7 @@ public class PigController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityPigZombie;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -57,17 +56,13 @@ public class PigZombieController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -136,9 +131,7 @@ public class PigZombieController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -16,7 +16,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.EntityPolarBear;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -48,16 +47,12 @@ public class PolarBearController extends MobEntityController {
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -110,9 +105,7 @@ public class PolarBearController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -19,7 +19,6 @@ import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityLiving;
import net.minecraft.server.v1_10_R1.EntityRabbit;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -68,17 +67,13 @@ public class RabbitController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -147,9 +142,7 @@ public class RabbitController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySheep;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -67,17 +66,13 @@ public class SheepController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -145,9 +140,7 @@ public class SheepController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -19,7 +19,6 @@ import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityAIBodyControl;
import net.minecraft.server.v1_10_R1.EntityShulker;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -57,17 +56,13 @@ public class ShulkerController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -135,9 +130,7 @@ public class ShulkerController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override
@ -181,13 +174,6 @@ public class ShulkerController extends MobEntityController {
}
}
@Override
public void n() {
if (npc == null) {
super.n();
}
}
@Override
public boolean m_() {
if (npc == null || !npc.isFlyable()) {
@ -197,6 +183,13 @@ public class ShulkerController extends MobEntityController {
}
}
@Override
public void n() {
if (npc == null) {
super.n();
}
}
@Override
protected EntityAIBodyControl s() {
return new EntityAIBodyControl(this);

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySilverfish;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class SilverfishController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class SilverfishController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySkeleton;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class SkeletonController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class SkeletonController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -20,7 +20,6 @@ import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityHuman;
import net.minecraft.server.v1_10_R1.EntitySlime;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -60,17 +59,13 @@ public class SlimeController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -146,9 +141,7 @@ public class SlimeController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySnowman;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class SnowmanController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class SnowmanController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySpider;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class SpiderController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class SpiderController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntitySquid;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class SquidController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class SquidController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -21,7 +21,6 @@ import net.minecraft.server.v1_10_R1.EntityVillager;
import net.minecraft.server.v1_10_R1.EnumHand;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.ItemStack;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -76,17 +75,13 @@ public class VillagerController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -155,9 +150,7 @@ public class VillagerController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityWitch;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class WitchController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class WitchController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -16,7 +16,6 @@ import net.citizensnpcs.npc.ai.NPCHolder;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.EntityWither;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -47,17 +46,13 @@ public class WitherController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -109,9 +104,7 @@ public class WitherController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityWolf;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -67,17 +66,13 @@ public class WolfController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.HURT_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.HURT_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -146,9 +141,7 @@ public class WolfController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -18,7 +18,6 @@ import net.citizensnpcs.util.Util;
import net.minecraft.server.v1_10_R1.BlockPosition;
import net.minecraft.server.v1_10_R1.EntityZombie;
import net.minecraft.server.v1_10_R1.IBlockData;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.NBTTagCompound;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.World;
@ -56,17 +55,13 @@ public class ZombieController extends MobEntityController {
}
@Override
protected SoundEffect bW() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bW()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bW()).toString())));
protected SoundEffect bV() {
return NMS.getSoundEffect(npc, super.bV(), NPC.DEATH_SOUND_METADATA);
}
@Override
protected SoundEffect bV() {
return npc == null || !npc.data().has(NPC.DEATH_SOUND_METADATA) ? super.bV()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.DEATH_SOUND_METADATA, SoundEffect.a.b(super.bV()).toString())));
protected SoundEffect bW() {
return NMS.getSoundEffect(npc, super.bW(), NPC.HURT_SOUND_METADATA);
}
@Override
@ -134,9 +129,7 @@ public class ZombieController extends MobEntityController {
@Override
protected SoundEffect G() {
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.G()
: SoundEffect.a.get(new MinecraftKey(
npc.data().get(NPC.AMBIENT_SOUND_METADATA, SoundEffect.a.b(super.G()).toString())));
return NMS.getSoundEffect(npc, super.G(), NPC.AMBIENT_SOUND_METADATA);
}
@Override

View File

@ -80,12 +80,14 @@ import net.minecraft.server.v1_10_R1.EntityTrackerEntry;
import net.minecraft.server.v1_10_R1.EntityTypes;
import net.minecraft.server.v1_10_R1.GenericAttributes;
import net.minecraft.server.v1_10_R1.MathHelper;
import net.minecraft.server.v1_10_R1.MinecraftKey;
import net.minecraft.server.v1_10_R1.MobEffects;
import net.minecraft.server.v1_10_R1.NavigationAbstract;
import net.minecraft.server.v1_10_R1.NetworkManager;
import net.minecraft.server.v1_10_R1.Packet;
import net.minecraft.server.v1_10_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_10_R1.PathfinderGoalSelector;
import net.minecraft.server.v1_10_R1.SoundEffect;
import net.minecraft.server.v1_10_R1.Vec3D;
import net.minecraft.server.v1_10_R1.World;
import net.minecraft.server.v1_10_R1.WorldServer;
@ -473,6 +475,11 @@ public class NMS {
}
}
public static SoundEffect getSoundEffect(NPC npc, SoundEffect snd, String meta) {
return npc == null || !npc.data().has(meta) ? snd
: SoundEffect.a.get(new MinecraftKey(npc.data().get(meta, snd == null ? "" : snd.toString())));
}
public static float getSpeedFor(NPC npc) {
if (!npc.isSpawned() || !(npc.getEntity() instanceof LivingEntity))
return DEFAULT_SPEED;