1
0
Fork 0

Fix formating

This commit is contained in:
AFCMS 2022-11-13 22:22:17 +01:00
parent 2b46dd60c5
commit c49f000894
Signed by untrusted user: AFCMS
GPG Key ID: 8720389A25B652E3
1 changed files with 199 additions and 191 deletions

View File

@ -9,8 +9,7 @@ end
--[[ BEGIN OF NODE DEFINITIONS ]]
local mcl_hoppers_formspec =
"size[9,7]"..
local mcl_hoppers_formspec = "size[9,7]" ..
"label[2,0;" .. minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))) .. "]" ..
"list[context;main;2,0.5;5,1;]" ..
mcl_formspec.get_itemslot_bg(2, 0.5, 5, 1) ..
@ -31,7 +30,9 @@ local def_hopper = {
drawtype = "nodebox",
paramtype = "light",
-- FIXME: mcl_hoppers_hopper_inside.png is unused by hoppers.
tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"},
tiles = { "mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png" },
node_box = {
type = "fixed",
fixed = {
@ -131,11 +132,15 @@ local def_hopper = {
-- Enabled downwards hopper
local def_hopper_enabled = table.copy(def_hopper)
def_hopper_enabled.description = S("Hopper")
def_hopper_enabled._tt_help = S("5 inventory slots").."\n"..S("Collects items from above, moves items to container below").."\n"..S("Can be disabled with redstone power")
def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.").."\n\n"..
def_hopper_enabled._tt_help = S("5 inventory slots") ..
"\n" .. S("Collects items from above, moves items to container below") .. "\n" ..
S("Can be disabled with redstone power")
def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.")
.. "\n\n" ..
S("Hoppers interact with containers the following way:") .. "\n" ..
S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot").."\n"..
S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot")
.. "\n" ..
S("• Ender chests: No interaction.") .. "\n" ..
S("• Other containers: Normal interaction.") .. "\n\n" ..
@ -219,7 +224,9 @@ local def_hopper_side = {
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"},
tiles = { "mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png",
"mcl_hoppers_hopper_outside.png" },
node_box = {
type = "fixed",
fixed = {
@ -382,7 +389,7 @@ end
--[[ BEGIN OF ABM DEFINITONS ]]
minetest.register_abm({
label = "Hoppers pull from minecart",
label = "Hoppers pull from minecart hoppers",
nodenames = { "mcl_hoppers:hopper", "mcl_hoppers:hopper_side" },
interval = 0.5,
chance = 1,
@ -443,7 +450,8 @@ minetest.register_abm({
local inv = meta:get_inventory()
for _, object in pairs(minetest.get_objects_inside_radius(pos, 2)) do
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and not object:get_luaentity()._removed then
if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and
not object:get_luaentity()._removed then
if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
-- Item must get sucked in when the item just TOUCHES the block above the hopper
-- This is the reason for the Y calculation.