mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-28 10:12:14 +01:00
Fix ghast not updating
This commit is contained in:
parent
98b2f274fc
commit
f64b40ad02
@ -1,5 +1,12 @@
|
||||
package net.citizensnpcs.npc.entity;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_8_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftGhast;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import net.citizensnpcs.api.event.NPCPushEvent;
|
||||
import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
@ -11,13 +18,6 @@ import net.minecraft.server.v1_8_R2.EntityGhast;
|
||||
import net.minecraft.server.v1_8_R2.NBTTagCompound;
|
||||
import net.minecraft.server.v1_8_R2.World;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_8_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftGhast;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class GhastController extends MobEntityController {
|
||||
public GhastController() {
|
||||
super(EntityGhastNPC.class);
|
||||
@ -43,6 +43,11 @@ public class GhastController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bM() {
|
||||
return npc != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String bo() {
|
||||
return npc == null ? super.bo() : npc.data().get(NPC.HURT_SOUND_METADATA, super.bo());
|
||||
@ -87,6 +92,14 @@ public class GhastController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void E() {
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
}
|
||||
super.E();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void g(double x, double y, double z) {
|
||||
if (npc == null) {
|
||||
@ -123,8 +136,8 @@ public class GhastController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
protected String z() {
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.z() : npc.data().get(
|
||||
NPC.AMBIENT_SOUND_METADATA, super.z());
|
||||
return npc == null || !npc.data().has(NPC.AMBIENT_SOUND_METADATA) ? super.z()
|
||||
: npc.data().get(NPC.AMBIENT_SOUND_METADATA, super.z());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user