forked from c0508383/Backhand
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some item uis not opening when something is in offhand (#61)
- Loading branch information
Showing
4 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/xonin/backhand/packet/OffhandCancelUsage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package xonin.backhand.packet; | ||
|
||
import net.minecraft.client.Minecraft; | ||
|
||
import cpw.mods.fml.common.network.simpleimpl.IMessage; | ||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; | ||
import cpw.mods.fml.common.network.simpleimpl.MessageContext; | ||
import io.netty.buffer.ByteBuf; | ||
|
||
public class OffhandCancelUsage implements IMessage { | ||
|
||
public OffhandCancelUsage() {} | ||
|
||
@Override | ||
public void fromBytes(ByteBuf buf) {} | ||
|
||
@Override | ||
public void toBytes(ByteBuf buf) {} | ||
|
||
public static class Handler implements IMessageHandler<OffhandCancelUsage, IMessage> { | ||
|
||
@Override | ||
public IMessage onMessage(OffhandCancelUsage message, MessageContext ctx) { | ||
Minecraft.getMinecraft().thePlayer.clearItemInUse(); | ||
return null; | ||
} | ||
} | ||
} |