mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-27 13:15:33 +01:00
Misc. translation fixes
This commit is contained in:
parent
dba652bb96
commit
6a7744859b
@ -117,9 +117,7 @@ public class MCTargetStrategy implements PathStrategy, EntityTarget {
|
||||
}
|
||||
|
||||
private static final int ATTACK_DELAY_TICKS = 20;
|
||||
|
||||
private static final double ATTACK_DISTANCE = 1.75 * 1.75;
|
||||
|
||||
private static final Location HANDLE_LOCATION = new Location(null, 0, 0, 0);
|
||||
private static final Location TARGET_LOCATION = new Location(null, 0, 0, 0);
|
||||
}
|
@ -65,7 +65,7 @@ public class BatController extends MobEntityController {
|
||||
@Override
|
||||
public void bo() {
|
||||
if (npc == null)
|
||||
super.bl();
|
||||
super.bo();
|
||||
else {
|
||||
NMS.updateAI(this);
|
||||
npc.update();
|
||||
|
@ -115,7 +115,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
}
|
||||
|
||||
getNavigation().e(true);
|
||||
X = 1F; // stepHeight - must not stay as the default 0 (breaks steps).
|
||||
Y = 1F; // stepHeight - must not stay as the default 0 (breaks steps).
|
||||
// Check the EntityPlayer constructor for the new name.
|
||||
|
||||
try {
|
||||
@ -163,7 +163,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
NMS.updateAI(this);
|
||||
// taken from EntityLiving update method
|
||||
if (bG) {
|
||||
/* boolean inLiquid = H() || J();
|
||||
/* boolean inLiquid = G() || I();
|
||||
if (inLiquid) {
|
||||
motY += 0.04;
|
||||
} else //(handled elsewhere)*/
|
||||
@ -174,13 +174,13 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
} else
|
||||
bX = 0;
|
||||
|
||||
bF *= 0.98F;
|
||||
bD *= 0.98F;
|
||||
bE *= 0.9F;
|
||||
bE *= 0.98F;
|
||||
bF *= 0.9F;
|
||||
|
||||
float prev = aO;
|
||||
aO *= bE();
|
||||
e(bF, bD); // movement method
|
||||
e(bD, bE); // movement method
|
||||
aO = prev;
|
||||
NMS.setHeadYaw(this, yaw);
|
||||
}
|
||||
@ -190,7 +190,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
|
||||
Location current = getBukkitEntity().getLocation(packetLocationCache);
|
||||
Packet[] packets = new Packet[navigating ? 5 : 6];
|
||||
if (!navigating) {
|
||||
packets[5] = new Packet35EntityHeadRotation(id, (byte) MathHelper.d(az * 256.0F / 360.0F));
|
||||
packets[5] = new Packet35EntityHeadRotation(id,
|
||||
(byte) MathHelper.d(NMS.getHeadYaw(this) * 256.0F / 360.0F));
|
||||
}
|
||||
for (int i = 0; i < 5; i++) {
|
||||
packets[i] = new Packet5EntityEquipment(id, i, getEquipment(i));
|
||||
|
@ -49,9 +49,9 @@ public class GhastController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc != null)
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
else
|
||||
} else
|
||||
super.bq();
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,9 @@ public class GiantController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.bq();
|
||||
else
|
||||
} else
|
||||
npc.update();
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,6 @@ public class MushroomCowController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,6 @@ public class PigZombieController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,9 +57,9 @@ public class PigZombieController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.bq();
|
||||
else {
|
||||
} else {
|
||||
NMS.updateAI(this);
|
||||
npc.update();
|
||||
}
|
||||
|
@ -57,9 +57,9 @@ public class SilverfishController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.bq();
|
||||
else {
|
||||
} else {
|
||||
NMS.updateAI(this);
|
||||
npc.update();
|
||||
}
|
||||
|
@ -39,7 +39,6 @@ public class SkeletonController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,6 @@ public class SlimeController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
setSize(3);
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,9 +58,9 @@ public class SlimeController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void bq() {
|
||||
if (npc == null)
|
||||
if (npc == null) {
|
||||
super.bq();
|
||||
else {
|
||||
} else {
|
||||
npc.update();
|
||||
NMS.updateAI(this);
|
||||
}
|
||||
|
@ -39,7 +39,6 @@ public class SnowmanController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ public class SpiderController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ public class SquidController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ import net.citizensnpcs.npc.MobEntityController;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.NMS;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_5_R1.EntityAgeable;
|
||||
import net.minecraft.server.v1_5_R1.EntityHuman;
|
||||
import net.minecraft.server.v1_5_R1.EntityVillager;
|
||||
import net.minecraft.server.v1_5_R1.World;
|
||||
@ -35,20 +34,18 @@ public class VillagerController extends MobEntityController {
|
||||
public EntityVillagerNPC(World world) {
|
||||
this(world, null);
|
||||
}
|
||||
public EntityVillagerNPC(World world, NPC npc) {
|
||||
|
||||
public EntityVillagerNPC(World world, NPC npc) {
|
||||
super(world);
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a_(EntityHuman entityhuman) {
|
||||
if (npc == null)
|
||||
return super.a_(entityhuman);
|
||||
return false; // block trades
|
||||
return npc == null ? super.a_(entityhuman) : false; // block trades
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -39,7 +39,6 @@ public class WolfController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMS.clearGoals(goalSelector, targetSelector);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,10 +11,9 @@ import net.minecraft.server.v1_5_R1.NetworkManager;
|
||||
import net.minecraft.server.v1_5_R1.Packet;
|
||||
|
||||
public class EmptyNetworkManager extends NetworkManager {
|
||||
|
||||
public EmptyNetworkManager(IConsoleLogManager logManager, Socket socket, String string, Connection conn, PrivateKey key) throws IOException {
|
||||
public EmptyNetworkManager(IConsoleLogManager logManager, Socket socket, String string, Connection conn,
|
||||
PrivateKey key) throws IOException {
|
||||
super(logManager, socket, string, conn, key);
|
||||
|
||||
NMS.stopNetworkThreads(this);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
|
||||
public class EmptySocket extends Socket {
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() {
|
||||
return new ByteArrayInputStream(EMPTY);
|
||||
|
@ -101,8 +101,7 @@ public class NMS {
|
||||
return;
|
||||
if (knockbackLevel > 0) {
|
||||
target.g(-MathHelper.sin((float) (handle.yaw * Math.PI / 180.0F)) * knockbackLevel * 0.5F, 0.1D,
|
||||
|
||||
MathHelper.cos((float) (handle.yaw * Math.PI / 180.0F)) * knockbackLevel * 0.5F);
|
||||
MathHelper.cos((float) (handle.yaw * Math.PI / 180.0F)) * knockbackLevel * 0.5F);
|
||||
handle.motX *= 0.6D;
|
||||
handle.motZ *= 0.6D;
|
||||
}
|
||||
@ -153,6 +152,10 @@ public class NMS {
|
||||
return ((CraftLivingEntity) entity).getHandle();
|
||||
}
|
||||
|
||||
public static float getHeadYaw(EntityLiving handle) {
|
||||
return handle.aA;
|
||||
}
|
||||
|
||||
public static float getSpeedFor(NPC npc) {
|
||||
EntityType entityType = npc.getBukkitEntity().getType();
|
||||
Float cached = MOVEMENT_SPEEDS.get(entityType);
|
||||
@ -174,7 +177,7 @@ public class NMS {
|
||||
|
||||
public static boolean inWater(LivingEntity entity) {
|
||||
EntityLiving mcEntity = getHandle(entity);
|
||||
return mcEntity.H() || mcEntity.I();
|
||||
return mcEntity.G() || mcEntity.I();
|
||||
}
|
||||
|
||||
public static void loadPlugins() {
|
||||
@ -271,10 +274,9 @@ public class NMS {
|
||||
while (yaw >= 180.0F) {
|
||||
yaw -= 360.0F;
|
||||
}
|
||||
handle.az = yaw;
|
||||
if (!(handle instanceof EntityHuman))
|
||||
handle.ax = yaw;
|
||||
handle.aA = yaw;
|
||||
if (!(handle instanceof EntityHuman))
|
||||
handle.ay = yaw;
|
||||
}
|
||||
|
||||
public static void setLandSpeedModifier(EntityLiving handle, float speed) {
|
||||
|
Loading…
Reference in New Issue
Block a user