In Control!

In Control!

72M Downloads

Denying PlaceHeldItem creates ghost blocks and items

DootLoot opened this issue ยท 1 comments

commented

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:

  1. 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" }

  2. Reload InControl

  3. Give yourself the block item with nbt
    /give @s minecraft:carved_pumpkin{Unbreakable: 1}

  4. Place the item to create the ghost item

4.5) Place the item without nbt creates the ghost block

commented

The problem is that In Control is server side and doesn't cancel the event on the client. I need to figure out how I can do this