Dropt

Dropt

3M Downloads

Issue with removing drops from leaves

keleryn opened this issue ยท 7 comments

commented

Hi,

I'm trying to replace some of the drops from leaves (saplings, etc.), but in every instance I still get the original drops along with my replacements.

Here's a simple example rule, attempting to make dirt and leaves drop ink sacs:

{
	"rules": [
		{
			"match": {
				"blocks": {
					"blocks": [
						"minecraft:dirt:*",
						"minecraft:leaves:*"
					]
				}
			},
			"replaceStrategy": "REPLACE_ALL",
			"drops": [
				{
					"item": {
						"items": [
							"minecraft:dye:0"
						]
					}
				}
			]
		}
	]
}

When I implement this rule, the dirt will always drop ink sacs and never dirt, but the leaves will still drop saplings and apples occasionally.

The issue is able to be replicated with modded leaves as well. Specifically, my main intent is to make the dead leaves under "biomesoplenty:leaves_1:1" (and :5, :9, :13) drop nothing. No matter what I try, they seem to always drop the dead saplings and persimmons. I tested with vanilla oak leaves to verify it wasn't a modded issue and still got oak saplings and apples regardless.

commented

I'm glad it's working. :)

commented

I tested your rule above by growing five oak trees and harvesting all the leaves. I also tested by letting the leaves decay naturally. I wasn't able to get any saplings or apples.

java_2018-06-11_09-39-32

I used Dropt's /dropt verbose command to verify that minecraft:leaves:* is correct for oak leaves.

I tested all this with Dropt only, no other mods were present.

What versions are you using?

  • Forge:
  • Dropt:
  • Athenaeum:
commented

Alright, so I'm absolutely confused now. I must have been doing something wrong, but I have no idea what. I tested in a pack with just Dropt installed and it worked just fine, so I went back over to my main pack and it was also working fine. I then switch the rule from the ink sac test back to my custom rule for biomesoplenty leaves and it also worked.

I'm so sorry for wasting your time; everything appears to be in order now.

commented

Thank you :)

commented

@NillerMedDild You can also use the command /dropt verbose to log any broken blocks to the console. This can help when trying to identify the actual state of a block when it's broken. Use /dropt verbose again to toggle the console output off.

commented

I'm having this issue aswell, I cannot alter or add drops of Leaves. Did you ever find the cause before it fixed itself @keleryn?

commented

So the issue was that there are four different metadata values for each variety of leaf, depending on how they're flagged to behave. You can only see one of the metadata values in JEI or by looking at a leaf block with WAILA, etc, but you have to set the Dropt function to work with all 4 otherwise you'll have some leaves dropping their original items.

For instance, oak leaves are under minecraft:leaves at :0, but also leaves:4, :8, and :12.

The block states for Decay and CheckDecay change this metadata when set to true or false.

You can see the vanilla leaf metadata here https://minecraft.gamepedia.com/Leaves#Data_values under block data, but you'll have to mess around with breaking and looking at leaves to find the modded ones.