Fix #2336 (interaction bug when opening chests) #2340

Merged
cora merged 1 commits from shield_fixes into master 2022-07-11 11:58:23 +02:00
Member
No description provided.
NO11 added the
bug
label 2022-06-19 22:09:05 +02:00
Contributor

Mmmh this seems to specifically check for group:container - not that i have personally experienced this bug a lot but wouldn't it be a problem for all on_rightclick nodes ?

Maybe better check for the existence of on_rightclick or something ?

Mmmh this seems to specifically check for group:container - not that i have personally experienced this bug a lot but wouldn't it be a problem for all on_rightclick nodes ? Maybe better check for the existence of on_rightclick or something ?
Author
Member

Which list of nodes is better for that?

minetest.register_on_mods_loaded(function()
	for n, def in pairs(minetest.registered_nodes) do
		if minetest.get_item_group(n, "container") > 1 then
			minetest.log("error", n)
		end
	end
end)

puts out:

mcl_chests:green_shulker_box
mcl_chests:pink_shulker_box_small
mcl_chests:cyan_shulker_box_small
mcl_chests:trapped_chest_small
mcl_hoppers:hopper_side
mcl_chests:black_shulker_box
mcl_smoker:smoker
mcl_smoker:smoker_active
mcl_chests:dark_green_shulker_box
mcl_chests:yellow_shulker_box_small
mcl_chests:red_shulker_box_small
mcl_chests:white_shulker_box_small
mcl_chests:trapped_chest_on_right
mcl_barrels:barrel_open
mcl_chests:brown_shulker_box_small
mcl_dispensers:dispenser_down
mcl_chests:trapped_chest_left
mcl_hoppers:hopper_side_disabled
mcl_chests:cyan_shulker_box
mcl_chests:violet_shulker_box_small
mcl_chests:orange_shulker_box_small
mcl_dispensers:dispenser
mcl_furnaces:furnace_active
mcl_barrels:barrel_closed
mcl_chests:trapped_chest_on_left
mcl_chests:dark_grey_shulker_box
mcl_chests:white_shulker_box
mcl_droppers:dropper
mcl_chests:orange_shulker_box
mcl_chests:grey_shulker_box
mcl_chests:chest_small
mcl_furnaces:furnace
mcl_chests:chest_right
mcl_chests:magenta_shulker_box_small
mcl_chests:pink_shulker_box
mcl_hoppers:hopper_disabled
mcl_chests:dark_green_shulker_box_small
mcl_dispensers:dispenser_up
mcl_blast_furnace:blast_furnace
mcl_chests:lightblue_shulker_box
mcl_chests:blue_shulker_box_small
mcl_chests:magenta_shulker_box
mcl_droppers:dropper_down
mcl_chests:violet_shulker_box
mcl_chests:black_shulker_box_small
mcl_itemframes:item_frame
mcl_chests:yellow_shulker_box
mcl_jukebox:jukebox
mcl_chests:trapped_chest_on_small
mcl_chests:red_shulker_box
mcl_chests:green_shulker_box_small
mcl_chests:trapped_chest_right
mcl_chests:lightblue_shulker_box_small
mcl_chests:blue_shulker_box
mcl_blast_furnace:blast_furnace_active
mcl_hoppers:hopper
mcl_chests:brown_shulker_box
mcl_chests:grey_shulker_box_small
mcl_chests:dark_grey_shulker_box_small
mcl_droppers:dropper_up
minetest.register_on_mods_loaded(function()
	for n, def in pairs(minetest.registered_nodes) do
		if def and def.on_rightclick then
			minetest.log("error", n)
		end
	end
end)

puts out:

