fix NPE. Fix fix gradle issue due to cofh dick move

This commit is contained in:
PrototypeTrousers
2023-07-25 17:18:42 -03:00
parent 8d152afcd3
commit 13ba399418
3 changed files with 13 additions and 18 deletions
+1 -4
View File
@@ -3,8 +3,6 @@ aechannel=stable
aebuild=7 aebuild=7
aegroup=appeng aegroup=appeng
aebasename=appliedenergistics2 aebasename=appliedenergistics2
extended=extended_life
extendedversion=v0.55.16
######################################################### #########################################################
# Versions # # Versions #
######################################################### #########################################################
@@ -22,7 +20,6 @@ jei_version=4.16.1.302
tesla_version=1.0.63 tesla_version=1.0.63
ic2_version=2.8.73-ex112 ic2_version=2.8.73-ex112
top_version=1.12-1.4.23-16 top_version=1.12-1.4.23-16
cofhcore_version=1.12.2-4.5.2.19
crafttweaker_version=4.1.20.684 crafttweaker_version=4.1.20.684
ctm_version=MC1.12.2-0.3.1.16 ctm_version=MC1.12.2-0.3.1.16
forestry_version=5.8.2.387 forestry_version=5.8.2.387
@@ -42,7 +39,7 @@ modId=appliedenergistics2
modGroup=appeng modGroup=appeng
# Version of your mod. # Version of your mod.
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead. # This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
modVersion=rv6-stable-7-extended_life-v0.55.18 modVersion=rv6-stable-7-extended_life-v0.55.20
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version) # Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
includeMCVersionJar=false includeMCVersionJar=false
# The name of your jar when you produce builds, not including any versioning info # The name of your jar when you produce builds, not including any versioning info
+5 -5
View File
@@ -81,11 +81,11 @@ configurations {
dependencies { dependencies {
// deobfCompile "gregtechce:gregtech:1.12.2:1.15.1.735" // deobfCompile "gregtechce:gregtech:1.12.2:1.15.1.735"
// installable runtime dependencies // installable runtime dependencies
implementation rfg.deobf ("curse.maven:gregtechceu-557242:4429261") implementation rfg.deobf("curse.maven:gregtechceu-557242:4429261")
compileOnly "curse.maven:chisel-235279:2915375" compileOnly "curse.maven:chisel-235279:2915375"
implementation rfg.deobf ("curse.maven:baubles-227083:2518667") implementation rfg.deobf("curse.maven:baubles-227083:2518667")
//mods "mcp.mobius.waila:Hwyla:${hwyla_version}" //mods "mcp.mobius.waila:Hwyla:${hwyla_version}"
mods "curse.maven:hwyla-253449:2568751" mods "curse.maven:hwyla-253449:2568751"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev" mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
@@ -96,7 +96,7 @@ dependencies {
//compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}" //compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"
compileOnly "curse.maven:hwyla-253449:2568751" compileOnly "curse.maven:hwyla-253449:2568751"
//Code chicken lib, GTCE dependency //Code chicken lib, GTCE dependency
implementation rfg.deobf ("curse.maven:CCL-242818:2779848") implementation rfg.deobf("curse.maven:CCL-242818:2779848")
compileOnly "curse.maven:recipe-stages-280554:3405072" compileOnly "curse.maven:recipe-stages-280554:3405072"
compileOnly "curse.maven:item-stages-280316:2696769" compileOnly "curse.maven:item-stages-280316:2696769"
@@ -104,13 +104,13 @@ dependencies {
compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}" compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api" compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api" compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api"
compileOnly "cofh:CoFHCore:${cofhcore_version}:deobf" compileOnly "curse.maven:CoFHCore-69162:2920433"
compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}" compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}"
compileOnly "curse.maven:inventory-tweaks-223094:2482482" compileOnly "curse.maven:inventory-tweaks-223094:2482482"
compileOnly "curse.maven:inventory-bogo-sorter-632327:4399738" compileOnly "curse.maven:inventory-bogo-sorter-632327:4399738"
compileOnly "team.chisel.ctm:CTM:${ctm_version}" compileOnly "team.chisel.ctm:CTM:${ctm_version}"
compileOnly "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r152.16:api" compileOnly "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r152.16:api"
implementation rfg.deobf ("net.sengir.forestry:forestry_${minecraft_version}:$forestry_version") implementation rfg.deobf("net.sengir.forestry:forestry_${minecraft_version}:$forestry_version")
// at runtime, use the full JEI jar // at runtime, use the full JEI jar
runtimeOnly "mezz.jei:jei_${minecraft_version}:${jei_version}" runtimeOnly "mezz.jei:jei_${minecraft_version}:${jei_version}"
@@ -109,8 +109,7 @@ public class JEIMissingItem implements IRecipeTransferError {
@Override @Override
public void showError(Minecraft minecraft, int mouseX, int mouseY, @Nonnull IRecipeLayout recipeLayout, int recipeX, int recipeY) { public void showError(Minecraft minecraft, int mouseX, int mouseY, @Nonnull IRecipeLayout recipeLayout, int recipeX, int recipeY) {
Container c = minecraft.player.openContainer; Container c = minecraft.player.openContainer;
if (c instanceof ContainerMEMonitorable) { if (c instanceof ContainerMEMonitorable container) {
ContainerMEMonitorable container = (ContainerMEMonitorable) c;
IItemList<IAEItemStack> ir = ((ContainerMEMonitorable) c).items; IItemList<IAEItemStack> ir = ((ContainerMEMonitorable) c).items;
boolean found = false; boolean found = false;
boolean foundAny = false; boolean foundAny = false;
@@ -148,8 +147,7 @@ public class JEIMissingItem implements IRecipeTransferError {
if (i.isInput()) { if (i.isInput()) {
List<?> allIngredients = i.getAllIngredients(); List<?> allIngredients = i.getAllIngredients();
for (Object allIngredient : allIngredients) { for (Object allIngredient : allIngredients) {
if (allIngredient instanceof ItemStack) { if (allIngredient instanceof ItemStack stack) {
ItemStack stack = (ItemStack) allIngredient;
if (!stack.isEmpty()) { if (!stack.isEmpty()) {
IAEItemStack search = AEItemStack.fromItemStack(stack); IAEItemStack search = AEItemStack.fromItemStack(stack);
if (stack.getItem().isDamageable() || Platform.isGTDamageableItem(stack.getItem())) { if (stack.getItem().isDamageable() || Platform.isGTDamageableItem(stack.getItem())) {
@@ -179,7 +177,7 @@ public class JEIMissingItem implements IRecipeTransferError {
if (ext.getStackSize() > 0 && (usedStack == null || usedStack.getStackSize() < ext.getStackSize())) { if (ext.getStackSize() > 0 && (usedStack == null || usedStack.getStackSize() < ext.getStackSize())) {
used.add(ext.copy().setStackSize(1)); used.add(ext.copy().setStackSize(1));
if (craftable) { if (craftable) {
valid = null; valid.resetStatus();
} }
valid.add(ext.copy().setStackSize(1)); valid.add(ext.copy().setStackSize(1));
found = true; found = true;
@@ -199,13 +197,13 @@ public class JEIMissingItem implements IRecipeTransferError {
continue; continue;
} }
ArrayList<ItemStack> validStacks = new ArrayList<>(); ArrayList<ItemStack> validStacks = new ArrayList<>();
if (valid != null) {
valid.forEach(v -> { valid.forEach(v -> {
if (v.getStackSize() > 0) {
ItemStack validStack = v.createItemStack(); ItemStack validStack = v.createItemStack();
validStack.setCount(1); validStack.setCount(1);
validStacks.add(validStack); validStacks.add(validStack);
});
} }
});
if (!found) { if (!found) {
if (craftable) { if (craftable) {
i.drawHighlight(minecraft, new Color(0.0f, 0.0f, 1.0f, 0.4f), recipeX, recipeY); i.drawHighlight(minecraft, new Color(0.0f, 0.0f, 1.0f, 0.4f), recipeX, recipeY);