MineWorlds reports: compass dupe bug. how it works ... #4591

Open
opened 2023-05-24 16:12:49 +00:00 by yourland-report · 6 comments

MineWorlds reports a bug:

compass dupe bug. how it works?: get 2 miocene compasses for free by buttercup. place an autocraft. set the crafting recipe for 2 compasses to make 1 compass, then place the 2 free miocene compasses and boom. you get an default compass. allowing you to add your own coords to it and save on ores.

Player position:

{
	z = 522.19903564453,
	x = 1296.1989746094,
	y = 41.5
}

Player look:

{
	z = 0.60781288146973,
	x = 0.76357799768448,
	y = 0.21797290444374
}

Player information:

{
	major = 5,
	ip_version = 6,
	min_rtt = 0.16099999845028,
	minor = 3,
	min_jitter = 0,
	max_jitter = 2.1470000743866,
	avg_jitter = 0.0069999992847443,
	connection_uptime = 4165,
	serialization_version = 28,
	patch = 0,
	lang_code = "",
	version_string = "5.3.0",
	formspec_version = 3,
	max_rtt = 2.3129999637604,
	state = "Active",
	avg_rtt = 0.17700000107288,
	protocol_version = 39
}

Player meta:

{
	fields = {
		["petz:werewolf_clan_idx"] = "2",
		played_time = "4029627",
		digged_nodes = "1125966",
		placed_nodes = "102137",
		died = "102",
		crafted = "46470",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		yl_commons_thankyou = "175",
		jointime = "1614030326",
		bitten = "0",
		punch_count = "253640",
		inflicted_damage = "5447198",
		yl_church = "return {[\"last_death_portal\"] = 1684687269, [\"last_death\"] = {[\"z\"] = 1179, [\"x\"] = 2006, [\"y\"] = 15}, [\"last_heal\"] = 1684019804}",
		["stamina:level"] = "18",
		repellant = "0",
		["stamina:poisoned"] = "no",
		["stamina:exhaustion"] = "144.5",
		["signslib:pos"] = "(1974,14,1673)",
		["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 520\", \"shields:shield_nether 1 1040\", \"3d_armor:leggings_nether 1 1040\", \"3d_armor:helmet_nether 1 520\", \"3d_armor:chestplate_nether 1 1040\", \"\"}",
		["ocean_build.last_warning"] = "1.679e+09",
		["petz:werewolf"] = "0",
		["ocean_build.ocean_built"] = "12",
		["petz:lycanthropy"] = "0",
		["petz:werewolf_vignette_id"] = "19",
		["hud_manager:choppy:waypoint_enabled"] = "y",
		hud_state = "on",
		arenalib_infobox_arenaID = "0",
		xp = "920059",
		["petz:old_override_table"] = "return {[\"jump\"] = 1.5, [\"gravity\"] = 1, [\"sneak\"] = true, [\"speed\"] = 2, [\"new_move\"] = true, [\"sneak_glitch\"] = false}",
		yl_commons_player_joined = "1684940674",
		partychat = "party",
		yl_commons_player_created = "1614030326",
		["ocean_build.forbidden"] = "true"
	}
}

Log identifier


[MOD] yl_report log identifier = 7kwX5ezc6vP6wpkhBtBAM8g7MPWV2KRj

Profiler save:

profile-20230524T161249.json_prettyEE

Status:

# Server: version: 5.6.1-yl | game: Minetest Game | uptime: 1d 21h 9min 49s | max lag: 0.94s | clients (26/52): AliasAlreadyTaken, Bailiff, BibaBoba, carag, daydream, Dirac, Dovakhiin, flux, Grzegorz, JeCel, lolshsh, lucas123s, mahou, melone, MineWorlds, Murmel, niceride, poppyasdan, Qualia, Ravise, Service, shanish, Sysmatic, tagtraum, whymebob, Yumpy

Teleport command:

/teleport xyz 1296 42 522

Compass command:

/give_compass Construction 7kwX5ezc6vP6wpkhBtBAM8g7MPWV2KRj D2691E 1296 42 522
MineWorlds reports a bug: > compass dupe bug. how it works?: get 2 miocene compasses for free by buttercup. place an autocraft. set the crafting recipe for 2 compasses to make 1 compass, then place the 2 free miocene compasses and boom. you get an default compass. allowing you to add your own coords to it and save on ores. Player position: ``` { z = 522.19903564453, x = 1296.1989746094, y = 41.5 } ``` Player look: ``` { z = 0.60781288146973, x = 0.76357799768448, y = 0.21797290444374 } ``` Player information: ``` { major = 5, ip_version = 6, min_rtt = 0.16099999845028, minor = 3, min_jitter = 0, max_jitter = 2.1470000743866, avg_jitter = 0.0069999992847443, connection_uptime = 4165, serialization_version = 28, patch = 0, lang_code = "", version_string = "5.3.0", formspec_version = 3, max_rtt = 2.3129999637604, state = "Active", avg_rtt = 0.17700000107288, protocol_version = 39 } ``` Player meta: ``` { fields = { ["petz:werewolf_clan_idx"] = "2", played_time = "4029627", digged_nodes = "1125966", placed_nodes = "102137", died = "102", crafted = "46470", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", yl_commons_thankyou = "175", jointime = "1614030326", bitten = "0", punch_count = "253640", inflicted_damage = "5447198", yl_church = "return {[\"last_death_portal\"] = 1684687269, [\"last_death\"] = {[\"z\"] = 1179, [\"x\"] = 2006, [\"y\"] = 15}, [\"last_heal\"] = 1684019804}", ["stamina:level"] = "18", repellant = "0", ["stamina:poisoned"] = "no", ["stamina:exhaustion"] = "144.5", ["signslib:pos"] = "(1974,14,1673)", ["3d_armor_inventory"] = "return {\"3d_armor:boots_crystal 1 520\", \"shields:shield_nether 1 1040\", \"3d_armor:leggings_nether 1 1040\", \"3d_armor:helmet_nether 1 520\", \"3d_armor:chestplate_nether 1 1040\", \"\"}", ["ocean_build.last_warning"] = "1.679e+09", ["petz:werewolf"] = "0", ["ocean_build.ocean_built"] = "12", ["petz:lycanthropy"] = "0", ["petz:werewolf_vignette_id"] = "19", ["hud_manager:choppy:waypoint_enabled"] = "y", hud_state = "on", arenalib_infobox_arenaID = "0", xp = "920059", ["petz:old_override_table"] = "return {[\"jump\"] = 1.5, [\"gravity\"] = 1, [\"sneak\"] = true, [\"speed\"] = 2, [\"new_move\"] = true, [\"sneak_glitch\"] = false}", yl_commons_player_joined = "1684940674", partychat = "party", yl_commons_player_created = "1614030326", ["ocean_build.forbidden"] = "true" } } ``` Log identifier ``` [MOD] yl_report log identifier = 7kwX5ezc6vP6wpkhBtBAM8g7MPWV2KRj ``` Profiler save: ``` profile-20230524T161249.json_prettyEE ``` Status: ``` # Server: version: 5.6.1-yl | game: Minetest Game | uptime: 1d 21h 9min 49s | max lag: 0.94s | clients (26/52): AliasAlreadyTaken, Bailiff, BibaBoba, carag, daydream, Dirac, Dovakhiin, flux, Grzegorz, JeCel, lolshsh, lucas123s, mahou, melone, MineWorlds, Murmel, niceride, poppyasdan, Qualia, Ravise, Service, shanish, Sysmatic, tagtraum, whymebob, Yumpy ``` Teleport command: ``` /teleport xyz 1296 42 522 ``` Compass command: ``` /give_compass Construction 7kwX5ezc6vP6wpkhBtBAM8g7MPWV2KRj D2691E 1296 42 522 ```
AliasAlreadyTaken was assigned by yourland-report 2023-05-24 16:12:49 +00:00
flux added the
1. kind/bug
label 2023-05-24 17:02:26 +00:00
Member

I can't reproduce this in the player's crafting grid, so I will blame the autocrafter :P

Seems like autocrafter is not calling on_craft or craft_predict that should update the item's meta or prevent the crafting a new compass from two "set" compasses.

bd5a42356b/autocrafter.lua (L36)

Probably can be prevented by making "unset" compass a separate item?
#2186

I can't reproduce this in the player's crafting grid, so I will blame the autocrafter :P Seems like autocrafter is not calling `on_craft` or `craft_predict` that should update the item's meta or prevent the crafting a new compass from two "set" compasses. https://gitea.your-land.de/your-land/pipeworks/src/commit/bd5a42356bc20a71dac5d11ea04deb4fa6246d0e/autocrafter.lua#L36 Probably can be prevented by making "unset" compass a separate item? https://gitea.your-land.de/your-land/bugtracker/issues/2186
Member

just to be clear - the goal of the "2 compass" crafting recipe is to copy the recipe from a programmed compass to an empty compass, this isn't a weird remnant of the "craft 2 worn tools to create a single less-worn tool" mechanic, right?

Probably can be prevented by making "unset" compass a separate item?

i'm in favor of this in general - unlike nodes, there's no real limit on the # of other items. more importantly, it'd allow making the unset compasses into "craftitems" instead of "tools", so that they could stack #2186.

I will blame the autocrafter

crafting is hard. i'm pretty sure i (finally) got it right for the "craft all" button, so i guess i should apply that work to the autocrafter. but, ugh, i hate pipeworks...

just to be clear - the goal of the "2 compass" crafting recipe is to copy the recipe from a programmed compass to an empty compass, this isn't a weird remnant of the "craft 2 worn tools to create a single less-worn tool" mechanic, right? > Probably can be prevented by making "unset" compass a separate item? i'm in favor of this in general - unlike nodes, there's no real limit on the # of other items. more importantly, it'd allow making the unset compasses into "craftitems" instead of "tools", so that they could stack #2186. > I will blame the autocrafter crafting is hard. i'm pretty sure i (finally) got it right for the ["craft all" button](https://github.com/mt-mods/unified_inventory_plus/blob/master/craft_all.lua), so i guess i should apply that work to the autocrafter. but, ugh, i hate pipeworks...
Member

just to be clear - the goal of the "2 compass" crafting recipe is to copy the recipe from a programmed compass to an empty compass, this isn't a weird remnant of the "craft 2 worn tools to create a single less-worn tool" mechanic, right?

Sorry, I have no idea how repairing works (if it's default behavior for tools, and compass is a tool. Why it's a tool? Probably to prevent stacking, or I was not sure what callbacks were availible for non-tools, I don't remember...). But I did write this:
c01ba435b7/init.lua (L433)
Which then triggers this:
c01ba435b7/init.lua (L439)
And it's supposed to find one "set" compass and one "unset", then copy meta.

Probably can be prevented by making "unset" compass a separate item?

i'm in favor of this in general - unlike nodes, there's no real limit on the # of other items. more importantly, it'd allow making the unset compasses into "craftitems" instead of "tools", so that they could stack #2186.

Well, maybe one day I'll finally do that, having a separate item seemed error prone to me back then, but maybe it's not too bad...

I will blame the autocrafter

crafting is hard. i'm pretty sure i (finally) got it right for the "craft all" button, so i guess i should apply that work to the autocrafter. but, ugh, i hate pipeworks...

Sucks that all of this depends on undocumented features.
I seem to remember there was a bug about autocrafter eating a bucket instead of empying it or something? Probably related problem...

> just to be clear - the goal of the "2 compass" crafting recipe is to copy the recipe from a programmed compass to an empty compass, this isn't a weird remnant of the "craft 2 worn tools to create a single less-worn tool" mechanic, right? Sorry, I have no idea how repairing works (if it's default behavior for tools, and compass _is_ a tool. Why it's a tool? Probably to prevent stacking, or I was not sure what callbacks were availible for non-tools, I don't remember...). But I did write this: https://gitea.your-land.de/whosit/waypoint_compass/src/commit/c01ba435b7573551f3bf69c467525f3ae51ad931/init.lua#L433 Which then triggers this: https://gitea.your-land.de/whosit/waypoint_compass/src/commit/c01ba435b7573551f3bf69c467525f3ae51ad931/init.lua#L439 And it's supposed to find one "set" compass and one "unset", then copy meta. > > Probably can be prevented by making "unset" compass a separate item? > > i'm in favor of this in general - unlike nodes, there's no real limit on the # of other items. more importantly, it'd allow making the unset compasses into "craftitems" instead of "tools", so that they could stack #2186. Well, maybe one day I'll finally do that, having a separate item seemed error prone to me back then, but maybe it's not too bad... > > > I will blame the autocrafter > > crafting is hard. i'm pretty sure i (finally) got it right for the ["craft all" button](https://github.com/mt-mods/unified_inventory_plus/blob/master/craft_all.lua), so i guess i should apply that work to the autocrafter. but, ugh, i hate pipeworks... Sucks that all of this depends on undocumented features. I seem to remember there was a bug about autocrafter eating a bucket instead of empying it or something? Probably related problem...
Member

just to be clear - the goal of the "2 compass" crafting recipe is to copy the recipe from a programmed compass to an empty compass, this isn't a weird remnant of the "craft 2 worn tools to create a single less-worn tool" mechanic, right?

verified the autocrafter has a similar problem w/ written books

> just to be clear - the goal of the "2 compass" crafting recipe is to copy the recipe from a programmed compass to an empty compass, this isn't a weird remnant of the "craft 2 worn tools to create a single less-worn tool" mechanic, right? verified the autocrafter has a similar problem w/ written books
Member

to be absolutely clear, this is a bug w/ pipeworks, not w/ the compass.

Sorry, I have no idea how repairing works

how tool repair works. we have it disabled intentionally (#118, #1787), though i no longer remember why i did so in a convoluted way.

I seem to remember there was a bug about autocrafter eating a bucket instead of empying it or something?

that's a separate but related problem https://github.com/mt-mods/pipeworks/issues/61.

to be absolutely clear, this is a bug w/ pipeworks, not w/ the compass. > Sorry, I have no idea how repairing works [how tool repair works](https://github.com/minetest/minetest/blob/master/doc/lua_api.md#tool-repair). we have it disabled intentionally (#118, #1787), though i no longer remember why i did so in a convoluted way. > I seem to remember there was a bug about autocrafter eating a bucket instead of empying it or something? that's a separate but related problem https://github.com/mt-mods/pipeworks/issues/61.
Member
upstream issue: https://github.com/mt-mods/pipeworks/issues/67
flux added the
3. source/mod upstream
label 2023-05-25 14:40:32 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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: your-land/bugtracker#4591
No description provided.