First Checkup

This commit is contained in:
Corail31
2018-02-11 22:51:13 +01:00
parent 7f7605c089
commit d0fda72a59
86 changed files with 429 additions and 428 deletions
@@ -74,9 +74,9 @@ public class PacketClairvoyance implements IMessageHandler<Message, IMessage> {
PathPoint point = path.getPathPointFromIndex(i);
buf.writeInt(point.xCoord);
buf.writeInt(point.yCoord);
buf.writeInt(point.zCoord);
buf.writeInt(point.x);
buf.writeInt(point.y);
buf.writeInt(point.z);
}
}
}
@@ -20,7 +20,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
// Just to make sure that the side is correct
if(ctx.side.isServer()){
final EntityPlayerMP player = ctx.getServerHandler().playerEntity;
final EntityPlayerMP player = ctx.getServerHandler().player;
player.getServerWorld().addScheduledTask(new Runnable(){
@@ -28,7 +28,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
ItemStack wand = player.getHeldItemMainhand();
if(wand == null || !(wand.getItem() instanceof ItemWand)){
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)){
wand = player.getHeldItemOffhand();
}
@@ -41,7 +41,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
case NEXT_SPELL_KEY:
if(wand != null && wand.getItem() instanceof ItemWand){
if(!wand.isEmpty() && wand.getItem() instanceof ItemWand){
WandHelper.selectNextSpell(wand);
// This line fixes the bug with continuous spells casting when they shouldn't be
@@ -52,7 +52,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
case PREVIOUS_SPELL_KEY:
if(wand != null && wand.getItem() instanceof ItemWand){
if(!wand.isEmpty() && wand.getItem() instanceof ItemWand){
WandHelper.selectPreviousSpell(wand);
// This line fixes the bug with continuous spells casting when they shouldn't be