Brewing stands duplicate their contents when they fall or are pushed by a piston #831
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-Minecraft feature
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#831
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A copy of their contents falls out.
Awesome bug! :))
I've been out of the MCL2 loop for a little while - taking a break. Noticed this little gem. There was an issue with early versions of the brewing stand, but I believed it to be fixed.
Brewing stands only have one call to distribute items on destruct, so this shouldn't happen...
Very challenging and maybe needs more time for exploring (half an hour wasn't enough for me).
Just my notices for now:
It can duplucate almost everything because I don't see any limitations for items you can load into the stand :)
Probably not as difficult would be to disable dropping, it calls from the destructor (
on_destruct
) when you push it by the piston or dig a block below it.But
on_construct
skips further :)))) So IDK where to clear the inventory, maybe besides delayed execution from the destructor...I was wrong about the constructor. It fires. Seems meta content is kept by an outer mod (?) Disabling the item dropout is still the best I would do for now
I think this is because pushing with a piston or falling counts as destruct.
The drop is implemented in brewing which runs through destructor which fires by on_destruct events redefined at lines 414, 486, 559, 628, 707, 782, 857 and 939. There is also after_dig definition but it isn't attached and maybe not used.
When item moves by falling and/or by the piston it actually just changes its position in the world but destruct and construct events still fire in this case. So at the first glance we would can just clear stand's content in the cunstructor. But it doesn't work :) That's why I suspect the action of some outer mod, eg falling handler where definitely meta manipulations used, but I have to explore it more carefully :( hope maybe @bzoss can fix it faster than me - it would really nice
mcl_falling_nodes
mod really keeps meta data of falling objects.mesecons_mvps
preserves it for object moving by the piston.By the way, I'm checking its behavior in MC 1.16.2:
I can't put random items into stand's inventory, eg. bed or flint and steel and even experience bottle.
Stand produces some black particles.
When I dig the block under the stand it doesn't fall :):):)
The pistons can't push the stand.
So... as the mods I mentioned above work really good and help the stand to keep its inventory, and as it still very very not as in MC, I don't see the reason for dropping its content anymore.
I can fix it now by removing the drop if @bzoss won't mind. I'd prefer to get confirmation from the authors of the brewing and don't touch anything without having it.
Rather than not dropping contents can't you disable falling/pushing?
That is unused, the reference to it in the nodedef was removed.
I think yes. The falling can be prevented just by removing the corresponding group, the pushing - I'm not 100% sure for now but we may try. I remember, you like to copy Minecraft behavior. But what's the profit for doing that? 100% copying isn't the goal... I thought it's good that the piston works with it in MineClone 2. You don't think so? Could you please explain why?
Well one reason it that it duplicates the content.
I think they should drop the contents when they are broken or blow up, along with all other item containers (currently some don't e.g. dispensers), disabling dropping could make players lose valuable items, but disabling pushing wouldn't cause many problems. Or you could just fix it properly and do what chests do.
@anon5 Thank you for reporting and for the opinion.
I'm fixing it as you prefer. It's really easy.
Hope @Wuzzy and @bzoss won't blame me for that. I shouldn't touch their code when they maybe work on it but we still need to fix the bug so let's try:
7678bf9b9f
We may revert this if I did something wrong.