Skip to content

Commit

Permalink
Add JEI catalysts. Requires JEI 13.1.0.6 or newer. #312
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkhax committed May 1, 2023
1 parent 2b74134 commit e148bf2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class BotanyPotsCommon {

public final Content content;
public static Content content;

public BotanyPotsCommon() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@
import mezz.jei.api.registration.IRecipeCategoryRegistration;
import mezz.jei.api.registration.IRecipeRegistration;
import net.darkhax.botanypots.BotanyPotHelper;
import net.darkhax.botanypots.BotanyPotsCommon;
import net.darkhax.botanypots.Constants;
import net.darkhax.botanypots.addons.jei.ui.BasicCropDisplayInfo;
import net.darkhax.botanypots.addons.jei.ui.CropDisplayInfo;
import net.darkhax.botanypots.block.BlockBotanyPot;
import net.darkhax.botanypots.data.recipes.crop.BasicCrop;
import net.darkhax.botanypots.data.recipes.crop.Crop;
import net.darkhax.botanypots.data.recipes.fertilizer.Fertilizer;
import net.darkhax.botanypots.data.recipes.potinteraction.PotInteraction;
import net.darkhax.botanypots.data.recipes.soil.Soil;
import net.minecraft.client.Minecraft;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.crafting.RecipeManager;

import java.util.List;
Expand Down Expand Up @@ -48,7 +52,11 @@ public void registerCategories(IRecipeCategoryRegistration registration) {

@Override
public void registerRecipeCatalysts(IRecipeCatalystRegistration registration) {

for (Item potItem : BotanyPotsCommon.content.items) {
if (potItem instanceof BlockItem blockItem && blockItem.getBlock() instanceof BlockBotanyPot pot) {
registration.addRecipeCatalyst(potItem.getDefaultInstance(), CROP);
}
}
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ group=net.darkhax.botanypots
# Common
minecraft_version=1.19.4
bookshelf_version=18.0.2
jei_version=13.1.0.2
jei_version=13.1.0.6

# Forge
forge_version=45.0.43
forge_version=45.0.50
top_version=4442439

# Fabric
fabric_version=0.77.0+1.19.4
fabric_version=0.79.0+1.19.4
fabric_loader_version=0.14.19

# Mod options
Expand Down

0 comments on commit e148bf2

Please sign in to comment.