Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

set_pinv(pinv()) clears EntityTag values

Aperta
#1,349 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Inizia riproducendo il round trip di set_pinv(pinv()) con i comandi degli item elencati, quindi segui la conversione dell’inventario usata da set_pinv e pinv. Controlla come sono rappresentati EntityTag e BlockEntityTag insieme al problema correlato di BlockStateTag. Il lavoro è completato quando questi tag sopravvivono al round trip e i tre esempi mantengono il loro comportamento originale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

CommandHelper seems to not support EntityTag for ItemStacks, resulting in that information being lost when updating the inventory using:

set_pinv(pinv())

I guess this is similar to #1343 (BlockStateTag)

Tested on:

CommandHelper-3.3.5-b309
Purpur-1.19.3-b1895


Test item 1:

/give @s minecraft:item_frame{EntityTag:{Invisible:1b}}

Places an invisible item frame.
After set_pinv(pinv()) it will remove the invisible tag and place a normal item frame. Also applies to glow_item_frame.

Test item 2:

/give @s minecraft:polar_bear_spawn_egg{EntityTag:{id:"minecraft:iron_golem", CustomName:'{"text":"Jerry"}', CustomNameVisible:1b}}

Looks like a polar bear spawn egg but spawn an iron golem named Jerry. right-clicking a spawner makes it an iron golem spawner.
After set_pinv(pinv()) it turns into a normal polar bear spawn egg.

With 1.20 experimental features we now have a vanilla iron_golem_spawn_egg item (and other previously unobtainable eggs), which don't use EntityTag. But this tag can still be used to make the spawned mob have specific traits.

Test item 3:

/give @s bee_nest{BlockEntityTag:{Bees:[{EntityData:{id:"minecraft:bee"}},{EntityData:{id:"minecraft:bee"}},{EntityData:{id:"minecraft:bee"}}]}}

When placed during the day, 3 bees come out of the hive.
After set_pinv(pinv()) it will remove all the bee information, creating an empty hive. When placed during the day no bees come out.

This item can be obtained in vanilla survival using a silktouch enchanted tool.
Having access to this tag could allow us to check how many bees are in the beenest/hive item.

Lingua principale
Java
Stelle
128
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di EngineHub/CommandHelper

Tutte le issue di EngineHub/CommandHelper

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.