EngineHub / EngineHub/CommandHelper

set_pinv(pinv()) clears EntityTag values

オープン
#1,349 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Java
スター
128
フォーク
70
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。