Remove unnecessary empty itemstack checks, see comments on d0fda72
This commit is contained in:
@@ -28,7 +28,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
|
||||
|
||||
ItemStack wand = player.getHeldItemMainhand();
|
||||
|
||||
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)){
|
||||
if(!(wand.getItem() instanceof ItemWand)){
|
||||
wand = player.getHeldItemOffhand();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class PacketControlInput implements IMessageHandler<Message, IMessage> {
|
||||
|
||||
case NEXT_SPELL_KEY:
|
||||
|
||||
if(!wand.isEmpty() && wand.getItem() instanceof ItemWand){
|
||||
if(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.isEmpty() && wand.getItem() instanceof ItemWand){
|
||||
if(wand.getItem() instanceof ItemWand){
|
||||
|
||||
WandHelper.selectPreviousSpell(wand);
|
||||
// This line fixes the bug with continuous spells casting when they shouldn't be
|
||||
|
||||
Reference in New Issue
Block a user