mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-24 10:14:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc56416560 | ||
|
|
41e2db4644 |
No files matched your search
+2
-1
@@ -2,5 +2,6 @@
|
||||
|
||||
dependencies {
|
||||
implementation('com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.46.16:dev')
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.46.21:dev')
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.8.0:dev')
|
||||
}
|
||||
@@ -30,6 +30,7 @@ public class FindIt {
|
||||
|
||||
private boolean extraUtilitiesLoaded;
|
||||
private boolean gregTechloaded;
|
||||
private boolean enderIOloaded;
|
||||
|
||||
private SearchCooldownService cooldownService;
|
||||
private BlockFindService blockFindService;
|
||||
@@ -39,6 +40,8 @@ public class FindIt {
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
this.extraUtilitiesLoaded = Loader.isModLoaded("ExtraUtilities");
|
||||
this.gregTechloaded = Loader.isModLoaded("gregtech");
|
||||
this.enderIOloaded = Loader.isModLoaded("EnderIO");
|
||||
|
||||
FindItConfig.setup(event.getSuggestedConfigurationFile());
|
||||
boolean isClient = event.getSide() == Side.CLIENT;
|
||||
|
||||
@@ -66,4 +69,8 @@ public class FindIt {
|
||||
public static boolean isGregTechLoaded() {
|
||||
return INSTANCE.gregTechloaded;
|
||||
}
|
||||
|
||||
public static boolean isEnderIOLoaded() {
|
||||
return INSTANCE.enderIOloaded;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public class FindItConfig {
|
||||
public static boolean USE_PARTICLE_HIGHLIGHTER = false;
|
||||
public static boolean SEARCH_ITEMS_ON_GROUND = true;
|
||||
public static boolean SEARCH_IN_GT_PIPES = false;
|
||||
public static boolean SEARCH_IN_ENDERIO_CONDUITS = false;
|
||||
public static int ITEM_HIGHLIGHTING_DURATION = 10;
|
||||
public static int BLOCK_HIGHLIGHTING_DURATION = 8;
|
||||
|
||||
@@ -45,6 +46,12 @@ public class FindItConfig {
|
||||
"false",
|
||||
"Search items & fluids in GT pipes").getBoolean();
|
||||
|
||||
SEARCH_IN_ENDERIO_CONDUITS = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"SearchInEnderIOConduits",
|
||||
"false",
|
||||
"Search items & fluids in EnderIO conduits").getBoolean();
|
||||
|
||||
SEARCH_ITEMS_ON_GROUND = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"SearchItemsOnGround",
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.gtnh.findit.service.blockfinder.BlockFoundResponse;
|
||||
import com.gtnh.findit.util.WorldUtils;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import crazypants.enderio.conduit.TileConduitBundle;
|
||||
import gregtech.api.metatileentity.BaseMetaPipeEntity;
|
||||
|
||||
public class ItemFindService {
|
||||
@@ -58,6 +59,11 @@ public class ItemFindService {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (FindIt.isEnderIOLoaded()) {
|
||||
if (!FindItConfig.SEARCH_IN_ENDERIO_CONDUITS && tileEntity instanceof TileConduitBundle) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (request.hasFluidStack()) {
|
||||
if (tileEntity instanceof IFluidTank && request.isFluidSatisfies(((IFluidTank) tileEntity).getFluid())) {
|
||||
|
||||
Reference in new issue
Block a user