mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-24 10:11:24 +01:00
Fix horse mounted navigation
This commit is contained in:
parent
22fd1da0c8
commit
85c1f8f732
@ -24,8 +24,9 @@ public class Settings {
|
||||
for (Setting setting : Setting.values()) {
|
||||
if (!root.keyExists(setting.path)) {
|
||||
setting.setAtKey(root);
|
||||
} else
|
||||
} else {
|
||||
setting.loadFromKey(root);
|
||||
}
|
||||
}
|
||||
updateMessagingSettings();
|
||||
|
||||
|
@ -135,7 +135,7 @@ public class AStarNavigationStrategy extends AbstractPathStrategy {
|
||||
Location currLoc = npc.getEntity().getLocation(NPC_LOCATION);
|
||||
Vector destVector = new Vector(vector.getX() + 0.5, vector.getY(), vector.getZ() + 0.5);
|
||||
/* Proper door movement - gets stuck on corners at times
|
||||
|
||||
|
||||
Block block = currLoc.getWorld().getBlockAt(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ());
|
||||
if (MinecraftBlockExaminer.isDoor(block.getType())) {
|
||||
Door door = (Door) block.getState().getData();
|
||||
|
@ -103,14 +103,6 @@ public class HorseController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cj() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_16_R3.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -121,6 +113,14 @@ public class HorseController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cs() { // horse boolean
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
|
@ -102,14 +102,6 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cj() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_16_R3.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -120,6 +112,14 @@ public class HorseDonkeyController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cs() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
|
@ -102,14 +102,6 @@ public class HorseMuleController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cj() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_16_R3.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -120,6 +112,14 @@ public class HorseMuleController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cs() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
|
@ -103,14 +103,6 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cj() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_16_R3.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -121,6 +113,14 @@ public class HorseSkeletonController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cs() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
|
@ -103,14 +103,6 @@ public class HorseZombieController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cj() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cj();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void collide(net.minecraft.server.v1_16_R3.Entity entity) {
|
||||
// this method is called by both the entities involved - cancelling
|
||||
@ -121,6 +113,14 @@ public class HorseZombieController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cs() {
|
||||
if (npc != null && riding) {
|
||||
return true;
|
||||
}
|
||||
return super.cs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
|
@ -31,7 +31,6 @@ public class HumanController extends AbstractEntityController {
|
||||
final WorldServer nmsWorld = ((CraftWorld) at.getWorld()).getHandle();
|
||||
String coloredName = npc.getFullName();
|
||||
String name = coloredName.length() > 16 ? coloredName.substring(0, 16) : coloredName;
|
||||
|
||||
UUID uuid = npc.getUniqueId();
|
||||
if (uuid.version() == 4) { // clear version
|
||||
long msb = uuid.getMostSignificantBits();
|
||||
|
@ -327,9 +327,8 @@ public class NMSImpl implements NMSBridge {
|
||||
EntityLiving handle = getHandle(attacker);
|
||||
EntityLiving target = getHandle(btarget);
|
||||
if (handle instanceof EntityPlayer) {
|
||||
EntityPlayer humanHandle = (EntityPlayer) handle;
|
||||
humanHandle.attack(target);
|
||||
PlayerAnimation.ARM_SWING.play(humanHandle.getBukkitEntity());
|
||||
((EntityPlayer) handle).attack(target);
|
||||
PlayerAnimation.ARM_SWING.play((Player) handle.getBukkitEntity());
|
||||
return;
|
||||
}
|
||||
if (handle instanceof EntityInsentient) {
|
||||
|
Loading…
Reference in New Issue
Block a user