Compare commits

...
4 Commits
Author SHA1 Message Date
Martin Robertz b3c002b42b update 2024-11-23 16:56:49 +01:00
Wilhelm Schuster d78625b514 Fix essentia search NPE (#26) 2024-11-19 19:08:17 +01:00
Martin Robertz 511b388b83 update 2024-10-27 14:41:16 +01:00
Temm 9278283ae8 fix thaumcraft search crash (#25) 2024-10-25 23:50:07 +02:00
3 changed files with 15 additions and 11 deletions

No files matched your search

+7 -7
View File
@@ -1,13 +1,13 @@
// Add your dependencies here
dependencies {
implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.42-GTNH:dev')
implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.46-GTNH:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.49:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.19:dev')
compileOnly('com.github.GTNewHorizons:Draconic-Evolution:1.3.11.GTNH:dev')
compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.16:dev')
compileOnly('com.github.GTNewHorizons:AdventureBackpack2:1.2.3-GTNH:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.74:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.22:dev')
compileOnly('com.github.GTNewHorizons:Draconic-Evolution:1.3.14-GTNH:dev')
compileOnly('com.github.GTNewHorizons:ForestryMC:4.9.19:dev')
compileOnly('com.github.GTNewHorizons:AdventureBackpack2:1.2.4-GTNH:dev')
compileOnly("com.github.GTNewHorizons:ProjectRed:4.10.5-GTNH:dev")
compileOnly("com.github.GTNewHorizons:Minecraft-Backpack-Mod:2.4.3-GTNH:dev")
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913")
@@ -15,7 +15,7 @@ dependencies {
// For testing in dev environment.
// runtimeOnlyNonPublishable('com.github.GTNewHorizons:StorageDrawers:2.0.3-GTNH')
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.8.1")
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.8.2")
// runtimeOnlyNonPublishable('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:Baubles:1.0.4:dev")
// runtimeOnlyNonPublishable('curse.maven:thaumcraft-nei-plugin-225095:2241913')
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29'
}
@@ -32,7 +32,7 @@ public class ThaumcraftProvider implements IStackFilterProvider {
if (!(item instanceof ItemAspect || item instanceof IEssentiaContainerItem)) return false;
AspectList stackAspects = ItemAspect.getAspects(stack);
if (stackAspects.size() != 1) return false;
if (stackAspects == null || stackAspects.size() != 1) return false;
Aspect stackAspect = stackAspects.getAspects()[0];
@@ -43,12 +43,16 @@ public class ThaumcraftProvider implements IStackFilterProvider {
@Override
public IStackFilter getFilter(EntityPlayer player, TileEntity tileEntity) {
if (!(tileEntity instanceof IAspectContainer aspectContainer)) return null;
return new AspectStackFilter(aspectContainer.getAspects());
AspectList aspects = aspectContainer.getAspects();
if (aspects == null) return null;
return new AspectStackFilter(aspects);
}
@Override
public IStackFilter getFilter(EntityPlayer player, ItemStack stack) {
if (!(stack.getItem() instanceof IEssentiaContainerItem containerItem)) return null;
return new AspectStackFilter(containerItem.getAspects(stack));
AspectList aspects = containerItem.getAspects(stack);
if (aspects == null) return null;
return new AspectStackFilter(aspects);
}
}