diff --git a/nether/crafting.lua b/nether/crafting.lua index e0cd34a..73e1b8f 100644 --- a/nether/crafting.lua +++ b/nether/crafting.lua @@ -197,7 +197,7 @@ minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv if not sound_allowed then -- avoid playing the sound multiple times, e.g. when middle mouse click return end - minetest.sound_play("default_wood_footstep", {pos=player:getpos(), gain=0.25}) + minetest.sound_play("default_wood_footstep", {pos=player:get_pos(), gain=0.25}) sound_allowed = false minetest.after(0, function() sound_allowed = true diff --git a/nether/guide.lua b/nether/guide.lua index 11fdc11..c90f320 100644 --- a/nether/guide.lua +++ b/nether/guide.lua @@ -398,7 +398,7 @@ minetest.register_chatcommand("nether_help", { minetest.chat_send_player(name, "Something went wrong.") return false end - if player:getpos().y > nether.start then + if player:get_pos().y > nether.start then minetest.chat_send_player(name, "Usually you don't neet this guide here. " .. "You can view it in the nether.") diff --git a/nether/init.lua b/nether/init.lua index aec6091..184338e 100644 --- a/nether/init.lua +++ b/nether/init.lua @@ -391,18 +391,18 @@ minetest.register_on_generated(function(minp, maxp, seed) map_lengths_xyz), } end - pelin_maps.a:get2dMap_flat({x=minp.x, y=minp.z}, pmap1) - pelin_maps.b:get2dMap_flat({x=minp.x, y=minp.z}, pmap2) - pelin_maps.c:get2dMap_flat({x=minp.x, y=minp.z}, pmap3) + pelin_maps.a:get_2d_map_flat({x=minp.x, y=minp.z}, pmap1) + pelin_maps.b:get_2d_map_flat({x=minp.x, y=minp.z}, pmap2) + pelin_maps.c:get_2d_map_flat({x=minp.x, y=minp.z}, pmap3) local forest_possible = maxp.y > f_h_min and minp.y < f_h_max --local pmap_f_bottom = minetest.get_perlin_map(perlins.forest_bottom, - -- map_lengths_xyz):get2dMap_flat({x=minp.x, y=minp.z}) + -- map_lengths_xyz):get_2d_map_flat({x=minp.x, y=minp.z}) local perlin_f_bottom, strassx, strassz if forest_possible then perlin_f_bottom = minetest.get_perlin(11, 3, 0.8, tmp2) - pelin_maps.forest_top:get2dMap_flat({x=minp.x, y=minp.z}, pmap_f_top) + pelin_maps.forest_top:get_2d_map_flat({x=minp.x, y=minp.z}, pmap_f_top) strassx = get_ws_list(2, minp.x) strassz = get_ws_list(2, minp.z) end @@ -485,7 +485,7 @@ minetest.register_on_generated(function(minp, maxp, seed) local pstr = p.x.." "..p.z if not f_perlins[pstr] then f_perlins[pstr] = math.floor(f_h_min + (math.abs( - perlin_f_bottom:get2d{x=p.x, y=p.z} + 1)) + perlin_f_bottom:get_2d{x=p.x, y=p.z} + 1)) * f_yscale_bottom + 0.5) end local top_noise = pmap_f_top[count]+1 diff --git a/nether/items.lua b/nether/items.lua index 1b58678..1e3b28c 100644 --- a/nether/items.lua +++ b/nether/items.lua @@ -362,6 +362,7 @@ minetest.register_node("nether:apple", { tiles = {"nether_fruit_top.png", "nether_fruit_bottom.png", "nether_fruit.png", "nether_fruit.png^[transformFX", "nether_fruit.png^[transformFX", "nether_fruit.png"}, + use_texture_alpha = "opaque", node_box = { type = "fixed", fixed = { @@ -641,7 +642,7 @@ minetest.register_node("nether:portal", { light_source = 12, paramtype = "light", sunlight_propagates = true, - use_texture_alpha = true, + use_texture_alpha = "blend", walkable = false, pointable = false, buildable_to = false, diff --git a/nether/pearl.lua b/nether/pearl.lua index 55af1e0..236efce 100644 --- a/nether/pearl.lua +++ b/nether/pearl.lua @@ -1,6 +1,6 @@ local function throw_pearl(item, player) - local playerpos = player:getpos() + local playerpos = player:get_pos() playerpos.y = playerpos.y+1.625 local obj = minetest.add_entity(playerpos, "nether:pearl_entity") local dir = player:get_look_dir() @@ -99,7 +99,7 @@ minetest.register_entity("nether:pearl_entity", { self.player = tmp.player end, get_staticdata = function(self) - --forceload(vector.round(self.object:getpos())) + --forceload(vector.round(self.object:get_pos())) return minetest.serialize({ player = self.player, }) @@ -121,7 +121,7 @@ minetest.register_entity("nether:pearl_entity", { return end - local pos = self.object:getpos() + local pos = self.object:get_pos() local rpos = vector.round(pos) local lastpos = self.lastpos if not lastpos then diff --git a/nether/portal.lua b/nether/portal.lua index bb24764..619e64f 100644 --- a/nether/portal.lua +++ b/nether/portal.lua @@ -72,7 +72,7 @@ end -- where the player appears after dying local function get_player_died_target(player) - local target = vector.add(player:getpos(), + local target = vector.add(player:get_pos(), {x=math.random(-100,100), y=0, z=math.random(-100,100)}) target.y = portal_target + math.random(4) return target @@ -172,7 +172,7 @@ minetest.register_chatcommand("from_hell", { return false, "Something went wrong." end minetest.chat_send_player(pname, "You are free now") - local pos = player:getpos() + local pos = player:get_pos() player_from_nether(player, {x=pos.x, y=100, z=pos.z}) return true, pname.." is now out of the nether." end @@ -246,7 +246,7 @@ if nether_prisons then local metatable_overridden minetest.register_on_joinplayer(function(player) -- set the background when the player joins - if player:getpos().y < nether.start then + if player:get_pos().y < nether.start then update_background(player, true) end @@ -270,7 +270,7 @@ else -- test if player is in nether when he/she joins minetest.register_on_joinplayer(function(player) players_in_nether[player:get_player_name()] = - player:getpos().y < nether.start or nil + player:get_pos().y < nether.start or nil end) end @@ -310,7 +310,7 @@ local function obsi_teleport_player(player, pos, target) return end - local objpos = player:getpos() + local objpos = player:get_pos() objpos.y = objpos.y+0.1 -- Fix some glitches at -8000 if minetest.get_node(vector.round(objpos)).name ~= "nether:portal" then return @@ -655,7 +655,7 @@ function nether.teleport_player(player) minetest.log("error", "[nether] Missing player.") return end - local pos = vector.round(player:getpos()) + local pos = vector.round(player:get_pos()) if not is_netherportal(pos) then return end