mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-11-21 12:32:31 +00:00
feat: convert gt fluid from nei item panel
This commit is contained in:
1 parent
e5767d75ab
commit
21eb93ea01
9 files changed
+36
-10
No files matched your search
@@ -88,11 +88,19 @@ public class Utilities {
|
||||
// MOD NAME
|
||||
@Nullable
|
||||
public static String getModName(Item item) {
|
||||
String name = GameData.getItemRegistry().getNameForObject(item);
|
||||
String name = getName(item);
|
||||
String id = name.substring(0, name.indexOf(":"));
|
||||
return id.equals("minecraft") ? "Minecraft" : Loader.instance().getIndexedModList().get(id).getName();
|
||||
}
|
||||
|
||||
public static String getName(Item item) {
|
||||
return GameData.getItemRegistry().getNameForObject(item);
|
||||
}
|
||||
|
||||
public static String getName(ItemStack itemStack) {
|
||||
return getName(itemStack.getItem());
|
||||
}
|
||||
|
||||
/**
|
||||
* If fluid is lava or water, return 'Minecraft'.
|
||||
* If has still icon or flowing icon, get the icon name, or return 'unknown';
|
||||
|
||||
Reference in new issue
Block a user