Add ability to bookmark linked items (#674)

This commit is contained in:
TotallyNotOndre authored and GitHub committed 2025-07-26 07:42:34 +07:00
1 parent 2ae94e94a0
commit 5fd0a74363
5 files changed
+71 -3

No files matched your search

@@ -17,6 +17,7 @@ import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.event.ClickEvent;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -87,7 +88,11 @@ public class NEIServerUtils {
new ChatComponentTranslation(
"nei.chat.item_link.text",
sender.getDisplayName(),
stackover.func_151000_E()));
stackover.func_151000_E().setChatStyle(
stackover.func_151000_E().getChatStyle().setChatClickEvent(
new ClickEvent(
ClickEvent.Action.RUN_COMMAND,
"/nei_bookmark " + stackover.writeToNBT(new NBTTagCompound()))))));
}
public static long getTime(World world) {