Skip to content

Commit

Permalink
Fix NPE.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSVK12 committed Feb 24, 2024
1 parent 82e9ffc commit 5c6492d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class GuiRenderItemMixin extends Gui {

@Inject(method = "render(Lnet/minecraft/core/item/ItemStack;IIZLnet/minecraft/core/player/inventory/slot/Slot;)V", at = @At("HEAD"))
public void render(ItemStack itemStack, int x, int y, boolean isSelected, Slot slot, CallbackInfo ci) {
if(mc.theWorld.getGameRule(HalpLibe.UNLOCK_ALL_RECIPES)){
if(mc.theWorld.getGameRule(HalpLibe.UNLOCK_ALL_RECIPES) && slot != null){
slot.discovered = true;
}
}
Expand Down

0 comments on commit 5c6492d

Please sign in to comment.