Compare commits
6 Commits
master
...
banner-mas
Author | SHA1 | Date |
---|---|---|
|
710a04ec82 | |
|
7cadc9120e | |
|
6f6b8a3344 | |
|
1800e79384 | |
|
5e9eee0b9d | |
|
f44dcefdc6 |
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
name: "Bug Report"
|
|
||||||
about: "Use this for when something's broken."
|
|
||||||
labels:
|
|
||||||
- bug
|
|
||||||
- unconfirmed
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
##### What happened?
|
|
||||||
|
|
||||||
<!-- Describe what's wrong. -->
|
|
||||||
|
|
||||||
##### What did I expect?
|
|
||||||
|
|
||||||
<!-- Describe what should be happening instead -->
|
|
||||||
|
|
||||||
##### How to get it to happen
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Write down exactly what you did to get the bug to happen
|
|
||||||
If you need more steps, just keep adding numbers. If you
|
|
||||||
don't need them all, delete the empty numbers.
|
|
||||||
-->
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
##### Environment
|
|
||||||
|
|
||||||
Mineclonia Version: <!-- Paste the version of Mineclonia here, if you know it. -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Please refer to https://git.minetest.land/Mineclonia/Mineclonia/wiki/Reporting-Bugs
|
|
||||||
if you need help finding your Minetest version.
|
|
||||||
-->
|
|
||||||
Minetest Version:
|
|
|
@ -1,22 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
name: "Feature Request"
|
|
||||||
about: "Mineclonia doesn't do something you need it to"
|
|
||||||
labels:
|
|
||||||
- "feature request"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
##### Problem
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Describe what's wrong.
|
|
||||||
|
|
||||||
If you're reporting a missing feature from Minecraft,
|
|
||||||
please include a link to the Minetest wiki or Mojang bug
|
|
||||||
tracker entry describing that feature.
|
|
||||||
-->
|
|
||||||
|
|
||||||
##### Solution
|
|
||||||
|
|
||||||
<!-- Write down an example of what you'd like to happen. -->
|
|
|
@ -1,51 +0,0 @@
|
||||||
<!--
|
|
||||||
Please include the main mod this PR affects in the title, including
|
|
||||||
the leading directory. For example, if you have added a new
|
|
||||||
type of banner to mcl_banners, the title should look like:
|
|
||||||
|
|
||||||
items/mcl_banners: add new banner type
|
|
||||||
|
|
||||||
-->
|
|
||||||
##### Problem
|
|
||||||
TRACKING ISSUE: #<!-- Tracking issue number -->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Describe WHAT problem this pull request solves.
|
|
||||||
If the tracking issue includes all the needed
|
|
||||||
information, you can leave this section empty.
|
|
||||||
-->
|
|
||||||
|
|
||||||
##### Solution
|
|
||||||
|
|
||||||
<!-- Describe HOW this pull request solves its problem. -->
|
|
||||||
|
|
||||||
##### Details
|
|
||||||
|
|
||||||
<!-- Include any additional information here. -->
|
|
||||||
|
|
||||||
##### Testing Steps
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Write how we can verify this patch addresses its problem.
|
|
||||||
If you need more steps, just keep adding numbers. If you
|
|
||||||
don't need them all, delete the empty numbers.
|
|
||||||
-->
|
|
||||||
1.
|
|
||||||
2.
|
|
||||||
3.
|
|
||||||
|
|
||||||
<!--
|
|
||||||
If your pull request still needs work, uncomment the
|
|
||||||
following section and include a list of things that
|
|
||||||
need to be done before it's ready for us to look at.
|
|
||||||
|
|
||||||
Please remember to put WIP: in front of the title as well.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
##### To do
|
|
||||||
|
|
||||||
- [ ] Item 1
|
|
||||||
- [ ] Item 2
|
|
||||||
- [ ] Item 3
|
|
||||||
-->
|
|
102
.luacheckrc
|
@ -1,102 +0,0 @@
|
||||||
std = "min"
|
|
||||||
|
|
||||||
read_globals = {
|
|
||||||
"ItemStack",
|
|
||||||
"dump", "dump2",
|
|
||||||
"vector",
|
|
||||||
"VoxelArea",
|
|
||||||
"minetest",
|
|
||||||
"PseudoRandom",
|
|
||||||
"PerlinNoise",
|
|
||||||
"PcgRandom",
|
|
||||||
|
|
||||||
string = {fields = {"split", "trim"}},
|
|
||||||
table = {fields = {"copy", "getn", "indexof", "insert_all"}},
|
|
||||||
math = {fields = {"hypot", "round"}},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- A config option to allow r/w access to mods which contain
|
|
||||||
-- this one. It only avoids a couple warnings, and may not be
|
|
||||||
-- the behavior we want, so it's disabled by default.
|
|
||||||
local allow_parents=false
|
|
||||||
|
|
||||||
local lfs = require "lfs"
|
|
||||||
|
|
||||||
-- Seed the queue with the mods/ directory
|
|
||||||
local queue={ {"mods"} }
|
|
||||||
|
|
||||||
local function check(dir)
|
|
||||||
-- Get the string of the directory path
|
|
||||||
local sdir=table.concat(dir, "/")
|
|
||||||
-- Save the top-level directory name as a
|
|
||||||
-- fallback in case there's no mod.conf,
|
|
||||||
-- or no name= directive.
|
|
||||||
local name=dir[#dir]
|
|
||||||
|
|
||||||
-- Is there a mod.conf?
|
|
||||||
if lfs.attributes(sdir.."/mod.conf", "mode") == "file" then
|
|
||||||
local deps={}
|
|
||||||
for line in io.lines(sdir.."/mod.conf") do
|
|
||||||
-- Use name= if it's there
|
|
||||||
name=string.match(line, "name *= *([a-zA-Z0-9_]+)") or name
|
|
||||||
-- Get the dependency entries (if they're there)
|
|
||||||
local ents=string.match(line, "depends *=(.*)$")
|
|
||||||
if ents then
|
|
||||||
-- Split them in to the comma-separated names
|
|
||||||
for m in string.gmatch(ents, "([a-zA-Z0-9_]+),?") do
|
|
||||||
table.insert(deps, m)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local glb={ name }
|
|
||||||
if allow_parents then
|
|
||||||
for _, v in pairs(dir) do
|
|
||||||
-- Skip ALL-CAPS names since those tend
|
|
||||||
-- to be collections of mods instead of
|
|
||||||
-- mods themselves.
|
|
||||||
if not string.match(v, "^[A-Z]+$") then
|
|
||||||
table.insert(glb, v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Tell Luacheck what the directory is allowed to do
|
|
||||||
files[sdir]={
|
|
||||||
globals = glb,
|
|
||||||
read_globals = deps,
|
|
||||||
}
|
|
||||||
elseif lfs.attributes(sdir.."/init.lua", "mode") == "file" then
|
|
||||||
-- No mod.conf, but there's an init.lua here.
|
|
||||||
local glb={ name }
|
|
||||||
if allow_parents then
|
|
||||||
for _, v in pairs(dir) do
|
|
||||||
-- Again, skip ALL-CAPS.
|
|
||||||
if not string.match(v, "^[A-Z]+$") then
|
|
||||||
table.insert(glb, v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
files[sdir]={ globals=glb }
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Queue any child directories
|
|
||||||
for d in lfs.dir(sdir) do
|
|
||||||
-- Skip hidden directories and parent/current directories.
|
|
||||||
if lfs.attributes(sdir.."/"..d, "mode") == "directory" and not string.match(d, "^%.") then
|
|
||||||
-- Copy dir in to nd (New Dir)
|
|
||||||
local nd={}
|
|
||||||
for k, v in pairs(dir) do
|
|
||||||
nd[k]=v
|
|
||||||
end
|
|
||||||
nd[#nd+1]=d
|
|
||||||
table.insert(queue, nd)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
while #queue > 0 do
|
|
||||||
-- Pop an entry and process it.
|
|
||||||
check(table.remove(queue, 1))
|
|
||||||
end
|
|
|
@ -21,7 +21,7 @@ The basic digging time groups determine by which tools a node can be dug.
|
||||||
* `swordy=1`: Diggable by sword (any material), and this node is *not* a cobweb
|
* `swordy=1`: Diggable by sword (any material), and this node is *not* a cobweb
|
||||||
* `swordy_cobweb=1`: Diggable by sword (any material), and this node is a cobweb
|
* `swordy_cobweb=1`: Diggable by sword (any material), and this node is a cobweb
|
||||||
* `shearsy=1`: Diggable by shears, and this node is *not* wool
|
* `shearsy=1`: Diggable by shears, and this node is *not* wool
|
||||||
* `shearsy_wool=1`: Diggable by shears, and this node is wool
|
* `shearsy=wool=1`: Diggable by shears, and this node is wool
|
||||||
* `handy=1`: Breakable by hand and this node gives it useful drop when dug by hand. All nodes which are breakable by pickaxe, axe, shovel, sword or shears are also automatically breakable by hand, but not neccess
|
* `handy=1`: Breakable by hand and this node gives it useful drop when dug by hand. All nodes which are breakable by pickaxe, axe, shovel, sword or shears are also automatically breakable by hand, but not neccess
|
||||||
* `creative_breakable=1`: Block is breakable by hand in creative mode. This group is implied if the node belongs to any other digging group
|
* `creative_breakable=1`: Block is breakable by hand in creative mode. This group is implied if the node belongs to any other digging group
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ These groups are used mostly for informational purposes
|
||||||
* `trapdoor=2`: Open trapdoor
|
* `trapdoor=2`: Open trapdoor
|
||||||
* `glass=1`: Glass (full cubes only)
|
* `glass=1`: Glass (full cubes only)
|
||||||
* `rail=1`: Rail
|
* `rail=1`: Rail
|
||||||
* `music_record=1`: Music Disc
|
* `music_record`: Music Disc (rating is track ID)
|
||||||
* `tnt=1`: Block is TNT
|
* `tnt=1`: Block is TNT
|
||||||
* `boat=1`: Boat
|
* `boat=1`: Boat
|
||||||
* `minecart=1`: Minecart
|
* `minecart=1`: Minecart
|
||||||
|
@ -182,10 +182,6 @@ These groups are used mostly for informational purposes
|
||||||
* `redstone_torch=1`: Redstone Torch (lit)
|
* `redstone_torch=1`: Redstone Torch (lit)
|
||||||
* `redstone_torch=2`: Redstone Torch (unlit)
|
* `redstone_torch=2`: Redstone Torch (unlit)
|
||||||
|
|
||||||
* `dirt=1`: Uncovered dirt
|
|
||||||
* `dirt=2`: Covered dirt (grass or mycelium or podzol on top)
|
|
||||||
* `dirt=3`: Coarse dirt
|
|
||||||
|
|
||||||
* `plant=1`: Plant or part of a plant
|
* `plant=1`: Plant or part of a plant
|
||||||
* `double_plant`: Part of a double-sized plant. 1 = lower part, 2 = upper part
|
* `double_plant`: Part of a double-sized plant. 1 = lower part, 2 = upper part
|
||||||
|
|
||||||
|
|
BIN
menu/header.png
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 76 KiB |
BIN
menu/icon.png
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -1,29 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
SVG_FILE=${2%.png}.svg
|
|
||||||
|
|
||||||
# How crisp a Minetest menu icon appears is influenced by image height
|
|
||||||
# and width. Low resolutions lead to blurry edges, as Minetest scales
|
|
||||||
# menu icons up. High resolutions lead to jagged edges, as Minetest
|
|
||||||
# scales menu icons down. Height & width of 72 pixes seem to work.
|
|
||||||
#
|
|
||||||
# Though usually one would export directly to "${3}", Inkscape 1.0 had
|
|
||||||
# its command line options changed by people who apparently think that
|
|
||||||
# backwards compatibility is some kind of swear word: Whereas earlier
|
|
||||||
# Inkscape versions would export to a file called foo.png.tmp, newer
|
|
||||||
# behaviour is to ignore the user's wishes & write to foo.png.png –
|
|
||||||
# unless one asks it to write to a filename with a .png extension,
|
|
||||||
# Inkscape 1.0 changes the filename extension to .png each time.
|
|
||||||
#
|
|
||||||
# As we do not know the extension of "${3}", we have to use the
|
|
||||||
# extension, then rename the resulting file to the proper name;
|
|
||||||
# only that way the export works with Inkscape 1.0 & earlier …
|
|
||||||
>&2 inkscape \
|
|
||||||
--file="${SVG_FILE}" \
|
|
||||||
--export-png="${3}".png \
|
|
||||||
--export-area-page \
|
|
||||||
--export-height 72 \
|
|
||||||
--export-width 72 \
|
|
||||||
|
|
||||||
mv "${3}".png "${3}"
|
|
8838
menu/icon.svg
Before Width: | Height: | Size: 509 KiB |
|
@ -207,10 +207,6 @@ end
|
||||||
function mcl_autogroup.can_harvest(nodename, toolname)
|
function mcl_autogroup.can_harvest(nodename, toolname)
|
||||||
local ndef = minetest.registered_nodes[nodename]
|
local ndef = minetest.registered_nodes[nodename]
|
||||||
|
|
||||||
if not ndef then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
|
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# mcl_colors
|
|
||||||
Mod providing global table containing legacy minecraft colors to be used in mods.
|
|
||||||
|
|
||||||
## mcl_colors.*
|
|
||||||
Colors by upper name, in hex value.
|
|
||||||
|
|
||||||
## mcl_colors.background.*
|
|
||||||
Background colors by upper name, in hex value.
|
|
|
@ -1,36 +0,0 @@
|
||||||
mcl_colors = {
|
|
||||||
BLACK = "#000000",
|
|
||||||
DARK_BLUE = "#0000AA",
|
|
||||||
DARK_GREEN = "#00AA00",
|
|
||||||
DARK_AQUA = "#00AAAA",
|
|
||||||
DARK_RED = "#AA0000",
|
|
||||||
DARK_PURPLE = "#AA00AA",
|
|
||||||
GOLD = "#FFAA00",
|
|
||||||
GRAY = "#AAAAAA",
|
|
||||||
DARK_GRAY = "#555555",
|
|
||||||
BLUE = "#5555FF",
|
|
||||||
GREEN = "#55FF55",
|
|
||||||
AQUA = "#55FFFF",
|
|
||||||
RED = "#FF5555",
|
|
||||||
LIGHT_PURPLE = "#FF55FF",
|
|
||||||
YELLOW = "#FFFF55",
|
|
||||||
WHITE = "#FFFFFF",
|
|
||||||
background = {
|
|
||||||
BLACK = "#000000",
|
|
||||||
DARK_BLUE = "#00002A",
|
|
||||||
DARK_GREEN = "#002A00",
|
|
||||||
DARK_AQUA = "#002A2A",
|
|
||||||
DARK_RED = "#2A0000",
|
|
||||||
DARK_PURPLE = "#2A002A",
|
|
||||||
GOLD = "#2A2A00",
|
|
||||||
GRAY = "#2A2A2A",
|
|
||||||
DARK_GRAY = "#151515",
|
|
||||||
BLUE = "#15153F",
|
|
||||||
GREEN = "#153F15",
|
|
||||||
AQUA = "#153F3F",
|
|
||||||
RED = "#3F1515",
|
|
||||||
LIGHT_PURPLE = "#3F153F",
|
|
||||||
YELLOW = "#3F3F15",
|
|
||||||
WHITE = "#373501",
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
name = mcl_colors
|
|
||||||
author = Fleckenstein
|
|
||||||
description = The HTML sequences for the minecraft colors
|
|
|
@ -57,48 +57,50 @@ local function compute_sphere_rays(radius)
|
||||||
local rays = {}
|
local rays = {}
|
||||||
local sphere = {}
|
local sphere = {}
|
||||||
|
|
||||||
local function add_ray(pos)
|
for i=1, 2 do
|
||||||
|
for y = -radius, radius do
|
||||||
|
for z = -radius, radius do
|
||||||
|
for x = -radius, 0, 1 do
|
||||||
|
local d = x * x + y * y + z * z
|
||||||
|
if d <= radius * radius then
|
||||||
|
local pos = { x = x, y = y, z = z }
|
||||||
sphere[minetest.hash_node_position(pos)] = pos
|
sphere[minetest.hash_node_position(pos)] = pos
|
||||||
end
|
|
||||||
|
|
||||||
for y = -radius, radius do
|
|
||||||
for z = -radius, radius do
|
|
||||||
for x = -radius, 0 do
|
|
||||||
local d = x * x + y * y + z * z
|
|
||||||
if d <= radius * radius then
|
|
||||||
add_ray(vector.new(x, y, z))
|
|
||||||
add_ray(vector.new(-x, y, z))
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for i=1,2 do
|
||||||
for x = -radius, radius do
|
for x = -radius, radius do
|
||||||
for z = -radius, radius do
|
for z = -radius, radius do
|
||||||
for y = -radius, 0 do
|
for y = -radius, 0, 1 do
|
||||||
local d = x * x + y * y + z * z
|
local d = x * x + y * y + z * z
|
||||||
if d <= radius * radius then
|
if d <= radius * radius then
|
||||||
add_ray(vector.new(x, y, z))
|
local pos = { x = x, y = y, z = z }
|
||||||
add_ray(vector.new(x, -y, z))
|
sphere[minetest.hash_node_position(pos)] = pos
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for i=1,2 do
|
||||||
for x = -radius, radius do
|
for x = -radius, radius do
|
||||||
for y = -radius, radius do
|
for y = -radius, radius do
|
||||||
for z = -radius, 0 do
|
for z = -radius, 0, 1 do
|
||||||
local d = x * x + y * y + z * z
|
local d = x * x + y * y + z * z
|
||||||
if d <= radius * radius then
|
if d <= radius * radius then
|
||||||
add_ray(vector.new(x, y, z))
|
local pos = { x = x, y = y, z = z }
|
||||||
add_ray(vector.new(x, y, -z))
|
sphere[minetest.hash_node_position(pos)] = pos
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for _, pos in pairs(sphere) do
|
for _, pos in pairs(sphere) do
|
||||||
rays[#rays + 1] = vector.normalize(pos)
|
rays[#rays + 1] = vector.normalize(pos)
|
||||||
|
@ -251,12 +253,12 @@ local function trace_explode(pos, strength, raydirs, radius, info, puncher)
|
||||||
|
|
||||||
if collisionbox then
|
if collisionbox then
|
||||||
-- Create rays from random points in the collision box
|
-- Create rays from random points in the collision box
|
||||||
local x1 = collisionbox[1]
|
local x1 = collisionbox[1] * 2
|
||||||
local y1 = collisionbox[2]
|
local y1 = collisionbox[2] * 2
|
||||||
local z1 = collisionbox[3]
|
local z1 = collisionbox[3] * 2
|
||||||
local x2 = collisionbox[4]
|
local x2 = collisionbox[4] * 2
|
||||||
local y2 = collisionbox[5]
|
local y2 = collisionbox[5] * 2
|
||||||
local z2 = collisionbox[6]
|
local z2 = collisionbox[6] * 2
|
||||||
local x_len = math.abs(x2 - x1)
|
local x_len = math.abs(x2 - x1)
|
||||||
local y_len = math.abs(y2 - y1)
|
local y_len = math.abs(y2 - y1)
|
||||||
local z_len = math.abs(z2 - z1)
|
local z_len = math.abs(z2 - z1)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
name = walkover
|
|
|
@ -243,7 +243,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||||
else
|
else
|
||||||
local ctrl = self._passenger:get_player_control()
|
local ctrl = self._passenger:get_player_control()
|
||||||
if ctrl and ctrl.sneak then
|
if ctrl and ctrl.sneak then
|
||||||
detach_object(self._passenger, true)
|
detach_player(self._passenger, true)
|
||||||
self._passenger = nil
|
self._passenger = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -260,7 +260,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local yaw = self.object:get_yaw()
|
local yaw = self.object:get_yaw()
|
||||||
if ctrl and ctrl.up then
|
if ctrl.up then
|
||||||
-- Forwards
|
-- Forwards
|
||||||
self._v = self._v + 0.1 * v_factor
|
self._v = self._v + 0.1 * v_factor
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ function boat.on_step(self, dtime, moveresult)
|
||||||
self.object:set_animation({x=0, y=40}, paddling_speed, 0, true)
|
self.object:set_animation({x=0, y=40}, paddling_speed, 0, true)
|
||||||
self._animation = 1
|
self._animation = 1
|
||||||
end
|
end
|
||||||
elseif ctrl and ctrl.down then
|
elseif ctrl.down then
|
||||||
-- Backwards
|
-- Backwards
|
||||||
self._v = self._v - 0.1 * v_factor
|
self._v = self._v - 0.1 * v_factor
|
||||||
|
|
||||||
|
|
|
@ -155,16 +155,6 @@ function mcl_burning.set_on_fire(obj, burn_time, reason)
|
||||||
}) + 1
|
}) + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local already_burning = mcl_burning.is_burning(obj)
|
|
||||||
|
|
||||||
|
|
||||||
mcl_burning.set(obj, "float", "burn_time", burn_time)
|
|
||||||
mcl_burning.set(obj, "string", "reason", reason)
|
|
||||||
|
|
||||||
if already_burning then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local hud_id
|
local hud_id
|
||||||
if obj:is_player() then
|
if obj:is_player() then
|
||||||
hud_id = mcl_burning.get(obj, "int", "hud_id")
|
hud_id = mcl_burning.get(obj, "int", "hud_id")
|
||||||
|
@ -178,7 +168,8 @@ function mcl_burning.set_on_fire(obj, burn_time, reason)
|
||||||
}) + 1
|
}) + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
mcl_burning.set(obj, "float", "burn_time", burn_time)
|
||||||
|
mcl_burning.set(obj, "string", "reason", reason)
|
||||||
mcl_burning.set(obj, "int", "hud_id", hud_id)
|
mcl_burning.set(obj, "int", "hud_id", hud_id)
|
||||||
mcl_burning.set(obj, "int", "sound_id", sound_id)
|
mcl_burning.set(obj, "int", "sound_id", sound_id)
|
||||||
|
|
||||||
|
@ -294,7 +285,7 @@ function mcl_burning.fire_entity_step(self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
local animation_timer = self.animation_timer + dtime
|
local animation_timer = self.animation_timer + dtime
|
||||||
if animation_timer >= ( 1 / mcl_burning.animation_fps ) then
|
if animation_timer >= 0.015 then
|
||||||
animation_timer = 0
|
animation_timer = 0
|
||||||
local animation_frame = self.animation_frame + 1
|
local animation_frame = self.animation_frame + 1
|
||||||
if animation_frame > mcl_burning.animation_frames - 1 then
|
if animation_frame > mcl_burning.animation_frames - 1 then
|
||||||
|
@ -305,48 +296,3 @@ function mcl_burning.fire_entity_step(self, dtime)
|
||||||
end
|
end
|
||||||
self.animation_timer = animation_timer
|
self.animation_timer = animation_timer
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_chatcommand("burn", {
|
|
||||||
params = S("<playername> <duration> <reason>"),
|
|
||||||
description = S("Sets a player on fire for the given amount of seconds with the given reason."),
|
|
||||||
privs = { debug = true },
|
|
||||||
func = function(name, params)
|
|
||||||
local playername, duration, reason = params:match("^(.+) (.+) (.+)$")
|
|
||||||
if not (playername and duration and reason) then
|
|
||||||
return false, S("Error: Parameter missing.")
|
|
||||||
end
|
|
||||||
local player = minetest.get_player_by_name(playername)
|
|
||||||
if not player then
|
|
||||||
return false, S(
|
|
||||||
"Error: Player “@1” not found.",
|
|
||||||
playername
|
|
||||||
)
|
|
||||||
end
|
|
||||||
local duration_number = tonumber(duration)
|
|
||||||
-- Lua numbers are truthy
|
|
||||||
-- NaN is not equal to NaN
|
|
||||||
if not duration_number or (duration_number ~= duration_number) then
|
|
||||||
return false, S(
|
|
||||||
"Error: Duration “@1” is not a number.",
|
|
||||||
duration
|
|
||||||
)
|
|
||||||
end
|
|
||||||
if duration_number < 0 then
|
|
||||||
return false, S(
|
|
||||||
"Error: Duration “@1” is negative.",
|
|
||||||
duration
|
|
||||||
)
|
|
||||||
end
|
|
||||||
mcl_burning.set_on_fire(
|
|
||||||
player,
|
|
||||||
duration_number,
|
|
||||||
reason
|
|
||||||
)
|
|
||||||
return true, S(
|
|
||||||
"Set @1 on fire for @2s for the following reason: @3",
|
|
||||||
playername,
|
|
||||||
duration,
|
|
||||||
reason
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
|
@ -2,8 +2,7 @@ local S = minetest.get_translator("mcl_burning")
|
||||||
local modpath = minetest.get_modpath("mcl_burning")
|
local modpath = minetest.get_modpath("mcl_burning")
|
||||||
|
|
||||||
mcl_burning = {
|
mcl_burning = {
|
||||||
animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8,
|
animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8
|
||||||
animation_fps = tonumber(minetest.settings:get("fire_animation_fps")) or 30
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dofile(modpath .. "/api.lua")
|
dofile(modpath .. "/api.lua")
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
local S = minetest.get_translator("mcl_item_entity")
|
|
||||||
--basic settings
|
--basic settings
|
||||||
local item_drop_settings = {} --settings table
|
local item_drop_settings = {} --settings table
|
||||||
item_drop_settings.age = 1.0 --how old a dropped item (_insta_collect==false) has to be before collecting
|
item_drop_settings.age = 1.0 --how old a dropped item (_insta_collect==false) has to be before collecting
|
||||||
|
@ -449,7 +448,7 @@ minetest.register_entity(":__builtin:item", {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
get_staticdata = function(self)
|
get_staticdata = function(self)
|
||||||
local data = minetest.serialize({
|
return minetest.serialize({
|
||||||
itemstring = self.itemstring,
|
itemstring = self.itemstring,
|
||||||
always_collect = self.always_collect,
|
always_collect = self.always_collect,
|
||||||
age = self.age,
|
age = self.age,
|
||||||
|
@ -457,39 +456,6 @@ minetest.register_entity(":__builtin:item", {
|
||||||
_flowing = self._flowing,
|
_flowing = self._flowing,
|
||||||
_removed = self._removed,
|
_removed = self._removed,
|
||||||
})
|
})
|
||||||
-- sfan5 guessed that the biggest serializable item
|
|
||||||
-- entity would have a size of 65530 bytes. This has
|
|
||||||
-- been experimentally verified to be still too large.
|
|
||||||
--
|
|
||||||
-- anon5 has calculated that the biggest serializable
|
|
||||||
-- item entity has a size of exactly 65487 bytes:
|
|
||||||
--
|
|
||||||
-- 1. serializeString16 can handle max. 65535 bytes.
|
|
||||||
-- 2. The following engine metadata is always saved:
|
|
||||||
-- • 1 byte (version)
|
|
||||||
-- • 2 byte (length prefix)
|
|
||||||
-- • 14 byte “__builtin:item”
|
|
||||||
-- • 4 byte (length prefix)
|
|
||||||
-- • 2 byte (health)
|
|
||||||
-- • 3 × 4 byte = 12 byte (position)
|
|
||||||
-- • 4 byte (yaw)
|
|
||||||
-- • 1 byte (version 2)
|
|
||||||
-- • 2 × 4 byte = 8 byte (pitch and roll)
|
|
||||||
-- 3. This leaves 65487 bytes for the serialization.
|
|
||||||
if #data > 65487 then -- would crash the engine
|
|
||||||
local stack = ItemStack(self.itemstring)
|
|
||||||
stack:get_meta():from_table(nil)
|
|
||||||
self.itemstring = stack:to_string()
|
|
||||||
minetest.log(
|
|
||||||
"warning",
|
|
||||||
"Overlong item entity metadata removed: “" ..
|
|
||||||
self.itemstring ..
|
|
||||||
"” had serialized length of " ..
|
|
||||||
#data
|
|
||||||
)
|
|
||||||
return self:get_staticdata()
|
|
||||||
end
|
|
||||||
return data
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_activate = function(self, staticdata, dtime_s)
|
on_activate = function(self, staticdata, dtime_s)
|
||||||
|
@ -782,29 +748,3 @@ minetest.register_entity(":__builtin:item", {
|
||||||
|
|
||||||
-- Note: on_punch intentionally left out. The player should *not* be able to collect items by punching
|
-- Note: on_punch intentionally left out. The player should *not* be able to collect items by punching
|
||||||
})
|
})
|
||||||
|
|
||||||
-- The “getwrittenbook” command was added as a debug aid. It can help
|
|
||||||
-- reproducing situations in which items with lots of metadata trigger
|
|
||||||
-- issues like heavy lag or server crashes. Do not remove this command
|
|
||||||
-- unless another easy way of getting items with overlong meta exists!
|
|
||||||
--
|
|
||||||
-- “/getwrittenbook 65323” creates an item that creates the largest
|
|
||||||
-- possible serializable written book item entity when dropped.
|
|
||||||
--
|
|
||||||
-- “/getwrittenbook 65324” creates an item that creates the smallest
|
|
||||||
-- possible non-serializable written book item entity when dropped.
|
|
||||||
minetest.register_chatcommand("getwrittenbook", {
|
|
||||||
params = S("<Count>"),
|
|
||||||
description = S("Get a written book with a configurable amount of characters."),
|
|
||||||
privs = {debug=true},
|
|
||||||
func = function(name, param)
|
|
||||||
local count = tonumber(param)
|
|
||||||
local itemstack = ItemStack("mcl_books:written_book")
|
|
||||||
local meta = itemstack:get_meta()
|
|
||||||
meta:set_string("description", "")
|
|
||||||
meta:set_string("text", string.rep("x", count))
|
|
||||||
local player = minetest.get_player_by_name(name)
|
|
||||||
local inv = player:get_inventory()
|
|
||||||
inv:add_item("main", itemstack)
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
|
@ -14,8 +14,6 @@ local DEFAULT_FALL_SPEED = -10
|
||||||
local FLOP_HEIGHT = 5.0
|
local FLOP_HEIGHT = 5.0
|
||||||
local FLOP_HOR_SPEED = 1.5
|
local FLOP_HOR_SPEED = 1.5
|
||||||
|
|
||||||
local LIGHT_SUN = minetest.LIGHT_MAX + 1
|
|
||||||
|
|
||||||
local MOB_CAP = {}
|
local MOB_CAP = {}
|
||||||
MOB_CAP.hostile = 70
|
MOB_CAP.hostile = 70
|
||||||
MOB_CAP.passive = 10
|
MOB_CAP.passive = 10
|
||||||
|
@ -1059,7 +1057,7 @@ local do_env_damage = function(self)
|
||||||
if mod_worlds then
|
if mod_worlds then
|
||||||
_, dim = mcl_worlds.y_to_layer(pos.y)
|
_, dim = mcl_worlds.y_to_layer(pos.y)
|
||||||
end
|
end
|
||||||
if (self.sunlight_damage ~= 0 or self.ignited_by_sunlight) and (minetest.get_node_light(pos) or 0) == LIGHT_SUN and dim == "overworld" then
|
if (self.sunlight_damage ~= 0 or self.ignited_by_sunlight) and (minetest.get_node_light(pos) or 0) >= minetest.LIGHT_MAX and dim == "overworld" then
|
||||||
if self.ignited_by_sunlight then
|
if self.ignited_by_sunlight then
|
||||||
mcl_burning.set_on_fire(self.object, 10)
|
mcl_burning.set_on_fire(self.object, 10)
|
||||||
else
|
else
|
||||||
|
|
|
@ -123,10 +123,6 @@ mobs:register_mob("mobs_mc:snowman", {
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
||||||
|
|
||||||
if minetest.registered_items["mcl_farming:pumpkin_face"] then
|
|
||||||
minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, "mcl_farming:pumpkin_face")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Wear out
|
-- Wear out
|
||||||
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||||
item:add_wear(mobs_mc.misc.shears_wear)
|
item:add_wear(mobs_mc.misc.shears_wear)
|
||||||
|
|
|
@ -74,7 +74,7 @@ local professions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
{ { "mcl_farming:pumpkin", 8, 13 }, E1 },
|
{ { "mcl_farming:pumpkin_face", 8, 13 }, E1 },
|
||||||
{ E1, { "mcl_farming:pumpkin_pie", 2, 3} },
|
{ E1, { "mcl_farming:pumpkin_pie", 2, 3} },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -413,7 +413,6 @@ function hb.hide_hudbar(player, identifier)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local hudtable = hb.get_hudtable(identifier)
|
local hudtable = hb.get_hudtable(identifier)
|
||||||
if hudtable == nil then return false end
|
if hudtable == nil then return false end
|
||||||
if hudtable.hudstate[name].hidden == true then return true end
|
|
||||||
if hb.settings.bar_type == "progress_bar" then
|
if hb.settings.bar_type == "progress_bar" then
|
||||||
if hudtable.hudids[name].icon ~= nil then
|
if hudtable.hudids[name].icon ~= nil then
|
||||||
player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0})
|
player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0})
|
||||||
|
@ -432,7 +431,6 @@ function hb.unhide_hudbar(player, identifier)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local hudtable = hb.get_hudtable(identifier)
|
local hudtable = hb.get_hudtable(identifier)
|
||||||
if hudtable == nil then return false end
|
if hudtable == nil then return false end
|
||||||
if hudtable.hudstate[name].hidden == false then return true end
|
|
||||||
local value = hudtable.hudstate[name].value
|
local value = hudtable.hudstate[name].value
|
||||||
local max = hudtable.hudstate[name].max
|
local max = hudtable.hudstate[name].max
|
||||||
if hb.settings.bar_type == "progress_bar" then
|
if hb.settings.bar_type == "progress_bar" then
|
||||||
|
|
|
@ -3,105 +3,12 @@ local N = function(s) return s end
|
||||||
|
|
||||||
local function get_tool_name(item)
|
local function get_tool_name(item)
|
||||||
local name = item:get_meta():get_string("name")
|
local name = item:get_meta():get_string("name")
|
||||||
if name == "" then
|
if name ~= "" then
|
||||||
|
return name
|
||||||
|
end
|
||||||
local def = item:get_definition()
|
local def = item:get_definition()
|
||||||
name=def._tt_original_description or def.description
|
return def._tt_original_description or def.description
|
||||||
end
|
end
|
||||||
local sanitized_name, substitution_count = name:gsub("[\r\n]"," ")
|
|
||||||
return sanitized_name
|
|
||||||
end
|
|
||||||
|
|
||||||
local test_tool_1a = {
|
|
||||||
get_meta = function()
|
|
||||||
return {
|
|
||||||
get_string = function()
|
|
||||||
return "foo 1a"
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
assert( get_tool_name(test_tool_1a) == "foo 1a" )
|
|
||||||
|
|
||||||
local test_tool_1b = {
|
|
||||||
get_meta = function()
|
|
||||||
return {
|
|
||||||
get_string = function()
|
|
||||||
return "bar\rbaz\n1b"
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
assert( get_tool_name(test_tool_1b) == "bar baz 1b" )
|
|
||||||
|
|
||||||
local test_tool_2a = {
|
|
||||||
get_definition = function()
|
|
||||||
return {
|
|
||||||
_tt_original_description = "foo 2a"
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
get_meta = function()
|
|
||||||
return {
|
|
||||||
get_string = function()
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
assert( get_tool_name(test_tool_2a) == "foo 2a" )
|
|
||||||
|
|
||||||
local test_tool_2b = {
|
|
||||||
get_definition = function()
|
|
||||||
return {
|
|
||||||
_tt_original_description = "bar\rbaz\n2b"
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
get_meta = function()
|
|
||||||
return {
|
|
||||||
get_string = function()
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
assert( get_tool_name(test_tool_2b) == "bar baz 2b" )
|
|
||||||
|
|
||||||
local test_tool_3a = {
|
|
||||||
get_definition = function()
|
|
||||||
return {
|
|
||||||
description = "foo 3a"
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
get_meta = function()
|
|
||||||
return {
|
|
||||||
get_string = function()
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
assert( get_tool_name(test_tool_3a) == "foo 3a" )
|
|
||||||
|
|
||||||
local test_tool_3b = {
|
|
||||||
get_definition = function()
|
|
||||||
return {
|
|
||||||
description = "bar\rbaz\n3b"
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
get_meta = function()
|
|
||||||
return {
|
|
||||||
get_string = function()
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
assert( get_tool_name(test_tool_3b) == "bar baz 3b" )
|
|
||||||
|
|
||||||
mcl_death_messages = {}
|
mcl_death_messages = {}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
@1 drowned.=@1 ertrank.
|
@1 drowned.=@1 ertrank.
|
||||||
@1 ran out of oxygen.=@1 ging die Luft aus.
|
@1 ran out of oxygen.=@1 ging die Luft aus.
|
||||||
@1 was killed by @2.=@1 wurde von @2 getötet.
|
@1 was killed by @2.=@1 wurde von @2 getötet.
|
||||||
@1 was slain by @2.=@1 wurde von @2 getötet.
|
|
||||||
@1 was killed.=@1 wurde getötet.
|
@1 was killed.=@1 wurde getötet.
|
||||||
@1 was killed by a mob.=@1 wurde von einem Mob getötet.
|
@1 was killed by a mob.=@1 wurde von einem Mob getötet.
|
||||||
@1 was burned to death by a blaze's fireball.=@1 wurde von einem Feuerball einer Lohe zu Tode verbrannt.
|
@1 was burned to death by a blaze's fireball.=@1 wurde von einem Feuerball einer Lohe zu Tode verbrannt.
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
@1 drowned.=
|
@1 drowned.=
|
||||||
@1 ran out of oxygen.=
|
@1 ran out of oxygen.=
|
||||||
@1 was killed by @2.=
|
@1 was killed by @2.=
|
||||||
@1 was slain by @2.=
|
|
||||||
@1 was killed.=
|
@1 was killed.=
|
||||||
@1 was killed by a mob.=
|
@1 was killed by a mob.=
|
||||||
@1 was burned to death by a blaze's fireball.=
|
@1 was burned to death by a blaze's fireball.=
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
name = mcl_experience
|
|
|
@ -1,2 +1 @@
|
||||||
name = mcl_formspec
|
|
||||||
description = Helper mod to simplify creation of formspecs a little bit
|
description = Helper mod to simplify creation of formspecs a little bit
|
||||||
|
|
|
@ -28,9 +28,10 @@ local function replace_enchanted_books(tbl)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ Populate all the item tables. We only do this once. Note this code must be
|
--[[ Populate all the item tables. We only do this once. Note this mod must be
|
||||||
executed after loading all the other mods in order to work. ]]
|
loaded after _mcl_autogroup for this to work, because it required certain
|
||||||
minetest.register_on_mods_loaded(function()
|
groups to be set. ]]
|
||||||
|
do
|
||||||
for name,def in pairs(minetest.registered_items) do
|
for name,def in pairs(minetest.registered_items) do
|
||||||
if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" then
|
if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" then
|
||||||
local is_redstone = function(def)
|
local is_redstone = function(def)
|
||||||
|
@ -108,7 +109,7 @@ minetest.register_on_mods_loaded(function()
|
||||||
table.sort(to_sort)
|
table.sort(to_sort)
|
||||||
replace_enchanted_books(to_sort)
|
replace_enchanted_books(to_sort)
|
||||||
end
|
end
|
||||||
end)
|
end
|
||||||
|
|
||||||
local function filter_item(name, description, lang, filter)
|
local function filter_item(name, description, lang, filter)
|
||||||
local desc
|
local desc
|
||||||
|
@ -117,7 +118,7 @@ local function filter_item(name, description, lang, filter)
|
||||||
else
|
else
|
||||||
desc = string.lower(minetest.get_translated_string(lang, description))
|
desc = string.lower(minetest.get_translated_string(lang, description))
|
||||||
end
|
end
|
||||||
return string.find(name, filter, nil, true) or string.find(desc, filter, nil, true)
|
return string.find(name, filter) or string.find(desc, filter)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_inv_search(filter, player)
|
local function set_inv_search(filter, player)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_inventory
|
name = mcl_inventory
|
||||||
description = Adds the player inventory and creative inventory.
|
description = Adds the player inventory and creative inventory.
|
||||||
depends = mcl_init, mcl_formspec, mcl_enchanting
|
depends = mcl_init, mcl_formspec, mcl_enchanting
|
||||||
optional_depends = mcl_player, mcl_armor, mcl_brewing, mcl_potions
|
optional_depends = mcl_player, _mcl_autogroup, mcl_armor, mcl_brewing, mcl_potions
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
mcl_tmp_message = {
|
mcl_tmp_message = {}
|
||||||
hud_hide_timeout = tonumber(
|
|
||||||
minetest.settings:get("mcl_tmp_message_hud_hide_timeout")
|
|
||||||
) or 10
|
|
||||||
}
|
|
||||||
|
|
||||||
local huds = {}
|
local huds = {}
|
||||||
local hud_hide_timeouts = {}
|
local hud_hide_timeouts = {}
|
||||||
|
@ -10,7 +6,7 @@ local hud_hide_timeouts = {}
|
||||||
function mcl_tmp_message.message(player, message)
|
function mcl_tmp_message.message(player, message)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
player:hud_change(huds[name], "text", message)
|
player:hud_change(huds[name], "text", message)
|
||||||
hud_hide_timeouts[name] = mcl_tmp_message.hud_hide_timeout
|
hud_hide_timeouts[name] = 3
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
name = mcl_tmp_message
|
|
|
@ -43,20 +43,14 @@ end
|
||||||
|
|
||||||
local comparator_activate = function(pos, node)
|
local comparator_activate = function(pos, node)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
local onstate = def.comparator_onstate
|
minetest.swap_node(pos, { name = def.comparator_onstate, param2 = node.param2 })
|
||||||
if onstate then
|
|
||||||
minetest.swap_node(pos, { name = onstate, param2 = node.param2 })
|
|
||||||
end
|
|
||||||
minetest.after(0.1, comparator_turnon , {pos = pos, node = node})
|
minetest.after(0.1, comparator_turnon , {pos = pos, node = node})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local comparator_deactivate = function(pos, node)
|
local comparator_deactivate = function(pos, node)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
local offstate = def.comparator_offstate
|
minetest.swap_node(pos, { name = def.comparator_offstate, param2 = node.param2 })
|
||||||
if offstate then
|
|
||||||
minetest.swap_node(pos, { name = offstate, param2 = node.param2 })
|
|
||||||
end
|
|
||||||
minetest.after(0.1, comparator_turnoff, {pos = pos, node = node})
|
minetest.after(0.1, comparator_turnoff, {pos = pos, node = node})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -129,19 +129,6 @@ local dispenserdef = {
|
||||||
local stack_id = stacks[r].stackpos
|
local stack_id = stacks[r].stackpos
|
||||||
local stackdef = stack:get_definition()
|
local stackdef = stack:get_definition()
|
||||||
local iname = stack:get_name()
|
local iname = stack:get_name()
|
||||||
if not minetest.registered_items[iname] then
|
|
||||||
minetest.log(
|
|
||||||
"warning",
|
|
||||||
"Trying to dispense unknown item " ..
|
|
||||||
"“" .. iname .. "” " ..
|
|
||||||
"near (" ..
|
|
||||||
pos.x .. ", " ..
|
|
||||||
pos.y .. ", " ..
|
|
||||||
pos.z ..
|
|
||||||
")"
|
|
||||||
)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local igroups = minetest.registered_items[iname].groups
|
local igroups = minetest.registered_items[iname].groups
|
||||||
|
|
||||||
--[===[ Dispense item ]===]
|
--[===[ Dispense item ]===]
|
||||||
|
|
|
@ -483,7 +483,6 @@ function mesecon.turnoff(pos, link)
|
||||||
for _, r in ipairs(mesecon.rule2meta(f.link, mesecon.rules.mcl_alldirs_spread)) do
|
for _, r in ipairs(mesecon.rule2meta(f.link, mesecon.rules.mcl_alldirs_spread)) do
|
||||||
local np = vector.add(f.pos, r)
|
local np = vector.add(f.pos, r)
|
||||||
local n = mesecon.get_node_force(np)
|
local n = mesecon.get_node_force(np)
|
||||||
if not (mesecon.get_node_force(np) == nil) then
|
|
||||||
if mesecon.is_receptor_on(n.name) then
|
if mesecon.is_receptor_on(n.name) then
|
||||||
local receptorrules = mesecon.receptor_get_rules(n)
|
local receptorrules = mesecon.receptor_get_rules(n)
|
||||||
for _, rr in pairs(receptorrules) do
|
for _, rr in pairs(receptorrules) do
|
||||||
|
@ -492,7 +491,6 @@ function mesecon.turnoff(pos, link)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
for _, l in ipairs(mesecon.rules_link_rule_all(f.pos, r)) do
|
for _, l in ipairs(mesecon.rules_link_rule_all(f.pos, r)) do
|
||||||
local nlink = table.copy(l)
|
local nlink = table.copy(l)
|
||||||
nlink.spread = false
|
nlink.spread = false
|
||||||
|
|
|
@ -149,8 +149,8 @@ armor.set_player_armor = function(self, player)
|
||||||
if level then
|
if level then
|
||||||
local texture = def.texture or item:gsub("%:", "_")
|
local texture = def.texture or item:gsub("%:", "_")
|
||||||
local enchanted_addition = (mcl_enchanting.is_enchanted(item) and mcl_enchanting.overlay or "")
|
local enchanted_addition = (mcl_enchanting.is_enchanted(item) and mcl_enchanting.overlay or "")
|
||||||
table.insert(textures, texture..".png"..enchanted_addition)
|
table.insert(textures, "("..texture..".png"..enchanted_addition..")")
|
||||||
preview = "player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..""..(preview and "^"..preview or "")
|
preview = "(player.png^[opacity:0^"..texture.."_preview.png"..enchanted_addition..")"..(preview and "^"..preview or "")
|
||||||
armor_level = armor_level + level
|
armor_level = armor_level + level
|
||||||
items = items + 1
|
items = items + 1
|
||||||
mcl_armor_points = mcl_armor_points + (def.groups["mcl_armor_points"] or 0)
|
mcl_armor_points = mcl_armor_points + (def.groups["mcl_armor_points"] or 0)
|
||||||
|
|
|
@ -387,14 +387,14 @@ for colorid, colortab in pairs(mcl_banners.colors) do
|
||||||
-- redraw the pattern textures as low-resolution pixel
|
-- redraw the pattern textures as low-resolution pixel
|
||||||
-- art and use that instead.
|
-- art and use that instead.
|
||||||
|
|
||||||
local layer = "([combine:20x40:-2,-2=" .. pattern .. "^[resize:16x24^[colorize:" .. color .. ":" .. layer_ratio .. ")"
|
local layer = "(([combine:20x40:-2,-2=" .. pattern .. "^[resize:16x24^[colorize:" .. color .. ":" .. layer_ratio .. "))"
|
||||||
local mask = "([combine:20x40:-2,-2=" .. pattern .. "^[resize:16x24" .. ")"
|
local mask = "(([combine:20x40:-2,-2=" .. pattern .. "^[resize:16x24" .. "))"
|
||||||
|
|
||||||
function escape(text)
|
function escape(text)
|
||||||
return text:gsub("%^", "\\%^"):gsub(":", "\\:") -- :gsub("%(", "\\%("):gsub("%)", "\\%)")
|
return text:gsub("%^", "\\%^"):gsub(":", "\\:") -- :gsub("%(", "\\%("):gsub("%)", "\\%)")
|
||||||
end
|
end
|
||||||
|
|
||||||
local layer_masked = layer .. "^[mask:" .. escape(mask)
|
local layer_masked = layer .. "[mask:" .. escape(mask)
|
||||||
finished_banner = "[combine:32x32:0,0=" .. escape(base) .. ":8,4=" .. escape(layer_masked)
|
finished_banner = "[combine:32x32:0,0=" .. escape(base) .. ":8,4=" .. escape(layer_masked)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,9 @@ local N = function(s) return s end
|
||||||
-- Maximum number of layers which can be put on a banner by crafting.
|
-- Maximum number of layers which can be put on a banner by crafting.
|
||||||
local max_layers_crafting = 12
|
local max_layers_crafting = 12
|
||||||
|
|
||||||
|
-- Maximum number of layers when banner includes a gradient (workaround, see below).
|
||||||
|
local max_layers_gradient = 3
|
||||||
|
|
||||||
-- Max. number lines in the descriptions for the banner layers.
|
-- Max. number lines in the descriptions for the banner layers.
|
||||||
-- This is done to avoid huge tooltips.
|
-- This is done to avoid huge tooltips.
|
||||||
local max_layer_lines = 6
|
local max_layer_lines = 6
|
||||||
|
@ -395,6 +398,16 @@ local banner_pattern_craft = function(itemstack, player, old_craft_grid, craft_i
|
||||||
if #layers >= max_layers_crafting then
|
if #layers >= max_layers_crafting then
|
||||||
return ItemStack("")
|
return ItemStack("")
|
||||||
end
|
end
|
||||||
|
-- Lower layer limit when banner includes any gradient.
|
||||||
|
-- Workaround to circumvent Minetest bug (https://github.com/minetest/minetest/issues/6210)
|
||||||
|
-- TODO: Remove this restriction when bug #6210 is fixed.
|
||||||
|
if #layers >= max_layers_gradient then
|
||||||
|
for l=1, #layers do
|
||||||
|
if layers[l].pattern == "gradient" or layers[l].pattern == "gradient_up" then
|
||||||
|
return ItemStack("")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local matching_pattern
|
local matching_pattern
|
||||||
local max_i = player:get_inventory():get_size("craft")
|
local max_i = player:get_inventory():get_size("craft")
|
||||||
|
|
|
@ -81,7 +81,7 @@ function mcl_beds.register_bed(name, def)
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
groups = {handy=1, bed = 1, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, deco_block = 1, flammable=-1},
|
groups = {handy=1, flammable = 3, bed = 1, dig_by_piston=1, bouncy=66, fall_damage_add_percent=-50, deco_block = 1, flammable=-1},
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
sounds = def.sounds or default_sounds,
|
sounds = def.sounds or default_sounds,
|
||||||
|
@ -204,7 +204,7 @@ function mcl_beds.register_bed(name, def)
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
-- FIXME: Should be bouncy=66, but this would be a higher bounciness than slime blocks!
|
-- FIXME: Should be bouncy=66, but this would be a higher bounciness than slime blocks!
|
||||||
groups = {handy = 1, flammable = -1, bed = 2, dig_by_piston=1, bouncy=33, fall_damage_add_percent=-50, not_in_creative_inventory = 1},
|
groups = {handy = 1, flammable = 3, bed = 2, dig_by_piston=1, bouncy=33, fall_damage_add_percent=-50, not_in_creative_inventory = 1},
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
sounds = def.sounds or default_sounds,
|
sounds = def.sounds or default_sounds,
|
||||||
|
|
|
@ -22,7 +22,7 @@ minetest.register_craftitem("mcl_bows:arrow", {
|
||||||
description = S("Arrow"),
|
description = S("Arrow"),
|
||||||
_tt_help = S("Ammunition").."\n"..S("Damage from bow: 1-10").."\n"..S("Damage from dispenser: 3"),
|
_tt_help = S("Ammunition").."\n"..S("Damage from bow: 1-10").."\n"..S("Damage from dispenser: 3"),
|
||||||
_doc_items_longdesc = S("Arrows are ammunition for bows and dispensers.").."\n"..
|
_doc_items_longdesc = S("Arrows are ammunition for bows and dispensers.").."\n"..
|
||||||
S("An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.").."\n"..
|
S("An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.").."\n"..
|
||||||
S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."),
|
S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."),
|
||||||
_doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."),
|
_doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."),
|
||||||
inventory_image = "mcl_bows_arrow_inv.png",
|
inventory_image = "mcl_bows_arrow_inv.png",
|
||||||
|
@ -136,8 +136,6 @@ end
|
||||||
ARROW_ENTITY.on_step = function(self, dtime)
|
ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
mcl_burning.tick(self.object, dtime)
|
mcl_burning.tick(self.object, dtime)
|
||||||
|
|
||||||
self._time_in_air = self._time_in_air + dtime
|
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local dpos = table.copy(pos) -- digital pos
|
local dpos = table.copy(pos) -- digital pos
|
||||||
dpos = vector.round(dpos)
|
dpos = vector.round(dpos)
|
||||||
|
@ -203,10 +201,10 @@ ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
for k, obj in pairs(objs) do
|
for k, obj in pairs(objs) do
|
||||||
local ok = false
|
local ok = false
|
||||||
-- Arrows can only damage players and mobs
|
-- Arrows can only damage players and mobs
|
||||||
if obj:is_player() then
|
if obj ~= self._shooter and obj:is_player() then
|
||||||
ok = true
|
ok = true
|
||||||
elseif obj:get_luaentity() ~= nil then
|
elseif obj:get_luaentity() ~= nil then
|
||||||
if obj:get_luaentity()._cmi_is_mob or obj:get_luaentity()._hittable_by_projectile then
|
if obj ~= self._shooter and (obj:get_luaentity()._cmi_is_mob or obj:get_luaentity()._hittable_by_projectile) then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -228,7 +226,7 @@ ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
local obj = closest_object
|
local obj = closest_object
|
||||||
local is_player = obj:is_player()
|
local is_player = obj:is_player()
|
||||||
local lua = obj:get_luaentity()
|
local lua = obj:get_luaentity()
|
||||||
if obj == self._shooter and self._time_in_air > 1 or obj ~= self._shooter and (is_player or (lua and (lua._cmi_is_mob or lua._hittable_by_projectile))) then
|
if obj ~= self._shooter and (is_player or (lua and (lua._cmi_is_mob or lua._hittable_by_projectile))) then
|
||||||
if obj:get_hp() > 0 then
|
if obj:get_hp() > 0 then
|
||||||
-- Check if there is no solid node between arrow and object
|
-- Check if there is no solid node between arrow and object
|
||||||
local ray = minetest.raycast(self.object:get_pos(), obj:get_pos(), true)
|
local ray = minetest.raycast(self.object:get_pos(), obj:get_pos(), true)
|
||||||
|
@ -265,7 +263,7 @@ ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
|
|
||||||
|
|
||||||
if is_player then
|
if is_player then
|
||||||
if self._shooter and self._shooter:is_player() and obj ~= self._shooter then
|
if self._shooter and self._shooter:is_player() then
|
||||||
-- “Ding” sound for hitting another player
|
-- “Ding” sound for hitting another player
|
||||||
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter:get_player_name()}, true)
|
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter:get_player_name()}, true)
|
||||||
end
|
end
|
||||||
|
@ -413,7 +411,6 @@ end
|
||||||
|
|
||||||
ARROW_ENTITY.on_activate = function(self, staticdata, dtime_s)
|
ARROW_ENTITY.on_activate = function(self, staticdata, dtime_s)
|
||||||
local data = minetest.deserialize(staticdata)
|
local data = minetest.deserialize(staticdata)
|
||||||
self._time_in_air = dtime_s
|
|
||||||
if data then
|
if data then
|
||||||
self._stuck = data.stuck
|
self._stuck = data.stuck
|
||||||
if data.stuck then
|
if data.stuck then
|
||||||
|
|
|
@ -129,7 +129,7 @@ minetest.register_tool("mcl_bows:bow", {
|
||||||
description = S("Bow"),
|
description = S("Bow"),
|
||||||
_tt_help = S("Launches arrows"),
|
_tt_help = S("Launches arrows"),
|
||||||
_doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n"..
|
_doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n"..
|
||||||
S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 25% of a critical hit, dealing 10 damage instead."),
|
S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."),
|
||||||
_doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot."),
|
_doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot."),
|
||||||
_doc_items_durability = BOW_DURABILITY,
|
_doc_items_durability = BOW_DURABILITY,
|
||||||
inventory_image = "mcl_bows_bow.png",
|
inventory_image = "mcl_bows_bow.png",
|
||||||
|
@ -256,9 +256,9 @@ controls.register_on_release(function(player, key, time)
|
||||||
local is_critical = false
|
local is_critical = false
|
||||||
if charge >= BOW_CHARGE_TIME_FULL then
|
if charge >= BOW_CHARGE_TIME_FULL then
|
||||||
speed = BOW_MAX_SPEED
|
speed = BOW_MAX_SPEED
|
||||||
local r = math.random(1,4)
|
local r = math.random(1,5)
|
||||||
if r == 1 then
|
if r == 1 then
|
||||||
-- 25% chance for critical hit
|
-- 20% chance for critical hit
|
||||||
damage = 10
|
damage = 10
|
||||||
is_critical = true
|
is_critical = true
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
# textdomain: mcl_bows
|
# textdomain: mcl_bows
|
||||||
Arrow=Pfeil
|
Arrow=Pfeil
|
||||||
Ammunition=Munition
|
|
||||||
Damage from bow: 1-10=Schaden vom Bogen: 1-10
|
|
||||||
Damage from dispenser: 3=Schaden vom Werfer: 3
|
|
||||||
Arrows are ammunition for bows and dispensers.=Pfeile sind Munition für Bögen und Werfer.
|
Arrows are ammunition for bows and dispensers.=Pfeile sind Munition für Bögen und Werfer.
|
||||||
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Ein Bogen von einem Pfeil richtet regulär 1-9 Schaden an. Mit voller Zugkraft gibt es eine 25%-ige Chance auf einen kritischen Treffer mit 10 Schaden. Ein Pfeil aus einem Werfer richtet immer 3 Schaden an.
|
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Ein Bogen von einem Pfeil richtet regulär 1-9 Schaden an. Mit voller Zugkraft gibt es eine 20%-ige Chance auf einen kritischen Treffer mit 10 Schaden. Ein Pfeil aus einem Werfer richtet immer 3 Schaden an.
|
||||||
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Pfeile können in festen Blöcken stecken bleiben und wieder aufgesammelt werden. Sie können auf Holzknöpfe drücken.
|
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Pfeile können in festen Blöcken stecken bleiben und wieder aufgesammelt werden. Sie können auf Holzknöpfe drücken.
|
||||||
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Um Pfeile als Munition für dne Bogen zu benutzen, platzieren Sie sie einfach irgendwo im Inventar, sie werden automatisch benutzt. Um Pfeile als Munition für Werfer zu benutzen, platzieren Sie sie ins Inventar eines Werferr. Um einen steckengebliebenen Pfeil aufzusammeln, gehen Sie einfach zu ihm hin.
|
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Um Pfeile als Munition für dne Bogen zu benutzen, platzieren Sie sie einfach irgendwo im Inventar, sie werden automatisch benutzt. Um Pfeile als Munition für Werfer zu benutzen, platzieren Sie sie ins Inventar eines Werferr. Um einen steckengebliebenen Pfeil aufzusammeln, gehen Sie einfach zu ihm hin.
|
||||||
Bow=Bogen
|
Bow=Bogen
|
||||||
Launches arrows=Verschießt Pfeile
|
|
||||||
Bows are ranged weapons to shoot arrows at your foes.=Bogen sind Fernwaffen, um Pfeile auf Ihre Feinde zu schießen.
|
Bows are ranged weapons to shoot arrows at your foes.=Bogen sind Fernwaffen, um Pfeile auf Ihre Feinde zu schießen.
|
||||||
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 25% of a critical hit, dealing 10 damage instead.=Die Geschwindigkeit und der Schaden des Bogens erhöht sich, je länger sie den Bogen spannen. Der reguläre Schaden des Pfeiles ist zwischen 1 und 9. Ist der Bogen voll gespannt, gibt es eine 25%-ig Change für einen kritischen Treffer, der 10 Schaden anrichtet.
|
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=Die Geschwindigkeit und der Schaden des Bogens erhöht sich, je länger sie den Bogen spannen. Der reguläre Schaden des Pfeiles ist zwischen 1 und 9. Ist der Bogen voll gespannt, gibt es eine 20%-ig Change für einen kritischen Treffer, der 10 Schaden anrichtet.
|
||||||
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Um den Bogen zu benutzen, muss sich im Inventar mindestens ein Pfeil befinden (außer im Kreativmodus). Halten sie die rechte Maustaste gedrückt zum Spannen, lassen Sie sie los zum Schießen.
|
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Um den Bogen zu benutzen, muss sich im Inventar mindestens ein Pfeil befinden (außer im Kreativmodus). Halten sie die rechte Maustaste gedrückt zum Spannen, lassen Sie sie los zum Schießen.
|
||||||
|
Bow=Bogen
|
||||||
|
Ammunition=Munition
|
||||||
|
Damage from bow: 1-10=Schaden vom Bogen: 1-10
|
||||||
|
Damage from dispenser: 3=Schaden vom Werfer: 3
|
||||||
|
Launches arrows=Verschießt Pfeile
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
# textdomain: mcl_bows
|
# textdomain: mcl_bows
|
||||||
Arrow=Flecha
|
Arrow=Flecha
|
||||||
Ammunition=Munición
|
|
||||||
Damage from bow: 1-10=Daño del arco: 1-10
|
|
||||||
Damage from dispenser: 3=Daño del dispensador: 3
|
|
||||||
Arrows are ammunition for bows and dispensers.=Las flechas son municiones para arcos y dispensadores.
|
Arrows are ammunition for bows and dispensers.=Las flechas son municiones para arcos y dispensadores.
|
||||||
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Una flecha disparada desde un arco tiene un daño regular de 1-9. A plena carga, hay un 25% de posibilidades de que un golpe crítico inflija 10 daños en su lugar. Una flecha disparada desde un dispensador siempre causa 3 de daño.
|
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Una flecha disparada desde un arco tiene un daño regular de 1-9. A plena carga, hay un 20% de posibilidades de que un golpe crítico inflija 10 daños en su lugar. Una flecha disparada desde un dispensador siempre causa 3 de daño.
|
||||||
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Las flechas pueden atascarse en bloques sólidos y pueden recuperarse nuevamente. También son capaces de presionar botones de madera.
|
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Las flechas pueden atascarse en bloques sólidos y pueden recuperarse nuevamente. También son capaces de presionar botones de madera.
|
||||||
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Para usar flechas como municiones para un arco, simplemente colóquelas en cualquier parte de su inventario, se usarán automáticamente. Para usar flechas como municiones para un dispensador, colóquelas en el inventario del dispensador. Para recuperar una flecha que se pega en un bloque, simplemente camine cerca de ella.
|
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Para usar flechas como municiones para un arco, simplemente colóquelas en cualquier parte de su inventario, se usarán automáticamente. Para usar flechas como municiones para un dispensador, colóquelas en el inventario del dispensador. Para recuperar una flecha que se pega en un bloque, simplemente camine cerca de ella.
|
||||||
Bow=Arco
|
Bow=Arco
|
||||||
Launches arrows=Dispara flechas
|
|
||||||
Bows are ranged weapons to shoot arrows at your foes.=Los arcos son armas a distancia para disparar flechas a tus enemigos.
|
Bows are ranged weapons to shoot arrows at your foes.=Los arcos son armas a distancia para disparar flechas a tus enemigos.
|
||||||
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 25% of a critical hit, dealing 10 damage instead.=La velocidad y el daño de la flecha aumentan cuanto más tiempo tenses. El daño regular de la flecha está entre 1 y 9. A plena carga, también hay un 25% de un golpe crítico, que en vez de eso causa 10 de daño.
|
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=La velocidad y el daño de la flecha aumentan cuanto más tiempo tenses. El daño regular de la flecha está entre 1 y 9. A plena carga, también hay un 20% de un golpe crítico, que en vez de eso causa 10 de daño.
|
||||||
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Para usar el arco, primero debes de tener al menos una flecha en cualquier parte de su inventario (a menos que esté en modo creativo). Mantenga presionado el botón derecho del mouse para tensar, suelte para disparar.
|
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Para usar el arco, primero debes de tener al menos una flecha en cualquier parte de su inventario (a menos que esté en modo creativo). Mantenga presionado el botón derecho del mouse para tensar, suelte para disparar.
|
||||||
|
Bow=Arco
|
|
@ -1,14 +1,15 @@
|
||||||
# textdomain: mcl_bows
|
# textdomain: mcl_bows
|
||||||
Arrow=Flèche
|
Arrow=Flèche
|
||||||
Ammunition=Munition
|
|
||||||
Damage from bow: 1-10=Dégâts de l'arc: 1-10
|
|
||||||
Damage from dispenser: 3=Dégâts du distributeur: 3
|
|
||||||
Arrows are ammunition for bows and dispensers.=Les flèches sont des munitions pour les arcs et les distributeurs.
|
Arrows are ammunition for bows and dispensers.=Les flèches sont des munitions pour les arcs et les distributeurs.
|
||||||
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Une flèche tirée d'un arc a des dégâts réguliers de 1 à 9. À pleine charge, il y a 25% de chances qu'un coup critique inflige 10 dégâts à la place. Une flèche tirée depuis un distributeur inflige toujours 3 dégâts.
|
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Une flèche tirée d'un arc a des dégâts réguliers de 1 à 9. À pleine charge, il y a 20% de chances qu'un coup critique inflige 10 dégâts à la place. Une flèche tirée depuis un distributeur inflige toujours 3 dégâts.
|
||||||
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Les flèches peuvent se coincer sur des blocs solides et peuvent être récupérées à nouveau. Ils sont également capables de pousser des boutons en bois.
|
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Les flèches peuvent se coincer sur des blocs solides et peuvent être récupérées à nouveau. Ils sont également capables de pousser des boutons en bois.
|
||||||
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Pour utiliser des flèches comme munitions pour un arc, il suffit de les placer n'importe où dans votre inventaire, elles seront utilisées automatiquement. Pour utiliser des flèches comme munitions pour un distributeur, placez-les dans l'inventaire du distributeur. Pour récupérer une flèche qui colle dans un bloc, il vous suffit de vous en approcher.
|
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Pour utiliser des flèches comme munitions pour un arc, il suffit de les placer n'importe où dans votre inventaire, elles seront utilisées automatiquement. Pour utiliser des flèches comme munitions pour un distributeur, placez-les dans l'inventaire du distributeur. Pour récupérer une flèche qui colle dans un bloc, il vous suffit de vous en approcher.
|
||||||
Bow=Arc
|
Bow=Arc
|
||||||
Launches arrows=Lance des flèches
|
|
||||||
Bows are ranged weapons to shoot arrows at your foes.=Les arcs sont des armes à distance pour tirer des flèches sur vos ennemis.
|
Bows are ranged weapons to shoot arrows at your foes.=Les arcs sont des armes à distance pour tirer des flèches sur vos ennemis.
|
||||||
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 25% of a critical hit, dealing 10 damage instead.=La vitesse et les dégâts de la flèche augmentent plus vous chargez. Les dégâts réguliers de la flèche sont compris entre 1 et 9. À pleine charge, il y a également 25% d'un coup critique, infligeant 10 dégâts à la place.
|
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=La vitesse et les dégâts de la flèche augmentent plus vous chargez. Les dégâts réguliers de la flèche sont compris entre 1 et 9. À pleine charge, il y a également 20% d'un coup critique, infligeant 10 dégâts à la place.
|
||||||
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Pour utiliser l'arc, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour tirer.
|
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Pour utiliser l'arc, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour tirer.
|
||||||
|
Bow=Arc
|
||||||
|
Ammunition=Munition
|
||||||
|
Damage from bow: 1-10=Dégâts de l'arc: 1-10
|
||||||
|
Damage from dispenser: 3=Dégâts du distributeur: 3
|
||||||
|
Launches arrows=Lance des flèches
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
# textdomain: mcl_bows
|
# textdomain: mcl_bows
|
||||||
Arrow=Стрела
|
Arrow=Стрела
|
||||||
Ammunition=Боеприпасы
|
|
||||||
Damage from bow: 1-10=Урон от лука: 1-10
|
|
||||||
Damage from dispenser: 3=Урон от диспенсера: 3
|
|
||||||
Arrows are ammunition for bows and dispensers.=Стрелы - это боеприпасы для луков и диспенсеров.
|
Arrows are ammunition for bows and dispensers.=Стрелы - это боеприпасы для луков и диспенсеров.
|
||||||
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Стрела, выпущенная из лука, обычно наносит урон 1-9. При полном натяжении есть 25-процентный шанс критического удара с уроном 10. Стрела из диспенсера всегда наносит урон уровня 3.
|
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=Стрела, выпущенная из лука, обычно наносит урон 1-9. При полном натяжении есть 20-процентный шанс критического удара с уроном 10. Стрела из диспенсера всегда наносит урон уровня 3.
|
||||||
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Стрелы могут застревать в твёрдых блоках, их можно подбирать для повторного использования. Они также способны нажимать деревянные кнопки.
|
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=Стрелы могут застревать в твёрдых блоках, их можно подбирать для повторного использования. Они также способны нажимать деревянные кнопки.
|
||||||
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Чтобы использовать стрелы в качестве боеприпасов для лука, просто положите их в любую ячейку вашего инвентаря, и они будут использоваться автоматически. Чтобы использовать стрелы в качестве боеприпасов для диспенсера, поместите их в инвентарь диспенсера. Чтобы взять стрелу, застрявшую в блоке, просто пройдите рядом с ней.
|
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=Чтобы использовать стрелы в качестве боеприпасов для лука, просто положите их в любую ячейку вашего инвентаря, и они будут использоваться автоматически. Чтобы использовать стрелы в качестве боеприпасов для диспенсера, поместите их в инвентарь диспенсера. Чтобы взять стрелу, застрявшую в блоке, просто пройдите рядом с ней.
|
||||||
Bow=Лук
|
Bow=Лук
|
||||||
Launches arrows=Пускает стрелы
|
|
||||||
Bows are ranged weapons to shoot arrows at your foes.=Лук - это оружие дальнего боя, чтобы стрелять стрелами по вашим врагам.
|
Bows are ranged weapons to shoot arrows at your foes.=Лук - это оружие дальнего боя, чтобы стрелять стрелами по вашим врагам.
|
||||||
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 25% of a critical hit, dealing 10 damage instead.=Скорость и урон стрелы увеличиваются, пока вы её натягиваете. Обычный урон стрелы находится между 1 и 9. При полном натяжении есть 25-процентный шанс критического удара с уроном 10.
|
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=Скорость и урон стрелы увеличиваются, пока вы её натягиваете. Обычный урон стрелы находится между 1 и 9. При полном натяжении есть 20-процентный шанс критического удара с уроном 10.
|
||||||
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Чтобы использовать лук, нужно иметь хотя бы одну стрелу в вашем инвентаре (за исключением творческого режима). Удерживайте правую клавишу мыши, чтобы натягивать тетиву, затем отпустите, чтобы выстрелить.
|
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Чтобы использовать лук, нужно иметь хотя бы одну стрелу в вашем инвентаре (за исключением творческого режима). Удерживайте правую клавишу мыши, чтобы натягивать тетиву, затем отпустите, чтобы выстрелить.
|
||||||
|
Bow=Лук
|
||||||
|
Ammunition=Боеприпасы
|
||||||
|
Damage from bow: 1-10=Урон от лука: 1-10
|
||||||
|
Damage from dispenser: 3=Урон от диспенсера: 3
|
||||||
|
Launches arrows=Пускает стрелы
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
# textdomain: mcl_bows
|
# textdomain: mcl_bows
|
||||||
Arrow=
|
Arrow=
|
||||||
Ammunition=
|
|
||||||
Damage from bow: 1-10=
|
|
||||||
Damage from dispenser: 3=
|
|
||||||
Arrows are ammunition for bows and dispensers.=
|
Arrows are ammunition for bows and dispensers.=
|
||||||
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 25% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=
|
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=
|
||||||
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=
|
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=
|
||||||
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=
|
To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=
|
||||||
Bow=
|
Bow=
|
||||||
Launches arrows=
|
|
||||||
Bows are ranged weapons to shoot arrows at your foes.=
|
Bows are ranged weapons to shoot arrows at your foes.=
|
||||||
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 25% of a critical hit, dealing 10 damage instead.=
|
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=
|
||||||
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=
|
To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=
|
||||||
|
Bow=
|
||||||
|
Ammunition=
|
||||||
|
Damage from bow: 1-10=
|
||||||
|
Damage from dispenser: 3=
|
||||||
|
Launches arrows=
|
||||||
|
|
|
@ -1,41 +1,6 @@
|
||||||
local S = minetest.get_translator("mcl_chests")
|
local S = minetest.get_translator("mcl_chests")
|
||||||
local mod_doc = minetest.get_modpath("doc")
|
local mod_doc = minetest.get_modpath("doc")
|
||||||
|
|
||||||
-- Christmas chest setup
|
|
||||||
local it_is_christmas = false
|
|
||||||
local date = os.date("*t")
|
|
||||||
if (
|
|
||||||
date.month == 12 and (
|
|
||||||
date.day == 24 or
|
|
||||||
date.day == 25 or
|
|
||||||
date.day == 26
|
|
||||||
)
|
|
||||||
) then
|
|
||||||
it_is_christmas = true
|
|
||||||
end
|
|
||||||
|
|
||||||
local tiles_chest_normal_small = {"mcl_chests_normal.png"}
|
|
||||||
local tiles_chest_normal_double = {"mcl_chests_normal_double.png"}
|
|
||||||
|
|
||||||
if it_is_christmas then
|
|
||||||
tiles_chest_normal_small = {"mcl_chests_normal_present.png^mcl_chests_noise.png"}
|
|
||||||
tiles_chest_normal_double = {"mcl_chests_normal_double_present.png^mcl_chests_noise_double.png"}
|
|
||||||
end
|
|
||||||
|
|
||||||
local tiles_chest_trapped_small = {"mcl_chests_trapped.png"}
|
|
||||||
local tiles_chest_trapped_double = {"mcl_chests_trapped_double.png"}
|
|
||||||
|
|
||||||
if it_is_christmas then
|
|
||||||
tiles_chest_trapped_small = {"mcl_chests_trapped_present.png^mcl_chests_noise.png"}
|
|
||||||
tiles_chest_trapped_double = {"mcl_chests_trapped_double_present.png^mcl_chests_noise_double.png"}
|
|
||||||
end
|
|
||||||
|
|
||||||
local tiles_chest_ender_small = {"mcl_chests_ender.png"}
|
|
||||||
|
|
||||||
if it_is_christmas then
|
|
||||||
tiles_chest_ender_small = {"mcl_chests_ender_present.png^mcl_chests_noise.png"}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Chest Entity
|
-- Chest Entity
|
||||||
local animate_chests = (minetest.settings:get_bool("animated_chests") ~= false)
|
local animate_chests = (minetest.settings:get_bool("animated_chests") ~= false)
|
||||||
local entity_animations = {
|
local entity_animations = {
|
||||||
|
@ -187,10 +152,7 @@ if minetest.get_modpath("screwdriver") then
|
||||||
local nodename = node.name
|
local nodename = node.name
|
||||||
local nodedef = minetest.registered_nodes[nodename]
|
local nodedef = minetest.registered_nodes[nodename]
|
||||||
local dir = minetest.facedir_to_dir(new_param2)
|
local dir = minetest.facedir_to_dir(new_param2)
|
||||||
|
|
||||||
if animate_chests then
|
|
||||||
find_or_create_entity(pos, nodename, nodedef._chest_entity_textures, new_param2, false, nodedef._chest_entity_sound, nodedef._chest_entity_mesh, nodedef._chest_entity_animation_type, dir):set_yaw(dir)
|
find_or_create_entity(pos, nodename, nodedef._chest_entity_textures, new_param2, false, nodedef._chest_entity_sound, nodedef._chest_entity_mesh, nodedef._chest_entity_animation_type, dir):set_yaw(dir)
|
||||||
end
|
|
||||||
else
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -219,10 +181,6 @@ local player_chest_open = function(player, pos, node_name, textures, param2, dou
|
||||||
local dir = minetest.facedir_to_dir(param2)
|
local dir = minetest.facedir_to_dir(param2)
|
||||||
local blocked = not shulker and (back_is_blocked(pos, dir) or double and back_is_blocked(mcl_util.get_double_container_neighbor_pos(pos, param2, node_name:sub(-4)), dir))
|
local blocked = not shulker and (back_is_blocked(pos, dir) or double and back_is_blocked(mcl_util.get_double_container_neighbor_pos(pos, param2, node_name:sub(-4)), dir))
|
||||||
find_or_create_entity(pos, node_name, textures, param2, double, sound, mesh, shulker and "shulker" or "chest", dir):open(name, blocked)
|
find_or_create_entity(pos, node_name, textures, param2, double, sound, mesh, shulker and "shulker" or "chest", dir):open(name, blocked)
|
||||||
else
|
|
||||||
minetest.sound_play(sound .. "_open", {
|
|
||||||
pos = pos,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -254,14 +212,11 @@ local chest_update_after_close = function(pos)
|
||||||
|
|
||||||
if node.name == "mcl_chests:trapped_chest_on_small" then
|
if node.name == "mcl_chests:trapped_chest_on_small" then
|
||||||
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_small", param2 = node.param2})
|
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_small", param2 = node.param2})
|
||||||
|
find_or_create_entity(pos, "mcl_chests:trapped_chest_small", {"mcl_chests_trapped.png"}, node.param2, false, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_small")
|
||||||
if animate_chests then
|
|
||||||
find_or_create_entity(pos, "mcl_chests:trapped_chest_small", tiles_chest_trapped_small, node.param2, false, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_small")
|
|
||||||
end
|
|
||||||
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
||||||
elseif node.name == "mcl_chests:trapped_chest_on_left" then
|
elseif node.name == "mcl_chests:trapped_chest_on_left" then
|
||||||
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
||||||
find_or_create_entity(pos, "mcl_chests:trapped_chest_left", tiles_chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
find_or_create_entity(pos, "mcl_chests:trapped_chest_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
||||||
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
||||||
|
|
||||||
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
|
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
|
||||||
|
@ -273,7 +228,7 @@ local chest_update_after_close = function(pos)
|
||||||
|
|
||||||
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
|
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
|
||||||
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
||||||
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_left", tiles_chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
||||||
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
|
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -287,10 +242,6 @@ local player_chest_close = function(player)
|
||||||
end
|
end
|
||||||
if animate_chests then
|
if animate_chests then
|
||||||
find_or_create_entity(open_chest.pos, open_chest.node_name, open_chest.textures, open_chest.param2, open_chest.double, open_chest.sound, open_chest.mesh, open_chest.shulker and "shulker" or "chest"):close(name)
|
find_or_create_entity(open_chest.pos, open_chest.node_name, open_chest.textures, open_chest.param2, open_chest.double, open_chest.sound, open_chest.mesh, open_chest.shulker and "shulker" or "chest"):close(name)
|
||||||
else
|
|
||||||
minetest.sound_play(open_chest.sound .. "_close", {
|
|
||||||
pos = open_chest.pos,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
chest_update_after_close(open_chest.pos)
|
chest_update_after_close(open_chest.pos)
|
||||||
|
|
||||||
|
@ -429,21 +380,12 @@ minetest.register_node(small_name, {
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
_doc_items_usagehelp = usagehelp,
|
_doc_items_usagehelp = usagehelp,
|
||||||
_doc_items_hidden = hidden,
|
_doc_items_hidden = hidden,
|
||||||
drawtype = animate_chests and "nodebox" or "mesh",
|
drawtype = "nodebox",
|
||||||
mesh = not animate_chests and "mcl_chests_chest.obj" or nil,
|
node_box = {
|
||||||
node_box = animate_chests and {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
|
||||||
} or nil,
|
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
||||||
},
|
},
|
||||||
selection_box = {
|
tiles = {"mcl_chests_blank.png"},
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
|
||||||
},
|
|
||||||
tiles = animate_chests and {"mcl_chests_blank.png"} or small_textures,
|
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||||
_chest_entity_textures = small_textures,
|
_chest_entity_textures = small_textures,
|
||||||
_chest_entity_sound = "default_chest",
|
_chest_entity_sound = "default_chest",
|
||||||
|
@ -493,11 +435,8 @@ minetest.register_node(small_name, {
|
||||||
minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_right", param2 = param2 })
|
minetest.swap_node(p, { name = "mcl_chests:"..canonical_basename.."_right", param2 = param2 })
|
||||||
else
|
else
|
||||||
minetest.swap_node(pos, { name = "mcl_chests:"..canonical_basename.."_small", param2 = param2 })
|
minetest.swap_node(pos, { name = "mcl_chests:"..canonical_basename.."_small", param2 = param2 })
|
||||||
|
|
||||||
if animate_chests then
|
|
||||||
create_entity(pos, small_name, small_textures, param2, false, "default_chest", "mcl_chests_chest", "chest")
|
create_entity(pos, small_name, small_textures, param2, false, "default_chest", "mcl_chests_chest", "chest")
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
minetest.get_meta(pos):set_string("name", itemstack:get_meta():get_string("name"))
|
minetest.get_meta(pos):set_string("name", itemstack:get_meta():get_string("name"))
|
||||||
|
@ -884,8 +823,8 @@ register_chest("chest",
|
||||||
chestusage,
|
chestusage,
|
||||||
S("27 inventory slots") .. "\n" .. S("Can be combined to a large chest"),
|
S("27 inventory slots") .. "\n" .. S("Can be combined to a large chest"),
|
||||||
{
|
{
|
||||||
small = tiles_chest_normal_small,
|
small = {"mcl_chests_normal.png"},
|
||||||
double = tiles_chest_normal_double,
|
double = {"mcl_chests_normal_double.png"},
|
||||||
inv = {"default_chest_top.png", "mcl_chests_chest_bottom.png",
|
inv = {"default_chest_top.png", "mcl_chests_chest_bottom.png",
|
||||||
"mcl_chests_chest_right.png", "mcl_chests_chest_left.png",
|
"mcl_chests_chest_right.png", "mcl_chests_chest_left.png",
|
||||||
"mcl_chests_chest_back.png", "default_chest_front.png"},
|
"mcl_chests_chest_back.png", "default_chest_front.png"},
|
||||||
|
@ -900,8 +839,8 @@ register_chest("chest",
|
||||||
)
|
)
|
||||||
|
|
||||||
local traptiles = {
|
local traptiles = {
|
||||||
small = tiles_chest_trapped_small,
|
small = {"mcl_chests_trapped.png"},
|
||||||
double = tiles_chest_trapped_double,
|
double = {"mcl_chests_trapped_double.png"},
|
||||||
inv = {"mcl_chests_chest_trapped_top.png", "mcl_chests_chest_trapped_bottom.png",
|
inv = {"mcl_chests_chest_trapped_top.png", "mcl_chests_chest_trapped_bottom.png",
|
||||||
"mcl_chests_chest_trapped_right.png", "mcl_chests_chest_trapped_left.png",
|
"mcl_chests_chest_trapped_right.png", "mcl_chests_chest_trapped_left.png",
|
||||||
"mcl_chests_chest_trapped_back.png", "mcl_chests_chest_trapped_front.png"},
|
"mcl_chests_chest_trapped_back.png", "mcl_chests_chest_trapped_front.png"},
|
||||||
|
@ -926,9 +865,7 @@ register_chest("trapped_chest",
|
||||||
}},
|
}},
|
||||||
function(pos, node, clicker)
|
function(pos, node, clicker)
|
||||||
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_on_small", param2 = node.param2})
|
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_on_small", param2 = node.param2})
|
||||||
if animate_chests then
|
find_or_create_entity(pos, "mcl_chests:trapped_chest_on_small", {"mcl_chests_trapped.png"}, node.param2, false, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_small")
|
||||||
find_or_create_entity(pos, "mcl_chests:trapped_chest_on_small", tiles_chest_trapped_small, node.param2, false, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_small")
|
|
||||||
end
|
|
||||||
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
|
||||||
end,
|
end,
|
||||||
function(pos, node, clicker)
|
function(pos, node, clicker)
|
||||||
|
@ -936,7 +873,7 @@ register_chest("trapped_chest",
|
||||||
meta:set_int("players", 1)
|
meta:set_int("players", 1)
|
||||||
|
|
||||||
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_on_left", param2 = node.param2})
|
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_on_left", param2 = node.param2})
|
||||||
find_or_create_entity(pos, "mcl_chests:trapped_chest_on_left", tiles_chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left")
|
find_or_create_entity(pos, "mcl_chests:trapped_chest_on_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left")
|
||||||
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
|
||||||
|
|
||||||
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
|
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
|
||||||
|
@ -950,7 +887,7 @@ register_chest("trapped_chest",
|
||||||
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_on(pos, trapped_chest_mesecons_rules)
|
||||||
|
|
||||||
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_on_left", param2 = node.param2})
|
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_on_left", param2 = node.param2})
|
||||||
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_on_left", tiles_chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left")
|
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_on_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_on_left")
|
||||||
mesecon.receptor_on(pos_other, trapped_chest_mesecons_rules)
|
mesecon.receptor_on(pos_other, trapped_chest_mesecons_rules)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
@ -971,15 +908,13 @@ local function close_if_trapped_chest(pos, player)
|
||||||
|
|
||||||
if node.name == "mcl_chests:trapped_chest_on_small" then
|
if node.name == "mcl_chests:trapped_chest_on_small" then
|
||||||
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_small", param2 = node.param2})
|
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_small", param2 = node.param2})
|
||||||
if animate_chests then
|
find_or_create_entity(pos, "mcl_chests:trapped_chest_small", {"mcl_chests_trapped.png"}, node.param2, false, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_small")
|
||||||
find_or_create_entity(pos, "mcl_chests:trapped_chest_small", tiles_chest_trapped_small, node.param2, false, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_small")
|
|
||||||
end
|
|
||||||
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
||||||
|
|
||||||
player_chest_close(player)
|
player_chest_close(player)
|
||||||
elseif node.name == "mcl_chests:trapped_chest_on_left" then
|
elseif node.name == "mcl_chests:trapped_chest_on_left" then
|
||||||
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
minetest.swap_node(pos, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
||||||
find_or_create_entity(pos, "mcl_chests:trapped_chest_left", tiles_chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
find_or_create_entity(pos, "mcl_chests:trapped_chest_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
||||||
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
mesecon.receptor_off(pos, trapped_chest_mesecons_rules)
|
||||||
|
|
||||||
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
|
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "left")
|
||||||
|
@ -993,7 +928,7 @@ local function close_if_trapped_chest(pos, player)
|
||||||
|
|
||||||
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
|
local pos_other = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
|
||||||
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
minetest.swap_node(pos_other, {name="mcl_chests:trapped_chest_left", param2 = node.param2})
|
||||||
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_left", tiles_chest_trapped_double, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
find_or_create_entity(pos_other, "mcl_chests:trapped_chest_left", {"mcl_chests_trapped_double.png"}, node.param2, true, "default_chest", "mcl_chests_chest", "chest"):reinitialize("mcl_chests:trapped_chest_left")
|
||||||
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
|
mesecon.receptor_off(pos_other, trapped_chest_mesecons_rules)
|
||||||
|
|
||||||
player_chest_close(player)
|
player_chest_close(player)
|
||||||
|
@ -1041,7 +976,7 @@ minetest.register_node("mcl_chests:ender_chest", {
|
||||||
_doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."),
|
_doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."),
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "mcl_chests_chest.obj",
|
mesh = "mcl_chests_chest.obj",
|
||||||
tiles = tiles_chest_ender_small,
|
tiles = {"mcl_chests_ender.png"},
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
@ -1067,38 +1002,22 @@ local formspec_ender_chest = "size[9,8.75]"..
|
||||||
"listring[current_player;enderchest]"..
|
"listring[current_player;enderchest]"..
|
||||||
"listring[current_player;main]"
|
"listring[current_player;main]"
|
||||||
|
|
||||||
minetest.register_chatcommand("enderchest", {
|
|
||||||
description = S("Show ender chest inventory formspec."),
|
|
||||||
privs = { debug = true },
|
|
||||||
func = function(name, params)
|
|
||||||
minetest.show_formspec(name, "enderchest:enderchest", formspec_ender_chest)
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mcl_chests:ender_chest_small", {
|
minetest.register_node("mcl_chests:ender_chest_small", {
|
||||||
description = S("Ender Chest"),
|
description = S("Ender Chest"),
|
||||||
_tt_help = S("27 interdimensional inventory slots") .. "\n" .. S("Put items inside, retrieve them from any ender chest"),
|
_tt_help = S("27 interdimensional inventory slots") .. "\n" .. S("Put items inside, retrieve them from any ender chest"),
|
||||||
_doc_items_longdesc = S("Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players."),
|
_doc_items_longdesc = S("Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players."),
|
||||||
_doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."),
|
_doc_items_usagehelp = S("Rightclick the ender chest to access your personal interdimensional inventory."),
|
||||||
drawtype = animate_chests and "nodebox" or "mesh",
|
drawtype = "nodebox",
|
||||||
mesh = not animate_chests and "mcl_chests_chest.obj" or nil,
|
node_box = {
|
||||||
node_box = animate_chests and {
|
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
fixed = {-0.4375, -0.5, -0.4375, 0.5, 0.375, 0.4375},
|
||||||
} or nil,
|
|
||||||
collision_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
|
||||||
},
|
},
|
||||||
selection_box = {
|
_chest_entity_textures = {"mcl_chests_ender.png"},
|
||||||
type = "fixed",
|
|
||||||
fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375},
|
|
||||||
},
|
|
||||||
tiles = animate_chests and {"mcl_chests_blank.png"} or tiles_chest_ender_small,
|
|
||||||
_chest_entity_textures = tiles_chest_ender_small,
|
|
||||||
_chest_entity_sound = "mcl_chests_enderchest",
|
_chest_entity_sound = "mcl_chests_enderchest",
|
||||||
_chest_entity_mesh = "mcl_chests_chest",
|
_chest_entity_mesh = "mcl_chests_chest",
|
||||||
_chest_entity_animation_type = "chest",
|
_chest_entity_animation_type = "chest",
|
||||||
|
tiles = {"mcl_chests_blank.png"},
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||||
--[[{"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png",
|
--[[{"mcl_chests_ender_chest_top.png", "mcl_chests_ender_chest_bottom.png",
|
||||||
"mcl_chests_ender_chest_right.png", "mcl_chests_ender_chest_left.png",
|
"mcl_chests_ender_chest_right.png", "mcl_chests_ender_chest_left.png",
|
||||||
|
@ -1115,13 +1034,10 @@ minetest.register_node("mcl_chests:ender_chest_small", {
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("formspec", formspec_ender_chest)
|
meta:set_string("formspec", formspec_ender_chest)
|
||||||
|
create_entity(pos, "mcl_chests:ender_chest_small", {"mcl_chests_ender.png"}, minetest.get_node(pos).param2, false, "mcl_chests_enderchest", "mcl_chests_chest", "chest")
|
||||||
if animate_chests then
|
|
||||||
create_entity(pos, "mcl_chests:ender_chest_small", tiles_chest_ender_small, minetest.get_node(pos).param2, false, "mcl_chests_enderchest", "mcl_chests_chest", "chest")
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
player_chest_open(clicker, pos, "mcl_chests:ender_chest_small", tiles_chest_ender_small, node.param2, false, "mcl_chests_enderchest", "mcl_chests_chest")
|
player_chest_open(clicker, pos, "mcl_chests:ender_chest_small", {"mcl_chests_ender.png"}, node.param2, false, "mcl_chests_enderchest", "mcl_chests_chest")
|
||||||
end,
|
end,
|
||||||
on_receive_fields = function(pos, formname, fields, sender)
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
if fields.quit then
|
if fields.quit then
|
||||||
|
@ -1139,20 +1055,6 @@ minetest.register_on_joinplayer(function(player)
|
||||||
inv:set_size("enderchest", 9*3)
|
inv:set_size("enderchest", 9*3)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_allow_player_inventory_action(function(player, action, inv, info)
|
|
||||||
if inv:get_location().type == "player" and (
|
|
||||||
action == "move" and (info.from_list == "enderchest" or info.to_list == "enderchest")
|
|
||||||
or action == "put" and info.listname == "enderchest"
|
|
||||||
or action == "take" and info.listname == "enderchest"
|
|
||||||
) then
|
|
||||||
local def = player:get_wielded_item():get_definition()
|
|
||||||
|
|
||||||
if not minetest.find_node_near(player:get_pos(), def and def.range or ItemStack():get_definition().range, "mcl_chests:ender_chest_small", true) then
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'mcl_chests:ender_chest',
|
output = 'mcl_chests:ender_chest',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -1313,9 +1215,8 @@ for color, desc in pairs(boxtypes) do
|
||||||
_doc_items_entry_name = entry_name,
|
_doc_items_entry_name = entry_name,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
_doc_items_usagehelp = usagehelp,
|
_doc_items_usagehelp = usagehelp,
|
||||||
drawtype = animate_chests and "nodebox" or "mesh",
|
drawtype = "nodebox",
|
||||||
mesh = not animate_chests and "mcl_chests_shulker.obj" or nil,
|
tiles = {"mcl_chests_blank.png"},
|
||||||
tiles = animate_chests and {"mcl_chests_blank.png"} or {mob_texture},
|
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||||
_chest_entity_textures = {mob_texture},
|
_chest_entity_textures = {mob_texture},
|
||||||
_chest_entity_sound = "mcl_chests_shulker",
|
_chest_entity_sound = "mcl_chests_shulker",
|
||||||
|
@ -1336,10 +1237,7 @@ for color, desc in pairs(boxtypes) do
|
||||||
meta:set_string("formspec", formspec_shulker_box(nil))
|
meta:set_string("formspec", formspec_shulker_box(nil))
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_size("main", 9*3)
|
inv:set_size("main", 9*3)
|
||||||
|
|
||||||
if animate_chests then
|
|
||||||
create_entity(pos, small_name, {mob_texture}, minetest.get_node(pos).param2, false, "mcl_chests_shulker", "mcl_chests_shulker", "shulker")
|
create_entity(pos, small_name, {mob_texture}, minetest.get_node(pos).param2, false, "mcl_chests_shulker", "mcl_chests_shulker", "shulker")
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||||
local nmeta = minetest.get_meta(pos)
|
local nmeta = minetest.get_meta(pos)
|
||||||
|
@ -1458,11 +1356,6 @@ local function select_and_spawn_entity(pos, node)
|
||||||
local node_name = node.name
|
local node_name = node.name
|
||||||
local node_def = minetest.registered_nodes[node_name]
|
local node_def = minetest.registered_nodes[node_name]
|
||||||
local double_chest = minetest.get_item_group(node_name, "double_chest") > 0
|
local double_chest = minetest.get_item_group(node_name, "double_chest") > 0
|
||||||
|
|
||||||
if not animate_chests and not double_chest then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
find_or_create_entity(pos, node_name, node_def._chest_entity_textures, node.param2, double_chest, node_def._chest_entity_sound, node_def._chest_entity_mesh, node_def._chest_entity_animation_type)
|
find_or_create_entity(pos, node_name, node_def._chest_entity_textures, node.param2, double_chest, node_def._chest_entity_sound, node_def._chest_entity_mesh, node_def._chest_entity_animation_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1508,22 +1401,6 @@ minetest.register_lbm({
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- The following LBM allows the Ender chests from MineClone2 post-0.71
|
|
||||||
-- (after commit 819dbc6224c3b96ad4094cccf3d9150f3ef61d45) to work in
|
|
||||||
-- Mineclonia. It also ensures that any Ender chest formspec changes
|
|
||||||
-- (even a removal of the formspec) get applied in future versions.
|
|
||||||
minetest.register_lbm({
|
|
||||||
label = "Update ender chest formspecs (MineClone2 compatibility)",
|
|
||||||
name = "mcl_chests:update_ender_chest_formspecs_" ..
|
|
||||||
minetest.sha1(formspec_ender_chest),
|
|
||||||
nodenames = { "mcl_chests:ender_chest_small" },
|
|
||||||
run_at_every_load = false,
|
|
||||||
action = function(pos, node)
|
|
||||||
local meta = minetest.get_meta(pos)
|
|
||||||
meta:set_string("formspec", formspec_ender_chest)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "Update shulker box formspecs (0.60.0)",
|
label = "Update shulker box formspecs (0.60.0)",
|
||||||
name = "mcl_chests:update_shulker_box_formspecs_0_60_0",
|
name = "mcl_chests:update_shulker_box_formspecs_0_60_0",
|
||||||
|
|
Before Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 286 B |
|
@ -4,30 +4,47 @@
|
||||||
-- Crafting definition
|
-- Crafting definition
|
||||||
--
|
--
|
||||||
|
|
||||||
local function craft_planks(output, input)
|
minetest.register_craft({
|
||||||
minetest.register_craft({
|
output = 'mcl_core:wood 4',
|
||||||
output = "mcl_core:"..output.."wood 4",
|
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mcl_core:"..input},
|
{'mcl_core:tree'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
|
||||||
local planks = {
|
minetest.register_craft({
|
||||||
{"", "oak"},
|
output = 'mcl_core:darkwood 4',
|
||||||
{"dark", "dark_oak"},
|
recipe = {
|
||||||
{"jungle", "jungle"},
|
{'mcl_core:darktree'},
|
||||||
{"acacia", "acacia"},
|
}
|
||||||
{"spruce", "spruce"},
|
})
|
||||||
{"birch", "birch"}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, p in pairs(planks) do
|
minetest.register_craft({
|
||||||
craft_planks(p[1], p[1].."tree")
|
output = 'mcl_core:junglewood 4',
|
||||||
craft_planks(p[1], p[1].."tree_bark")
|
recipe = {
|
||||||
craft_planks(p[1], "stripped_"..p[2])
|
{'mcl_core:jungletree'},
|
||||||
craft_planks(p[1], "stripped_"..p[2].."_bark")
|
}
|
||||||
end
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'mcl_core:acaciawood 4',
|
||||||
|
recipe = {
|
||||||
|
{'mcl_core:acaciatree'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'mcl_core:sprucewood 4',
|
||||||
|
recipe = {
|
||||||
|
{'mcl_core:sprucetree'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'mcl_core:birchwood 4',
|
||||||
|
recipe = {
|
||||||
|
{'mcl_core:birchtree'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = 'shapeless',
|
type = 'shapeless',
|
||||||
|
@ -382,14 +399,8 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
-- TODO: Add crafting recipe: 9 ice → 1 packed ice
|
||||||
output = 'mcl_core:packed_ice 1',
|
-- Add it when silk touch tools work.
|
||||||
recipe = {
|
|
||||||
{'mcl_core:ice', 'mcl_core:ice', 'mcl_core:ice'},
|
|
||||||
{'mcl_core:ice', 'mcl_core:ice', 'mcl_core:ice'},
|
|
||||||
{'mcl_core:ice', 'mcl_core:ice', 'mcl_core:ice'},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Crafting (tool repair)
|
-- Crafting (tool repair)
|
||||||
|
|
|
@ -165,7 +165,7 @@ local function eat_gapple(itemstack, placer, pointed_thing)
|
||||||
mcl_potions.fire_resistance_func(placer, 1, 300)
|
mcl_potions.fire_resistance_func(placer, 1, 300)
|
||||||
mcl_potions.leaping_func(placer, 1, 300)
|
mcl_potions.leaping_func(placer, 1, 300)
|
||||||
end
|
end
|
||||||
-- TODO: Absorbtion
|
mcl_potions.swiftness_func(placer, absorbtion_factor, 120) -- TODO: Absorbtion
|
||||||
mcl_potions.regeneration_func(placer, 2, regen_duration)
|
mcl_potions.regeneration_func(placer, 2, regen_duration)
|
||||||
return gapple_hunger_restore(itemstack, placer, pointed_thing)
|
return gapple_hunger_restore(itemstack, placer, pointed_thing)
|
||||||
end
|
end
|
||||||
|
|
|
@ -202,42 +202,18 @@ Stained glass is a decorative and mostly transparent block which comes in variou
|
||||||
Stick=Stock
|
Stick=Stock
|
||||||
Sticks are a very versatile crafting material; used in countless crafting recipes.=Stöcke sind ein vielseitiges Material, sie werden in zahllosen Fertigungsrezepten gebraucht.
|
Sticks are a very versatile crafting material; used in countless crafting recipes.=Stöcke sind ein vielseitiges Material, sie werden in zahllosen Fertigungsrezepten gebraucht.
|
||||||
Stone=Stein
|
Stone=Stein
|
||||||
Stripped Acacia Log=Entrindeter Akazienstamm
|
|
||||||
Stripped Acacia Wood=Entrindetes Akazienholz
|
|
||||||
Stripped Birch Log=Entrindeter Birkenstamm
|
|
||||||
Stripped Birch Wood=Entrindetes Birkenholz
|
|
||||||
Stripped Dark Oak Log=Entrindeter Schwarzeichenstamm
|
|
||||||
Stripped Dark Oak Wood=Entrindetes Schwarzeichenholz
|
|
||||||
Stripped Jungle Log=Entrindeter Dschungelbaumstamm
|
|
||||||
Stripped Jungle Wood=Entrindetes Dschungelholz
|
|
||||||
Stripped Oak Log=Entrindeter Eichenstamm
|
|
||||||
Stripped Oak Wood=Entrindetes Eichenholz
|
|
||||||
Stripped Spruce Log=Entrindeter Fichtenstamm
|
|
||||||
Stripped Spruce Wood=Entrindetes Fichtenholz
|
|
||||||
Stone Bricks=Steinziegel
|
Stone Bricks=Steinziegel
|
||||||
Sugar=Zucker
|
Sugar=Zucker
|
||||||
Sugar Canes=Zuckerrohr
|
Sugar Canes=Zuckerrohr
|
||||||
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=Zuckerrohr ist eine Pflanze, die in der Herstellung gebraucht wird. Zuckerrohr wird in der Nähe von Wasser bis zu 3 zusätzliche Blöcke wachsen lassen, wenn sie sich neben Wasser befinden und auf einem Grasblock, auf Erde, Sand, roten Sand, Podsol oder grobe Erde platziert wurden. Wird ein Zuckerrohr abgebrochen, werden alle verbundenen Zuckerrohrblöcke ebenfalls abbrechen.
|
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=Zuckerrohr ist eine Pflanze, die in der Herstellung gebraucht wird. Zuckerrohr wird in der Nähe von Wasser bis zu 3 zusätzliche Blöcke wachsen lassen, wenn sie sich neben Wasser befinden und auf einem Grasblock, auf Erde, Sand, roten Sand, Podsol oder grobe Erde platziert wurden. Wird ein Zuckerrohr abgebrochen, werden alle verbundenen Zuckerrohrblöcke ebenfalls abbrechen.
|
||||||
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=Zuckerrohr kann nur auf Zuckerrohr platziert werden und auf Blöcken, auf denen Zuckerrohr wachsen würde.
|
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=Zuckerrohr kann nur auf Zuckerrohr platziert werden und auf Blöcken, auf denen Zuckerrohr wachsen würde.
|
||||||
Sugar comes from sugar canes and is used to make sweet foods.=Zucker kommt von Zuckerrohr und wird benutzt, um süße Lebensmittel zu machen.
|
Sugar comes from sugar canes and is used to make sweet foods.=Zucker kommt von Zuckerrohr und wird benutzt, um süße Lebensmittel zu machen.
|
||||||
The stripped trunk of an acacia tree.=Der entrindete Stamm einer Akazie.
|
|
||||||
The stripped trunk of a birch tree.=Der entrindete Stamm einer Birke.
|
|
||||||
The stripped trunk of a dark oak tree.=Der entrindete Stamm einer Schwarzeiche.
|
|
||||||
The stripped trunk of a jungle tree.=Der entrindete Stamm eines Dschungelbaums.
|
|
||||||
The stripped trunk of an oak tree.=Der entrindete Stamm einer Eiche.
|
|
||||||
The stripped trunk of a spruce tree.=Der entrindete Stamm einer Fichte.
|
|
||||||
The trunk of a birch tree.=Der Baumstamm einer Birke.
|
The trunk of a birch tree.=Der Baumstamm einer Birke.
|
||||||
The trunk of a dark oak tree.=Der Baumstamm einer Schwarzeiche.
|
The trunk of a dark oak tree.=Der Baumstamm einer Schwarzeiche.
|
||||||
The trunk of a jungle tree.=Der Baumstamm eines Dschungelbaums.
|
The trunk of a jungle tree.=Der Baumstamm eines Dschungelbaums.
|
||||||
The trunk of a spruce tree.=Der Baumstamm einer Fichte.
|
The trunk of a spruce tree.=Der Baumstamm einer Fichte.
|
||||||
The trunk of an acacia.=Der Baumstamm einer Akazie.
|
The trunk of an acacia.=Der Baumstamm einer Akazie.
|
||||||
The trunk of an oak tree.=Der Baumstamm einer Eiche.
|
The trunk of an oak tree.=Der Baumstamm einer Eiche.
|
||||||
The stripped wood of an acacia tree.=Das entrindete Holz einer Akazie.
|
|
||||||
The stripped wood of a birch tree.=Das entrindete Holz einer Birke.
|
|
||||||
The stripped wood of a dark oak tree.=Das entrindete Holz einer Schwarzeiche.
|
|
||||||
The stripped wood of a jungle tree.=Das entrindete Holz eines Dschungelbaums.
|
|
||||||
The stripped wood of an oak tree.=Das entrindete Holz einer Eiche.
|
|
||||||
The stripped wood of a spruce tree.=Das entrindete Holz einer Fichte.
|
|
||||||
This block consists of a couple of loose stones and can't support itself.=Diser Block besteht aus ein paar losen Steinchen und kann sich nicht selbst tragen.
|
This block consists of a couple of loose stones and can't support itself.=Diser Block besteht aus ein paar losen Steinchen und kann sich nicht selbst tragen.
|
||||||
This is a decorative block surrounded by the bark of a tree trunk.=Dies ist ein dekorativer Block, der von der Rinde eines Baumstamms umgeben ist.
|
This is a decorative block surrounded by the bark of a tree trunk.=Dies ist ein dekorativer Block, der von der Rinde eines Baumstamms umgeben ist.
|
||||||
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=Ein ganzer Block aus Schnee. Schnee von dieser Dicke wird üblicherweise in Gebieten extremer Kälte gefunden.
|
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=Ein ganzer Block aus Schnee. Schnee von dieser Dicke wird üblicherweise in Gebieten extremer Kälte gefunden.
|
||||||
|
|
|
@ -202,42 +202,18 @@ Stained glass is a decorative and mostly transparent block which comes in variou
|
||||||
Stick=
|
Stick=
|
||||||
Sticks are a very versatile crafting material; used in countless crafting recipes.=
|
Sticks are a very versatile crafting material; used in countless crafting recipes.=
|
||||||
Stone=
|
Stone=
|
||||||
Stripped Acacia Log=
|
|
||||||
Stripped Acacia Wood=
|
|
||||||
Stripped Birch Log=
|
|
||||||
Stripped Birch Wood=
|
|
||||||
Stripped Dark Oak Log=
|
|
||||||
Stripped Dark Oak Wood=
|
|
||||||
Stripped Jungle Log=
|
|
||||||
Stripped Jungle Wood=
|
|
||||||
Stripped Oak Log=
|
|
||||||
Stripped Oak Wood=
|
|
||||||
Stripped Spruce Log=
|
|
||||||
Stripped Spruce Wood=
|
|
||||||
Stone Bricks=
|
Stone Bricks=
|
||||||
Sugar=
|
Sugar=
|
||||||
Sugar Canes=
|
Sugar Canes=
|
||||||
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=
|
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=
|
||||||
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=
|
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=
|
||||||
Sugar comes from sugar canes and is used to make sweet foods.=
|
Sugar comes from sugar canes and is used to make sweet foods.=
|
||||||
The stripped trunk of an acacia tree.=
|
|
||||||
The stripped trunk of a birch tree.=
|
|
||||||
The stripped trunk of a dark oak tree.=
|
|
||||||
The stripped trunk of a jungle tree.=
|
|
||||||
The stripped trunk of an oak tree.=
|
|
||||||
The stripped trunk of a spruce tree.=
|
|
||||||
The trunk of a birch tree.=
|
The trunk of a birch tree.=
|
||||||
The trunk of a dark oak tree.=
|
The trunk of a dark oak tree.=
|
||||||
The trunk of a jungle tree.=
|
The trunk of a jungle tree.=
|
||||||
The trunk of a spruce tree.=
|
The trunk of a spruce tree.=
|
||||||
The trunk of an acacia.=
|
The trunk of an acacia.=
|
||||||
The trunk of an oak tree.=
|
The trunk of an oak tree.=
|
||||||
The stripped wood of an acacia tree.=
|
|
||||||
The stripped wood of a birch tree.=
|
|
||||||
The stripped wood of a dark oak tree.=
|
|
||||||
The stripped wood of a jungle tree.=
|
|
||||||
The stripped wood of an oak tree.=
|
|
||||||
The stripped wood of a spruce tree.=
|
|
||||||
This block consists of a couple of loose stones and can't support itself.=
|
This block consists of a couple of loose stones and can't support itself.=
|
||||||
This is a decorative block surrounded by the bark of a tree trunk.=
|
This is a decorative block surrounded by the bark of a tree trunk.=
|
||||||
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=
|
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_core
|
name = mcl_core
|
||||||
description = Core items of MineClone 2: Basic biome blocks (dirt, sand, stones, etc.), derived items, glass, sugar cane, cactus, barrier, mining tools, hand, craftitems, and misc. items which don't really fit anywhere else.
|
description = Core items of MineClone 2: Basic biome blocks (dirt, sand, stones, etc.), derived items, glass, sugar cane, cactus, barrier, mining tools, hand, craftitems, and misc. items which don't really fit anywhere else.
|
||||||
depends = mcl_autogroup, mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting
|
depends = mcl_init, mcl_sounds, mcl_particles, mcl_util, mcl_worlds, doc_items, mcl_enchanting, mcl_autogroup
|
||||||
optional_depends = doc
|
optional_depends = doc
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ for i=1,8 do
|
||||||
drop = "mcl_throwing:snowball "..(i+1),
|
drop = "mcl_throwing:snowball "..(i+1),
|
||||||
_mcl_blast_resistance = 0.1,
|
_mcl_blast_resistance = 0.1,
|
||||||
_mcl_hardness = 0.1,
|
_mcl_hardness = 0.1,
|
||||||
_mcl_silk_touch_drop = {"mcl_core:snow " .. i},
|
_mcl_silk_touch_drop = {"mcl_core:snow " .. (i+1)},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ if mod_screwdriver then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Register tree trunk (wood) and bark
|
-- Register tree trunk (wood) and bark
|
||||||
local function register_tree_trunk(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark, stripped_variant)
|
local register_tree_trunk = function(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark)
|
||||||
minetest.register_node("mcl_core:"..subname, {
|
minetest.register_node("mcl_core:"..subname, {
|
||||||
description = description_trunk,
|
description = description_trunk,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
|
@ -17,12 +17,11 @@ local function register_tree_trunk(subname, description_trunk, description_bark,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy=1, axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
on_rotate = on_rotate,
|
on_rotate = on_rotate,
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
_mcl_stripped_variant = stripped_variant,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_core:"..subname.."_bark", {
|
minetest.register_node("mcl_core:"..subname.."_bark", {
|
||||||
|
@ -32,49 +31,7 @@ local function register_tree_trunk(subname, description_trunk, description_bark,
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
on_place = mcl_util.rotate_axis,
|
on_place = mcl_util.rotate_axis,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy=1, axey=1, bark=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
groups = {handy=1,axey=1, bark=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
|
||||||
is_ground_content = false,
|
|
||||||
on_rotate = on_rotate,
|
|
||||||
_mcl_blast_resistance = 2,
|
|
||||||
_mcl_hardness = 2,
|
|
||||||
_mcl_stripped_variant = stripped_variant.."_bark",
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mcl_core:"..subname.."_bark 3",
|
|
||||||
recipe = {
|
|
||||||
{ "mcl_core:"..subname, "mcl_core:"..subname },
|
|
||||||
{ "mcl_core:"..subname, "mcl_core:"..subname },
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Register stripped trunk and stripped wood
|
|
||||||
local function register_stripped_trunk(subname, description_stripped_trunk, description_stripped_bark, longdesc, longdesc_wood, tile_stripped_inner, tile_stripped_bark)
|
|
||||||
minetest.register_node("mcl_core:"..subname, {
|
|
||||||
description = description_stripped_trunk,
|
|
||||||
_doc_items_longdesc = longdesc,
|
|
||||||
_doc_items_hidden = false,
|
|
||||||
tiles = {tile_stripped_inner, tile_stripped_inner, tile_stripped_bark},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
on_place = mcl_util.rotate_axis,
|
|
||||||
stack_max = 64,
|
|
||||||
groups = {handy=1, axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
|
||||||
on_rotate = on_rotate,
|
|
||||||
_mcl_blast_resistance = 2,
|
|
||||||
_mcl_hardness = 2,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("mcl_core:"..subname.."_bark", {
|
|
||||||
description = description_stripped_bark,
|
|
||||||
_doc_items_longdesc = longdesc_wood,
|
|
||||||
tiles = {tile_stripped_bark},
|
|
||||||
paramtype2 = "facedir",
|
|
||||||
on_place = mcl_util.rotate_axis,
|
|
||||||
stack_max = 64,
|
|
||||||
groups = {handy=1, axey=1, bark=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5},
|
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
on_rotate = on_rotate,
|
on_rotate = on_rotate,
|
||||||
|
@ -91,7 +48,7 @@ local function register_stripped_trunk(subname, description_stripped_trunk, desc
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function register_wooden_planks(subname, description, tiles)
|
local register_wooden_planks = function(subname, description, tiles)
|
||||||
minetest.register_node("mcl_core:"..subname, {
|
minetest.register_node("mcl_core:"..subname, {
|
||||||
description = description,
|
description = description,
|
||||||
_doc_items_longdesc = doc.sub.items.temp.build,
|
_doc_items_longdesc = doc.sub.items.temp.build,
|
||||||
|
@ -99,7 +56,7 @@ local function register_wooden_planks(subname, description, tiles)
|
||||||
tiles = tiles,
|
tiles = tiles,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {handy=1, axey=1, flammable=3,wood=1,building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
|
groups = {handy=1,axey=1, flammable=3,wood=1,building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20},
|
||||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
|
@ -151,7 +108,7 @@ local register_leaves = function(subname, description, longdesc, tiles, sapling,
|
||||||
tiles = tiles,
|
tiles = tiles,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {handy=1, shearsy=1, swordy=1, leafdecay=leafdecay_distance, flammable=2, leaves=1, deco_block=1, dig_by_piston=1, fire_encouragement=30, fire_flammability=60},
|
groups = {handy=1,shearsy=1,swordy=1, leafdecay=leafdecay_distance, flammable=2, leaves=1, deco_block=1, dig_by_piston=1, fire_encouragement=30, fire_flammability=60},
|
||||||
drop = get_drops(0),
|
drop = get_drops(0),
|
||||||
_mcl_shears_drop = true,
|
_mcl_shears_drop = true,
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
|
@ -162,7 +119,7 @@ local register_leaves = function(subname, description, longdesc, tiles, sapling,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function register_sapling(subname, description, longdesc, tt_help, texture, selbox)
|
local register_sapling = function(subname, description, longdesc, tt_help, texture, selbox)
|
||||||
minetest.register_node("mcl_core:"..subname, {
|
minetest.register_node("mcl_core:"..subname, {
|
||||||
description = description,
|
description = description,
|
||||||
_tt_help = tt_help,
|
_tt_help = tt_help,
|
||||||
|
@ -182,7 +139,7 @@ local function register_sapling(subname, description, longdesc, tt_help, texture
|
||||||
fixed = selbox
|
fixed = selbox
|
||||||
},
|
},
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {dig_immediate=3, plant=1, sapling=1, non_mycelium_plant=1, attached_node=1, dig_by_water=1, dig_by_piston=1, destroy_by_lava_flow=1, deco_block=1},
|
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1},
|
||||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
|
@ -204,19 +161,12 @@ end
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
register_tree_trunk("tree", S("Oak Wood"), S("Oak Bark"), S("The trunk of an oak tree."), "default_tree_top.png", "default_tree.png", "mcl_core:stripped_oak")
|
register_tree_trunk("tree", S("Oak Wood"), S("Oak Bark"), S("The trunk of an oak tree."), "default_tree_top.png", "default_tree.png")
|
||||||
register_tree_trunk("darktree", S("Dark Oak Wood"), S("Dark Oak Bark"), S("The trunk of a dark oak tree."), "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png", "mcl_core:stripped_dark_oak")
|
register_tree_trunk("darktree", S("Dark Oak Wood"), S("Dark Oak Bark"), S("The trunk of a dark oak tree."), "mcl_core_log_big_oak_top.png", "mcl_core_log_big_oak.png")
|
||||||
register_tree_trunk("acaciatree", S("Acacia Wood"), S("Acacia Bark"), S("The trunk of an acacia."), "default_acacia_tree_top.png", "default_acacia_tree.png", "mcl_core:stripped_acacia")
|
register_tree_trunk("acaciatree", S("Acacia Wood"), S("Acacia Bark"), S("The trunk of an acacia."), "default_acacia_tree_top.png", "default_acacia_tree.png")
|
||||||
register_tree_trunk("sprucetree", S("Spruce Wood"), S("Spruce Bark"), S("The trunk of a spruce tree."), "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png", "mcl_core:stripped_spruce")
|
register_tree_trunk("sprucetree", S("Spruce Wood"), S("Spruce Bark"), S("The trunk of a spruce tree."), "mcl_core_log_spruce_top.png", "mcl_core_log_spruce.png")
|
||||||
register_tree_trunk("birchtree", S("Birch Wood"), S("Birch Bark"), S("The trunk of a birch tree."), "mcl_core_log_birch_top.png", "mcl_core_log_birch.png", "mcl_core:stripped_birch")
|
register_tree_trunk("birchtree", S("Birch Wood"), S("Birch Bark"), S("The trunk of a birch tree."), "mcl_core_log_birch_top.png", "mcl_core_log_birch.png")
|
||||||
register_tree_trunk("jungletree", S("Jungle Wood"), S("Jungle Bark"), S("The trunk of a jungle tree."), "default_jungletree_top.png", "default_jungletree.png", "mcl_core:stripped_jungle")
|
register_tree_trunk("jungletree", S("Jungle Wood"), S("Jungle Bark"), S("The trunk of a jungle tree."), "default_jungletree_top.png", "default_jungletree.png")
|
||||||
|
|
||||||
register_stripped_trunk("stripped_oak", S("Stripped Oak Log"), S("Stripped Oak Wood"), S("The stripped trunk of an oak tree."), S("The stripped wood of an oak tree."), "mcl_core_stripped_oak_top.png", "mcl_core_stripped_oak_side.png")
|
|
||||||
register_stripped_trunk("stripped_acacia", S("Stripped Acacia Log"), S("Stripped Acacia Wood"), S("The stripped trunk of an acacia tree."), S("The stripped wood of an acacia tree."), "mcl_core_stripped_acacia_top.png", "mcl_core_stripped_acacia_side.png")
|
|
||||||
register_stripped_trunk("stripped_dark_oak", S("Stripped Dark Oak Log"), S("Stripped Dark Oak Wood"), S("The stripped trunk of a dark oak tree."), S("The stripped wood of a dark oak tree."), "mcl_core_stripped_dark_oak_top.png", "mcl_core_stripped_dark_oak_side.png")
|
|
||||||
register_stripped_trunk("stripped_birch", S("Stripped Birch Log"), S("Stripped Birch Wood"), S("The stripped trunk of a birch tree."), S("The stripped wood of a birch tree."), "mcl_core_stripped_birch_top.png", "mcl_core_stripped_birch_side.png")
|
|
||||||
register_stripped_trunk("stripped_spruce", S("Stripped Spruce Log"), S("Stripped Spruce Wood"), S("The stripped trunk of a spruce tree."), S("The stripped wood of a spruce tree."), "mcl_core_stripped_spruce_top.png", "mcl_core_stripped_spruce_side.png")
|
|
||||||
register_stripped_trunk("stripped_jungle", S("Stripped Jungle Log"), S("Stripped Jungle Wood"), S("The stripped trunk of a jungle tree."), S("The stripped wood of a jungle tree."),"mcl_core_stripped_jungle_top.png", "mcl_core_stripped_jungle_side.png")
|
|
||||||
|
|
||||||
register_wooden_planks("wood", S("Oak Wood Planks"), {"default_wood.png"})
|
register_wooden_planks("wood", S("Oak Wood Planks"), {"default_wood.png"})
|
||||||
register_wooden_planks("darkwood", S("Dark Oak Wood Planks"), {"mcl_core_planks_big_oak.png"})
|
register_wooden_planks("darkwood", S("Dark Oak Wood Planks"), {"mcl_core_planks_big_oak.png"})
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 695 B |
Before Width: | Height: | Size: 650 B |
Before Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 733 B |
|
@ -97,12 +97,4 @@ The target item is not enchantable.=Der Zielgegenstand ist nicht verzauberbar.
|
||||||
'@1' is not a valid number.='@1' ist keine gültige Zahl.
|
'@1' is not a valid number.='@1' ist keine gültige Zahl.
|
||||||
Enchanted Book=Verzaubertes Buch
|
Enchanted Book=Verzaubertes Buch
|
||||||
Enchanting Table=Zaubertisch
|
Enchanting Table=Zaubertisch
|
||||||
Spend experience, and lapis to enchant various items.=Verbrauche Erfahrung und Lapislazuli, um verschiedene Gegenstände zu verzaubern.
|
|
||||||
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=Mit Zaubertischen kannst Du Rüstungen, Werkzeuge, Waffen und Bücher mit verschiedenen Fähigkeiten verzaubern. Das kostet aber Erfahrung und Lapislazuli.
|
|
||||||
Rightclick the Enchanting Table to open the enchanting menu.=Rechtsklick auf den Zaubertisch öffnet das Verzaubern-Menü
|
|
||||||
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=Platziere ein Werkzeug, eine Waffe oder ein Buch im oberen linken Slot und platziere dann 1-3 Lapislazuli im rechten Slot.
|
|
||||||
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=Nachdem Du Deine Gegenstände in den Slots platziert hast, werden die Verzauberungs-Optionen angezeigt. Fahre mit der Maus über die Optionen, um die angebotenen Verzauberungen zu sehen.
|
|
||||||
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=Die Auswahl wird zufällig generiert und hängt von Deinem Erfahrungslevel ab; Du kannst die Stärker der Verzauberung aber erhöhen.
|
|
||||||
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=Um die Stärker der Verzauberung zu erhöhen, platziere Bücherregale um den Zaubertisch. Damit die Verstärkung funktioniert, muss zwischen Tisch und Bücherregalen aber ein Block Freiraum sein.
|
|
||||||
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=Nachdem Du Deine Verzauberung ausgewählt hast, klicke links auf die Auswahl. Nun werden Lapislazuli und Erfahrung verbraucht und durch einen verzauberten Gegenstand ersetzt.
|
|
||||||
Enchant=Verzaubern
|
Enchant=Verzaubern
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# textdomain: mcl_enchanting
|
# textdomain: mcl_enchanting
|
||||||
# Disclaimer: Some of these texts were machine-translated and should be reviewed by someone competent
|
|
||||||
Aqua Affinity=Affinité aquatique
|
Aqua Affinity=Affinité aquatique
|
||||||
Increases underwater mining speed.=Augmente la vitesse de minage sous-marine.
|
Increases underwater mining speed.=Augmente la vitesse de minage sous-marine.
|
||||||
Bane of Arthropods=Fléau des arthropodes
|
Bane of Arthropods=Fléau des arthropodes
|
||||||
|
@ -77,8 +76,8 @@ Reflects some of the damage taken when hit, at the cost of reducing durability w
|
||||||
Unbreaking=Solidité
|
Unbreaking=Solidité
|
||||||
Increases item durability.=Augmente la durabilité des objets.
|
Increases item durability.=Augmente la durabilité des objets.
|
||||||
Inventory=Inventaire
|
Inventory=Inventaire
|
||||||
@1 Lapis Lazuli=@1 Lapis Lazuli
|
@1 × Lapis Lazuli=@1 × Lapis Lazuli
|
||||||
@1 Enchantment Levels=Niveaux d'enchantement: @1
|
Enchantment levels: @1=Niveaux d'enchantement: @1
|
||||||
Level requirement: @1=Niveau requis: @1
|
Level requirement: @1=Niveau requis: @1
|
||||||
Enchant an item=Enchanter un objet
|
Enchant an item=Enchanter un objet
|
||||||
<player> <enchantment> [<level>]=<joueur> <enchantement> [<niveau>]
|
<player> <enchantment> [<level>]=<joueur> <enchantement> [<niveau>]
|
||||||
|
@ -98,12 +97,4 @@ The target item is not enchantable.=L'objet cible n'est pas enchantable.
|
||||||
'@1' is not a valid number.='@1' n'est pas un nombre valide.
|
'@1' is not a valid number.='@1' n'est pas un nombre valide.
|
||||||
Enchanted Book=Livre enchanté
|
Enchanted Book=Livre enchanté
|
||||||
Enchanting Table=Table d'enchantement
|
Enchanting Table=Table d'enchantement
|
||||||
Spend experience, and lapis to enchant various items.=Dépensez de l'expérience et du lapis pour enchanter divers objets.
|
|
||||||
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=Les tables d'enchantement vous permettront d'enchanter des armures, des outils, des armes et des livres avec diverses capacités. Mais, au prix d'un peu d'expérience, et de lapis-lazuli.
|
|
||||||
Rightclick the Enchanting Table to open the enchanting menu.=Faites un clic droit sur la table d'enchantement pour ouvrir le menu d'enchantement.
|
|
||||||
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=Placez un outil, une armure, une arme ou un livre dans la fente supérieure gauche, puis placez 1-3 Lapis Lazuli dans la fente de droite.
|
|
||||||
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=Après avoir placé vos objets dans les emplacements, les options d'enchantement s'afficheront. Passez la souris sur les options pour lire ce qui est disponible pour vous.
|
|
||||||
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=Ces options sont aléatoires et dépendent du niveau d'expérience, mais la force de l'enchantement peut être augmentée.
|
|
||||||
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=Pour augmenter la puissance de l'enchantement, placez des étagères autour de la table d'enchantement. Cependant, vous devrez garder un nœud aérien entre la table et les étagères pour renforcer la table d'enchantement.
|
|
||||||
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=Après avoir finalement sélectionné votre enchantement, cliquez avec le bouton gauche de la souris sur la sélection, et vous verrez le lapis-lazuli et vos niveaux d'expérience consommés. Et, un objet enchanté laissé à sa place.
|
|
||||||
Enchant=Enchantement
|
Enchant=Enchantement
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# textdomain: mcl_enchanting
|
# textdomain: mcl_enchanting
|
||||||
# Disclaimer: Some of these texts were machine-translated and should be reviewed by someone competent
|
|
||||||
Aqua Affinity=Родство с водой
|
Aqua Affinity=Родство с водой
|
||||||
Increases underwater mining speed.=Увеличивает скорость добычи под водой.
|
Increases underwater mining speed.=Увеличивает скорость добычи под водой.
|
||||||
Bane of Arthropods=Бич членистоногих
|
Bane of Arthropods=Бич членистоногих
|
||||||
|
@ -77,8 +76,8 @@ Reflects some of the damage taken when hit, at the cost of reducing durability w
|
||||||
Unbreaking=Нерушимость
|
Unbreaking=Нерушимость
|
||||||
Increases item durability.=Увеличивает прочность предмета.
|
Increases item durability.=Увеличивает прочность предмета.
|
||||||
Inventory=Инвентарь
|
Inventory=Инвентарь
|
||||||
@1 Lapis Lazuli=@1 Ляпис-лазурь
|
@1 × Lapis Lazuli=@1 × Ляпис-лазурь
|
||||||
@1 Enchantment Levels=@1 Уровень зачаровывания
|
Enchantment levels: @1=Уровень зачаровывания: @1
|
||||||
Level requirement: @1=Требуемый уровень: @1
|
Level requirement: @1=Требуемый уровень: @1
|
||||||
Enchant an item=Зачаровать предмет
|
Enchant an item=Зачаровать предмет
|
||||||
<player> <enchantment> [<level>]=<игрок> <зачарование> [<уровень>]
|
<player> <enchantment> [<level>]=<игрок> <зачарование> [<уровень>]
|
||||||
|
@ -98,18 +97,4 @@ The target item is not enchantable.=Указана незачаровываем
|
||||||
'@1' is not a valid number.='@1' не является допустимым числом.
|
'@1' is not a valid number.='@1' не является допустимым числом.
|
||||||
Enchanted Book=Зачарованная книга
|
Enchanted Book=Зачарованная книга
|
||||||
Enchanting Table=Стол зачаровывания
|
Enchanting Table=Стол зачаровывания
|
||||||
Spend experience, and lapis to enchant various items.=Проведите время, и ляпис, чтобы очаровать различные предметы.
|
|
||||||
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=Волшебные столы позволят вам очаровать доспехами, инструментами, оружием и книгами с различными способностями. Но, ценой некоторого опыта, и ляпис-лазурь.
|
|
||||||
Rightclick the Enchanting Table to open the enchanting menu.=Щелкните правой кнопкой мыши Зачаровывающий стол, чтобы открыть зачаровывающее меню.
|
|
||||||
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=Поместите инструмент, броню, оружие или книгу в верхний левый паз, а затем поместите 1-3 лазурита в паз справа.
|
|
||||||
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=После размещения Ваших элементов в слотах, будут показаны волшебные опции. Наведите курсор на опции, чтобы прочитать, что доступно для вас.
|
|
||||||
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=Эти варианты рандомизированы и зависят от уровня опыта; но сила очарования может быть увеличена.
|
|
||||||
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=Чтобы увеличить силу очарования, разместите книжные полки вокруг очаровательного стола. Однако, вам нужно будет держать 1 воздушный узел между столом и книжными полками, чтобы придать силу очаровательному столу.
|
|
||||||
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=После того, как вы, наконец, выбрали свое очарование; щелкните левой кнопкой мыши по выбору, и вы увидите, как лазурь ляпис и ваш уровень опыта потребляется. И очарованная вещь, оставленная на своем месте.
|
|
||||||
Enchant=Зачарование
|
Enchant=Зачарование
|
||||||
|
|
||||||
|
|
||||||
##### not used anymore #####
|
|
||||||
|
|
||||||
@1 × Lapis Lazuli=@1 × Ляпис-лазурь
|
|
||||||
Enchantment levels: @1=Уровень зачаровывания: @1
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ Reflects some of the damage taken when hit, at the cost of reducing durability w
|
||||||
Unbreaking=
|
Unbreaking=
|
||||||
Increases item durability.=
|
Increases item durability.=
|
||||||
Inventory=
|
Inventory=
|
||||||
@1 Lapis Lazuli=
|
@1 × Lapis Lazuli=
|
||||||
@1 Enchantment Levels=
|
Enchantment levels: @1=
|
||||||
Level requirement: @1=
|
Level requirement: @1=
|
||||||
Enchant an item=
|
Enchant an item=
|
||||||
<player> <enchantment> [<level>]=
|
<player> <enchantment> [<level>]=
|
||||||
|
@ -97,12 +97,4 @@ The target item is not enchantable.=
|
||||||
'@1' is not a valid number.=
|
'@1' is not a valid number.=
|
||||||
Enchanted Book=
|
Enchanted Book=
|
||||||
Enchanting Table=
|
Enchanting Table=
|
||||||
Spend experience, and lapis to enchant various items.=
|
|
||||||
Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=
|
|
||||||
Rightclick the Enchanting Table to open the enchanting menu.=
|
|
||||||
Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=
|
|
||||||
After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=
|
|
||||||
These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=
|
|
||||||
To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=
|
|
||||||
After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=
|
|
||||||
Enchant=
|
Enchant=
|
||||||
|
|
|
@ -169,16 +169,7 @@ minetest.register_node("mcl_end:dragon_egg", {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
_mcl_blast_resistance = 9,
|
_mcl_blast_resistance = 9,
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
on_punch = function(pos, node)
|
-- TODO: Make dragon egg teleport on punching
|
||||||
local max_dist = vector.new(15, 7, 15)
|
|
||||||
local positions = minetest.find_nodes_in_area(vector.subtract(pos, max_dist), vector.add(pos, max_dist), "air", false)
|
|
||||||
if #positions > 0 then
|
|
||||||
local tpos = positions[math.random(#positions)]
|
|
||||||
minetest.remove_node(pos)
|
|
||||||
minetest.set_node(tpos, node)
|
|
||||||
minetest.check_for_falling(tpos)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,21 +18,19 @@ minetest.register_node("mcl_farming:beetroot_0", {
|
||||||
_doc_items_longdesc = S("Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature."),
|
_doc_items_longdesc = S("Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature."),
|
||||||
_doc_items_entry_name = S("Premature Beetroot Plant"),
|
_doc_items_entry_name = S("Premature Beetroot Plant"),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = "mcl_farming:beetroot_seeds",
|
drop = "mcl_farming:beetroot_seeds",
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_beetroot_0.png") },
|
tiles = {"mcl_farming_beetroot_0.png"},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "mcl_farming_beetroot_0.png",
|
inventory_image = "mcl_farming_beetroot_0.png",
|
||||||
wield_image = "mcl_farming_beetroot_0.png",
|
wield_image = "mcl_farming_beetroot_0.png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, -6/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
||||||
|
@ -44,21 +42,19 @@ minetest.register_node("mcl_farming:beetroot_1", {
|
||||||
description = S("Premature Beetroot Plant (Stage 2)"),
|
description = S("Premature Beetroot Plant (Stage 2)"),
|
||||||
_doc_items_create_entry = false,
|
_doc_items_create_entry = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = "mcl_farming:beetroot_seeds",
|
drop = "mcl_farming:beetroot_seeds",
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_beetroot_1.png") },
|
tiles = {"mcl_farming_beetroot_1.png"},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "mcl_farming_beetroot_1.png",
|
inventory_image = "mcl_farming_beetroot_1.png",
|
||||||
wield_image = "mcl_farming_beetroot_1.png",
|
wield_image = "mcl_farming_beetroot_1.png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, -4/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, -3/16, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
||||||
|
@ -70,21 +66,19 @@ minetest.register_node("mcl_farming:beetroot_2", {
|
||||||
description = S("Premature Beetroot Plant (Stage 3)"),
|
description = S("Premature Beetroot Plant (Stage 3)"),
|
||||||
_doc_items_create_entry = false,
|
_doc_items_create_entry = false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = "mcl_farming:beetroot_seeds",
|
drop = "mcl_farming:beetroot_seeds",
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_beetroot_2.png") },
|
tiles = {"mcl_farming_beetroot_2.png"},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "mcl_farming_beetroot_2.png",
|
inventory_image = "mcl_farming_beetroot_2.png",
|
||||||
wield_image = "mcl_farming_beetroot_2.png",
|
wield_image = "mcl_farming_beetroot_2.png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, 1/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, 2/16, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
||||||
|
@ -97,36 +91,33 @@ minetest.register_node("mcl_farming:beetroot", {
|
||||||
_doc_items_longdesc = S("A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further."),
|
_doc_items_longdesc = S("A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further."),
|
||||||
_doc_items_create_entry = true,
|
_doc_items_create_entry = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = {
|
drop = {
|
||||||
--[[ drops 1 beetroot guaranteed.
|
--[[ drops 1 beetroot guaranteed.
|
||||||
drops 1-4 beetroot seeds:
|
drops 0-3 beetroot seeds:
|
||||||
1 seed: 42.18%
|
0 seeds: 42.18%
|
||||||
2 seeds: 14.06%
|
1 seed: 14.06%
|
||||||
3 seeds: 18.75%
|
2 seeds: 18.75%
|
||||||
4 seeds: 25% ]]
|
3 seeds: 25% ]]
|
||||||
max_items = 3,
|
max_items = 2,
|
||||||
items = {
|
items = {
|
||||||
{ items = {"mcl_farming:beetroot_item"}, rarity = 1 },
|
{ items = {"mcl_farming:beetroot_item"}, rarity = 1 },
|
||||||
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 1 },
|
|
||||||
{ items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 },
|
{ items = {"mcl_farming:beetroot_seeds 3"}, rarity = 4 },
|
||||||
{ items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 },
|
{ items = {"mcl_farming:beetroot_seeds 2"}, rarity = 4 },
|
||||||
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 },
|
{ items = {"mcl_farming:beetroot_seeds 1"}, rarity = 4 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_beetroot_3.png") },
|
tiles = {"mcl_farming_beetroot_3.png"},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "mcl_farming_beetroot_3.png",
|
inventory_image = "mcl_farming_beetroot_3.png",
|
||||||
wield_image = "mcl_farming_beetroot_3.png",
|
wield_image = "mcl_farming_beetroot_3.png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, 2/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, 3/16, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,beetroot=4},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,beetroot=4},
|
||||||
|
|
|
@ -28,20 +28,18 @@ for i=1, 7 do
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
paramtype2 = "meshoptions",
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = "mcl_farming:carrot_item",
|
drop = "mcl_farming:carrot_item",
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture(texture) },
|
tiles = {texture},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = texture,
|
inventory_image = texture,
|
||||||
wield_image = texture,
|
wield_image = texture,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, sel_height - 1/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, sel_height, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
||||||
|
@ -55,13 +53,11 @@ minetest.register_node("mcl_farming:carrot", {
|
||||||
_doc_items_longdesc = S("Mature carrot plants are ready to be harvested for carrots. They won't grow any further."),
|
_doc_items_longdesc = S("Mature carrot plants are ready to be harvested for carrots. They won't grow any further."),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
paramtype2 = "meshoptions",
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
tiles = {"farming_carrot_4.png"},
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("farming_carrot_4.png") },
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "farming_carrot_4.png",
|
inventory_image = "farming_carrot_4.png",
|
||||||
wield_image = "farming_carrot_4.png",
|
wield_image = "farming_carrot_4.png",
|
||||||
drop = {
|
drop = {
|
||||||
|
@ -76,7 +72,7 @@ minetest.register_node("mcl_farming:carrot", {
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, 3/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, 4/16, 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
||||||
|
|
|
@ -27,73 +27,3 @@ dofile(minetest.get_modpath("mcl_farming").."/potatoes.lua")
|
||||||
|
|
||||||
-- ========= BEETROOT =========
|
-- ========= BEETROOT =========
|
||||||
dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua")
|
dofile(minetest.get_modpath("mcl_farming").."/beetroot.lua")
|
||||||
|
|
||||||
-- This function generates a row of plantlike and nodebox nodes whose
|
|
||||||
-- name starts with a given string, starting at a given position. It
|
|
||||||
-- places a given node below so that the rendering can be examined.
|
|
||||||
local function generate_plant_row(prefix, pos, below_node)
|
|
||||||
local i = 1
|
|
||||||
for node_name, node in pairs(minetest.registered_nodes) do
|
|
||||||
if (
|
|
||||||
1 == node_name:find(prefix) and
|
|
||||||
(
|
|
||||||
"plantlike" == node.drawtype or
|
|
||||||
"nodebox" == node.drawtype
|
|
||||||
)
|
|
||||||
) then
|
|
||||||
local node_pos = {
|
|
||||||
x = pos.x + i,
|
|
||||||
y = pos.y,
|
|
||||||
z = pos.z,
|
|
||||||
}
|
|
||||||
minetest.set_node(
|
|
||||||
node_pos,
|
|
||||||
{
|
|
||||||
name = node_name,
|
|
||||||
param2 = node.place_param2 or 0
|
|
||||||
}
|
|
||||||
)
|
|
||||||
local below_pos = {
|
|
||||||
x = node_pos.x,
|
|
||||||
y = node_pos.y - 1,
|
|
||||||
z = node_pos.z
|
|
||||||
}
|
|
||||||
minetest.set_node(
|
|
||||||
below_pos,
|
|
||||||
below_node
|
|
||||||
)
|
|
||||||
i = i + 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_chatcommand("generate_farming_plant_rows",{
|
|
||||||
description = "Generates rows of mcl_farming plant nodes on farming soil and glass",
|
|
||||||
privs = { debug = true },
|
|
||||||
func = function(name, param)
|
|
||||||
local player = minetest.get_player_by_name(name)
|
|
||||||
local pos = player:get_pos()
|
|
||||||
local node_prefixes = {
|
|
||||||
"mcl_farming:beetroot",
|
|
||||||
"mcl_farming:carrot",
|
|
||||||
"mcl_farming:melon",
|
|
||||||
"mcl_farming:potato",
|
|
||||||
"mcl_farming:pumpkin",
|
|
||||||
"mcl_farming:wheat",
|
|
||||||
}
|
|
||||||
for i,node_prefix in ipairs(node_prefixes) do
|
|
||||||
generate_plant_row(
|
|
||||||
node_prefix,
|
|
||||||
pos,
|
|
||||||
{ name = "mcl_farming:soil" }
|
|
||||||
)
|
|
||||||
pos.z = pos.z + 2
|
|
||||||
generate_plant_row(
|
|
||||||
node_prefix,
|
|
||||||
pos,
|
|
||||||
{ name = "mcl_core:glass" }
|
|
||||||
)
|
|
||||||
pos.z = pos.z + 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
|
@ -91,18 +91,16 @@ for s=1,7 do
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_plus_nodebox(),
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = stem_drop,
|
drop = stem_drop,
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture(texture) },
|
tiles = {texture},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
wield_image = texture,
|
wield_image = texture,
|
||||||
inventory_image = texture,
|
inventory_image = texture,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.15, -9/16, -0.15, 0.15, -9/16+h, 0.15}
|
{-0.15, -0.5, -0.15, 0.15, -0.5+h, 0.15}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1, plant_melon_stem=s},
|
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1, plant_melon_stem=s},
|
||||||
|
|
|
@ -6,13 +6,13 @@ for i=1, 7 do
|
||||||
local texture, selbox
|
local texture, selbox
|
||||||
if i < 3 then
|
if i < 3 then
|
||||||
texture = "mcl_farming_potatoes_stage_0.png"
|
texture = "mcl_farming_potatoes_stage_0.png"
|
||||||
selbox = { -0.5, -9/16, -0.5, 0.5, -6/16, 0.5 }
|
selbox = { -0.5, -0.5, -0.5, 0.5, -5/16, 0.5 }
|
||||||
elseif i < 5 then
|
elseif i < 5 then
|
||||||
texture = "mcl_farming_potatoes_stage_1.png"
|
texture = "mcl_farming_potatoes_stage_1.png"
|
||||||
selbox = { -0.5, -9/16, -0.5, 0.5, -3/16, 0.5 }
|
selbox = { -0.5, -0.5, -0.5, 0.5, -2/16, 0.5 }
|
||||||
else
|
else
|
||||||
texture = "mcl_farming_potatoes_stage_2.png"
|
texture = "mcl_farming_potatoes_stage_2.png"
|
||||||
selbox = { -0.5, -9/16, -0.5, 0.5, 1/16, 0.5 }
|
selbox = { -0.5, -0.5, -0.5, 0.5, 2/16, 0.5 }
|
||||||
end
|
end
|
||||||
|
|
||||||
local create, name, longdesc
|
local create, name, longdesc
|
||||||
|
@ -33,15 +33,13 @@ for i=1, 7 do
|
||||||
_doc_items_entry_name = name,
|
_doc_items_entry_name = name,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = "mcl_farming:potato_item",
|
drop = "mcl_farming:potato_item",
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture(texture) },
|
tiles = { texture },
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = texture,
|
inventory_image = texture,
|
||||||
wield_image = texture,
|
wield_image = texture,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
|
@ -59,14 +57,12 @@ minetest.register_node("mcl_farming:potato", {
|
||||||
description = S("Mature Potato Plant"),
|
description = S("Mature Potato Plant"),
|
||||||
_doc_items_longdesc = S("Mature potato plants are ready to be harvested for potatoes. They won't grow any further."),
|
_doc_items_longdesc = S("Mature potato plants are ready to be harvested for potatoes. They won't grow any further."),
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
paramtype2 = "meshoptions",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
tiles = {"mcl_farming_potatoes_stage_3.png"},
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_potatoes_stage_3.png") },
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
wield_image = "mcl_farming_potatoes_stage_3.png",
|
wield_image = "mcl_farming_potatoes_stage_3.png",
|
||||||
inventory_image = "mcl_farming_potatoes_stage_3.png",
|
inventory_image = "mcl_farming_potatoes_stage_3.png",
|
||||||
drop = {
|
drop = {
|
||||||
|
@ -81,7 +77,7 @@ minetest.register_node("mcl_farming:potato", {
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{ -0.5, -9/16, -0.5, 0.5, 0, 0.5 }
|
{ -0.5, -0.5, -0.5, 0.5, 1/16, 0.5 }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
|
||||||
|
|
|
@ -63,18 +63,16 @@ for s=1,7 do
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_plus_nodebox(),
|
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
drop = stem_drop,
|
drop = stem_drop,
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture(texture) },
|
tiles = {texture},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = texture,
|
inventory_image = texture,
|
||||||
wield_image = texture,
|
wield_image = texture,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.15, -9/16, -0.15, 0.15, -9/16+h, 0.15}
|
{-0.15, -0.5, -0.15, 0.15, -0.5+h, 0.15}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,},
|
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,},
|
||||||
|
@ -106,6 +104,7 @@ local pumpkin_base_def = {
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
_mcl_hardness = 1,
|
_mcl_hardness = 1,
|
||||||
}
|
}
|
||||||
|
minetest.register_node("mcl_farming:pumpkin", pumpkin_base_def)
|
||||||
|
|
||||||
local pumpkin_face_base_def = table.copy(pumpkin_base_def)
|
local pumpkin_face_base_def = table.copy(pumpkin_base_def)
|
||||||
pumpkin_face_base_def.description = S("Pumpkin")
|
pumpkin_face_base_def.description = S("Pumpkin")
|
||||||
|
@ -116,11 +115,6 @@ pumpkin_face_base_def.groups.armor_head=1
|
||||||
pumpkin_face_base_def._mcl_armor_mob_range_factor = 0
|
pumpkin_face_base_def._mcl_armor_mob_range_factor = 0
|
||||||
pumpkin_face_base_def._mcl_armor_mob_range_mob = "mobs_mc:enderman"
|
pumpkin_face_base_def._mcl_armor_mob_range_mob = "mobs_mc:enderman"
|
||||||
pumpkin_face_base_def.groups.non_combat_armor=1
|
pumpkin_face_base_def.groups.non_combat_armor=1
|
||||||
pumpkin_face_base_def.on_construct = function(pos)
|
|
||||||
-- Attempt to spawn iron golem or snow golem
|
|
||||||
mobs_mc.tools.check_iron_golem_summon(pos)
|
|
||||||
mobs_mc.tools.check_snow_golem_summon(pos)
|
|
||||||
end
|
|
||||||
if minetest.get_modpath("mcl_armor") then
|
if minetest.get_modpath("mcl_armor") then
|
||||||
pumpkin_face_base_def.on_secondary_use = armor.on_armor_use
|
pumpkin_face_base_def.on_secondary_use = armor.on_armor_use
|
||||||
end
|
end
|
||||||
|
@ -129,11 +123,12 @@ end
|
||||||
mcl_farming:add_plant("plant_pumpkin_stem", "mcl_farming:pumpkintige_unconnect", {"mcl_farming:pumpkin_1", "mcl_farming:pumpkin_2", "mcl_farming:pumpkin_3", "mcl_farming:pumpkin_4", "mcl_farming:pumpkin_5", "mcl_farming:pumpkin_6", "mcl_farming:pumpkin_7"}, 30, 5)
|
mcl_farming:add_plant("plant_pumpkin_stem", "mcl_farming:pumpkintige_unconnect", {"mcl_farming:pumpkin_1", "mcl_farming:pumpkin_2", "mcl_farming:pumpkin_3", "mcl_farming:pumpkin_4", "mcl_farming:pumpkin_5", "mcl_farming:pumpkin_6", "mcl_farming:pumpkin_7"}, 30, 5)
|
||||||
|
|
||||||
-- Register actual pumpkin, connected stems and stem-to-pumpkin growth
|
-- Register actual pumpkin, connected stems and stem-to-pumpkin growth
|
||||||
mcl_farming:add_gourd("mcl_farming:pumpkintige_unconnect", "mcl_farming:pumpkintige_linked", "mcl_farming:pumpkintige_unconnect", stem_def, stem_drop, "mcl_farming:pumpkin", pumpkin_base_def, 30, 15, "mcl_farming_pumpkin_stem_connected.png^[colorize:#FFA800:127")
|
mcl_farming:add_gourd("mcl_farming:pumpkintige_unconnect", "mcl_farming:pumpkintige_linked", "mcl_farming:pumpkintige_unconnect", stem_def, stem_drop, "mcl_farming:pumpkin_face", pumpkin_face_base_def, 30, 15, "mcl_farming_pumpkin_stem_connected.png^[colorize:#FFA800:127",
|
||||||
|
function(pos)
|
||||||
-- Steal function to properly disconnect a carved pumpkin
|
-- Attempt to spawn iron golem or snow golem
|
||||||
pumpkin_face_base_def.after_destruct = minetest.registered_nodes["mcl_farming:pumpkin"].after_destruct
|
mobs_mc.tools.check_iron_golem_summon(pos)
|
||||||
minetest.register_node("mcl_farming:pumpkin_face", pumpkin_face_base_def)
|
mobs_mc.tools.check_snow_golem_summon(pos)
|
||||||
|
end)
|
||||||
|
|
||||||
-- Jack o'Lantern
|
-- Jack o'Lantern
|
||||||
minetest.register_node("mcl_farming:pumpkin_face_light", {
|
minetest.register_node("mcl_farming:pumpkin_face_light", {
|
||||||
|
@ -170,6 +165,11 @@ minetest.register_craft({
|
||||||
recipe = {{"mcl_farming:pumpkin"}}
|
recipe = {{"mcl_farming:pumpkin"}}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_farming:pumpkin_seeds 4",
|
||||||
|
recipe = {{"mcl_farming:pumpkin_face"}}
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("mcl_farming:pumpkin_pie", {
|
minetest.register_craftitem("mcl_farming:pumpkin_pie", {
|
||||||
description = S("Pumpkin Pie"),
|
description = S("Pumpkin Pie"),
|
||||||
_doc_items_longdesc = S("A pumpkin pie is a tasty food item which can be eaten."),
|
_doc_items_longdesc = S("A pumpkin pie is a tasty food item which can be eaten."),
|
||||||
|
@ -187,6 +187,11 @@ minetest.register_craft({
|
||||||
output = "mcl_farming:pumpkin_pie",
|
output = "mcl_farming:pumpkin_pie",
|
||||||
recipe = {"mcl_farming:pumpkin", "mcl_core:sugar", "mcl_throwing:egg"},
|
recipe = {"mcl_farming:pumpkin", "mcl_core:sugar", "mcl_throwing:egg"},
|
||||||
})
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = "mcl_farming:pumpkin_pie",
|
||||||
|
recipe = {"mcl_farming:pumpkin_face", "mcl_core:sugar", "mcl_throwing:egg"},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
if minetest.get_modpath("doc") then
|
if minetest.get_modpath("doc") then
|
||||||
|
|
|
@ -178,7 +178,7 @@ end
|
||||||
- stem_def: Partial node definition of the fully-grown unconnected stem node. Many fields are already defined. You need to add `tiles` and `description` at minimum. Don't define on_construct without good reason
|
- stem_def: Partial node definition of the fully-grown unconnected stem node. Many fields are already defined. You need to add `tiles` and `description` at minimum. Don't define on_construct without good reason
|
||||||
- stem_drop: Drop probability table for all stem
|
- stem_drop: Drop probability table for all stem
|
||||||
- gourd_itemstring: Desired itemstring of the full gourd node
|
- gourd_itemstring: Desired itemstring of the full gourd node
|
||||||
- gourd_def: (almost) full definition of the gourd node. This function will add on_construct and after_destruct to the definition for unconnecting any connected stems
|
- gourd_def: (almost) full definition of the gourd node. This function will add on_construct and after_dig_node to the definition for unconnecting any connected stems
|
||||||
- grow_interval: Will attempt to grow a gourd periodically at this interval in seconds
|
- grow_interval: Will attempt to grow a gourd periodically at this interval in seconds
|
||||||
- grow_chance: Chance of 1/grow_chance to grow a gourd next to the full unconnected stem after grow_interval has passed. Must be a natural number
|
- grow_chance: Chance of 1/grow_chance to grow a gourd next to the full unconnected stem after grow_interval has passed. Must be a natural number
|
||||||
- connected_stem_texture: Texture of the connected stem
|
- connected_stem_texture: Texture of the connected stem
|
||||||
|
@ -228,8 +228,8 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Register gourd
|
-- Register gourd
|
||||||
if not gourd_def.after_destruct then
|
if not gourd_def.after_dig_node then
|
||||||
gourd_def.after_destruct = function(blockpos, oldnode)
|
gourd_def.after_dig_node = function(blockpos, oldnode, oldmetadata, user)
|
||||||
-- Disconnect any connected stems, turning them back to normal stems
|
-- Disconnect any connected stems, turning them back to normal stems
|
||||||
for n=1, #neighbors do
|
for n=1, #neighbors do
|
||||||
local offset = neighbors[n]
|
local offset = neighbors[n]
|
||||||
|
@ -265,7 +265,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
stem_def.selection_box = {
|
stem_def.selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.15, -9/16, -0.15, 0.15, 7/16, 0.15}
|
{-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -273,20 +273,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
stem_def.paramtype = "light"
|
stem_def.paramtype = "light"
|
||||||
end
|
end
|
||||||
if not stem_def.drawtype then
|
if not stem_def.drawtype then
|
||||||
stem_def.drawtype = "nodebox"
|
stem_def.drawtype = "plantlike"
|
||||||
end
|
|
||||||
if not stem_def.node_box then
|
|
||||||
stem_def.node_box = mcl_farming:get_plantlike_plus_nodebox()
|
|
||||||
end
|
|
||||||
if stem_def.tiles then
|
|
||||||
for i=1,#stem_def.tiles do
|
|
||||||
stem_def.tiles[i] = mcl_farming:align_plantlike_nodebox_texture(
|
|
||||||
stem_def.tiles[i]
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not stem_def.use_texture_alpha then
|
|
||||||
stem_def.use_texture_alpha = "clip"
|
|
||||||
end
|
end
|
||||||
if stem_def.walkable == nil then
|
if stem_def.walkable == nil then
|
||||||
stem_def.walkable = false
|
stem_def.walkable = false
|
||||||
|
@ -313,9 +300,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
minetest.register_node(stem_itemstring, stem_def)
|
minetest.register_node(stem_itemstring, stem_def)
|
||||||
|
|
||||||
-- Register connected stems
|
-- Register connected stems
|
||||||
local connected_stem_texture = mcl_farming:align_plantlike_nodebox_texture(
|
|
||||||
connected_stem_texture
|
|
||||||
)
|
|
||||||
local connected_stem_tiles = {
|
local connected_stem_tiles = {
|
||||||
{ "blank.png", --top
|
{ "blank.png", --top
|
||||||
"blank.png", -- bottom
|
"blank.png", -- bottom
|
||||||
|
@ -347,16 +332,16 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local connected_stem_nodebox = {
|
local connected_stem_nodebox = {
|
||||||
{-0.5, -9/16, 0, 0.5, 7/16, 0},
|
{-0.5, -0.5, 0, 0.5, 0.5, 0},
|
||||||
{-0.5, -9/16, 0, 0.5, 7/16, 0},
|
{-0.5, -0.5, 0, 0.5, 0.5, 0},
|
||||||
{0, -9/16, -0.5, 0, 7/16, 0.5},
|
{0, -0.5, -0.5, 0, 0.5, 0.5},
|
||||||
{0, -9/16, -0.5, 0, 7/16, 0.5},
|
{0, -0.5, -0.5, 0, 0.5, 0.5},
|
||||||
}
|
}
|
||||||
local connected_stem_selectionbox = {
|
local connected_stem_selectionbox = {
|
||||||
{-0.1, -9/16, -0.1, 0.5, 0.2 - 1/16, 0.1},
|
{-0.1, -0.5, -0.1, 0.5, 0.2, 0.1},
|
||||||
{-0.5, -9/16, -0.1, 0.1, 0.2 - 1/16, 0.1},
|
{-0.5, -0.5, -0.1, 0.1, 0.2, 0.1},
|
||||||
{-0.1, -9/16, -0.1, 0.1, 0.2 - 1/16, 0.5},
|
{-0.1, -0.5, -0.1, 0.1, 0.2, 0.5},
|
||||||
{-0.1, -9/16, -0.5, 0.1, 0.2 - 1/16, 0.1},
|
{-0.1, -0.5, -0.5, 0.1, 0.2, 0.1},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i=1, 4 do
|
for i=1, 4 do
|
||||||
|
@ -403,11 +388,12 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
{ x=0, y=0, z=-1 },
|
{ x=0, y=0, z=-1 },
|
||||||
{ x=0, y=0, z=1 },
|
{ x=0, y=0, z=1 },
|
||||||
}
|
}
|
||||||
|
local floorpos, floor
|
||||||
for n=#neighbors, 1, -1 do
|
for n=#neighbors, 1, -1 do
|
||||||
local offset = neighbors[n]
|
local offset = neighbors[n]
|
||||||
local blockpos = vector.add(stempos, offset)
|
local blockpos = vector.add(stempos, offset)
|
||||||
local floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
|
floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
|
||||||
local floor = minetest.get_node(floorpos)
|
floor = minetest.get_node(floorpos)
|
||||||
local block = minetest.get_node(blockpos)
|
local block = minetest.get_node(blockpos)
|
||||||
local soilgroup = minetest.get_item_group(floor.name, "soil")
|
local soilgroup = minetest.get_item_group(floor.name, "soil")
|
||||||
if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
|
if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then
|
||||||
|
@ -421,8 +407,6 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s
|
||||||
local r = math.random(1, #neighbors)
|
local r = math.random(1, #neighbors)
|
||||||
local offset = neighbors[r]
|
local offset = neighbors[r]
|
||||||
local blockpos = vector.add(stempos, offset)
|
local blockpos = vector.add(stempos, offset)
|
||||||
local floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z }
|
|
||||||
local floor = minetest.get_node(floorpos)
|
|
||||||
local p2
|
local p2
|
||||||
if offset.x == 1 then
|
if offset.x == 1 then
|
||||||
minetest.set_node(stempos, {name=connected_stem_names[1]})
|
minetest.set_node(stempos, {name=connected_stem_names[1]})
|
||||||
|
@ -484,40 +468,3 @@ minetest.register_lbm({
|
||||||
mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed)
|
mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- This function returns a nodebox that imitates a plantlike plus (+)
|
|
||||||
-- drawtype, but is shifted 1/16 lower, into the empty space above
|
|
||||||
-- farming soil. The regular plantlike drawtype can not do this.
|
|
||||||
function mcl_farming:get_plantlike_plus_nodebox()
|
|
||||||
return {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ 0, -9/16, -0.15, 0, 7/16, 0.15 },
|
|
||||||
{ -0.15, -9/16, 0, 0.15, 7/16, 0 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This function returns a nodebox that imitates a plantlike grid (#)
|
|
||||||
-- drawtype, but is shifted 1/16 lower, into the empty space above
|
|
||||||
-- farming soil. The regular plantlike drawtype can not do this.
|
|
||||||
function mcl_farming:get_plantlike_grid_nodebox()
|
|
||||||
return {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ 4/16, -9/16, -8/16, 4/16, 7/16, 8/16},
|
|
||||||
{-4/16, -9/16, -8/16, -4/16, 7/16, 8/16},
|
|
||||||
{-8/16, -9/16, -4/16, 8/16, 7/16, -4/16},
|
|
||||||
{-8/16, -9/16, 4/16, 8/16, 7/16, 4/16},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This function takes a texture and returns a modified texture where
|
|
||||||
-- the bottom row is at the top, assuming 16px × 16px textures. This
|
|
||||||
-- is used to align textures to a “plantlike” nodebox shifted 1/16
|
|
||||||
-- below its own node – into the empty space above farming soil.
|
|
||||||
function mcl_farming:align_plantlike_nodebox_texture(texture)
|
|
||||||
local texture = texture:gsub("%^", "\\%^"):gsub(":", "\\:")
|
|
||||||
return "[combine:16x16:0,-15=" .. texture .. ":0,1=" .. texture
|
|
||||||
end
|
|
||||||
|
|
|
@ -39,21 +39,19 @@ for i=1,7 do
|
||||||
_doc_items_entry_name = name,
|
_doc_items_entry_name = name,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
paramtype2 = "meshoptions",
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
|
||||||
drop = "mcl_farming:wheat_seeds",
|
drop = "mcl_farming:wheat_seeds",
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_wheat_stage_"..(i-1)..".png") },
|
tiles = {"mcl_farming_wheat_stage_"..(i-1)..".png"},
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
|
inventory_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
|
||||||
wield_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
|
wield_image = "mcl_farming_wheat_stage_"..(i-1)..".png",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.5, -9/16, -0.5, 0.5, sel_heights[i] - 1/16, 0.5}
|
{-0.5, -0.5, -0.5, 0.5, sel_heights[i], 0.5}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1},
|
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1},
|
||||||
|
@ -67,21 +65,13 @@ minetest.register_node("mcl_farming:wheat", {
|
||||||
_doc_items_longdesc = S("Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further."),
|
_doc_items_longdesc = S("Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further."),
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
-- keep place_param2 for plantlike drawtype compatiblity
|
paramtype2 = "meshoptions",
|
||||||
place_param2 = 3,
|
place_param2 = 3,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drawtype = "nodebox",
|
drawtype = "plantlike",
|
||||||
node_box = mcl_farming:get_plantlike_grid_nodebox(),
|
tiles = {"mcl_farming_wheat_stage_7.png"},
|
||||||
tiles = { mcl_farming:align_plantlike_nodebox_texture("mcl_farming_wheat_stage_7.png") },
|
|
||||||
use_texture_alpha = "clip",
|
|
||||||
inventory_image = "mcl_farming_wheat_stage_7.png",
|
inventory_image = "mcl_farming_wheat_stage_7.png",
|
||||||
wield_image = "mcl_farming_wheat_stage_7.png",
|
wield_image = "mcl_farming_wheat_stage_7.png",
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{ -0.5, -9/16, -0.5, 0.5, 7/16, 0.5 }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
drop = {
|
drop = {
|
||||||
max_items = 4,
|
max_items = 4,
|
||||||
items = {
|
items = {
|
||||||
|
|
|
@ -5,6 +5,29 @@ mcl_fire = {}
|
||||||
local S = minetest.get_translator("mcl_fire")
|
local S = minetest.get_translator("mcl_fire")
|
||||||
local N = function(s) return s end
|
local N = function(s) return s end
|
||||||
|
|
||||||
|
-- inverse pyramid pattern above lava source, floor 1 of 2:
|
||||||
|
local lava_fire=
|
||||||
|
{
|
||||||
|
{ x =-1, y = 1, z =-1},
|
||||||
|
{ x =-1, y = 1, z = 0},
|
||||||
|
{ x =-1, y = 1, z = 1},
|
||||||
|
{ x = 0, y = 1, z =-1},
|
||||||
|
{ x = 0, y = 1, z = 0},
|
||||||
|
{ x = 0, y = 1, z = 1},
|
||||||
|
{ x = 1, y = 1, z =-1},
|
||||||
|
{ x = 1, y = 1, z = 0},
|
||||||
|
{ x = 1, y = 1, z = 1}
|
||||||
|
}
|
||||||
|
local alldirs=
|
||||||
|
{
|
||||||
|
{ x =-1, y = 0, z = 0},
|
||||||
|
{ x = 1, y = 0, z = 0},
|
||||||
|
{ x = 0, y =-1, z = 0},
|
||||||
|
{ x = 0, y = 1, z = 0},
|
||||||
|
{ x = 0, y = 0, z =-1},
|
||||||
|
{ x = 0, y = 0, z = 1}
|
||||||
|
}
|
||||||
|
|
||||||
local spawn_smoke = function(pos)
|
local spawn_smoke = function(pos)
|
||||||
mcl_particles.add_node_particlespawner(pos, {
|
mcl_particles.add_node_particlespawner(pos, {
|
||||||
amount = 0.1,
|
amount = 0.1,
|
||||||
|
@ -27,34 +50,6 @@ local spawn_smoke = function(pos)
|
||||||
}, "high")
|
}, "high")
|
||||||
end
|
end
|
||||||
|
|
||||||
local adjacents = {
|
|
||||||
{ x =-1, y = 0, z = 0 },
|
|
||||||
{ x = 1, y = 0, z = 0 },
|
|
||||||
{ x = 0, y = 1, z = 0 },
|
|
||||||
{ x = 0, y =-1, z = 0 },
|
|
||||||
{ x = 0, y = 0, z =-1 },
|
|
||||||
{ x = 0, y = 0, z = 1 },
|
|
||||||
}
|
|
||||||
|
|
||||||
math.randomseed(os.time())
|
|
||||||
local function shuffle_table(t)
|
|
||||||
for i = #t, 1, -1 do
|
|
||||||
local r = math.random(i)
|
|
||||||
t[i], t[r] = t[r], t[i]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
shuffle_table(adjacents)
|
|
||||||
|
|
||||||
local function has_flammable(pos)
|
|
||||||
for k,v in pairs(adjacents) do
|
|
||||||
local p=vector.add(pos,v)
|
|
||||||
local n=minetest.get_node_or_nil(p)
|
|
||||||
if n and minetest.get_item_group(n.name, "flammable") ~= 0 then
|
|
||||||
return p
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Items
|
-- Items
|
||||||
--
|
--
|
||||||
|
@ -90,6 +85,10 @@ local fire_death_messages = {
|
||||||
N("@1 died in a fire."),
|
N("@1 died in a fire."),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local fire_timer = function(pos)
|
||||||
|
minetest.get_node_timer(pos):start(math.random(3, 7))
|
||||||
|
end
|
||||||
|
|
||||||
local spawn_fire = function(pos, age)
|
local spawn_fire = function(pos, age)
|
||||||
minetest.set_node(pos, {name="mcl_fire:fire", param2 = age})
|
minetest.set_node(pos, {name="mcl_fire:fire", param2 = age})
|
||||||
minetest.check_single_for_falling({x=pos.x, y=pos.y+1, z=pos.z})
|
minetest.check_single_for_falling({x=pos.x, y=pos.y+1, z=pos.z})
|
||||||
|
@ -125,6 +124,82 @@ minetest.register_node("mcl_fire:fire", {
|
||||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
on_timer = function(pos)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
-- Age is a number from 0 to 15 and is increased every timer step.
|
||||||
|
-- "old" fire is more likely to be extinguished
|
||||||
|
local age = node.param2
|
||||||
|
local flammables = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"group:flammable"})
|
||||||
|
local below = minetest.get_node({x=pos.x, y=pos.z-1, z=pos.z})
|
||||||
|
local below_is_flammable = minetest.get_item_group(below.name, "flammable") > 0
|
||||||
|
-- Extinguish fire
|
||||||
|
if (not fire_enabled) and (math.random(1,3) == 1) then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if age == 15 and not below_is_flammable then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return
|
||||||
|
elseif age > 3 and #flammables == 0 and not below_is_flammable and math.random(1,4) == 1 then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local age_add = 1
|
||||||
|
-- If fire spread is disabled, we have to skip the "destructive" code
|
||||||
|
if (not fire_enabled) then
|
||||||
|
if age + age_add <= 15 then
|
||||||
|
node.param2 = age + age_add
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end
|
||||||
|
-- Restart timer
|
||||||
|
fire_timer(pos)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- Spawn fire to nearby flammable nodes
|
||||||
|
local is_next_to_flammable = minetest.find_node_near(pos, 2, {"group:flammable"}) ~= nil
|
||||||
|
if is_next_to_flammable and math.random(1,2) == 1 then
|
||||||
|
-- The fire we spawn copies the age of this fire.
|
||||||
|
-- This prevents fire from spreading infinitely far as the fire fire dies off
|
||||||
|
-- quicker the further it has spreaded.
|
||||||
|
local age_next = math.min(15, age + math.random(0, 1))
|
||||||
|
-- Select random type of fire spread
|
||||||
|
local burntype = math.random(1,2)
|
||||||
|
if burntype == 1 then
|
||||||
|
-- Spawn fire in air
|
||||||
|
local nodes = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"air"})
|
||||||
|
while #nodes > 0 do
|
||||||
|
local r = math.random(1, #nodes)
|
||||||
|
if minetest.find_node_near(nodes[r], 1, {"group:flammable"}) then
|
||||||
|
spawn_fire(nodes[r], age_next)
|
||||||
|
break
|
||||||
|
else
|
||||||
|
table.remove(nodes, r)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- Burn flammable block
|
||||||
|
local nodes = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"group:flammable"})
|
||||||
|
if #nodes > 0 then
|
||||||
|
local r = math.random(1, #nodes)
|
||||||
|
local nn = minetest.get_node(nodes[r]).name
|
||||||
|
local ndef = minetest.registered_nodes[nn]
|
||||||
|
local fgroup = minetest.get_item_group(nn, "flammable")
|
||||||
|
if ndef and ndef._on_burn then
|
||||||
|
ndef._on_burn(nodes[r])
|
||||||
|
elseif fgroup ~= -1 then
|
||||||
|
spawn_fire(nodes[r], age_next)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Regular age increase
|
||||||
|
if age + age_add <= 15 then
|
||||||
|
node.param2 = age + age_add
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end
|
||||||
|
-- Restart timer
|
||||||
|
fire_timer(pos)
|
||||||
|
end,
|
||||||
drop = "",
|
drop = "",
|
||||||
sounds = {},
|
sounds = {},
|
||||||
-- Turn into eternal fire on special blocks, light Nether portal (if possible), start burning timer
|
-- Turn into eternal fire on special blocks, light Nether portal (if possible), start burning timer
|
||||||
|
@ -134,12 +209,14 @@ minetest.register_node("mcl_fire:fire", {
|
||||||
|
|
||||||
local dim = mcl_worlds.pos_to_dimension(bpos)
|
local dim = mcl_worlds.pos_to_dimension(bpos)
|
||||||
if under == "mcl_nether:magma" or under == "mcl_nether:netherrack" or (under == "mcl_core:bedrock" and dim == "end") then
|
if under == "mcl_nether:magma" or under == "mcl_nether:netherrack" or (under == "mcl_core:bedrock" and dim == "end") then
|
||||||
minetest.set_node(pos, {name="mcl_fire:eternal_fire"})
|
minetest.swap_node(pos, {name = "mcl_fire:eternal_fire"})
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.get_modpath("mcl_portals") then
|
if minetest.get_modpath("mcl_portals") then
|
||||||
mcl_portals.light_nether_portal(pos)
|
mcl_portals.light_nether_portal(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
fire_timer(pos)
|
||||||
spawn_smoke(pos)
|
spawn_smoke(pos)
|
||||||
end,
|
end,
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
|
@ -178,7 +255,29 @@ minetest.register_node("mcl_fire:eternal_fire", {
|
||||||
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
on_timer = function(pos)
|
||||||
|
if fire_enabled then
|
||||||
|
local airs = minetest.find_nodes_in_area({x=pos.x-1, y=pos.y-1, z=pos.z-1}, {x=pos.x+1, y=pos.y+4, z=pos.z+1}, {"air"})
|
||||||
|
while #airs > 0 do
|
||||||
|
local r = math.random(1, #airs)
|
||||||
|
if minetest.find_node_near(airs[r], 1, {"group:flammable"}) then
|
||||||
|
local node = minetest.get_node(airs[r])
|
||||||
|
local age = node.param2
|
||||||
|
local age_next = math.min(15, age + math.random(0, 1))
|
||||||
|
spawn_fire(airs[r], age_next)
|
||||||
|
break
|
||||||
|
else
|
||||||
|
table.remove(airs, r)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Restart timer
|
||||||
|
fire_timer(pos)
|
||||||
|
end,
|
||||||
|
-- Start burning timer and light Nether portal (if possible)
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
|
fire_timer(pos)
|
||||||
|
|
||||||
if minetest.get_modpath("mcl_portals") then
|
if minetest.get_modpath("mcl_portals") then
|
||||||
mcl_portals.light_nether_portal(pos)
|
mcl_portals.light_nether_portal(pos)
|
||||||
end
|
end
|
||||||
|
@ -303,6 +402,114 @@ if flame_sound then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- ABMs
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Extinguish all flames quickly with water and such
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Extinguish fire",
|
||||||
|
nodenames = {"mcl_fire:fire", "mcl_fire:eternal_fire"},
|
||||||
|
neighbors = {"group:puts_out_fire"},
|
||||||
|
interval = 3,
|
||||||
|
chance = 1,
|
||||||
|
catch_up = false,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
minetest.sound_play("fire_extinguish_flame",
|
||||||
|
{pos = pos, max_hear_distance = 16, gain = 0.15}, true)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Enable the following ABMs according to 'enable fire' setting
|
||||||
|
|
||||||
|
local function has_flammable(pos)
|
||||||
|
local npos, node
|
||||||
|
for n, v in ipairs(alldirs) do
|
||||||
|
npos = vector.add(pos, v)
|
||||||
|
node = minetest.get_node_or_nil(npos)
|
||||||
|
if node and node.name and minetest.get_item_group(node.name, "flammable") ~= 0 then
|
||||||
|
return npos
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if not fire_enabled then
|
||||||
|
|
||||||
|
-- Occasionally remove fire if fire disabled
|
||||||
|
-- NOTE: Fire is normally extinguished in timer function
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Remove disabled fire",
|
||||||
|
nodenames = {"mcl_fire:fire"},
|
||||||
|
interval = 10,
|
||||||
|
chance = 10,
|
||||||
|
catch_up = false,
|
||||||
|
action = minetest.remove_node,
|
||||||
|
})
|
||||||
|
|
||||||
|
else -- Fire enabled
|
||||||
|
|
||||||
|
-- Set fire to air nodes
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Ignite fire by lava",
|
||||||
|
nodenames = {"group:lava"},
|
||||||
|
neighbors = {"air"},
|
||||||
|
interval = 7,
|
||||||
|
chance = 3,
|
||||||
|
catch_up = false,
|
||||||
|
action = function(pos)
|
||||||
|
local i, dir, target, node, i2, f
|
||||||
|
i = math.random(1,9)
|
||||||
|
dir = lava_fire[i]
|
||||||
|
target = {x=pos.x+dir.x, y=pos.y+dir.y, z=pos.z+dir.z}
|
||||||
|
node = minetest.get_node(target)
|
||||||
|
if not node or node.name ~= "air" then
|
||||||
|
i = ((i + math.random(0,7)) % 9) + 1
|
||||||
|
dir = lava_fire[i]
|
||||||
|
target = {x=pos.x+dir.x, y=pos.y+dir.y, z=pos.z+dir.z}
|
||||||
|
node = minetest.get_node(target)
|
||||||
|
if not node or node.name ~= "air" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
i2 = math.random(1,15)
|
||||||
|
if i2 < 10 then
|
||||||
|
local dir2, target2, node2
|
||||||
|
dir2 = lava_fire[i2]
|
||||||
|
target2 = {x=target.x+dir2.x, y=target.y+dir2.y, z=target.z+dir2.z}
|
||||||
|
node2 = minetest.get_node(target2)
|
||||||
|
if node2 and node2.name == "air" then
|
||||||
|
f = has_flammable(target2)
|
||||||
|
if f then
|
||||||
|
minetest.after(1, spawn_fire, {x=target2.x, y=target2.y, z=target2.z})
|
||||||
|
minetest.add_particle({
|
||||||
|
pos = vector.new({x=pos.x, y=pos.y+0.5, z=pos.z}),
|
||||||
|
velocity={x=f.x-pos.x, y=math.max(f.y-pos.y,0.7), z=f.z-pos.z},
|
||||||
|
expirationtime=1, size=1.5, collisiondetection=false,
|
||||||
|
glow=minetest.LIGHT_MAX, texture="mcl_particles_flame.png"
|
||||||
|
})
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
f = has_flammable(target)
|
||||||
|
if f then
|
||||||
|
minetest.after(1, spawn_fire, {x=target.x, y=target.y, z=target.z})
|
||||||
|
minetest.add_particle({
|
||||||
|
pos = vector.new({x=pos.x, y=pos.y+0.5, z=pos.z}),
|
||||||
|
velocity={x=f.x-pos.x, y=math.max(f.y-pos.y,0.25), z=f.z-pos.z},
|
||||||
|
expirationtime=1, size=1, collisiondetection=false,
|
||||||
|
glow=minetest.LIGHT_MAX, texture="mcl_particles_flame.png"
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- Set pointed_thing on (normal) fire.
|
-- Set pointed_thing on (normal) fire.
|
||||||
-- * pointed_thing: Pointed thing to ignite
|
-- * pointed_thing: Pointed thing to ignite
|
||||||
-- * player: Player who sets fire or nil if nobody
|
-- * player: Player who sets fire or nil if nobody
|
||||||
|
@ -328,144 +535,6 @@ mcl_fire.set_fire = function(pointed_thing, player, allow_on_fire)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
|
||||||
-- ABMs
|
|
||||||
--
|
|
||||||
|
|
||||||
-- Extinguish all flames quickly with water and such
|
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Extinguish fire",
|
|
||||||
nodenames = {"mcl_fire:fire", "mcl_fire:eternal_fire"},
|
|
||||||
neighbors = {"group:puts_out_fire"},
|
|
||||||
interval = 3,
|
|
||||||
chance = 1,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
|
||||||
minetest.remove_node(pos)
|
|
||||||
minetest.sound_play("fire_extinguish_flame",
|
|
||||||
{pos = pos, max_hear_distance = 16, gain = 0.15}, true)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
-- Enable the following ABMs according to 'enable fire' setting
|
|
||||||
|
|
||||||
-- [...]a fire that is not adjacent to any flammable block does not spread, even to another flammable block within the normal range.
|
|
||||||
-- https://minecraft.fandom.com/wiki/Fire#Spread
|
|
||||||
|
|
||||||
local function check_aircube(p1,p2)
|
|
||||||
local nds=minetest.find_nodes_in_area(p1,p2,{"air"})
|
|
||||||
shuffle_table(nds)
|
|
||||||
for k,v in pairs(nds) do
|
|
||||||
if has_flammable(v) then return v end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- [...] a fire block can turn any air block that is adjacent to a flammable block into a fire block. This can happen at a distance of up to one block downward, one block sideways (including diagonals), and four blocks upward of the original fire block (not the block the fire is on/next to).
|
|
||||||
local function get_ignitable(pos)
|
|
||||||
return check_aircube(vector.add(pos,vector.new(-1,-1,-1)),vector.add(pos,vector.new(1,4,1)))
|
|
||||||
end
|
|
||||||
-- Fire spreads from a still lava block similarly: any air block one above and up to one block sideways (including diagonals) or two above and two blocks sideways (including diagonals) that is adjacent to a flammable block may be turned into a fire block.
|
|
||||||
local function get_ignitable_by_lava(pos)
|
|
||||||
return check_aircube(vector.add(pos,vector.new(-1,1,-1)),vector.add(pos,vector.new(1,1,1))) or check_aircube(vector.add(pos,vector.new(-2,2,-2)),vector.add(pos,vector.new(2,2,2))) or nil
|
|
||||||
end
|
|
||||||
|
|
||||||
if not fire_enabled then
|
|
||||||
|
|
||||||
-- Occasionally remove fire if fire disabled
|
|
||||||
-- NOTE: Fire is normally extinguished in timer function
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Remove disabled fire",
|
|
||||||
nodenames = {"mcl_fire:fire"},
|
|
||||||
interval = 10,
|
|
||||||
chance = 10,
|
|
||||||
catch_up = false,
|
|
||||||
action = minetest.remove_node,
|
|
||||||
})
|
|
||||||
|
|
||||||
else -- Fire enabled
|
|
||||||
|
|
||||||
-- Fire Spread
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Ignite flame",
|
|
||||||
nodenames ={"mcl_fire:fire","mcl_fire:eternal_fire"},
|
|
||||||
interval = 7,
|
|
||||||
chance = 12,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos)
|
|
||||||
local p = get_ignitable(pos)
|
|
||||||
if p then
|
|
||||||
spawn_fire(p)
|
|
||||||
shuffle_table(adjacents)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
--lava fire spread
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Ignite fire by lava",
|
|
||||||
nodenames = {"mcl_core:lava_source","mcl_nether:nether_lava_source"},
|
|
||||||
neighbors = {"air","group:flammable"},
|
|
||||||
interval = 7,
|
|
||||||
chance = 3,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos)
|
|
||||||
local p=get_ignitable_by_lava(pos)
|
|
||||||
if p then
|
|
||||||
spawn_fire(p)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Remove fires",
|
|
||||||
nodenames = {"mcl_fire:fire"},
|
|
||||||
interval = 7,
|
|
||||||
chance = 3,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos)
|
|
||||||
local p=has_flammable(pos)
|
|
||||||
if p then
|
|
||||||
local n=minetest.get_node_or_nil(p)
|
|
||||||
if n and minetest.get_item_group(n.name, "flammable") < 1 then
|
|
||||||
minetest.remove_node(pos)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
minetest.remove_node(pos)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Remove flammable nodes around basic flame
|
|
||||||
minetest.register_abm({
|
|
||||||
label = "Remove flammable nodes",
|
|
||||||
nodenames = {"mcl_fire:fire","mcl_fire:eternal_fire"},
|
|
||||||
neighbors = {"group:flammable"},
|
|
||||||
interval = 5,
|
|
||||||
chance = 18,
|
|
||||||
catch_up = false,
|
|
||||||
action = function(pos)
|
|
||||||
local p = has_flammable(pos)
|
|
||||||
if not p then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local nn = minetest.get_node(p).name
|
|
||||||
local def = minetest.registered_nodes[nn]
|
|
||||||
local fgroup = minetest.get_item_group(nn, "flammable")
|
|
||||||
|
|
||||||
if def and def._on_burn then
|
|
||||||
def._on_burn(p)
|
|
||||||
elseif fgroup ~= -1 then
|
|
||||||
spawn_fire(p)
|
|
||||||
minetest.check_for_falling(p)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_lbm({
|
minetest.register_lbm({
|
||||||
label = "Smoke particles from fire",
|
label = "Smoke particles from fire",
|
||||||
name = "mcl_fire:smoke",
|
name = "mcl_fire:smoke",
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
# mcl_jukebox
|
|
||||||
|
|
||||||
## mcl_jukebox.register_record(title, author, identifier, image, sound)
|
|
||||||
|
|
||||||
* title: title of the track
|
|
||||||
* author: author of the track
|
|
||||||
* identifier: short string used in the item registration
|
|
||||||
* image: the texture of the track
|
|
||||||
* sound: sound file of the track
|
|
||||||
|
|
||||||
## mcl_jukebox.registered_records
|
|
||||||
|
|
||||||
Table indexed by item name containing:
|
|
||||||
* title: title of the track
|
|
||||||
* author: author of the track
|
|
||||||
* identifier: short string used in the item registration
|
|
||||||
* image: the texture of the track
|
|
||||||
* sound: sound file of the track
|
|
|
@ -1,8 +1,5 @@
|
||||||
local S = minetest.get_translator("mcl_jukebox")
|
local S = minetest.get_translator("mcl_jukebox")
|
||||||
|
|
||||||
mcl_jukebox = {}
|
|
||||||
mcl_jukebox.registered_records = {}
|
|
||||||
|
|
||||||
-- Player name-indexed table containing the currently heard track
|
-- Player name-indexed table containing the currently heard track
|
||||||
local active_tracks = {}
|
local active_tracks = {}
|
||||||
|
|
||||||
|
@ -13,30 +10,47 @@ local active_huds = {}
|
||||||
-- Used to make sure that minetest.after only applies to the latest HUD change event
|
-- Used to make sure that minetest.after only applies to the latest HUD change event
|
||||||
local hud_sequence_numbers = {}
|
local hud_sequence_numbers = {}
|
||||||
|
|
||||||
function mcl_jukebox.register_record(title, author, identifier, image, sound)
|
-- List of music
|
||||||
mcl_jukebox.registered_records["mcl_jukebox:record_"..identifier] = {title, author, identifier, image, sound}
|
local recorddata = {
|
||||||
local entryname = S("Music Disc")
|
-- { title, author, identifier }
|
||||||
local longdesc = S("A music disc holds a single music track which can be used in a jukebox to play music.")
|
{ "The Evil Sister (Jordach's Mix)", "SoundHelix", "13" } ,
|
||||||
local usagehelp = S("Place a music disc into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.")
|
{ "The Energetic Rat (Jordach's Mix)", "SoundHelix", "wait" },
|
||||||
minetest.register_craftitem(":mcl_jukebox:record_"..identifier, {
|
{ "Eastern Feeling", "Jordach", "blocks"},
|
||||||
|
{ "Minetest", "Jordach", "far" },
|
||||||
|
{ "Credit Roll (Jordach's HD Mix)", "Junichi Masuda", "chirp" },
|
||||||
|
{ "Winter Feeling", "Tom Peter", "strad" },
|
||||||
|
{ "Synthgroove (Jordach's Mix)", "HeroOfTheWinds", "mellohi" },
|
||||||
|
{ "The Clueless Frog (Jordach's Mix)", "SoundHelix", "mall" },
|
||||||
|
}
|
||||||
|
local records = #recorddata
|
||||||
|
|
||||||
|
for r=1, records do
|
||||||
|
local doc = false
|
||||||
|
local entryname, longdesc, usagehelp
|
||||||
|
if r == 1 then
|
||||||
|
doc = true
|
||||||
|
entryname = S("Music Disc")
|
||||||
|
longdesc = S("A music disc holds a single music track which can be used in a jukebox to play music.")
|
||||||
|
usagehelp = S("Place a music disc into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.")
|
||||||
|
end
|
||||||
|
minetest.register_craftitem("mcl_jukebox:record_"..r, {
|
||||||
description =
|
description =
|
||||||
core.colorize("#55FFFF", S("Music Disc")) .. "\n" ..
|
core.colorize("#55FFFF", S("Music Disc")) .. "\n" ..
|
||||||
core.colorize("#989898", S("@1—@2", author, title)),
|
core.colorize("#989898", S("@1—@2", recorddata[r][2], recorddata[r][1])),
|
||||||
_doc_items_create_entry = true,
|
_doc_items_create_entry = doc,
|
||||||
_doc_items_entry_name = entryname,
|
_doc_items_entry_name = entryname,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
_doc_items_usagehelp = usagehelp,
|
_doc_items_usagehelp = usagehelp,
|
||||||
--inventory_image = "mcl_jukebox_record_"..recorddata[r][3]..".png",
|
inventory_image = "mcl_jukebox_record_"..recorddata[r][3]..".png",
|
||||||
inventory_image = image,
|
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
groups = { music_record = 1 },
|
groups = { music_record = r },
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function now_playing(player, name)
|
local function now_playing(player, track_id)
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
local hud = active_huds[playername]
|
local hud = active_huds[playername]
|
||||||
local text = S("Now playing: @1—@2", mcl_jukebox.registered_records[name][2], mcl_jukebox.registered_records[name][1])
|
local text = S("Now playing: @1—@2", recorddata[track_id][2], recorddata[track_id][1])
|
||||||
|
|
||||||
if not hud_sequence_numbers[playername] then
|
if not hud_sequence_numbers[playername] then
|
||||||
hud_sequence_numbers[playername] = 1
|
hud_sequence_numbers[playername] = 1
|
||||||
|
@ -92,20 +106,18 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
local play_record = function(pos, itemstack, player)
|
local play_record = function(pos, itemstack, player)
|
||||||
local item_name = itemstack:get_name()
|
local record_id = minetest.get_item_group(itemstack:get_name(), "music_record")
|
||||||
-- ensure the jukebox uses the new record names for old records
|
if record_id ~= 0 then
|
||||||
local name = minetest.registered_aliases[item_name] or item_name
|
|
||||||
if mcl_jukebox.registered_records[name] then
|
|
||||||
local cname = player:get_player_name()
|
local cname = player:get_player_name()
|
||||||
if active_tracks[cname] ~= nil then
|
if active_tracks[cname] ~= nil then
|
||||||
minetest.sound_stop(active_tracks[cname])
|
minetest.sound_stop(active_tracks[cname])
|
||||||
active_tracks[cname] = nil
|
active_tracks[cname] = nil
|
||||||
end
|
end
|
||||||
active_tracks[cname] = minetest.sound_play(mcl_jukebox.registered_records[name][5], {
|
active_tracks[cname] = minetest.sound_play("mcl_jukebox_track_"..record_id, {
|
||||||
to_player = cname,
|
to_player = cname,
|
||||||
gain = 1,
|
gain = 1,
|
||||||
})
|
})
|
||||||
now_playing(player, name)
|
now_playing(player, record_id)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -227,22 +239,3 @@ minetest.register_craft({
|
||||||
recipe = "mcl_jukebox:jukebox",
|
recipe = "mcl_jukebox:jukebox",
|
||||||
burntime = 15,
|
burntime = 15,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_jukebox.register_record("The Evil Sister (Jordach's Mix)", "SoundHelix", "13", "mcl_jukebox_record_13.png", "mcl_jukebox_track_1")
|
|
||||||
mcl_jukebox.register_record("The Energetic Rat (Jordach's Mix)", "SoundHelix", "wait", "mcl_jukebox_record_wait.png", "mcl_jukebox_track_2")
|
|
||||||
mcl_jukebox.register_record("Eastern Feeling", "Jordach", "blocks", "mcl_jukebox_record_blocks.png", "mcl_jukebox_track_3")
|
|
||||||
mcl_jukebox.register_record("Minetest", "Jordach", "far", "mcl_jukebox_record_far.png", "mcl_jukebox_track_4")
|
|
||||||
mcl_jukebox.register_record("Credit Roll (Jordach's HD Mix)", "Junichi Masuda", "chirp", "mcl_jukebox_record_chirp.png", "mcl_jukebox_track_5")
|
|
||||||
mcl_jukebox.register_record("Winter Feeling", "Tom Peter", "strad", "mcl_jukebox_record_strad.png", "mcl_jukebox_track_6")
|
|
||||||
mcl_jukebox.register_record("Synthgroove (Jordach's Mix)", "HeroOfTheWinds", "mellohi", "mcl_jukebox_record_mellohi.png", "mcl_jukebox_track_7")
|
|
||||||
mcl_jukebox.register_record("The Clueless Frog (Jordach's Mix)", "SoundHelix", "mall", "mcl_jukebox_record_mall.png", "mcl_jukebox_track_8")
|
|
||||||
|
|
||||||
--add backward compatibility
|
|
||||||
minetest.register_alias("mcl_jukebox:record_1", "mcl_jukebox:record_13")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_2", "mcl_jukebox:record_wait")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_3", "mcl_jukebox:record_blocks")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_4", "mcl_jukebox:record_far")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_5", "mcl_jukebox:record_chirp")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_6", "mcl_jukebox:record_strad")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_7", "mcl_jukebox:record_mellohi")
|
|
||||||
minetest.register_alias("mcl_jukebox:record_8", "mcl_jukebox:record_mall")
|
|
|
@ -43,19 +43,13 @@ end
|
||||||
-- Checks if player is still allowed to display the minimap
|
-- Checks if player is still allowed to display the minimap
|
||||||
local function update_minimap(player)
|
local function update_minimap(player)
|
||||||
local creative = minetest.is_creative_enabled(player:get_player_name())
|
local creative = minetest.is_creative_enabled(player:get_player_name())
|
||||||
|
|
||||||
local newstate=false
|
|
||||||
local oldstate=player:hud_get_flags().minimap
|
|
||||||
|
|
||||||
if creative or has_item_in_hotbar(player, "mcl_maps:filled_map") then
|
|
||||||
newstate=true
|
|
||||||
end
|
|
||||||
|
|
||||||
if oldstate ~= newstate then
|
|
||||||
if creative then
|
if creative then
|
||||||
player:hud_set_flags({minimap = true, minimap_radar = true})
|
player:hud_set_flags({minimap=true, minimap_radar = true})
|
||||||
else
|
else
|
||||||
player:hud_set_flags({minimap = newstate, minimap_radar = false})
|
if has_item_in_hotbar(player, "mcl_maps:filled_map") then
|
||||||
|
player:hud_set_flags({minimap = true, minimap_radar = false})
|
||||||
|
else
|
||||||
|
player:hud_set_flags({minimap = false, minimap_radar = false})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -130,8 +130,6 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
ARROW_ENTITY.on_step = function(self, dtime)
|
ARROW_ENTITY.on_step = function(self, dtime)
|
||||||
self._time_in_air = self._time_in_air + dtime
|
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local dpos = table.copy(pos) -- digital pos
|
local dpos = table.copy(pos) -- digital pos
|
||||||
dpos = vector.round(dpos)
|
dpos = vector.round(dpos)
|
||||||
|
@ -195,10 +193,10 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
||||||
for k, obj in pairs(objs) do
|
for k, obj in pairs(objs) do
|
||||||
local ok = false
|
local ok = false
|
||||||
-- Arrows can only damage players and mobs
|
-- Arrows can only damage players and mobs
|
||||||
if obj:is_player() then
|
if obj ~= self._shooter and obj:is_player() then
|
||||||
ok = true
|
ok = true
|
||||||
elseif obj:get_luaentity() ~= nil then
|
elseif obj:get_luaentity() ~= nil then
|
||||||
if obj:get_luaentity()._cmi_is_mob or obj:get_luaentity()._hittable_by_projectile then
|
if obj ~= self._shooter and obj:get_luaentity()._cmi_is_mob then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -220,7 +218,7 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
||||||
local obj = closest_object
|
local obj = closest_object
|
||||||
local is_player = obj:is_player()
|
local is_player = obj:is_player()
|
||||||
local lua = obj:get_luaentity()
|
local lua = obj:get_luaentity()
|
||||||
if obj == self._shooter and self._time_in_air > 1 or obj ~= self._shooter and (is_player or (lua and (lua._cmi_is_mob or lua._hittable_by_projectile))) then
|
if obj ~= self._shooter and (is_player or (lua and lua._cmi_is_mob)) then
|
||||||
|
|
||||||
if obj:get_hp() > 0 then
|
if obj:get_hp() > 0 then
|
||||||
-- Check if there is no solid node between arrow and object
|
-- Check if there is no solid node between arrow and object
|
||||||
|
@ -258,9 +256,9 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
||||||
end
|
end
|
||||||
|
|
||||||
if is_player then
|
if is_player then
|
||||||
if self._shooter and self._shooter:is_player() and obj ~= self._shooter then
|
if self._shooter and self._shooter:is_player() then
|
||||||
-- “Ding” sound for hitting another player
|
-- “Ding” sound for hitting another player
|
||||||
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter:get_player_name()}, true)
|
minetest.sound_play({name="mcl_bows_hit_player", gain=0.1}, {to_player=self._shooter}, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -397,7 +395,6 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
||||||
|
|
||||||
ARROW_ENTITY.on_activate = function(self, staticdata, dtime_s)
|
ARROW_ENTITY.on_activate = function(self, staticdata, dtime_s)
|
||||||
local data = minetest.deserialize(staticdata)
|
local data = minetest.deserialize(staticdata)
|
||||||
self._time_in_air = dtime_s
|
|
||||||
if data then
|
if data then
|
||||||
self._stuck = data.stuck
|
self._stuck = data.stuck
|
||||||
if data.stuck then
|
if data.stuck then
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
local S = minetest.get_translator("mcl_tnt")
|
local S = minetest.get_translator("mcl_tnt")
|
||||||
local tnt_drop_rate = tonumber(minetest.settings:get("mcl_tnt_drop_rate") or 1.0)
|
|
||||||
local tnt_griefing = minetest.settings:get_bool("mcl_tnt_griefing", true)
|
local tnt_griefing = minetest.settings:get_bool("mcl_tnt_griefing", true)
|
||||||
|
|
||||||
local mod_death_messages = minetest.get_modpath("mcl_death_messages")
|
local mod_death_messages = minetest.get_modpath("mcl_death_messages")
|
||||||
|
@ -181,7 +180,7 @@ function TNT:on_step(dtime)
|
||||||
self.blinkstatus = not self.blinkstatus
|
self.blinkstatus = not self.blinkstatus
|
||||||
end
|
end
|
||||||
if self.timer > tnt.BOOMTIMER then
|
if self.timer > tnt.BOOMTIMER then
|
||||||
mcl_explosions.explode(self.object:get_pos(), 4, { drop_chance = tnt_drop_rate }, self.object)
|
mcl_explosions.explode(self.object:get_pos(), 4, {}, self.object)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -232,10 +232,10 @@ if minetest.get_modpath("mcl_farming") then
|
||||||
local wear = mcl_autogroup.get_wear(toolname, "shearsy")
|
local wear = mcl_autogroup.get_wear(toolname, "shearsy")
|
||||||
itemstack:add_wear(wear)
|
itemstack:add_wear(wear)
|
||||||
end
|
end
|
||||||
minetest.sound_play({name="default_grass_footstep", gain=1}, {pos = pointed_thing.above}, true)
|
minetest.sound_play({name="default_grass_footstep", gain=1}, {pos = above}, true)
|
||||||
local dir = vector.subtract(pointed_thing.under, pointed_thing.above)
|
local dir = vector.subtract(pointed_thing.under, pointed_thing.above)
|
||||||
local param2 = minetest.dir_to_facedir(dir)
|
local param2 = minetest.dir_to_facedir(dir)
|
||||||
minetest.set_node(pointed_thing.under, {name="mcl_farming:pumpkin_face", param2 = param2})
|
minetest.swap_node(pointed_thing.under, {name="mcl_farming:pumpkin_face", param2 = param2})
|
||||||
minetest.add_item(pointed_thing.above, "mcl_farming:pumpkin_seeds 4")
|
minetest.add_item(pointed_thing.above, "mcl_farming:pumpkin_seeds 4")
|
||||||
end
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -351,34 +351,6 @@ minetest.register_tool("mcl_tools:shovel_diamond", {
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Axes
|
-- Axes
|
||||||
local function make_stripped_trunk(itemstack, placer, pointed_thing)
|
|
||||||
if pointed_thing.type ~= "node" then return end
|
|
||||||
|
|
||||||
local node = minetest.get_node(pointed_thing.under)
|
|
||||||
local nodedef = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
|
|
||||||
|
|
||||||
if not placer:get_player_control().sneak and nodedef.on_rightclick then
|
|
||||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
|
||||||
end
|
|
||||||
if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then
|
|
||||||
minetest.record_protection_violation(pointed_thing.under, placer:get_player_name())
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
|
|
||||||
if nodedef._mcl_stripped_variant == nil then
|
|
||||||
return itemstack
|
|
||||||
else
|
|
||||||
minetest.swap_node(pointed_thing.under, {name=nodedef._mcl_stripped_variant, param2=node.param2})
|
|
||||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
|
||||||
-- Add wear (as if digging a axey node)
|
|
||||||
local toolname = itemstack:get_name()
|
|
||||||
local wear = mcl_autogroup.get_wear(toolname, "axey")
|
|
||||||
itemstack:add_wear(wear)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return itemstack
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_tool("mcl_tools:axe_wood", {
|
minetest.register_tool("mcl_tools:axe_wood", {
|
||||||
description = S("Wooden Axe"),
|
description = S("Wooden Axe"),
|
||||||
_doc_items_longdesc = axe_longdesc,
|
_doc_items_longdesc = axe_longdesc,
|
||||||
|
@ -392,7 +364,6 @@ minetest.register_tool("mcl_tools:axe_wood", {
|
||||||
damage_groups = {fleshy=7},
|
damage_groups = {fleshy=7},
|
||||||
punch_attack_uses = 30,
|
punch_attack_uses = 30,
|
||||||
},
|
},
|
||||||
on_place = make_stripped_trunk,
|
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
_repair_material = "group:wood",
|
_repair_material = "group:wood",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -412,7 +383,6 @@ minetest.register_tool("mcl_tools:axe_stone", {
|
||||||
damage_groups = {fleshy=9},
|
damage_groups = {fleshy=9},
|
||||||
punch_attack_uses = 66,
|
punch_attack_uses = 66,
|
||||||
},
|
},
|
||||||
on_place = make_stripped_trunk,
|
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
_repair_material = "mcl_core:cobble",
|
_repair_material = "mcl_core:cobble",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -433,7 +403,6 @@ minetest.register_tool("mcl_tools:axe_iron", {
|
||||||
damage_groups = {fleshy=9},
|
damage_groups = {fleshy=9},
|
||||||
punch_attack_uses = 126,
|
punch_attack_uses = 126,
|
||||||
},
|
},
|
||||||
on_place = make_stripped_trunk,
|
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
_repair_material = "mcl_core:iron_ingot",
|
_repair_material = "mcl_core:iron_ingot",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -453,7 +422,6 @@ minetest.register_tool("mcl_tools:axe_gold", {
|
||||||
damage_groups = {fleshy=7},
|
damage_groups = {fleshy=7},
|
||||||
punch_attack_uses = 17,
|
punch_attack_uses = 17,
|
||||||
},
|
},
|
||||||
on_place = make_stripped_trunk,
|
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
_repair_material = "mcl_core:gold_ingot",
|
_repair_material = "mcl_core:gold_ingot",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
@ -473,7 +441,6 @@ minetest.register_tool("mcl_tools:axe_diamond", {
|
||||||
damage_groups = {fleshy=9},
|
damage_groups = {fleshy=9},
|
||||||
punch_attack_uses = 781,
|
punch_attack_uses = 781,
|
||||||
},
|
},
|
||||||
on_place = make_stripped_trunk,
|
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
_repair_material = "mcl_core:diamond",
|
_repair_material = "mcl_core:diamond",
|
||||||
_mcl_toollike_wield = true,
|
_mcl_toollike_wield = true,
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
name = mcl_tools
|
name = mcl_tools
|
||||||
depends = mcl_sounds
|
depends = mcl_sounds, _mcl_autogroup
|
||||||
|
|
|
@ -176,7 +176,7 @@ minetest.register_tool("screwdriver:screwdriver", {
|
||||||
description = S("Screwdriver"),
|
description = S("Screwdriver"),
|
||||||
inventory_image = "screwdriver.png",
|
inventory_image = "screwdriver.png",
|
||||||
wield_image = "screwdriver.png^[transformFX",
|
wield_image = "screwdriver.png^[transformFX",
|
||||||
groups = { tool = 1 },
|
groups = { tool = 1, not_in_creative_inventory = 1 },
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200)
|
screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200)
|
||||||
return itemstack
|
return itemstack
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
name = screwdriver
|
|
|
@ -3532,7 +3532,7 @@ local function register_decorations()
|
||||||
-- Pumpkin
|
-- Pumpkin
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
decoration = "mcl_farming:pumpkin",
|
decoration = "mcl_farming:pumpkin_face",
|
||||||
param2 = 0,
|
param2 = 0,
|
||||||
param2_max = 3,
|
param2_max = 3,
|
||||||
place_on = {"group:grass_block_no_snow"},
|
place_on = {"group:grass_block_no_snow"},
|
||||||
|
|
|
@ -868,7 +868,7 @@ local function register_mgv6_decorations()
|
||||||
-- Pumpkin
|
-- Pumpkin
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
deco_type = "simple",
|
deco_type = "simple",
|
||||||
decoration = "mcl_farming:pumpkin",
|
decoration = "mcl_farming:pumpkin_face",
|
||||||
param2 = 0,
|
param2 = 0,
|
||||||
param2_max = 3,
|
param2_max = 3,
|
||||||
place_on = {"group:grass_block_no_snow"},
|
place_on = {"group:grass_block_no_snow"},
|
||||||
|
|
|
@ -532,24 +532,9 @@ local function dir_to_rotation(dir)
|
||||||
return "0"
|
return "0"
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_structures.generate_test_structure_comparator = function(pos, rotation, pr)
|
|
||||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_test_structure_comparator.mts"
|
|
||||||
mcl_structures.place_schematic(pos, path, rotation, nil, true, nil, nil, pr)
|
|
||||||
end
|
|
||||||
|
|
||||||
mcl_structures.generate_test_structure_fireproof = function(pos, rotation, pr)
|
|
||||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_test_structure_fireproof.mts"
|
|
||||||
mcl_structures.place_schematic(pos, path, rotation, nil, true, nil, nil, pr)
|
|
||||||
end
|
|
||||||
|
|
||||||
mcl_structures.generate_test_structure_tnt = function(pos, rotation, pr)
|
|
||||||
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_test_structure_tnt.mts"
|
|
||||||
mcl_structures.place_schematic(pos, path, rotation, nil, true, nil, nil, pr)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Debug command
|
-- Debug command
|
||||||
minetest.register_chatcommand("spawnstruct", {
|
minetest.register_chatcommand("spawnstruct", {
|
||||||
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine | test_structure_comparator | test_structure_fireproof | test_structure_tnt",
|
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine",
|
||||||
description = S("Generate a pre-defined structure near your position."),
|
description = S("Generate a pre-defined structure near your position."),
|
||||||
privs = {debug = true},
|
privs = {debug = true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
|
@ -583,12 +568,6 @@ minetest.register_chatcommand("spawnstruct", {
|
||||||
mcl_structures.generate_end_exit_portal(pos, rot, pr)
|
mcl_structures.generate_end_exit_portal(pos, rot, pr)
|
||||||
elseif param == "end_portal_shrine" then
|
elseif param == "end_portal_shrine" then
|
||||||
mcl_structures.generate_end_portal_shrine(pos, rot, pr)
|
mcl_structures.generate_end_portal_shrine(pos, rot, pr)
|
||||||
elseif param == "test_structure_comparator" then
|
|
||||||
mcl_structures.generate_test_structure_comparator(pos, rot, pr)
|
|
||||||
elseif param == "test_structure_fireproof" then
|
|
||||||
mcl_structures.generate_test_structure_fireproof(pos, rot, pr)
|
|
||||||
elseif param == "test_structure_tnt" then
|
|
||||||
mcl_structures.generate_test_structure_tnt(pos, rot, pr)
|
|
||||||
elseif param == "" then
|
elseif param == "" then
|
||||||
message = S("Error: No structure type given. Please use “/spawnstruct <type>”.")
|
message = S("Error: No structure type given. Please use “/spawnstruct <type>”.")
|
||||||
errord = true
|
errord = true
|
||||||
|
|