mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Fixed crashes when viewing the Dandelifeon and Elven Mana Lenses pages. Closes #2355
This commit is contained in:
1 parent
71a1d47291
commit
ab126ac9db
2 files changed
+11
No files matched your search
@@ -530,6 +530,7 @@ public final class ModCraftingRecipes {
|
||||
recipeLensFirework = path("lens_20");
|
||||
recipeLensFlare = path("lens_21");
|
||||
recipeLensMessenger = path("lens_22");
|
||||
recipeLensTripwire = path("lens_23");
|
||||
|
||||
recipeDistributor = ModBlocks.distributor.getRegistryName();
|
||||
recipeManaVoid = ModBlocks.manaVoid.getRegistryName();
|
||||
@@ -740,6 +741,7 @@ public final class ModCraftingRecipes {
|
||||
recipeBlazeBlock = gogPath("blazeblock");
|
||||
recipeCacophonium = ModItems.cacophonium.getRegistryName();
|
||||
recipesPavement = allOfGroup(ModFluffBlocks.pavement.getRegistryName());
|
||||
recipeCellBlock = ModBlocks.cellBlock.getRegistryName();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
public class PageCraftingRecipe extends PageRecipe {
|
||||
|
||||
private static final ResourceLocation craftingOverlay = new ResourceLocation(LibResources.GUI_CRAFTING_OVERLAY);
|
||||
@@ -52,6 +54,10 @@ public class PageCraftingRecipe extends PageRecipe {
|
||||
public PageCraftingRecipe(String unlocalizedName, List<ResourceLocation> recipes) {
|
||||
super(unlocalizedName);
|
||||
this.recipes = recipes;
|
||||
|
||||
for(ResourceLocation res : recipes)
|
||||
if(res == null)
|
||||
throw new IllegalArgumentException("Null recipes arent allowed");
|
||||
}
|
||||
|
||||
public PageCraftingRecipe(String unlocalizedName, ResourceLocation recipe) {
|
||||
@@ -128,6 +134,9 @@ public class PageCraftingRecipe extends PageRecipe {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderCraftingRecipe(IGuiLexiconEntry gui, IRecipe recipe) {
|
||||
if(recipe == null)
|
||||
return;
|
||||
|
||||
if(recipe instanceof ShapedRecipes || recipe instanceof ShapedOreRecipe) {
|
||||
oreDictRecipe = recipe instanceof ShapedOreRecipe;
|
||||
|
||||
|
||||
Reference in new issue
Block a user