How to override a vanilla feature?

Started by ktosiowy ktos on

Topic category: Help with modding (Java Edition)

Last seen on 17:03, 20. Dec 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to override a vanilla feature?

I'm having a quite specific problem here. There's this vanilla feature, that when you right-click a rose bush with shears, it drops another rose bush. I want to disable this feature or make it drop something else than a rose bush. How do I do that?

Last seen on 08:09, 24. Apr 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a datapack in which…
Mon, 11/29/2021 - 23:58

Create a datapack in which you change the vanilla rose bush loot table to any item you like, then merge that datapack with your mod. That loot should go in - your mod\data\minecraft\loot_tables\blocks (rose_bush.json goes here)

This is the rose_bush loot table:

 

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "conditions": [
            {
              "condition": "minecraft:block_state_property",
              "block": "minecraft:rose_bush",
              "properties": {
                "half": "lower"
              }
            }
          ],
          "name": "minecraft:rose_bush"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:survives_explosion"
        }
      ]
    }
  ]
}

reference: https://www.youtube.com/results?search_query=custom+loot+table+minecraft

Last seen on 21:39, 11. Sep 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You don't even need to do…
Tue, 11/30/2021 - 02:26

You don't even need to do write one manually then merge. Just create a loottable in your workspace, set it to a block with the name rose_bush, and there you go.

Last seen on 17:03, 20. Dec 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wouldn't that just change…
Tue, 11/30/2021 - 14:07

Wouldn't that just change the item that drops after breaking a rose bush? I want to change just the item that drops when you right-click it with shears

Last seen on 21:39, 11. Sep 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ah I see what you mean now. …
Wed, 12/01/2021 - 00:23

Ah I see what you mean now.  I believe if you edit the blockstates/loot tables in vanilla MC, you should be able to change it to not drop anything. I'll look into the data files later since I'm curious myself and will update ya.