Dupe Bug with Oops
Boymann opened this issue ยท 8 comments
While the Oops mod is installed (not completely confirmed but 80% sure) if you break the backpack after placing it on the floor 2 backpacks drop.
This should probably get respolved on Oops' end..?
I use onBlockBreak
to drop the backpack, for the record.
I'm pretty new to github, I'll open an issue there too, because I don't think there is a way to forward an issue.
No problem, we all start out somewhere! I'd appreciate it if you could link this issue there. GitHub will automatically add a notice here about it being mentioned, and that's always helpful.
@copygirl its not "Oops" issue. As mod developer, i recommend you use onBlockHarvested
instead of onBlockBreak
:
@DreenDex To do what, exactly?
Not sure what I linked in my first comment. Here's the relevant code from BlockBackpack
. I don't exactly remember why I chose to do things this way, but I'm pretty sure it was done like this intentionally for some reason.
You're using Block.breakBlock which is called every single time setBlockState() sets the block to air. Nuh-uh. I recommend making it hook one of the harvesting methods,
You can work around "The super method will set the block to air before getDrops." by passing the TileEntity reference from harvestBlock to getDrops - I can also tackle that.
@asiekierka Feel free to have a fresh go at it. I remember I wanted to have some specific behavior. Such as always dropping the backpack even if it was from an explosion.
3c61f58 should fix it