Zarius / Bukkit-OtherBlocks

OtherBlocks (now known as OtherDrops) plugin for Bukkit (dev build: https://www.mediafire.com/?i6ows1g6kus2o0l)
http://dev.bukkit.org/server-mods/otherdrops/
GNU General Public License v3.0
17 stars 17 forks source link

Duplication Issues #267

Open stvncao5 opened 11 years ago

stvncao5 commented 11 years ago

I ran tests of two scenarios on my testing server. My testing server was version 1.5.2-R0.1, and was using only Pail and version 2.8b.542 of OtherDrops.

Scenario 1: I was breaking fully grown crops with my hand, or with an item in my hand. But whenever I would try breaking the crops, the block would come back as if I specified "replacementblock: CROPS@THIS". Yet, I have never specified such a thing. On top of that, the crops would drop items each time I hit it.

Scenario 2: If I mine coal ore or diamond ore with a iron pickaxe or a diamond pickaxe, it acts as I have it configured in the plugin. The ore turns into cobblestone which can then be broken again. But if I mine the coal ore with a golden pickaxe, the coal ore gets replaced with yet another coal ore. Despite the fact that I've specified "replacementblock: COBBLESTONE" within the configuration.

If you need me to, I can email you the configuration yet again. I have your email already so you don't need to PM it to me.

I could've tested many more scenarios, but I chose not to, because I already saw a common theme between these two scenarios: when I break a certain block, the plugin "refuses" to listen, and replaces the block with something I never specified. I'm wondering why this might be the case.

Zarius commented 11 years ago

Yes, please email me the config so I can try and replicate the issue.

Zarius commented 11 years ago

Just confirming that I've started on this issue, once I isolate the specific issues I'll post new tickets and close this one.

stvncao5 commented 8 years ago

I don't know if you're still around anymore, but I figured it would be worth a shot posting this. I've isolated the factors that lead to reproduction of this duplication bug. I've still yet to come up with a hypothesis as to why this bug arises.

Three things are required. First, the object in question must have two or more "nodes" with the drops parameter involved. Second, there must be a tool specified that is used in at least one node, and negated in at least one other node. Third, the drops parameter for all nodes that involve the tool-in-question must involve multiple drops (i.e. with square brackets) and not just one individual drop (i.e. without brackets).

An example would be the following: PUMPKIN:

Now, if I break a pumpkin with "AIR" or with "ANY_AXE", they will drop their respective and correct drops. Everything works fine except for the fact that the pumpkin block comes back "most of the time" (it turns out if you break it fast and often enough, it will not). IF one does not use either their fist nor an axe, the pumpkin does not duplicate. IF I had specified an item to drop without square brackets, no duplication will occur.

Now you will notice the following three factors at work here: 1.) there are multiple nodes used here, 2.) both "AIR" and the list of all vanilla axes are negated in some previous node, 3.) the tools - in the drop nodes where they are used - have multiple drops enclosed in square brackets.

Notice how the drop node that negates tools does not use square brackets - thus multiple drops need only be specified for the "duplication-afflicted" tools. Also notice how "duplication-affliction" occurs regardless of whether a tool is specified alone (AIR) or in a bracket-enclosed group (ANY_AXE). These are two factors you can rule out.