mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-24 10:14:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b03be8e3a7 | ||
|
|
f925a189b0 | ||
|
|
b537a26003 |
No files matched your search
@@ -0,0 +1,17 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
@@ -1,8 +1,22 @@
|
||||
# FindIt
|
||||
##### For those times when you just can't remember where you placed your EV Mixer!
|
||||
|
||||
This is inspired by the "Search in nearby inventories" feature from 1.7.10 Extra Utilities, and from 1.12+ [FindMe](https://github.com/Buuz135/FindMe). Instead of searching inventories, FindIt will search the world for placed tile entities!
|
||||
This is inspired by the "Search in nearby inventories" feature from 1.7.10 Extra Utilities, and from 1.12+ [FindMe](https://github.com/Buuz135/FindMe). As well as searching for items and fluids in inventories, FindIt will also search the world for placed tile entities!
|
||||
|
||||
Did you forget where you placed your EV Mixer?
|
||||
Did you forget where you placed your EV Mixer?
|
||||
|
||||
Well no problem now! Locate the item in NEI; however over it and hit 'Y' (the default keybind); if it's within range (+/-16 blocks) it will flash particle effects for you to locate it!
|
||||
Well, no problem now! Locate the item in NEI, hover over it, and hit 'Y' (the default keybind). If it's within range (+/-16 blocks), an outline will flash around it for you to locate it!
|
||||
|
||||
Dependencies:
|
||||
[NotEnoughItems](https://github.com/GTNewHorizons/NotEnoughItems)
|
||||
[GTNHLib](https://github.com/GTNewHorizons/GTNHLib)
|
||||
|
||||
FindIt has special support for the following mods' containers:
|
||||
* [AdventureBackpack](https://github.com/GTNewHorizons/AdventureBackpack2): Finds items and fluids inside backpacks when inside another container.
|
||||
* [Minecraft Backpack Mod](https://github.com/GTNewHorizons/Minecraft-Backpack-Mod/): Finds items inside backpacks when inside another container.
|
||||
* [Forestry](https://github.com/GTNewHorizons/ForestryMC): Finds items inside backpacks when inside another container.
|
||||
* [ProjectRedExploration](https://github.com/GTNewHorizons/ProjectRed): Finds items inside backpacks when inside another container.
|
||||
* [Draconic Evolution](https://github.com/GTNewHorizons/Draconic-Evolution/): Finds placed items.
|
||||
* [Thaumcraft 4](https://www.curseforge.com/minecraft/mc-mods/thaumcraft/files/2227552): Finds essentia in placed containers.
|
||||
* [Aspect Recipe Index](https://github.com/GTNewHorizons/AspectRecipeIndex): Also finds essentia when trying to "find" its aspect items.
|
||||
* [Thaumcraft NEI Plugin](https://www.curseforge.com/minecraft/mc-mods/thaumcraft-nei-plugin) Also finds essentia when trying to "find" its aspect items.
|
||||
+14
-13
@@ -1,25 +1,26 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.75-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.93-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:GTNHLib:0.9.54:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.348:dev")
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.21:dev")
|
||||
compileOnly("com.github.GTNewHorizons:Draconic-Evolution:1.5.19-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.8:dev")
|
||||
compileOnly("com.github.GTNewHorizons:AdventureBackpack2:1.4.16-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:ProjectRed:4.12.27-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:Minecraft-Backpack-Mod:2.6.10-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.463:dev")
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.10.25:dev")
|
||||
compileOnly("com.github.GTNewHorizons:Draconic-Evolution:1.5.24-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.15:dev")
|
||||
compileOnly("com.github.GTNewHorizons:AdventureBackpack2:1.4.19-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:ProjectRed:4.12.33-GTNH:dev")
|
||||
compileOnly("com.github.GTNewHorizons:Minecraft-Backpack-Mod:2.6.11-GTNH:dev")
|
||||
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913")
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
||||
compileOnly("com.github.GTNewHorizons:AspectRecipeIndex:1.0.4:dev")
|
||||
compileOnly("com.github.GTNewHorizons:AspectRecipeIndex:1.0.16:dev")
|
||||
|
||||
// For testing in dev environment.
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:StorageDrawers:2.2.16-GTNH")
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.19.22")
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:StorageDrawers:2.2.20-GTNH")
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:waila:1.19.23")
|
||||
// runtimeOnlyNonPublishable("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev")
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:Baubles-Expanded:2.2.13-GTNH:dev")
|
||||
// runtimeOnlyNonPublishable(rfg.deobf("curse.maven:thaumcraft-nei-plugin-225095:2241913"))
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:AspectRecipeIndex:1.0.4:dev")
|
||||
// runtimeOnlyNonPublishable("com.github.GTNewHorizons:AspectRecipeIndex:1.0.16:dev")
|
||||
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3689d0bcdd77ac01674ba3c9dbbe94d0/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/b96cb7670c095245220e7d01d5927b58/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
|
||||
toolchainVersion=25
|
||||
@@ -3,6 +3,8 @@ package com.gtnh.findit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
|
||||
import com.gtnh.findit.IStackFilter.IStackFilterProvider;
|
||||
import com.gtnh.findit.handler.AdventureBackpackProvider;
|
||||
import com.gtnh.findit.handler.BackpackProvider;
|
||||
@@ -55,8 +57,11 @@ public class FindIt {
|
||||
this.isGregTechLoaded = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi");
|
||||
this.isEnderIOLoaded = Loader.isModLoaded("EnderIO");
|
||||
this.cooldownService = new SearchCooldownService();
|
||||
|
||||
FindItConfig.setup(event.getSuggestedConfigurationFile());
|
||||
try {
|
||||
ConfigurationManager.registerConfig(FindItConfig.class);
|
||||
} catch (ConfigException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
if (event.getSide() == Side.CLIENT) {
|
||||
this.blockFindService = new ClientBlockFindService();
|
||||
|
||||
@@ -1,98 +1,73 @@
|
||||
package com.gtnh.findit;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import com.gtnewhorizon.gtnhlib.config.Config;
|
||||
|
||||
@Config(modid = "findit")
|
||||
public class FindItConfig {
|
||||
|
||||
public static int SEARCH_RADIUS = 16;
|
||||
public static int SEARCH_COOLDOWN = 10;
|
||||
public static int MAX_RESPONSE_SIZE = 20;
|
||||
public static boolean ENABLE_ROTATE_VIEW = false;
|
||||
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;
|
||||
public static int ITEM_HIGHLIGHTING_COLOR = 0xFFFF8726;
|
||||
public static boolean ITEM_HIGHLIGHTING_EMPTY_ITEMSTACKS = true;
|
||||
@Config.Comment("Radius to search within")
|
||||
@Config.DefaultInt(16)
|
||||
@Config.RangeInt(min = 1)
|
||||
@Config.Name("SearchRadius")
|
||||
public static int SEARCH_RADIUS;
|
||||
|
||||
public static void setup(final File file) {
|
||||
final Configuration config = new Configuration(file);
|
||||
try {
|
||||
config.load();
|
||||
@Config.Comment("Search cooldown in ticks")
|
||||
@Config.DefaultInt(10)
|
||||
@Config.RangeInt(min = 0)
|
||||
@Config.Name("SearchCooldown")
|
||||
public static int SEARCH_COOLDOWN;
|
||||
|
||||
SEARCH_RADIUS = config.get(Configuration.CATEGORY_GENERAL, "SearchRadius", "16", "Radius to search within")
|
||||
.getInt();
|
||||
@Config.Comment("Maximum number of positions that can be displayed by item/block search")
|
||||
@Config.DefaultInt(20)
|
||||
@Config.RangeInt(min = 0)
|
||||
@Config.Name("MaxResponseSize")
|
||||
public static int MAX_RESPONSE_SIZE;
|
||||
|
||||
SEARCH_COOLDOWN = config
|
||||
.get(Configuration.CATEGORY_GENERAL, "SearchCooldown", "10", "Search cooldown in ticks").getInt();
|
||||
@Config.Comment("Rotate the player's view to face found items/blocks after searching")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.Name("EnableRotateView")
|
||||
public static boolean ENABLE_ROTATE_VIEW;
|
||||
|
||||
MAX_RESPONSE_SIZE = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"MaxResponseSize",
|
||||
"20",
|
||||
"Maximum number of positions that can be displayed by item/block search").getInt();
|
||||
@Config.Comment("Use particles for the block highlighter instead of outlining found blocks")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.Name("UseParticleHighlighter")
|
||||
public static boolean USE_PARTICLE_HIGHLIGHTER;
|
||||
|
||||
USE_PARTICLE_HIGHLIGHTER = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"UseParticleHighlighter",
|
||||
"false",
|
||||
"Use Particle for Block Highlighter").getBoolean();
|
||||
@Config.Comment("Search items dropped on the ground")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.Name("SearchItemsOnGround")
|
||||
public static boolean SEARCH_ITEMS_ON_GROUND;
|
||||
|
||||
SEARCH_IN_GT_PIPES = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"SearchInGregTechPipes",
|
||||
"false",
|
||||
"Search items & fluids in GT pipes").getBoolean();
|
||||
@Config.Comment("Search items and fluids in GT pipes")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.Name("SearchInGregTechPipes")
|
||||
public static boolean SEARCH_IN_GT_PIPES;
|
||||
|
||||
SEARCH_IN_ENDERIO_CONDUITS = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"SearchInEnderIOConduits",
|
||||
"false",
|
||||
"Search items & fluids in EnderIO conduits").getBoolean();
|
||||
@Config.Comment("Search items and fluids in EnderIO conduits")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.Name("SearchInEnderIOConduits")
|
||||
public static boolean SEARCH_IN_ENDERIO_CONDUITS;
|
||||
|
||||
SEARCH_ITEMS_ON_GROUND = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"SearchItemsOnGround",
|
||||
"true",
|
||||
"Search items dropped on ground").getBoolean();
|
||||
@Config.Comment("Item highlighting duration in seconds")
|
||||
@Config.DefaultInt(10)
|
||||
@Config.RangeInt(min = 1)
|
||||
@Config.Name("ItemHighlightingDuration")
|
||||
public static int ITEM_HIGHLIGHTING_DURATION;
|
||||
|
||||
ITEM_HIGHLIGHTING_DURATION = config
|
||||
.get(Configuration.CATEGORY_GENERAL, "ItemHighlightingDuration", "10", "Item highlighting duration")
|
||||
.getInt();
|
||||
@Config.Comment("Block highlighting duration in seconds")
|
||||
@Config.DefaultInt(8)
|
||||
@Config.RangeInt(min = 1)
|
||||
@Config.Name("BlockHighlightingDuration")
|
||||
public static int BLOCK_HIGHLIGHTING_DURATION;
|
||||
|
||||
BLOCK_HIGHLIGHTING_DURATION = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"BlockHighlightingDuration",
|
||||
"8",
|
||||
"Block highlighting duration in seconds").getInt();
|
||||
@Config.Comment("Item highlighting color as an ARGB hexadecimal color code.\nDo not prefix with \"0x\"")
|
||||
@Config.DefaultString("FFFF8726")
|
||||
@Config.Name("ItemHighlightingColor")
|
||||
public static String ITEM_HIGHLIGHTING_COLOR;
|
||||
|
||||
ENABLE_ROTATE_VIEW = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"EnableRotateView",
|
||||
"false",
|
||||
"Rotate player's view when searched").getBoolean();
|
||||
|
||||
ITEM_HIGHLIGHTING_COLOR = Integer.parseUnsignedInt(
|
||||
config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"ItemHighlightingColor",
|
||||
"FFFF8726",
|
||||
"Item highlighting color as a hexadecimal color code. For example 0xFFFF8726").getString(),
|
||||
16);
|
||||
|
||||
ITEM_HIGHLIGHTING_EMPTY_ITEMSTACKS = config.get(
|
||||
Configuration.CATEGORY_GENERAL,
|
||||
"ItemHighlightingEmptyItemStacks",
|
||||
"true",
|
||||
"If true, the item stack size is ignored. If false, items are only highlighted if their stack size is greater than zero.\n"
|
||||
+ "This is useful when working with barrels or storage drawers.")
|
||||
.getBoolean();
|
||||
} catch (Exception ignore) {} finally {
|
||||
if (config.hasChanged()) config.save();
|
||||
}
|
||||
}
|
||||
@Config.Comment("If true, the item stack size is ignored. If false, items are only highlighted if their stack size is greater than zero.\n"
|
||||
+ "This is useful when working with barrels or storage drawers.")
|
||||
@Config.DefaultBoolean(true)
|
||||
@Config.Name("ItemHighlightingEmptyItemStacks")
|
||||
public static boolean ITEM_HIGHLIGHTING_EMPTY_ITEMSTACKS;
|
||||
}
|
||||
@@ -138,7 +138,15 @@ public class ClientItemFindService extends ItemFindService {
|
||||
}
|
||||
}
|
||||
|
||||
slotHighlighter.highlightSlots(gui, highlightedSlots, FindItConfig.ITEM_HIGHLIGHTING_COLOR);
|
||||
slotHighlighter.highlightSlots(gui, highlightedSlots, getItemHighlightingColor());
|
||||
}
|
||||
}
|
||||
|
||||
private static int getItemHighlightingColor() {
|
||||
try {
|
||||
return Integer.parseUnsignedInt(FindItConfig.ITEM_HIGHLIGHTING_COLOR, 16);
|
||||
} catch (NumberFormatException e) {
|
||||
return 0xFFFF8726;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 227 B |
Reference in new issue
Block a user