Comments (4)
This doesn't seem to be the same version of the code as in master
right now.
I suspect they are putting in a non-tool item into the tool slot.
from xdecor.
Ps. Piecing it together, it's got to be the 3d_armor mod. I can place a chest in there fine when it's present, but I haven't yet made it crash. I put debugging info in, so maybe I'll spot something. The enchanting.lua in dcb and on Amhi is about the same.
diff --git a/home/james/.minetest/mods/xdecor/enchanting.lua b/mods/xdecor/enchanting.lua
index a3c8e5a..3878d95 100644
--- a/home/james/.minetest/mods/xdecor/enchanting.lua
+++ b/mods/xdecor/enchanting.lua
@@ -12,11 +12,15 @@ enchanting.strength = 1.2 -- Armor strength (3d_armor only)
enchanting.speed = 0.2 -- Player speed (3d_armor only)
enchanting.jump = 0.2 -- Player jumping (3d_armor only)
+local function debug(pos, listname, stack, player, name)
+ minetest.log("action", name .. ", " .. listname .. ": " .. player:get_player_name() .. " with " ..
+ stack:get_name() .. " at " .. minetest.pos_to_string(pos))
+end
+
function enchanting.formspec(pos, num)
local meta = minetest.get_meta(pos)
local formspec = [[ size[9,9;]
- bgcolor[#080808BB;true]
- background[0,0;9,9;ench_ui.png]
+ background[0,0;9,9;ench_ui.png;true]
list[context;tool;0.9,2.9;1,1;]
list[context;mese;2,2.9;1,1;]
list[current_player;main;0.5,4.5;8,4;]
@@ -41,7 +45,8 @@ function enchanting.formspec(pos, num)
meta:set_string("formspec", formspec)
end
-function enchanting.on_put(pos, listname, _, stack)
+function enchanting.on_put(pos, listname, index, stack, player)
+ debug(pos, listname, stack, player, "on_put")
if listname == "tool" then
local stackname = stack:get_name()
local tool_groups = {
@@ -58,7 +63,11 @@ function enchanting.on_put(pos, listname, _, stack)
end
end
-function enchanting.fields(pos, _, fields, sender)
+function enchanting.fields(pos, formname, fields, sender)
+ minetest.log("action", sender:get_player_name() .. " at " ..
+ minetest.pos_to_string(pos) ..
+ " sends the following fields:")
+ minetest.log("action", "\n" .. dump(fields))
if fields.quit then return end
local inv = minetest.get_meta(pos):get_inventory()
local tool = inv:get_stack("tool", 1)
@@ -89,7 +98,8 @@ local function allowed(tool)
return false
end
-function enchanting.put(_, listname, _, stack)
+function enchanting.put(pos, listname, index, stack, player)
+ debug(pos, listname, stack, player, "put")
local item = stack:get_name():match("[^:]+$")
if listname == "mese" and item == "mese_crystal" then
return stack:get_count()
@@ -99,7 +109,8 @@ function enchanting.put(_, listname, _, stack)
return 0
end
-function enchanting.on_take(pos, listname)
+function enchanting.on_take(pos, listname, index, stack, player)
+ debug(pos, listname, stack, player, "on_take")
if listname == "tool" then enchanting.formspec(pos, nil) end
end
@@ -230,6 +241,7 @@ function enchanting:register_tools(mod, def)
full_punch_interval = full_punch_interval, max_drop_level = max_drop_level
}
})
+ minetest.register_alias("xdecor:enchanted_"..tool.."_"..material.."_"..enchant, mod..":enchanted_"..tool.."_"..material.."_"..enchant)
end
if mod == "3d_armor" then
from xdecor.
Probably related: minetest/minetest#4321
from xdecor.
4c06f81 should fix that crash. But it won't fix the underlying upstream issue you found there in minetest/minetest#4321
My guess is, that some unknown node was, what caused the match to return nil.
Now it will simply be disallowed.
from xdecor.
Related Issues (20)
- Workbench should respect replacements
- The chess ain't working anymore HOT 2
- Chess queen skip. HOT 2
- xdecor nodes unknown in the 5.4.0 version HOT 2
- 5.4.0 xdecor disabled HOT 2
- Server Crash
- Minetest Server 5.4.1 Stuck in Chairs in Ground Has to Get off, Sit, Get off Again
- Please tag releases HOT 3
- Improve model HOT 2
- Minor issue causing warnings in MT 5.5.0 with texture alpha clipping HOT 1
- Non-free files HOT 2
- Change crafting recipe of cauldron
- List of known issues HOT 3
- CC version numbers missing in LICENSE file HOT 2
- Bad node sounds
- Bee hive always shows that bees are busy, even when they're not
- Shelf node says it is an empty shelf even when it's not
- Recipe collision: Prison door vs steel bar door
- Radio and speaker node names are not translatable
- xdeccor:packed_ice Crafting recipe collision with ethereal:icebrick
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xdecor.