Generate end exit portal near the spawn in the End
This commit is contained in:
parent
71be25f44a
commit
fc17303b1e
4 changed files with 39 additions and 4 deletions
|
@ -38,6 +38,8 @@ mcl_structures.call_struct = function(pos, struct_style, rotation)
|
|||
return mcl_structures.generate_boulder(pos, rotation)
|
||||
elseif struct_style == "fossil" then
|
||||
return mcl_structures.generate_fossil(pos, rotation)
|
||||
elseif struct_style == "end_exit_portal" then
|
||||
return mcl_structures.generate_end_exit_portal(pos, rotation)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -116,6 +118,11 @@ mcl_structures.generate_fossil = function(pos)
|
|||
return minetest.place_schematic(newpos, path, "random", nil, true)
|
||||
end
|
||||
|
||||
mcl_structures.generate_end_exit_portal = function(pos)
|
||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_end_exit_portal.mts"
|
||||
return minetest.place_schematic(pos, path, "0", nil, true)
|
||||
end
|
||||
|
||||
mcl_structures.generate_desert_temple = function(pos)
|
||||
-- No Generating for the temple ... Why using it ? No Change
|
||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_desert_temple.mts"
|
||||
|
@ -194,7 +201,7 @@ end
|
|||
|
||||
-- Debug command
|
||||
minetest.register_chatcommand("spawnstruct", {
|
||||
params = "desert_temple | desert_well | igloo | village | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil",
|
||||
params = "desert_temple | desert_well | igloo | village | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal",
|
||||
description = "Generate a pre-defined structure near your position.",
|
||||
privs = {debug = true},
|
||||
func = function(name, param)
|
||||
|
@ -230,6 +237,9 @@ minetest.register_chatcommand("spawnstruct", {
|
|||
elseif param == "ice_spike_large" then
|
||||
mcl_structures.generate_ice_spike_large(pos)
|
||||
minetest.chat_send_player(name, "Large ice spike placed.")
|
||||
elseif param == "end_exit_portal" then
|
||||
mcl_structures.generate_end_exit_portal(pos)
|
||||
minetest.chat_send_player(name, "End exit portal placed.")
|
||||
elseif param == "" then
|
||||
minetest.chat_send_player(name, "Error: No structure type given. Please use “/spawnstruct <type>”.")
|
||||
errord = true
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue