Restore JEI and compat

This commit is contained in:
Vincent Lee committed 2020-06-27 21:02:40 -05:00
1 parent 7ab7690c89
commit 5484cfc815
16 files changed
+28 -20

No files matched your search

+3 -3
View File
@@ -102,10 +102,10 @@ dependencies {
compileOnly fg.deobf("vazkii.patchouli:Patchouli:1.16-36.187:api")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.16-36.187")
compileOnly fg.deobf("mezz.jei:jei-1.16.1:7.0.0.2:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.16.1:7.0.0.2")
/*
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2:api")
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2")
compileOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.15.2-2.0:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios:FORGE-1.15.2-2.0")
*/
@@ -28,6 +28,7 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.mana.IManaItem;
import vazkii.botania.api.recipe.IElvenTradeRecipe;
@@ -108,7 +109,7 @@ public class JEIBotaniaPlugin implements IModPlugin {
}
public static boolean doesOreExist(ResourceLocation tagId) {
return !BlockTags.getCollection().getOrCreate(tagId).getAllElements().isEmpty();
return !BlockTags.getCollection().getOrCreate(tagId).func_230236_b_().isEmpty();
}
@Override
@@ -222,7 +223,7 @@ public class JEIBotaniaPlugin implements IModPlugin {
group.addTooltipCallback((slotIndex, input, ingredient, tooltip) -> {
if (slotIndex == slot) {
if (Minecraft.getInstance().gameSettings.advancedItemTooltips || Screen.func_231173_s_()) {
tooltip.add(TextFormatting.DARK_GRAY + I18n.format("jei.tooltip.recipe.id", recipeId));
tooltip.add(new TranslationTextComponent("jei.tooltip.recipe.id", recipeId).func_240699_a_(TextFormatting.DARK_GRAY));
}
}
});
@@ -37,7 +37,7 @@ public class CompositeLensRecipeWrapper implements ICustomCraftingCategoryExtens
public CompositeLensRecipeWrapper(CompositeLensRecipe recipe) {
List<ItemStack> lensStacks = ItemTags.getCollection().getOrCreate(new ResourceLocation(LibMisc.MOD_ID, "lens"))
.getAllElements().stream()
.func_230236_b_().stream()
.map(ItemStack::new)
.filter(s -> !((ItemLens) s.getItem()).isControlLens(s))
.filter(s -> ((ItemLens) s.getItem()).isCombinable(s))
@@ -9,6 +9,7 @@
package vazkii.botania.client.integration.jei.elventrade;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.VanillaTypes;
@@ -31,6 +32,7 @@ import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import org.lwjgl.opengl.GL11;
import vazkii.botania.api.recipe.IElvenTradeRecipe;
@@ -99,10 +101,10 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory<IElvenTradeReci
}
@Override
public void draw(IElvenTradeRecipe recipe, double mouseX, double mouseY) {
public void draw(IElvenTradeRecipe recipe, MatrixStack ms, double mouseX, double mouseY) {
RenderSystem.enableAlphaTest();
RenderSystem.enableBlend();
overlay.draw(0, 4);
overlay.draw(ms, 0, 4);
RenderSystem.disableBlend();
RenderSystem.disableAlphaTest();
@@ -143,7 +145,7 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory<IElvenTradeReci
recipeLayout.getItemStacks().addTooltipCallback((slotIndex, input, ingredient, tooltip) -> {
if (slotIndex >= endIndex) {
if (Minecraft.getInstance().gameSettings.advancedItemTooltips || Screen.func_231173_s_()) {
tooltip.add(TextFormatting.DARK_GRAY + I18n.format("jei.tooltip.recipe.id", recipeId));
tooltip.add(new TranslationTextComponent("jei.tooltip.recipe.id", recipeId).func_240699_a_(TextFormatting.DARK_GRAY));
}
}
});
@@ -9,6 +9,7 @@
package vazkii.botania.client.integration.jei.manapool;
import com.google.common.collect.ImmutableList;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.VanillaTypes;
@@ -103,10 +104,10 @@ public class ManaPoolRecipeCategory implements IRecipeCategory<IManaInfusionReci
}
@Override
public void draw(IManaInfusionRecipe recipe, double mouseX, double mouseY) {
public void draw(IManaInfusionRecipe recipe, MatrixStack ms, double mouseX, double mouseY) {
RenderSystem.enableAlphaTest();
RenderSystem.enableBlend();
overlay.draw(48, 0);
overlay.draw(ms, 48, 0);
HUDHandler.renderManaBar(ms, 28, 50, 0x0000FF, 0.75F, recipe.getManaToConsume(), TilePool.MAX_MANA / 10);
RenderSystem.disableBlend();
RenderSystem.disableAlphaTest();
@@ -8,6 +8,7 @@
*/
package vazkii.botania.client.integration.jei.orechid;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.VanillaTypes;
@@ -84,7 +85,7 @@ public abstract class OrechidRecipeCategoryBase<T extends OrechidRecipeWrapper>
// Shouldn't ever return an empty list since the ore weight
// list is filtered to only have ores with ItemBlocks
List<ItemStack> stackList = BlockTags.getCollection().getOrCreate(recipe.entry.getKey())
.getAllElements()
.func_230236_b_()
.stream()
.filter(s -> s.asItem() != Items.AIR)
.map(ItemStack::new)
@@ -118,10 +119,10 @@ public abstract class OrechidRecipeCategoryBase<T extends OrechidRecipeWrapper>
}
@Override
public void draw(T recipe, double mouseX, double mouseY) {
public void draw(T recipe, MatrixStack ms, double mouseX, double mouseY) {
RenderSystem.enableAlphaTest();
RenderSystem.enableBlend();
overlay.draw(48, 0);
overlay.draw(ms, 48, 0);
RenderSystem.disableBlend();
RenderSystem.disableAlphaTest();
}
@@ -8,6 +8,7 @@
*/
package vazkii.botania.client.integration.jei.petalapothecary;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.VanillaTypes;
@@ -92,10 +93,10 @@ public class PetalApothecaryRecipeCategory implements IRecipeCategory<IPetalReci
}
@Override
public void draw(IPetalRecipe recipe, double mouseX, double mouseY) {
public void draw(IPetalRecipe recipe, MatrixStack ms, double mouseX, double mouseY) {
RenderSystem.enableAlphaTest();
RenderSystem.enableBlend();
overlay.draw();
overlay.draw(ms);
RenderSystem.disableBlend();
RenderSystem.disableAlphaTest();
}
@@ -8,6 +8,7 @@
*/
package vazkii.botania.client.integration.jei.puredaisy;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.VanillaTypes;
@@ -117,10 +118,10 @@ public class PureDaisyRecipeCategory implements IRecipeCategory<IPureDaisyRecipe
}
@Override
public void draw(IPureDaisyRecipe recipe, double mouseX, double mouseY) {
public void draw(IPureDaisyRecipe recipe, MatrixStack ms, double mouseX, double mouseY) {
RenderSystem.enableAlphaTest();
RenderSystem.enableBlend();
overlay.draw(48, 0);
overlay.draw(ms, 48, 0);
RenderSystem.disableBlend();
RenderSystem.disableAlphaTest();
}
@@ -8,6 +8,7 @@
*/
package vazkii.botania.client.integration.jei.runicaltar;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import mezz.jei.api.constants.VanillaTypes;
@@ -93,10 +94,10 @@ public class RunicAltarRecipeCategory implements IRecipeCategory<IRuneAltarRecip
}
@Override
public void draw(IRuneAltarRecipe recipe, double mouseX, double mouseY) {
public void draw(IRuneAltarRecipe recipe, MatrixStack ms, double mouseX, double mouseY) {
RenderSystem.enableAlphaTest();
RenderSystem.enableBlend();
overlay.draw();
overlay.draw(ms);
HUDHandler.renderManaBar(ms, 28, 113, 0x0000FF, 0.75F, recipe.getManaUsage(), TilePool.MAX_MANA / 10);
RenderSystem.disableBlend();
RenderSystem.disableAlphaTest();