feat: Better debug informations (AAInfo)#523
feat: Better debug informations (AAInfo)#523Gebardensprache wants to merge 6 commits intoCleanroomMC:mainfrom
Conversation
- furnace fuel burn time display - hold SHIFT to display advanced info (ore dicts, unlocalized name) - hold CTRL to display NBT list - multilingual support (only english)
There was a problem hiding this comment.
Pull request overview
Adds additional “advanced” tooltip information (fuel burn time, ore dictionary IDs, translation key, and NBT display) with modifier-key hints, plus new localization strings and a config knob for NBT tooltip truncation.
Changes:
- Add new lang keys for burn time and advanced tooltip hints/info across multiple locales.
- Introduce
ForgeEarlyConfig.MAX_TOOLTIP_NBT_LIST_LENGTHto cap tooltip NBT output. - Extend
ItemStacktooltip generation to show burn time and modifier-key gated advanced info; fireForgeEventFactory.onItemTooltip.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/assets/forge/lang/zh_tw.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/zh_cn.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/ru_ru.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/ko_kr.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/ja_jp.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/fr_fr.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/es_es.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/en_us.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/resources/assets/forge/lang/en_pt.lang | Adds tooltip strings for burn time and advanced info keys. |
| src/main/java/net/minecraftforge/common/ForgeEarlyConfig.java | Adds config value controlling tooltip NBT truncation. |
| patches/minecraft/net/minecraft/item/ItemStack.java.patch | Implements burn time + SHIFT/CTRL advanced tooltip sections and NBT truncation; fires tooltip event. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Just cleaned up the patch, could you copy your new method, rebase on main and regen the patch? |
# Conflicts: # patches/minecraft/net/minecraft/item/ItemStack.java.patch # src/main/java/net/minecraftforge/common/ForgeEarlyConfig.java # src/main/resources/assets/forge/lang/en_pt.lang # src/main/resources/assets/forge/lang/en_us.lang # src/main/resources/assets/forge/lang/es_es.lang # src/main/resources/assets/forge/lang/fr_fr.lang # src/main/resources/assets/forge/lang/ja_jp.lang # src/main/resources/assets/forge/lang/ko_kr.lang # src/main/resources/assets/forge/lang/ru_ru.lang # src/main/resources/assets/forge/lang/zh_cn.lang # src/main/resources/assets/forge/lang/zh_tw.lang
hmmm looks wrong but i dont know how to use git... |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 166 out of 313 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (4)
patches/minecraft/net/minecraft/nbt/NBTTagString.java.patch:1
NBTSizeTracker.readUTF(sizeTracker, data)referencesdata, but within this method the string is assigned tothis.data. As written, this looks like a compile error / unresolved symbol. Use the actual string value that was read (e.g.,this.data) when computing UTF accounting.
--- before/net/minecraft/nbt/NBTTagString.java
patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch:1
- The new
addFMLMarkerconstructor setshasFMLMarker, andreadPacketDatadetects/strips the marker, butwritePacketDatain this hunk doesn’t show any usage ofhasFMLMarkerto actually append the\0FML\0marker to the address being written. This makes call sites likenew C00Handshake(host, port, state, true)ineffective; updatewritePacketDatato include the marker whenhasFMLMarkeris true (while still respecting the protocol’s string length constraints).
--- before/net/minecraft/network/handshake/client/C00Handshake.java
patches/minecraft/net/minecraft/network/play/server/SPacketCustomPayload.java.patch:1
- Synchronizing on
this.data(a mutable buffer object) and mutating its reader index during encoding is risky: the buffer object may be shared/escaped elsewhere, and locking on it can introduce lock-order issues, while readerIndex mutations can still interact badly with other code that reads/writes the same buffer. Prefer writing from a duplicate/snapshot of the buffer (e.g., aduplicate()/slice()or copied bytes) so encoding does not require mutation or external locking.
--- before/net/minecraft/network/play/server/SPacketCustomPayload.java
patches/minecraft/net/minecraft/network/play/client/CPacketCustomPayload.java.patch:1
- Same issue as the server variant: locking on
this.dataand marking/resetting readerIndex duringwritePacketDatacan cause subtle concurrency problems ifdatais shared. Use a non-mutating approach (encode from a duplicated/sliced view or a copied byte array) and avoid synchronizing on externally reachable objects.
--- before/net/minecraft/network/play/client/CPacketCustomPayload.java
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
patches/minecraft/net/minecraft/network/handshake/client/C00Handshake.java.patch
Show resolved
Hide resolved
|
Should be git fetch upstream and then git merge upstream/main |
In Roadmap