Skip to content

Commit

Permalink
Merge pull request #26 from GTNewHorizons/fix
Browse files Browse the repository at this point in the history
fix AIOOBE in amount set packet
  • Loading branch information
Dream-Master authored Oct 8, 2022
2 parents c29f502 + e6b4917 commit 1a2ba79
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static class Handler implements IMessageHandler<CPacketPatternValueSet, I
@Override
public IMessage onMessage(CPacketPatternValueSet message, MessageContext ctx) {
EntityPlayer player = ctx.getServerHandler().playerEntity;
if (player.openContainer instanceof ContainerPatternValueAmount) {
if (player.openContainer instanceof ContainerPatternValueAmount && message.valueIndex != -1) {
ContainerPatternValueAmount cpv = (ContainerPatternValueAmount) player.openContainer;
final Object target = cpv.getTarget();
if (target instanceof IGridHost) {
Expand Down

0 comments on commit 1a2ba79

Please sign in to comment.