mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-24 18:24:21 +00:00
Add DE Placed Item Compat (#18)
* Add DE Placed Item Compat * update bs * update deps * fix type * update gitignore
This commit is contained in:
1 parent
18972388a7
commit
641288386d
7 files changed
+33
-6
No files matched your search
@@ -32,6 +32,8 @@ public class FindIt {
|
||||
private boolean gregTechloaded;
|
||||
private boolean enderIOloaded;
|
||||
|
||||
private boolean draconicEvolutionLoaded;
|
||||
|
||||
private SearchCooldownService cooldownService;
|
||||
private BlockFindService blockFindService;
|
||||
private ItemFindService itemFindService;
|
||||
@@ -41,6 +43,7 @@ public class FindIt {
|
||||
this.extraUtilitiesLoaded = Loader.isModLoaded("ExtraUtilities");
|
||||
this.gregTechloaded = Loader.isModLoaded("gregtech");
|
||||
this.enderIOloaded = Loader.isModLoaded("EnderIO");
|
||||
this.draconicEvolutionLoaded = Loader.isModLoaded("DraconicEvolution");
|
||||
|
||||
FindItConfig.setup(event.getSuggestedConfigurationFile());
|
||||
boolean isClient = event.getSide() == Side.CLIENT;
|
||||
@@ -73,4 +76,8 @@ public class FindIt {
|
||||
public static boolean isEnderIOLoaded() {
|
||||
return INSTANCE.enderIOloaded;
|
||||
}
|
||||
|
||||
public static boolean isDraconicEvolutionLoaded() {
|
||||
return INSTANCE.draconicEvolutionLoaded;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TilePlacedItem;
|
||||
import com.gtnh.findit.FindIt;
|
||||
import com.gtnh.findit.FindItConfig;
|
||||
import com.gtnh.findit.FindItNetwork;
|
||||
@@ -65,6 +66,12 @@ public class ItemFindService {
|
||||
}
|
||||
}
|
||||
|
||||
if (FindIt.isDraconicEvolutionLoaded()) {
|
||||
if (tileEntity instanceof TilePlacedItem placedItem && request.isStackSatisfies(placedItem.getStack())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (request.hasFluidStack()) {
|
||||
if (tileEntity instanceof IFluidTank && request.isFluidSatisfies(((IFluidTank) tileEntity).getFluid())) {
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user