Format file

This commit is contained in:
AFCMS 2022-12-04 18:34:15 +01:00 committed by Gitea
parent fa96f9d593
commit 4457432d32

View file

@ -8,7 +8,14 @@ if mod_screwdriver then
on_rotate = screwdriver.rotate_3way
end
local alldirs = {{x=0,y=0,z=1}, {x=1,y=0,z=0}, {x=0,y=0,z=-1}, {x=-1,y=0,z=0}, {x=0,y=-1,z=0}, {x=0,y=1,z=0}}
local alldirs = {
{x = 0, y = 0, z = 1},
{x = 1, y = 0, z = 0},
{x = 0, y = 0, z = -1},
{x = -1, y = 0, z = 0},
{x = 0, y = -1, z = 0},
{x = 0, y = 1, z = 0},
}
minetest.register_node("mcl_core:bone_block", {
description = S("Bone Block"),
@ -74,7 +81,8 @@ minetest.register_node("mcl_core:slimeblock", {
elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then
piston, piston_down = true, true
end
if not( (piston_side and (n-1==neighbor_node.param2)) or (piston_up and (n==5)) or (piston_down and (n==6)) ) then
if not
((piston_side and (n - 1 == neighbor_node.param2)) or (piston_up and (n == 5)) or (piston_down and (n == 6))) then
if piston and piston_pos then
if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then
-- Loopback to the same piston! Preventing unwanted behavior:
@ -109,7 +117,8 @@ minetest.register_node("mcl_core:cobweb", {
liquid_renewable = false,
liquid_range = 0,
walkable = false,
groups = {swordy_cobweb=1, shearsy_cobweb=1, fake_liquid=1, disable_jump=1, deco_block=1, dig_by_piston=1, dig_by_water=1,destroy_by_lava_flow=1,},
groups = {swordy_cobweb = 1, shearsy_cobweb = 1, fake_liquid = 1, disable_jump = 1, deco_block = 1, dig_by_piston = 1,
dig_by_water = 1, destroy_by_lava_flow = 1,},
drop = "mcl_mobitems:string",
_mcl_shears_drop = true,
sounds = mcl_sounds.node_sound_leaves_defaults(),
@ -133,7 +142,8 @@ minetest.register_node("mcl_core:deadbush", {
walkable = false,
stack_max = 64,
buildable_to = true,
groups = {handy=1,shearsy=1, flammable=3,attached_node=1,plant=1,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1, fire_encouragement=60, fire_flammability=100},
groups = {handy = 1, shearsy = 1, flammable = 3, attached_node = 1, plant = 1, non_mycelium_plant = 1, dig_by_water = 1,
destroy_by_lava_flow = 1, deco_block = 1, fire_encouragement = 60, fire_flammability = 100},
drop = {
max_items = 1,
items = {
@ -237,7 +247,8 @@ minetest.register_node("mcl_core:realm_barrier", {
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
node_placement_prediction = "",
on_place = function(pos, placer, itemstack, pointed_thing)
minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!"))
minetest.chat_send_player(placer:get_player_name(),
minetest.colorize(mcl_colors.RED, "You can't just place a realm barrier by hand!"))
return
end,
})
@ -267,7 +278,8 @@ minetest.register_node("mcl_core:void", {
-- Prevent placement to protect player from screwing up the world, because the node is not pointable and hard to get rid of.
node_placement_prediction = "",
on_place = function(pos, placer, itemstack, pointed_thing)
minetest.chat_send_player(placer:get_player_name(), minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!"))
minetest.chat_send_player(placer:get_player_name(),
minetest.colorize(mcl_colors.RED, "You can't just place the void by hand!"))
return
end,
drop = "",