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
aegroup=appeng
aebasename=appliedenergistics2
extended=extended_life
extendedversion=v0.55.16
#########################################################
# Versions #
#########################################################
@@ -22,7 +20,6 @@ jei_version=4.16.1.302
tesla_version=1.0.63
ic2_version=2.8.73-ex112
top_version=1.12-1.4.23-16
cofhcore_version=1.12.2-4.5.2.19
crafttweaker_version=4.1.20.684
ctm_version=MC1.12.2-0.3.1.16
forestry_version=5.8.2.387
@@ -42,7 +39,7 @@ modId=appliedenergistics2
modGroup=appeng
# 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.
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)
includeMCVersionJar=false
# The name of your jar when you produce builds, not including any versioning info
+1 -1
View File
@@ -104,7 +104,7 @@ dependencies {
compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_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 "curse.maven:inventory-tweaks-223094:2482482"
compileOnly "curse.maven:inventory-bogo-sorter-632327:4399738"
@@ -109,8 +109,7 @@ public class JEIMissingItem implements IRecipeTransferError {
@Override
public void showError(Minecraft minecraft, int mouseX, int mouseY, @Nonnull IRecipeLayout recipeLayout, int recipeX, int recipeY) {
Container c = minecraft.player.openContainer;
if (c instanceof ContainerMEMonitorable) {
ContainerMEMonitorable container = (ContainerMEMonitorable) c;
if (c instanceof ContainerMEMonitorable container) {
IItemList<IAEItemStack> ir = ((ContainerMEMonitorable) c).items;
boolean found = false;
boolean foundAny = false;
@@ -148,8 +147,7 @@ public class JEIMissingItem implements IRecipeTransferError {
if (i.isInput()) {
List<?> allIngredients = i.getAllIngredients();
for (Object allIngredient : allIngredients) {
if (allIngredient instanceof ItemStack) {
ItemStack stack = (ItemStack) allIngredient;
if (allIngredient instanceof ItemStack stack) {
if (!stack.isEmpty()) {
IAEItemStack search = AEItemStack.fromItemStack(stack);
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())) {
used.add(ext.copy().setStackSize(1));
if (craftable) {
valid = null;
valid.resetStatus();
}
valid.add(ext.copy().setStackSize(1));
found = true;
@@ -199,13 +197,13 @@ public class JEIMissingItem implements IRecipeTransferError {
continue;
}
ArrayList<ItemStack> validStacks = new ArrayList<>();
if (valid != null) {
valid.forEach(v -> {
if (v.getStackSize() > 0) {
ItemStack validStack = v.createItemStack();
validStack.setCount(1);
validStacks.add(validStack);
});
}
});
if (!found) {
if (craftable) {
i.drawHighlight(minecraft, new Color(0.0f, 0.0f, 1.0f, 0.4f), recipeX, recipeY);