Compare commits

..
Author SHA1 Message Date
slprimeandslprime e0171adc65 Show Delete Item Tooltip only in creative (#517)
Co-authored-by: slprime <[email protected]>
2024-08-18 09:27:57 +02:00
72ad8aa2e7 More QOL (#510)
* ItemZoom, hotkeys & more tooltips

* fix tooltips

* fix hover crash to unnamed item

* fix bookmark group with groupIds bigger than 127

---------

Co-authored-by: slprime <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
2024-08-17 22:24:27 +02:00
3 changed files with 5 additions and 12 deletions

No files matched your search

-1
View File
@@ -2,6 +2,5 @@
dependencies {
api('com.github.GTNewHorizons:CodeChickenCore:1.3.6:dev')
compileOnly('com.github.GTNewHorizons:Hodgepodge:2.5.45-pre:dev') // TODO: change to proper tag
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
}
@@ -110,7 +110,10 @@ public class HeldItemHandler implements IContainerInputHandler, IContainerToolti
if (contains(mousex, mousey)) {
currenttip.clear();
currenttip.add(EnumChatFormatting.RED + translate("itempanel.deleteItem"));
if (NEIClientConfig.canPerformAction("delete") && NEIClientConfig.canPerformAction("item")) {
currenttip.add(EnumChatFormatting.RED + translate("itempanel.deleteItem"));
}
}
return currenttip;
@@ -39,7 +39,6 @@ import net.minecraftforge.common.IShearable;
import net.minecraftforge.oredict.OreDictionary;
import com.google.common.collect.ArrayListMultimap;
import com.mitchej123.hodgepodge.config.TweaksConfig;
import codechicken.core.featurehack.GameDataManipulator;
import codechicken.nei.InfiniteStackSizeHandler;
@@ -65,11 +64,9 @@ import codechicken.nei.search.ModNameFilter;
import codechicken.nei.search.OreDictionaryFilter;
import codechicken.nei.search.TooltipFilter;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
import cpw.mods.fml.common.versioning.DefaultArtifactVersion;
/**
* This is an internal class for storing information about items, to be accessed by the API
@@ -214,7 +211,7 @@ public class ItemInfo {
public String[] dump(Block block, int id, String name) {
final Item item = Item.getItemFromBlock(block);
return new String[] { name, Integer.toString(id), Boolean.toString(item != null),
ItemInfo.itemOwners.get(item), block.getClass().getCanonicalName(),
ItemInfo.itemOwners.get(block), block.getClass().getCanonicalName(),
item != null ? EnumChatFormatting.getTextWithoutFormattingCodes(
GuiContainerManager.itemDisplayNameShort(new ItemStack(item))) : "null" };
}
@@ -461,12 +458,6 @@ public class ItemInfo {
}
private static void addSpawnEggs() {
if (Loader.isModLoaded("hodgepodge")
&& Loader.instance().getIndexedModList().get("hodgepodge").getProcessedVersion()
.compareTo(new DefaultArtifactVersion("2.5.44")) >= 0
&& TweaksConfig.addModEntityStats) {
return;
}
addEntityEgg(EntitySnowman.class, 0xEEFFFF, 0xffa221);
addEntityEgg(EntityIronGolem.class, 0xC5C2C1, 0xffe1cc);
}