Modhilfe: Geräte
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Modhilfe: Geräte
Hallo in meiner mod will ich ein gerät(z.b. ofen) machenwomit ich was craften kann. Gibt es was was mir dazu helfen kann?
- LRV
- Helper
- Posts: 273
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Moonvehicleman LunarRovingVehicle LRV Mooncarguy
Re: Modhilfe: Geräte
Also die Mods mcg_lockworkshop, mcg_dyemixer und mining_plus haben solche Geräte. Sollte man recht einfach umcoden können, um eine eigene Werkbank zu kriegen.
Why didn't my siganture show up completly til' I did that?LRV wrote:Why is there food in my sentence? XDLRV wrote:I got another food mod xtraarmor, of course a customleather item needs to be added, but the chainmaila nd leather armor would be pretty fitting.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Ok, versuchs
- Krock
- Developer
- Posts: 4589
- Joined: Thu Oct 03, 2013 07:48
- GitHub: SmallJoker
- Location: Switzerland
- Contact:
Re: Modhilfe: Geräte
Mit der "pipeworks"-Mod erhälst du einen neuen Block der "Autocrafter" heisst. Mit dem Block, Rohren und "Filtern" (alle in pipeworks) kannst du eine Fabrik aufbauen.
Dazu gibt es verschiedene Videos auf Youtube, welche dir beim zusammenbauen helfen können.
Dazu gibt es verschiedene Videos auf Youtube, welche dir beim zusammenbauen helfen können.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Pipework kenne ich. Ich will aber eine alienbench für meine alienn_material machen womit ich alien aplles herstellen kann.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Es gunktioniert noch nicht ganz. Das mit den ersten Item(nich wo die lngots reinkommen9 funktioniert noch nicht. HIer der Quellcode:
Code: Select all
-- default/furnace.lua
alienbench = {}
alienbench.crafts = {}
alienbench.register_craft = function(item_from, item_to)
if not minetest.registered_nodes[item_from] or not minetest.registered_nodes[item_to] then
return
end
minetest.clear_craft({output = item_to})
alienbench.crafts[item_from] = item_to
end
local function craft(pos, listname, index, stack, player)
local inv = minetest.get_meta(pos):get_inventory()
local apple = inv:get_stack("input", 1):get_name()
local lock = inv:get_stack("alien_ingot", 1):is_empty()
if alienbench.crafts[input] and inv:room_for_item("output", alienbench.crafts[input]) then
inv:remove_item("input", {name = input, count = 1})
inv:remove_item("alien_ingot", {name = "alien_material:alien_ingot", count = 1})
inv:add_item("output", mcg_lockworkshop.crafts[input])
end
end
minetest.register_node("alien_material:alienbench", {
description = "alienbench",
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
tiles = {
"alienbench_y.png", "alienbench_y.png",
"alienbench.png","alienbench_side.png",
"alienbench_side.png", "alienbench_side.png"
},
after_place_node = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
meta:set_string("infotext", "alienbench")
inv:set_size("input", 1)
inv:set_size("alien_ingot", 1)
inv:set_size("output", 1)
meta:set_string("formspec", [[
size[8,4.8]
box[-0.01,0;1.84,0.9;#555555]
image[0,0;0.9,0.9;alien_apple.png]
label[0.7,0.25;alien_apple]
list[context;input;2,0;1,1;]
list[context;alien_ingot;3,0;1,1;]
image[3,0;1,1;ingot_bg.png]
image[4,0;1,1;gui_furnace_arrow_bg.png^[transformR270]
list[context;output;5,0;1,1;]
list[current_player;main;0,1.1;8,4;]
]].. default.gui_bg .. default.gui_bg_img .. default.gui_slots .. default.get_hotbar_bg(0, 1.1))
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local stackname = stack:get_name()
if (listname == "input" and stackname == alienbench.crafts[stackname]) or
(listname == "alien_ingot" and "alien_material:alien_ingot") then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_put = craft,
on_metadata_inventory_take = craft,
can_dig = function(pos)
local inv = minetest.get_meta(pos):get_inventory()
if inv:is_empty("input") and inv:is_empty("alien_ingot") and inv:is_empty("output") then
return true
else
return false
end
end})
- LRV
- Helper
- Posts: 273
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Moonvehicleman LunarRovingVehicle LRV Mooncarguy
Re: Modhilfe: Geräte
Hmmm.. Ich denke es wäre wohl besser den Code von mcg_dyemixer zu nehmen. Der ist flexibler, da er erlaubt beide items beim registrieren zu wählen. Dann müsste nurnoch überall mcg_dyemixer durch alien_material bzw. alienbench ersetzt werden. Außerdem hat mcg_lockworkshop teilweise Code, der von bestimmten, in deinem Fall nicht gegebenen Vorraussetzungen ausgeht, was zu Bugs führt.debiankaios wrote: ↑Wed Jan 06, 2021 14:20Es gunktioniert noch nicht ganz. Das mit den ersten Item(nich wo die lngots reinkommen9 funktioniert noch nicht. HIer der Quellcode:Code: Select all
-- default/furnace.lua alienbench = {} alienbench.crafts = {} alienbench.register_craft = function(item_from, item_to) if not minetest.registered_nodes[item_from] or not minetest.registered_nodes[item_to] then return end minetest.clear_craft({output = item_to}) alienbench.crafts[item_from] = item_to end local function craft(pos, listname, index, stack, player) local inv = minetest.get_meta(pos):get_inventory() local apple = inv:get_stack("input", 1):get_name() local lock = inv:get_stack("alien_ingot", 1):is_empty() if alienbench.crafts[input] and inv:room_for_item("output", alienbench.crafts[input]) then inv:remove_item("input", {name = input, count = 1}) inv:remove_item("alien_ingot", {name = "alien_material:alien_ingot", count = 1}) inv:add_item("output", mcg_lockworkshop.crafts[input]) end end minetest.register_node("alien_material:alienbench", { description = "alienbench", groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, sounds = default.node_sound_wood_defaults(), tiles = { "alienbench_y.png", "alienbench_y.png", "alienbench.png","alienbench_side.png", "alienbench_side.png", "alienbench_side.png" }, after_place_node = function(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() meta:set_string("infotext", "alienbench") inv:set_size("input", 1) inv:set_size("alien_ingot", 1) inv:set_size("output", 1) meta:set_string("formspec", [[ size[8,4.8] box[-0.01,0;1.84,0.9;#555555] image[0,0;0.9,0.9;alien_apple.png] label[0.7,0.25;alien_apple] list[context;input;2,0;1,1;] list[context;alien_ingot;3,0;1,1;] image[3,0;1,1;ingot_bg.png] image[4,0;1,1;gui_furnace_arrow_bg.png^[transformR270] list[context;output;5,0;1,1;] list[current_player;main;0,1.1;8,4;] ]].. default.gui_bg .. default.gui_bg_img .. default.gui_slots .. default.get_hotbar_bg(0, 1.1)) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) local stackname = stack:get_name() if (listname == "input" and stackname == alienbench.crafts[stackname]) or (listname == "alien_ingot" and "alien_material:alien_ingot") then return stack:get_count() end return 0 end, on_metadata_inventory_put = craft, on_metadata_inventory_take = craft, can_dig = function(pos) local inv = minetest.get_meta(pos):get_inventory() if inv:is_empty("input") and inv:is_empty("alien_ingot") and inv:is_empty("output") then return true else return false end end})
Notiz: init.lua bei mcg_dyemixer beinhaltet keinen Code aus dem offiziellen Minetest, weshalb "celeron55" und "various MT developers and contributors" bei den Lizenzhinweisen wegzulassen ist.
Why didn't my siganture show up completly til' I did that?LRV wrote:Why is there food in my sentence? XDLRV wrote:I got another food mod xtraarmor, of course a customleather item needs to be added, but the chainmaila nd leather armor would be pretty fitting.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Ich glaube mcg_dymixer ist besser für mich geeignet. Ich neheme Sachen aus beiden.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Ich habe jetzt den Quellcode in Zeile 62 umgeändert:LRV wrote: ↑Wed Jan 06, 2021 14:45Hmmm.. Ich denke es wäre wohl besser den Code von mcg_dyemixer zu nehmen. Der ist flexibler, da er erlaubt beide items beim registrieren zu wählen. Dann müsste nurnoch überall mcg_dyemixer durch alien_material bzw. alienbench ersetzt werden. Außerdem hat mcg_lockworkshop teilweise Code, der von bestimmten, in deinem Fall nicht gegebenen Vorraussetzungen ausgeht, was zu Bugs führt.debiankaios wrote: ↑Wed Jan 06, 2021 14:20Es gunktioniert noch nicht ganz. Das mit den ersten Item(nich wo die lngots reinkommen9 funktioniert noch nicht. HIer der Quellcode:Code: Select all
-- default/furnace.lua alienbench = {} alienbench.crafts = {} alienbench.register_craft = function(item_from, item_to) if not minetest.registered_nodes[item_from] or not minetest.registered_nodes[item_to] then return end minetest.clear_craft({output = item_to}) alienbench.crafts[item_from] = item_to end local function craft(pos, listname, index, stack, player) local inv = minetest.get_meta(pos):get_inventory() local apple = inv:get_stack("input", 1):get_name() local lock = inv:get_stack("alien_ingot", 1):is_empty() if alienbench.crafts[input] and inv:room_for_item("output", alienbench.crafts[input]) then inv:remove_item("input", {name = input, count = 1}) inv:remove_item("alien_ingot", {name = "alien_material:alien_ingot", count = 1}) inv:add_item("output", mcg_lockworkshop.crafts[input]) end end minetest.register_node("alien_material:alienbench", { description = "alienbench", groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, sounds = default.node_sound_wood_defaults(), tiles = { "alienbench_y.png", "alienbench_y.png", "alienbench.png","alienbench_side.png", "alienbench_side.png", "alienbench_side.png" }, after_place_node = function(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() meta:set_string("infotext", "alienbench") inv:set_size("input", 1) inv:set_size("alien_ingot", 1) inv:set_size("output", 1) meta:set_string("formspec", [[ size[8,4.8] box[-0.01,0;1.84,0.9;#555555] image[0,0;0.9,0.9;alien_apple.png] label[0.7,0.25;alien_apple] list[context;input;2,0;1,1;] list[context;alien_ingot;3,0;1,1;] image[3,0;1,1;ingot_bg.png] image[4,0;1,1;gui_furnace_arrow_bg.png^[transformR270] list[context;output;5,0;1,1;] list[current_player;main;0,1.1;8,4;] ]].. default.gui_bg .. default.gui_bg_img .. default.gui_slots .. default.get_hotbar_bg(0, 1.1)) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) local stackname = stack:get_name() if (listname == "input" and stackname == alienbench.crafts[stackname]) or (listname == "alien_ingot" and "alien_material:alien_ingot") then return stack:get_count() end return 0 end, on_metadata_inventory_put = craft, on_metadata_inventory_take = craft, can_dig = function(pos) local inv = minetest.get_meta(pos):get_inventory() if inv:is_empty("input") and inv:is_empty("alien_ingot") and inv:is_empty("output") then return true else return false end end})
Notiz: init.lua bei mcg_dyemixer beinhaltet keinen Code aus dem offiziellen Minetest, weshalb "celeron55" und "various MT developers and contributors" bei den Lizenzhinweisen wegzulassen ist.
Code: Select all
if (listname == "input" and stackname == "default:apple") or
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Ich habe jetzt den Quellcode in Zeile 62 umgeändert:LRV wrote: ↑Wed Jan 06, 2021 14:45Hmmm.. Ich denke es wäre wohl besser den Code von mcg_dyemixer zu nehmen. Der ist flexibler, da er erlaubt beide items beim registrieren zu wählen. Dann müsste nurnoch überall mcg_dyemixer durch alien_material bzw. alienbench ersetzt werden. Außerdem hat mcg_lockworkshop teilweise Code, der von bestimmten, in deinem Fall nicht gegebenen Vorraussetzungen ausgeht, was zu Bugs führt.debiankaios wrote: ↑Wed Jan 06, 2021 14:20Es gunktioniert noch nicht ganz. Das mit den ersten Item(nich wo die lngots reinkommen9 funktioniert noch nicht. HIer der Quellcode:Code: Select all
-- default/furnace.lua alienbench = {} alienbench.crafts = {} alienbench.register_craft = function(item_from, item_to) if not minetest.registered_nodes[item_from] or not minetest.registered_nodes[item_to] then return end minetest.clear_craft({output = item_to}) alienbench.crafts[item_from] = item_to end local function craft(pos, listname, index, stack, player) local inv = minetest.get_meta(pos):get_inventory() local apple = inv:get_stack("input", 1):get_name() local lock = inv:get_stack("alien_ingot", 1):is_empty() if alienbench.crafts[input] and inv:room_for_item("output", alienbench.crafts[input]) then inv:remove_item("input", {name = input, count = 1}) inv:remove_item("alien_ingot", {name = "alien_material:alien_ingot", count = 1}) inv:add_item("output", mcg_lockworkshop.crafts[input]) end end minetest.register_node("alien_material:alienbench", { description = "alienbench", groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, sounds = default.node_sound_wood_defaults(), tiles = { "alienbench_y.png", "alienbench_y.png", "alienbench.png","alienbench_side.png", "alienbench_side.png", "alienbench_side.png" }, after_place_node = function(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() meta:set_string("infotext", "alienbench") inv:set_size("input", 1) inv:set_size("alien_ingot", 1) inv:set_size("output", 1) meta:set_string("formspec", [[ size[8,4.8] box[-0.01,0;1.84,0.9;#555555] image[0,0;0.9,0.9;alien_apple.png] label[0.7,0.25;alien_apple] list[context;input;2,0;1,1;] list[context;alien_ingot;3,0;1,1;] image[3,0;1,1;ingot_bg.png] image[4,0;1,1;gui_furnace_arrow_bg.png^[transformR270] list[context;output;5,0;1,1;] list[current_player;main;0,1.1;8,4;] ]].. default.gui_bg .. default.gui_bg_img .. default.gui_slots .. default.get_hotbar_bg(0, 1.1)) end, allow_metadata_inventory_put = function(pos, listname, index, stack, player) local stackname = stack:get_name() if (listname == "input" and stackname == alienbench.crafts[stackname]) or (listname == "alien_ingot" and "alien_material:alien_ingot") then return stack:get_count() end return 0 end, on_metadata_inventory_put = craft, on_metadata_inventory_take = craft, can_dig = function(pos) local inv = minetest.get_meta(pos):get_inventory() if inv:is_empty("input") and inv:is_empty("alien_ingot") and inv:is_empty("output") then return true else return false end end})
Notiz: init.lua bei mcg_dyemixer beinhaltet keinen Code aus dem offiziellen Minetest, weshalb "celeron55" und "various MT developers and contributors" bei den Lizenzhinweisen wegzulassen ist.
Code: Select all
if (listname == "input" and stackname == "default:apple") or
- LRV
- Helper
- Posts: 273
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Moonvehicleman LunarRovingVehicle LRV Mooncarguy
Re: Modhilfe: Geräte
Ja, weil der Output im Table-Format ist. Demnach musst du "output = {name = "alien_material:alien_apple", count = 1}" schreiben.
Why didn't my siganture show up completly til' I did that?LRV wrote:Why is there food in my sentence? XDLRV wrote:I got another food mod xtraarmor, of course a customleather item needs to be added, but the chainmaila nd leather armor would be pretty fitting.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Code: Select all
alienbench.register_craft("default:apple", "alien_material:alien_apple")
- LRV
- Helper
- Posts: 273
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Moonvehicleman LunarRovingVehicle LRV Mooncarguy
Re: Modhilfe: Geräte
Ändere es zu:
EDIT: Ne, moment, das geht auch nicht...
Code: Select all
alienbench.register_craft("default:apple", {name = "alien_material:alien_apple", count = 1})
Why didn't my siganture show up completly til' I did that?LRV wrote:Why is there food in my sentence? XDLRV wrote:I got another food mod xtraarmor, of course a customleather item needs to be added, but the chainmaila nd leather armor would be pretty fitting.
- LRV
- Helper
- Posts: 273
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Moonvehicleman LunarRovingVehicle LRV Mooncarguy
Re: Modhilfe: Geräte
Ah, jetzt weiß ich warum kein output kommt. Es wurde inkonsequent umbenannt. Teilweise wurde input durch apple ersetzt. Leider nicht vollständig, weshalb die Mod jetzt die falsche Variable prüft. Außerdem wurde die Funktion mcg_lockworkshop.craft in zeile 25 nicht umbenannt.
Why didn't my siganture show up completly til' I did that?LRV wrote:Why is there food in my sentence? XDLRV wrote:I got another food mod xtraarmor, of course a customleather item needs to be added, but the chainmaila nd leather armor would be pretty fitting.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Echt ich dachte das hätte ich kompleet ausgetauscht. Also appleLRV wrote: ↑Wed Jan 06, 2021 16:36Ah, jetzt weiß ich warum kein output kommt. Es wurde inkonsequent umbenannt. Teilweise wurde input durch apple ersetzt. Leider nicht vollständig, weshalb die Mod jetzt die falsche Variable prüft. Außerdem wurde die Funktion mcg_lockworkshop.craft in zeile 25 nicht umbenannt.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Funktioniert immer noch nicht!
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: Modhilfe: Geräte
Funktioniert immer noch nicht!LRV wrote: ↑Wed Jan 06, 2021 16:36Ah, jetzt weiß ich warum kein output kommt. Es wurde inkonsequent umbenannt. Teilweise wurde input durch apple ersetzt. Leider nicht vollständig, weshalb die Mod jetzt die falsche Variable prüft. Außerdem wurde die Funktion mcg_lockworkshop.craft in zeile 25 nicht umbenannt.
- LRV
- Helper
- Posts: 273
- Joined: Mon Dec 19, 2016 17:29
- GitHub: Mooncarguy
- In-game: Mooncarman Moonvehicleman LunarRovingVehicle LRV Mooncarguy
Re: Modhilfe: Geräte
Ich hab jetzt mal von vorne begonnen und den Code von mcg_dyemixer verwendet.
- Attachments
-
- alienbench.zip
- (2.83 KiB) Downloaded 8 times
Why didn't my siganture show up completly til' I did that?LRV wrote:Why is there food in my sentence? XDLRV wrote:I got another food mod xtraarmor, of course a customleather item needs to be added, but the chainmaila nd leather armor would be pretty fitting.
- debiankaios
- Member
- Posts: 320
- Joined: Thu Dec 03, 2020 12:48
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Who is online
Users browsing this forum: No registered users and 2 guests