mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-23 07:41:29 +01:00
Fix wolf targeting with Citizens installed
This commit is contained in:
parent
476debfcd7
commit
9ad7c976bf
@ -196,7 +196,7 @@ public class WolfController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public boolean setGoalTarget(EntityLiving entityliving, EntityTargetEvent.TargetReason reason, boolean fire) {
|
||||
return npc == null ? super.setGoalTarget(killer, reason, fire) : false;
|
||||
return npc == null ? super.setGoalTarget(entityliving, reason, fire) : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class WolfController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public boolean setGoalTarget(EntityLiving entityliving, EntityTargetEvent.TargetReason reason, boolean fire) {
|
||||
return npc == null ? super.setGoalTarget(killer, reason, fire) : false;
|
||||
return npc == null ? super.setGoalTarget(entityliving, reason, fire) : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,10 @@ public class BatController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -86,8 +86,10 @@ public class BlazeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityCaveSpider;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -68,13 +69,17 @@ public class CaveSpiderController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -87,6 +92,11 @@ public class CaveSpiderController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -101,8 +111,10 @@ public class CaveSpiderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -132,15 +144,6 @@ public class CaveSpiderController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityChicken;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -79,13 +80,17 @@ public class ChickenController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -98,6 +103,11 @@ public class ChickenController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -112,8 +122,10 @@ public class ChickenController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -143,15 +155,6 @@ public class ChickenController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityCow;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -80,13 +81,17 @@ public class CowController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -99,6 +104,11 @@ public class CowController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -113,8 +123,10 @@ public class CowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -144,15 +156,6 @@ public class CowController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityCreeper;
|
||||
import net.minecraft.server.v1_12_R1.EntityLightning;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
@ -70,13 +71,17 @@ public class CreeperController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -88,6 +93,11 @@ public class CreeperController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -102,8 +112,10 @@ public class CreeperController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -134,15 +146,6 @@ public class CreeperController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -14,6 +14,7 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityEnderDragon;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_12_R1.SoundEffect;
|
||||
@ -63,11 +64,6 @@ public class EnderDragonController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -77,6 +73,11 @@ public class EnderDragonController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -84,8 +85,10 @@ public class EnderDragonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityEnderman;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -68,13 +69,17 @@ public class EndermanController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -86,6 +91,11 @@ public class EndermanController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -100,8 +110,10 @@ public class EndermanController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -131,15 +143,6 @@ public class EndermanController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityEndermite;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -68,13 +69,17 @@ public class EndermiteController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -86,6 +91,11 @@ public class EndermiteController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -100,8 +110,10 @@ public class EndermiteController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -131,15 +143,6 @@ public class EndermiteController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -227,8 +227,10 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityEvoker;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class EvokerController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,6 +78,11 @@ public class EvokerController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -87,8 +97,10 @@ public class EvokerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -118,15 +130,6 @@ public class EvokerController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -77,8 +77,10 @@ public class GhastController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -54,6 +54,15 @@ public class GiantController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
@ -87,8 +96,10 @@ public class GiantController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -123,15 +134,6 @@ public class GiantController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
if (npc != null && !(bukkitEntity instanceof NPCHolder)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityGuardian;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class GuardianController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,6 +78,11 @@ public class GuardianController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -87,8 +97,10 @@ public class GuardianController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -118,15 +130,6 @@ public class GuardianController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityGuardianElder;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class GuardianElderController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,6 +78,11 @@ public class GuardianElderController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -87,8 +97,10 @@ public class GuardianElderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -118,15 +130,6 @@ public class GuardianElderController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -18,6 +18,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityHorse;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -75,13 +76,17 @@ public class HorseController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,6 +99,11 @@ public class HorseController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -108,8 +118,10 @@ public class HorseController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -139,15 +151,6 @@ public class HorseController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -18,6 +18,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityHorseDonkey;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -75,13 +76,17 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,6 +99,11 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -108,8 +118,10 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -139,15 +151,6 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -18,6 +18,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityHorseMule;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -75,13 +76,17 @@ public class HorseMuleController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,6 +99,11 @@ public class HorseMuleController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -108,8 +118,10 @@ public class HorseMuleController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -139,15 +151,6 @@ public class HorseMuleController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -18,6 +18,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityHorseSkeleton;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -76,13 +77,17 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -95,6 +100,11 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -109,8 +119,10 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -140,15 +152,6 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -18,6 +18,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityHorseZombie;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -76,13 +77,17 @@ public class HorseZombieController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -95,6 +100,11 @@ public class HorseZombieController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -109,8 +119,10 @@ public class HorseZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -140,15 +152,6 @@ public class HorseZombieController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -97,8 +97,10 @@ public class IllusionerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityIronGolem;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class IronGolemController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class IronGolemController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class IronGolemController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class IronGolemController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
@ -18,6 +18,7 @@ import net.citizensnpcs.trait.HorseModifiers;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityLlama;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -75,13 +76,17 @@ public class LlamaController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,6 +99,11 @@ public class LlamaController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -108,8 +118,10 @@ public class LlamaController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -139,15 +151,6 @@ public class LlamaController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -16,6 +16,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityMagmaCube;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -56,6 +57,15 @@ public class MagmaCubeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void B_() {
|
||||
super.B_();
|
||||
@ -69,11 +79,6 @@ public class MagmaCubeController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -83,6 +88,11 @@ public class MagmaCubeController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -97,8 +107,10 @@ public class MagmaCubeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -128,15 +140,6 @@ public class MagmaCubeController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityMushroomCow;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -66,13 +67,17 @@ public class MushroomCowController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,6 +89,11 @@ public class MushroomCowController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -98,8 +108,10 @@ public class MushroomCowController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -129,15 +141,6 @@ public class MushroomCowController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityOcelot;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -65,13 +66,17 @@ public class OcelotController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -83,6 +88,11 @@ public class OcelotController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -97,8 +107,10 @@ public class OcelotController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -128,15 +140,6 @@ public class OcelotController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -83,8 +83,10 @@ public class ParrotController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityLightning;
|
||||
import net.minecraft.server.v1_12_R1.EntityPig;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
@ -66,13 +67,17 @@ public class PigController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -85,6 +90,11 @@ public class PigController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -99,8 +109,10 @@ public class PigController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -130,15 +142,6 @@ public class PigController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityPigZombie;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -55,13 +56,17 @@ public class PigZombieController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -73,6 +78,11 @@ public class PigZombieController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -87,8 +97,10 @@ public class PigZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -119,15 +131,6 @@ public class PigZombieController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -14,6 +14,7 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityPolarBear;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_12_R1.SoundEffect;
|
||||
@ -60,11 +61,6 @@ public class PolarBearController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -75,6 +71,11 @@ public class PolarBearController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -82,8 +83,10 @@ public class PolarBearController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityLiving;
|
||||
import net.minecraft.server.v1_12_R1.EntityRabbit;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
@ -66,13 +67,17 @@ public class RabbitController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -85,6 +90,11 @@ public class RabbitController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -99,8 +109,10 @@ public class RabbitController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -130,15 +142,6 @@ public class RabbitController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySheep;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -65,13 +66,17 @@ public class SheepController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -83,6 +88,11 @@ public class SheepController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -97,8 +107,10 @@ public class SheepController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -128,15 +140,6 @@ public class SheepController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityAIBodyControl;
|
||||
import net.minecraft.server.v1_12_R1.EntityShulker;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
@ -54,6 +55,15 @@ public class ShulkerController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void B_() {
|
||||
if (npc != null) {
|
||||
@ -68,11 +78,6 @@ public class ShulkerController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -82,6 +87,11 @@ public class ShulkerController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -96,8 +106,10 @@ public class ShulkerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -127,15 +139,6 @@ public class ShulkerController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySkeleton;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class SkeletonController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class SkeletonController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class SkeletonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class SkeletonController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySkeletonStray;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class SkeletonStrayController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySkeletonWither;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class SkeletonWitherController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -16,6 +16,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityHuman;
|
||||
import net.minecraft.server.v1_12_R1.EntitySlime;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
@ -57,6 +58,15 @@ public class SlimeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void B_() {
|
||||
super.B_();
|
||||
@ -70,11 +80,6 @@ public class SlimeController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -85,6 +90,11 @@ public class SlimeController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void d(EntityHuman human) {
|
||||
if (npc == null) {
|
||||
@ -106,8 +116,10 @@ public class SlimeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -137,15 +149,6 @@ public class SlimeController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySnowman;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class SnowmanController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class SnowmanController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class SnowmanController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class SnowmanController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySpider;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class SpiderController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class SpiderController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class SpiderController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class SpiderController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntitySquid;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class SquidController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class SquidController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class SquidController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class SquidController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -14,6 +14,7 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityVex;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_12_R1.SoundEffect;
|
||||
@ -49,11 +50,6 @@ public class VexController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -64,6 +60,11 @@ public class VexController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -71,8 +72,10 @@ public class VexController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -136,8 +136,10 @@ public class VillagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityVindicator;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -65,13 +66,17 @@ public class VindicatorController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,6 +89,11 @@ public class VindicatorController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -98,8 +108,10 @@ public class VindicatorController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -129,15 +141,6 @@ public class VindicatorController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityWitch;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class WitchController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class WitchController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class WitchController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class WitchController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -14,6 +14,7 @@ import net.citizensnpcs.nms.v1_12_R1.util.NMSImpl;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityWither;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_12_R1.SoundEffect;
|
||||
@ -49,11 +50,6 @@ public class WitherController extends MobEntityController {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_12_R1.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -63,6 +59,11 @@ public class WitherController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -70,8 +71,10 @@ public class WitherController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
|
@ -110,8 +110,10 @@ public class WolfController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -197,7 +199,7 @@ public class WolfController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public boolean setGoalTarget(EntityLiving entityliving, EntityTargetEvent.TargetReason reason, boolean fire) {
|
||||
return npc == null ? super.setGoalTarget(killer, reason, fire) : false;
|
||||
return npc == null ? super.setGoalTarget(entityliving, reason, fire) : false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityZombie;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class ZombieController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class ZombieController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class ZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class ZombieController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityZombieHusk;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class ZombieHuskController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
protected SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class ZombieHuskController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class ZombieHuskController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class ZombieHuskController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity; import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
package net.citizensnpcs.nms.v1_12_R1.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.CraftServer;
|
||||
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_12_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_12_R1.DamageSource;
|
||||
import net.minecraft.server.v1_12_R1.EntityZombieVillager;
|
||||
import net.minecraft.server.v1_12_R1.IBlockData;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
@ -54,13 +55,17 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
public SoundEffect cf() {
|
||||
return NMSImpl.getSoundEffect(npc, super.cf(), NPC.DEATH_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,6 +77,11 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
Util.callCollisionEvent(npc, entity.getBukkitEntity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
@ -86,8 +96,10 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void enderTeleportTo(double d0, double d1, double d2) {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.enderTeleportTo(d0, d1, d2);
|
||||
return;
|
||||
}
|
||||
NPCEnderTeleportEvent event = new NPCEnderTeleportEvent(npc);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled()) {
|
||||
@ -117,15 +129,6 @@ public class ZombieVillagerController extends MobEntityController {
|
||||
// cancelled.
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(float f, float f1, float f2) {
|
||||
if (npc == null || !npc.isFlyable()) {
|
||||
super.a(f, f1, f2);
|
||||
} else {
|
||||
NMSImpl.flyingMoveLogic(this, f, f1, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEffect F() {
|
||||
return NMSImpl.getSoundEffect(npc, super.F(), NPC.AMBIENT_SOUND_METADATA);
|
||||
|
Loading…
Reference in New Issue
Block a user