mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-19 22:51:48 +01:00
Fix location missing bug... and bats
This commit is contained in:
parent
e43a233ade
commit
71d4752c58
@ -112,6 +112,7 @@ public class CitizensBatNPC extends CitizensMobNPC {
|
|||||||
@Override
|
@Override
|
||||||
public void j_() {
|
public void j_() {
|
||||||
super.j_();
|
super.j_();
|
||||||
|
if (npc != null)
|
||||||
npc.update();
|
npc.update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
|||||||
if (inLiquid) {
|
if (inLiquid) {
|
||||||
motY += 0.04;
|
motY += 0.04;
|
||||||
} else //(handled elsewhere)*/
|
} else //(handled elsewhere)*/
|
||||||
if (onGround && bW == 0) {
|
if (onGround && Math.abs(bW) < EPSILON) {
|
||||||
bf(); // jump
|
bf(); // jump
|
||||||
bW = 10;
|
bW = 10;
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ import net.minecraft.server.EntityPlayer;
|
|||||||
|
|
||||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
@ -102,9 +103,10 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean mount(Player toMount) {
|
public boolean mount(Player toMount) {
|
||||||
if (npc.getBukkitEntity().getPassenger() != null)
|
Entity passenger = npc.getBukkitEntity().getPassenger();
|
||||||
|
if (passenger != null && passenger != toMount)
|
||||||
return false;
|
return false;
|
||||||
((CraftPlayer) toMount).getHandle().setPassengerOf(getHandle());
|
enterOrLeaveVehicle(toMount);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import net.citizensnpcs.api.trait.Trait;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|
||||||
public class CurrentLocation extends Trait {
|
public class CurrentLocation extends Trait {
|
||||||
@Persist(required = true)
|
@Persist(value = "", required = true)
|
||||||
private Location loc;
|
private Location loc;
|
||||||
|
|
||||||
public CurrentLocation() {
|
public CurrentLocation() {
|
||||||
|
Loading…
Reference in New Issue
Block a user