Compare commits

..
2 Commits
Author SHA1 Message Date
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
2 changed files with 10 additions and 6 deletions

No files matched your search

+4 -4
View File
@@ -1,11 +1,11 @@
// Add your dependencies here
dependencies {
implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.42-GTNH:dev')
implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.44-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:GT5-Unofficial:5.09.50.53:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.20:dev')
compileOnly('com.github.GTNewHorizons:Draconic-Evolution:1.3.13-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:ProjectRed:4.10.5-GTNH:dev")
@@ -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);
}
}