Skip to content

Commit

Permalink
fix: divination rods showing up in all creative tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Dec 26, 2022
1 parent 96e612d commit 11078ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.klikli_dev.theurgy.item;

import com.google.common.collect.ImmutableList;
import com.klikli_dev.theurgy.Theurgy;
import com.klikli_dev.theurgy.TheurgyConstants;
import com.klikli_dev.theurgy.client.render.SulfurBEWLR;
import net.minecraft.ChatFormatting;
Expand Down Expand Up @@ -95,6 +96,9 @@ public void fillItemCategory(CreativeModeTab tab, NonNullList<ItemStack> items)
*/
public static class DistHelper {
public static void fillItemCategory(AlchemicalSulfurItem item, CreativeModeTab tab, NonNullList<ItemStack> items) {
if(tab != Theurgy.CREATIVE_MODE_TAB && tab != CreativeModeTab.TAB_SEARCH)
return;

var level = Minecraft.getInstance().level;
if (level != null) {
var recipeManager = level.getRecipeManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package com.klikli_dev.theurgy.item;

import com.klikli_dev.theurgy.Theurgy;
import com.klikli_dev.theurgy.TheurgyConstants;
import com.klikli_dev.theurgy.client.scanner.ScanManager;
import com.klikli_dev.theurgy.entity.FollowProjectile;
Expand Down Expand Up @@ -452,6 +453,9 @@ public static class DistHelper {
};

public static void fillItemCategory(DivinationRodItem item, CreativeModeTab tab, NonNullList<ItemStack> items) {
if(tab != Theurgy.CREATIVE_MODE_TAB && tab != CreativeModeTab.TAB_SEARCH)
return;

var level = Minecraft.getInstance().level;
if (level != null) {
var recipeManager = level.getRecipeManager();
Expand Down

0 comments on commit 11078ae

Please sign in to comment.