Skip to content

feat: Better debug informations (AAInfo)#523

Closed
Gebardensprache wants to merge 6 commits intoCleanroomMC:mainfrom
Gebardensprache:info
Closed

feat: Better debug informations (AAInfo)#523
Gebardensprache wants to merge 6 commits intoCleanroomMC:mainfrom
Gebardensprache:info

Conversation

@Gebardensprache
Copy link
Contributor

In Roadmap

  • furnace fuel burn time display
  • hold SHIFT to display advanced info (ore dicts, unlocalized name)
  • hold CTRL to display NBT list
image

- 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)
Copilot AI review requested due to automatic review settings March 7, 2026 03:48
@Gebardensprache Gebardensprache changed the title feat: merged aainfo features feat: Better debug informations (AAInfo) Mar 7, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_LENGTH to cap tooltip NBT output.
  • Extend ItemStack tooltip generation to show burn time and modifier-key gated advanced info; fire ForgeEventFactory.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.

@kappa-maintainer
Copy link
Collaborator

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
@Gebardensprache
Copy link
Contributor Author

Just cleaned up the patch, could you copy your new method, rebase on main and regen the patch?

hmmm looks wrong but i dont know how to use git...

@Gebardensprache Gebardensprache requested a review from Copilot March 7, 2026 06:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) references data, but within this method the string is assigned to this.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 addFMLMarker constructor sets hasFMLMarker, and readPacketData detects/strips the marker, but writePacketData in this hunk doesn’t show any usage of hasFMLMarker to actually append the \0FML\0 marker to the address being written. This makes call sites like new C00Handshake(host, port, state, true) ineffective; update writePacketData to include the marker when hasFMLMarker is 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., a duplicate()/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.data and marking/resetting readerIndex during writePacketData can cause subtle concurrency problems if data is 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.

@kappa-maintainer
Copy link
Collaborator

Should be git fetch upstream and then git merge upstream/main
+2,614-34,524 looks too cursed

@Gebardensprache Gebardensprache deleted the info branch March 7, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants