Denying PlaceHeldItem creates ghost blocks and items
DootLoot opened this issue ยท 1 comments
Minecraft Version: 1.20.1
Mod Loader: Forge 1.20.1-47.2.17
Mod Version: 1.20-9.2.6
Description of the bug:
While playing with just InControl, if you go into the placeevents.json file and deny the ability to place a block with a item that has nbt, the item becomes invisible inside of the players inventory. Then, placing the same block using its item without the required nbt, a ghost block is created that doesn't go away after reloading. The only solution is to set the invisible block's position to another block.
How to replicate:
-
In placeevents.json, create a rule to deny the place event if the held item has some nbt data.
{ "playerhelditem": { "item": "minecraft:carved_punpkin", "nbt": [ { "tag": "Unbreakable", "value": 1 } ] }, "result": "deny" }
-
Reload InControl
-
Give yourself the block item with nbt
/give @s minecraft:carved_pumpkin{Unbreakable: 1}
-
Place the item to create the ghost item
4.5) Place the item without nbt creates the ghost block