mesecons_commandblock:commandblock_off
mcl_composters:composter_4
mcl_flowerpots:flower_pot_blue_orchid
mcl_chests:pink_shulker_box_small
mcl_flowerpots:flower_pot_tulip_pink
mcl_compass:lodestone
mcl_cake:cake_1
mcl_beds:respawn_anchor_charged_4
mcl_beds:bed_yellow_bottom
mesecons_button:button_birchwood_off
mcl_cake:cake_6
mcl_flowerpots:flower_pot_poppy
mcl_beds:respawn_anchor_charged_3
mcl_beds:respawn_anchor_charged_2
mcl_chests:cyan_shulker_box_small
mcl_beds:bed_blue_top
mcl_beds:respawn_anchor
mcl_beds:bed_white_top
mcl_beds:bed_light_blue_bottom
mcl_beds:bed_lime_top
mcl_fences:birch_fence_gate_open
mcl_beds:bed_pink_top
mcl_beds:bed_pink_bottom
mcl_beds:bed_brown_top
mcl_beds:bed_brown_bottom
mcl_beds:bed_purple_top
mcl_beds:bed_orange_top
mcl_chests:trapped_chest_small
mcl_beds:bed_orange_bottom
mcl_beds:bed_magenta_bottom
mcl_beds:bed_green_top
mesecons_delayer:delayer_off_2
mcl_beds:bed_green_bottom
mcl_beds:bed_yellow_top
mcl_cake:cake_4
mcl_beds:bed_black_top
mcl_beds:bed_silver_bottom
mcl_beds:bed_grey_top
mcl_doors:wooden_door_t_2
mcl_beds:bed_cyan_top
mcl_beds:bed_cyan_bottom
mcl_beds:bed_blue_bottom
mcl_beds:bed_red_bottom
mcl_cake:cake
mcl_comparators:comparator_on_comp
mesecons_solarpanel:solar_panel_inverted_off
mcl_doors:birch_door_t_1
mcl_doors:dark_oak_door_b_2
mcl_fences:jungle_fence_gate_open
mcl_fences:jungle_fence_gate
mcl_doors:trapdoor
mesecons_button:button_wood_off
mesecons_solarpanel:solar_panel_off
mcl_doors:wooden_door_t_1
mcl_flowerpots:flower_pot_darksapling
mcl_chests:yellow_shulker_box_small
mclx_fences:nether_brick_fence_gate
mcl_doors:birch_door_t_2
mcl_flowerpots:flower_pot_sprucesapling
mclx_fences:red_nether_brick_fence_gate_open
mcl_enchanting:table
mcl_chests:red_shulker_box_small
mcl_composters:composter_2
mesecons_noteblock:noteblock
mcl_flowerpots:flower_pot_tulip_white
mcl_flowerpots:flower_pot_tulip_orange
mcl_chests:white_shulker_box_small
mcl_chests:trapped_chest_on_right
mcl_doors:jungle_door_t_1
mcl_barrels:barrel_open
mcl_chests:brown_shulker_box_small
mcl_flowerpots:flower_pot
mcl_doors:acacia_door_b_2
mesecons_solarpanel:solar_panel_on
mcl_doors:dark_oak_door_t_1
mesecons_delayer:delayer_on_1
mcl_composters:composter_ready
mcl_composters:composter_7
mcl_composters:composter_3
mcl_composters:composter_1
mcl_doors:acacia_trapdoor_open
mcl_flowerpots:flower_pot_cactus
mesecons_commandblock:commandblock_on
mcl_chests:trapped_chest_left
mcl_doors:jungle_door_t_2
mesecons_walllever:wall_lever_off
mcl_doors:birch_trapdoor_open
mcl_doors:acacia_trapdoor
mcl_comparators:comparator_on_sub
mcl_doors:jungle_trapdoor_open
mcl_flowerpots:flower_pot_dandelion
mcl_crafting_table:crafting_table
mcl_flowerpots:flower_pot_mushroom_red
mcl_beds:bed_magenta_top
mcl_chests:ender_chest_small
mcl_chests:violet_shulker_box_small
mcl_chests:orange_shulker_box_small
mcl_barrels:barrel_closed
mcl_chests:trapped_chest_on_left
mcl_comparators:comparator_off_comp
mesecons_button:button_junglewood_off
mcl_crimson:crimson_fungus
mcl_fences:dark_oak_fence_gate
mcl_crimson:twisting_vines
mcl_flowerpots:flower_pot_mushroom_brown
mcl_doors:jungle_door_b_1
mesecons_button:button_darkwood_off
mesecons_button:button_sprucewood_off
mcl_doors:trapdoor_open
mcl_chests:chest_small
mcl_doors:spruce_trapdoor_open
mcl_chests:chest_right
mcl_chests:magenta_shulker_box_small
mcl_doors:wooden_door_b_2
mcl_doors:spruce_door_t_1
mcl_chests:dark_green_shulker_box_small
mcl_beds:bed_grey_bottom
mcl_fences:acacia_fence_gate_open
mcl_cake:cake_3
mcl_doors:spruce_door_b_2
mcl_doors:birch_trapdoor
mcl_doors:jungle_trapdoor
mcl_flowerpots:flower_pot_oxeye_daisy
mesecons_delayer:delayer_on_2
mcl_crimson:warped_fungus
mcl_composters:composter
mcl_beds:bed_black_bottom
mcl_beds:respawn_anchor_charged_1
mcl_flowerpots:flower_pot_allium
mcl_beds:bed_lime_bottom
mcl_chests:blue_shulker_box_small
mcl_doors:dark_oak_trapdoor
mesecons_delayer:delayer_off_3
mcl_fences:spruce_fence_gate_open
mcl_doors:wooden_door_b_1
mcl_doors:dark_oak_trapdoor_open
mcl_doors:acacia_door_t_2
mcl_fences:birch_fence_gate
mcl_doors:acacia_door_b_1
mcl_flowerpots:flower_pot_junglesapling
mcl_flowerpots:flower_pot_acaciasapling
mesecons_delayer:delayer_on_4
mcl_cake:cake_2
mesecons_button:button_acaciawood_off
mcl_doors:dark_oak_door_b_1
mcl_chests:black_shulker_box_small
mcl_itemframes:item_frame
mcl_composters:composter_6
mesecons_walllever:wall_lever_on
mcl_doors:birch_door_b_2
mesecons_delayer:delayer_on_3
mcl_doors:spruce_door_b_1
mcl_doors:dark_oak_door_t_2
mcl_fences:dark_oak_fence_gate_open
mcl_beds:bed_red_top
mcl_bells:bell
mcl_fences:acacia_fence_gate
mcl_flowerpots:flower_pot_tulip_red
mcl_doors:birch_door_b_1
mesecons_button:button_stone_off
mcl_fences:fence_gate_open
mcl_doors:spruce_trapdoor
mcl_fences:spruce_fence_gate
mcl_doors:acacia_door_t_1
mcl_flowerpots:flower_pot_deadbush
mcl_composters:composter_5
mcl_beds:bed_white_bottom
mcl_jukebox:jukebox
mesecons_delayer:delayer_off_4
mcl_armor_stand:armor_stand
mclx_fences:nether_brick_fence_gate_open
mcl_chests:trapped_chest_on_small
mcl_chests:green_shulker_box_small
mcl_chests:trapped_chest_right
mcl_chests:lightblue_shulker_box_small
mesecons_solarpanel:solar_panel_inverted_on
mcl_beds:bed_silver_top
mcl_doors:jungle_door_b_2
mclx_fences:red_nether_brick_fence_gate
mcl_doors:spruce_door_t_2
mcl_beds:bed_light_blue_top
mcl_comparators:comparator_off_sub
mcl_beds:bed_purple_bottom
mesecons_delayer:delayer_off_1
mcl_cake:cake_5
mcl_flowerpots:flower_pot_sapling
mcl_chests:grey_shulker_box_small
mcl_chests:dark_grey_shulker_box_small
mcl_flowerpots:flower_pot_azure_bluet
mcl_flowerpots:flower_pot_birchsapling
mcl_flowerpots:flower_pot_fern
mcl_fences:fence_gate
mcl_chests:chest_left
Which list of nodes is better for that? ``` minetest.register_on_mods_loaded(function() for n, def in pairs(minetest.registered_nodes) do if minetest.get_item_group(n, "container") > 1 then minetest.log("error", n) end end end) ``` puts out: ``` mcl_chests:green_shulker_box mcl_chests:pink_shulker_box_small mcl_chests:cyan_shulker_box_small mcl_chests:trapped_chest_small mcl_hoppers:hopper_side mcl_chests:black_shulker_box mcl_smoker:smoker mcl_smoker:smoker_active mcl_chests:dark_green_shulker_box mcl_chests:yellow_shulker_box_small mcl_chests:red_shulker_box_small mcl_chests:white_shulker_box_small mcl_chests:trapped_chest_on_right mcl_barrels:barrel_open mcl_chests:brown_shulker_box_small mcl_dispensers:dispenser_down mcl_chests:trapped_chest_left mcl_hoppers:hopper_side_disabled mcl_chests:cyan_shulker_box mcl_chests:violet_shulker_box_small mcl_chests:orange_shulker_box_small mcl_dispensers:dispenser mcl_furnaces:furnace_active mcl_barrels:barrel_closed mcl_chests:trapped_chest_on_left mcl_chests:dark_grey_shulker_box mcl_chests:white_shulker_box mcl_droppers:dropper mcl_chests:orange_shulker_box mcl_chests:grey_shulker_box mcl_chests:chest_small mcl_furnaces:furnace mcl_chests:chest_right mcl_chests:magenta_shulker_box_small mcl_chests:pink_shulker_box mcl_hoppers:hopper_disabled mcl_chests:dark_green_shulker_box_small mcl_dispensers:dispenser_up mcl_blast_furnace:blast_furnace mcl_chests:lightblue_shulker_box mcl_chests:blue_shulker_box_small mcl_chests:magenta_shulker_box mcl_droppers:dropper_down mcl_chests:violet_shulker_box mcl_chests:black_shulker_box_small mcl_itemframes:item_frame mcl_chests:yellow_shulker_box mcl_jukebox:jukebox mcl_chests:trapped_chest_on_small mcl_chests:red_shulker_box mcl_chests:green_shulker_box_small mcl_chests:trapped_chest_right mcl_chests:lightblue_shulker_box_small mcl_chests:blue_shulker_box mcl_blast_furnace:blast_furnace_active mcl_hoppers:hopper mcl_chests:brown_shulker_box mcl_chests:grey_shulker_box_small mcl_chests:dark_grey_shulker_box_small mcl_droppers:dropper_up ``` ``` minetest.register_on_mods_loaded(function() for n, def in pairs(minetest.registered_nodes) do if def and def.on_rightclick then minetest.log("error", n) end end end) ``` puts out: ``` mesecons_commandblock:commandblock_off mcl_composters:composter_4 mcl_flowerpots:flower_pot_blue_orchid mcl_chests:pink_shulker_box_small mcl_flowerpots:flower_pot_tulip_pink mcl_compass:lodestone mcl_cake:cake_1 mcl_beds:respawn_anchor_charged_4 mcl_beds:bed_yellow_bottom mesecons_button:button_birchwood_off mcl_cake:cake_6 mcl_flowerpots:flower_pot_poppy mcl_beds:respawn_anchor_charged_3 mcl_beds:respawn_anchor_charged_2 mcl_chests:cyan_shulker_box_small mcl_beds:bed_blue_top mcl_beds:respawn_anchor mcl_beds:bed_white_top mcl_beds:bed_light_blue_bottom mcl_beds:bed_lime_top mcl_fences:birch_fence_gate_open mcl_beds:bed_pink_top mcl_beds:bed_pink_bottom mcl_beds:bed_brown_top mcl_beds:bed_brown_bottom mcl_beds:bed_purple_top mcl_beds:bed_orange_top mcl_chests:trapped_chest_small mcl_beds:bed_orange_bottom mcl_beds:bed_magenta_bottom mcl_beds:bed_green_top mesecons_delayer:delayer_off_2 mcl_beds:bed_green_bottom mcl_beds:bed_yellow_top mcl_cake:cake_4 mcl_beds:bed_black_top mcl_beds:bed_silver_bottom mcl_beds:bed_grey_top mcl_doors:wooden_door_t_2 mcl_beds:bed_cyan_top mcl_beds:bed_cyan_bottom mcl_beds:bed_blue_bottom mcl_beds:bed_red_bottom mcl_cake:cake mcl_comparators:comparator_on_comp mesecons_solarpanel:solar_panel_inverted_off mcl_doors:birch_door_t_1 mcl_doors:dark_oak_door_b_2 mcl_fences:jungle_fence_gate_open mcl_fences:jungle_fence_gate mcl_doors:trapdoor mesecons_button:button_wood_off mesecons_solarpanel:solar_panel_off mcl_doors:wooden_door_t_1 mcl_flowerpots:flower_pot_darksapling mcl_chests:yellow_shulker_box_small mclx_fences:nether_brick_fence_gate mcl_doors:birch_door_t_2 mcl_flowerpots:flower_pot_sprucesapling mclx_fences:red_nether_brick_fence_gate_open mcl_enchanting:table mcl_chests:red_shulker_box_small mcl_composters:composter_2 mesecons_noteblock:noteblock mcl_flowerpots:flower_pot_tulip_white mcl_flowerpots:flower_pot_tulip_orange mcl_chests:white_shulker_box_small mcl_chests:trapped_chest_on_right mcl_doors:jungle_door_t_1 mcl_barrels:barrel_open mcl_chests:brown_shulker_box_small mcl_flowerpots:flower_pot mcl_doors:acacia_door_b_2 mesecons_solarpanel:solar_panel_on mcl_doors:dark_oak_door_t_1 mesecons_delayer:delayer_on_1 mcl_composters:composter_ready mcl_composters:composter_7 mcl_composters:composter_3 mcl_composters:composter_1 mcl_doors:acacia_trapdoor_open mcl_flowerpots:flower_pot_cactus mesecons_commandblock:commandblock_on mcl_chests:trapped_chest_left mcl_doors:jungle_door_t_2 mesecons_walllever:wall_lever_off mcl_doors:birch_trapdoor_open mcl_doors:acacia_trapdoor mcl_comparators:comparator_on_sub mcl_doors:jungle_trapdoor_open mcl_flowerpots:flower_pot_dandelion mcl_crafting_table:crafting_table mcl_flowerpots:flower_pot_mushroom_red mcl_beds:bed_magenta_top mcl_chests:ender_chest_small mcl_chests:violet_shulker_box_small mcl_chests:orange_shulker_box_small mcl_barrels:barrel_closed mcl_chests:trapped_chest_on_left mcl_comparators:comparator_off_comp mesecons_button:button_junglewood_off mcl_crimson:crimson_fungus mcl_fences:dark_oak_fence_gate mcl_crimson:twisting_vines mcl_flowerpots:flower_pot_mushroom_brown mcl_doors:jungle_door_b_1 mesecons_button:button_darkwood_off mesecons_button:button_sprucewood_off mcl_doors:trapdoor_open mcl_chests:chest_small mcl_doors:spruce_trapdoor_open mcl_chests:chest_right mcl_chests:magenta_shulker_box_small mcl_doors:wooden_door_b_2 mcl_doors:spruce_door_t_1 mcl_chests:dark_green_shulker_box_small mcl_beds:bed_grey_bottom mcl_fences:acacia_fence_gate_open mcl_cake:cake_3 mcl_doors:spruce_door_b_2 mcl_doors:birch_trapdoor mcl_doors:jungle_trapdoor mcl_flowerpots:flower_pot_oxeye_daisy mesecons_delayer:delayer_on_2 mcl_crimson:warped_fungus mcl_composters:composter mcl_beds:bed_black_bottom mcl_beds:respawn_anchor_charged_1 mcl_flowerpots:flower_pot_allium mcl_beds:bed_lime_bottom mcl_chests:blue_shulker_box_small mcl_doors:dark_oak_trapdoor mesecons_delayer:delayer_off_3 mcl_fences:spruce_fence_gate_open mcl_doors:wooden_door_b_1 mcl_doors:dark_oak_trapdoor_open mcl_doors:acacia_door_t_2 mcl_fences:birch_fence_gate mcl_doors:acacia_door_b_1 mcl_flowerpots:flower_pot_junglesapling mcl_flowerpots:flower_pot_acaciasapling mesecons_delayer:delayer_on_4 mcl_cake:cake_2 mesecons_button:button_acaciawood_off mcl_doors:dark_oak_door_b_1 mcl_chests:black_shulker_box_small mcl_itemframes:item_frame mcl_composters:composter_6 mesecons_walllever:wall_lever_on mcl_doors:birch_door_b_2 mesecons_delayer:delayer_on_3 mcl_doors:spruce_door_b_1 mcl_doors:dark_oak_door_t_2 mcl_fences:dark_oak_fence_gate_open mcl_beds:bed_red_top mcl_bells:bell mcl_fences:acacia_fence_gate mcl_flowerpots:flower_pot_tulip_red mcl_doors:birch_door_b_1 mesecons_button:button_stone_off mcl_fences:fence_gate_open mcl_doors:spruce_trapdoor mcl_fences:spruce_fence_gate mcl_doors:acacia_door_t_1 mcl_flowerpots:flower_pot_deadbush mcl_composters:composter_5 mcl_beds:bed_white_bottom mcl_jukebox:jukebox mesecons_delayer:delayer_off_4 mcl_armor_stand:armor_stand mclx_fences:nether_brick_fence_gate_open mcl_chests:trapped_chest_on_small mcl_chests:green_shulker_box_small mcl_chests:trapped_chest_right mcl_chests:lightblue_shulker_box_small mesecons_solarpanel:solar_panel_inverted_on mcl_beds:bed_silver_top mcl_doors:jungle_door_b_2 mclx_fences:red_nether_brick_fence_gate mcl_doors:spruce_door_t_2 mcl_beds:bed_light_blue_top mcl_comparators:comparator_off_sub mcl_beds:bed_purple_bottom mesecons_delayer:delayer_off_1 mcl_cake:cake_5 mcl_flowerpots:flower_pot_sapling mcl_chests:grey_shulker_box_small mcl_chests:dark_grey_shulker_box_small mcl_flowerpots:flower_pot_azure_bluet mcl_flowerpots:flower_pot_birchsapling mcl_flowerpots:flower_pot_fern mcl_fences:fence_gate mcl_chests:chest_left ```
Author
Member

I both lists, theres no anvil. But it could also happen with an anvil right?

I both lists, theres no anvil. But it could also happen with an anvil right?
Contributor

I both lists, theres no anvil. But it could also happen with an anvil right?

yeah i suppose it could ... why doesnt an anvil have on_rightclick though lol

> I both lists, theres no anvil. But it could also happen with an anvil right? yeah i suppose it could ... why doesnt an anvil have on_rightclick though lol
Contributor

I mean i've tried for like 10 minutest to reproduce this and could not even do that so idk if it would happen with anvils ^^

I mean i've tried for like 10 minutest to reproduce this and could not even do that so idk if it would happen with anvils ^^
Contributor

maybe check for node meta ?

maybe check for node meta ?
cora force-pushed shield_fixes from 444eb7511f to a16613f31c 2022-07-11 11:14:23 +02:00 Compare
Contributor

I'm merging this since it seems to fix #2336

I'm merging this since it seems to fix #2336
cora merged commit 0b197d3605 into master 2022-07-11 11:58:23 +02:00
cora deleted branch shield_fixes 2022-07-11 11:58:27 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#2340
No description provided.