forked from VoxeLibre/VoxeLibre
fork update #10
|
@ -76,7 +76,7 @@ in singleplayer, post a screenshot of the message that Minetest showed
|
||||||
when the crash happened (or copy the message into your issue). If you
|
when the crash happened (or copy the message into your issue). If you
|
||||||
are a server admin, you can find error messages in the log file of the
|
are a server admin, you can find error messages in the log file of the
|
||||||
server.
|
server.
|
||||||
* Tell us which MineClone2 and Minetest versions you are using.
|
* Tell us which MineClone2 and Minetest versions you are using (from Minetest 5.7 type /ver, for previous versions, check the game.conf or README.md file).
|
||||||
* Tell us how to reproduce the problem: What you were doing to trigger
|
* Tell us how to reproduce the problem: What you were doing to trigger
|
||||||
the bug, e.g. before the crash happened or what causes the faulty
|
the bug, e.g. before the crash happened or what causes the faulty
|
||||||
behavior.
|
behavior.
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
* talamh
|
* talamh
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
* FossFanatic
|
* FossFanatic
|
||||||
|
* SmokeyDope
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
* Laurent Rocher
|
* Laurent Rocher
|
||||||
|
@ -81,15 +82,12 @@
|
||||||
* aldum
|
* aldum
|
||||||
* Dieter44
|
* Dieter44
|
||||||
* Pepebotella
|
* Pepebotella
|
||||||
* MrRar
|
|
||||||
* Lazerbeak12345
|
* Lazerbeak12345
|
||||||
* mrminer
|
* mrminer
|
||||||
* Thunder1035
|
* Thunder1035
|
||||||
* opfromthestart
|
* opfromthestart
|
||||||
* snowyu
|
* snowyu
|
||||||
* FaceDeer
|
* FaceDeer
|
||||||
* Faerraven / Michieal
|
|
||||||
* FossFanatic
|
|
||||||
* Herbert West
|
* Herbert West
|
||||||
* GuyLiner
|
* GuyLiner
|
||||||
* 3raven
|
* 3raven
|
||||||
|
@ -101,8 +99,8 @@
|
||||||
* b3nderman
|
* b3nderman
|
||||||
* CyberMango
|
* CyberMango
|
||||||
* gldrk
|
* gldrk
|
||||||
* SmokeyDope
|
|
||||||
* atomdmac
|
* atomdmac
|
||||||
|
* emptyshore
|
||||||
|
|
||||||
## MineClone5
|
## MineClone5
|
||||||
* kay27
|
* kay27
|
||||||
|
@ -176,6 +174,7 @@
|
||||||
* cora
|
* cora
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
* Nicu
|
* Nicu
|
||||||
|
* Exhale
|
||||||
|
|
||||||
## Translations
|
## Translations
|
||||||
* Wuzzy
|
* Wuzzy
|
||||||
|
|
10
RELEASE.md
10
RELEASE.md
|
@ -13,15 +13,15 @@ git add game.conf
|
||||||
|
|
||||||
#git add RELEASE.md
|
#git add RELEASE.md
|
||||||
|
|
||||||
git commit -m "Pre-release update credits and set version 0.82.0"
|
git commit -m "Pre-release update credits and set version 0.83.0"
|
||||||
|
|
||||||
git tag 0.82.0
|
git tag 0.83.0
|
||||||
|
|
||||||
git push origin 0.82.0
|
git push origin 0.83.0
|
||||||
|
|
||||||
#Update version in game.conf to -SNAPSHOT
|
#Update version in game.conf to the next version with -SNAPSHOT suffix
|
||||||
|
|
||||||
git commit -m "Post-release set version 0.82.0-SNAPSHOT"
|
git commit -m "Post-release set version 0.84.0-SNAPSHOT"
|
||||||
|
|
||||||
### Hotfix Release
|
### Hotfix Release
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
# Making Textures In Mineclone2
|
||||||
|
|
||||||
|
Textures are a crucial asset for all items, nodes, and models in mineclone2. This document is for artist who would like to make and modify textures for mineclone2. While no means comprehensive, this document contains the basic important information for beginners to get started with texture curation and optimization.
|
||||||
|
|
||||||
|
## Minetest Wiki
|
||||||
|
For more detailed information on creating and modifing texture packs for Minetest/Mineclone2, please visit the Minetest wiki's page on creating a texture pack. Click [here](https://wiki.minetest.net/Creating_texture_packs) to view the wiki page on creating texture packs.
|
||||||
|
|
||||||
|
## GIMP Tutorials Pixel Art Guide
|
||||||
|
GIMP Tutorials has an excellent guide to making pixel art in GIMP. If you would like further clarification as well as screenshots for what we are about to cover, it is an excellent resource to turn to. Click [here](https://thegimptutorials.com/how-to-make-pixel-art/) to view the guide
|
||||||
|
|
||||||
|
## Recommended Software
|
||||||
|
|
||||||
|
### GIMP
|
||||||
|
|
||||||
|
GIMP (Gnu Image Manipulation Program) is a very popular and free image editing software supported on Windows, MacOS, and most Linux distributions. It is recommended to use GIMP to create and modify textures within the minetest engine.
|
||||||
|
|
||||||
|
Download GIMP [here](http://gimp.org/)
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
## Creating a new file
|
||||||
|
the first thing to do is open GIMP and create a new file to work in by opening the File menu and choosing New.
|
||||||
|
|
||||||
|
Choose width of 16 and height of 16 for the image size. While higher resolution textures are possible, The default size is 16x16. It is recommended you use this size as well, as it is universally supported on all systems.
|
||||||
|
|
||||||
|
## Zoom In
|
||||||
|
Next, you'll want to zoom in as the canvas is very small at the default zoom level. To do this either use CTRL + mousewheel, +/-, or navigate to the View menu > zoom > zoom in
|
||||||
|
|
||||||
|
## Configure Grid
|
||||||
|
Now, we'll want to turn on the grid. Open the edit menu and enable the 'show grid' option.
|
||||||
|
|
||||||
|
The default grid size is 10 pixels, we want to change it to a 1 pixel grid. Go to the Image menu and choose 'configure grid.
|
||||||
|
|
||||||
|
In the Spacing section, change both the Horizontal and Vertical pixel settings to 1.00 then click ok and the grid will update.
|
||||||
|
|
||||||
|
## Pencil Tool & Color Picking
|
||||||
|
The most useful brush type for pixel art is the Pencil tool. Its nested under the paintbrush tool in the toolbox, or you can use the keyboard shortcut 'N'.
|
||||||
|
|
||||||
|
Once the pencil tool is selected, navigate to the sliders on the left side of the canvas and change brush size to 1 pixel.
|
||||||
|
|
||||||
|
Now choose a color! You can do this by clicking on the two colored squares under the toolbox. The Color Picker tool is also a good option if you already have a reference image for color palette.
|
||||||
|
|
||||||
|
## How to export optimally
|
||||||
|
|
||||||
|
Once you have finished up a texture and are ready to export it, navigate to the file menu > export as... and make sure the file name extention is .png
|
||||||
|
|
||||||
|
After clicking 'Export', a menu will appear with a bunch of options checked. Make sure to uncheck all of these options!!! This will drastically reduce the file size from multiple kilobytes to a couple of hundred bytes. Finally click 'Export' one more time.
|
||||||
|
|
||||||
|
### Further optimization with OptiPNG
|
||||||
|
For those running a GNU/linux distribution, you most likely have the 'optipng' command available to you. If it does not come with your system by default, the software homepage can be found [here](https://optipng.sourceforge.net/) where you can download and install from source.
|
||||||
|
|
||||||
|
First, Open up the terminal in the directory where your exported texture is located (or navigate to the directory with the 'cd your/directory/path/to/textures'), then run this command
|
||||||
|
```
|
||||||
|
optipng -o7 -zm1-9 -nc -clobber *.png
|
||||||
|
```
|
||||||
|
This will further optimize all the textures in the directory.
|
||||||
|
|
||||||
|
NOTE: If you would like to further edit a texture that has been optipng'd in GIMP, you must manually set the color palette back to RBG after opening. Navigate to Image menu > Mode > select RGB
|
|
@ -1,4 +1,4 @@
|
||||||
title = MineClone 2
|
title = MineClone 2
|
||||||
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
||||||
disallowed_mapgens = v6
|
disallowed_mapgens = v6
|
||||||
version=0.82.0-SNAPSHOT
|
version=0.84.0-SNAPSHOT
|
|
@ -352,6 +352,23 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Punch End Crystals to make them explode
|
||||||
|
if ent and ent.name == "mcl_end:crystal" then
|
||||||
|
if direct then
|
||||||
|
local puncher = direct:get_luaentity()
|
||||||
|
if puncher and puncher.name == "mcl_end:crystal" then
|
||||||
|
ent.object:punch(direct, 1.0, { -- End Crystal nearby, trigger it.
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 1},
|
||||||
|
}, nil, nil)
|
||||||
|
else
|
||||||
|
ent.object:remove() -- Direct Exists, but it is not an end crystal, remove crystal.
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ent.object:remove() -- Node exploded the end crystal, remove it.
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local airs, fires = {}, {}
|
local airs, fires = {}, {}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_explosions
|
||||||
|
@1 was caught in an explosion.=@1 est mort dans une explosion
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_explosions
|
||||||
|
@1 was caught in an explosion.=
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Oxidization API for MineClone 2
|
||||||
|
This mods adds the oxidization api, so that modders can easily use the same features that copper uses.
|
||||||
|
|
||||||
|
## API
|
||||||
|
To take advantage of the actual oxidization, put `oxidizable = 1` into the list of groups for the oxidizable node.
|
||||||
|
You would also need to put `_mcl_oxidized_variant = itemstring of node this node will oxidize into` into the node definition.
|
||||||
|
For example, a copper block oxidizes into exposed copper, so the defintion would be `_mcl_oxidized_variant = "mcl_copper:block_exposed"`.
|
||||||
|
|
||||||
|
To utilize the ability to wax the block for protection from oxidization, put `mcl_waxed_variant = item string of waxed variant of node` into the node definition table.
|
||||||
|
For example, Copper Blocks have the definition arguement of `_mcl_waxed_variant = "mcl_copper:waxed_block"`.
|
||||||
|
|
||||||
|
For waxed nodes, scraping is easy. Start by putting `waxed = 1` into the list of groups of the waxed node.
|
||||||
|
Next put `_mcl_stripped_variant = item string of the unwaxed variant of the node` into the defintion table.
|
||||||
|
Wxaed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.
|
|
@ -0,0 +1,12 @@
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Oxidatize Nodes",
|
||||||
|
nodenames = { "group:oxidizable" },
|
||||||
|
interval = 500,
|
||||||
|
chance = 3,
|
||||||
|
action = function(pos, node)
|
||||||
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
if def and def._mcl_oxidized_variant then
|
||||||
|
minetest.set_node(pos, { name = def._mcl_oxidized_variant, param2 = node.param2 })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
|
@ -0,0 +1,4 @@
|
||||||
|
name = mcl_oxidation
|
||||||
|
title = Oxidation API for MineClone 2
|
||||||
|
author = PrairieWind, N011, Michael
|
||||||
|
description = API to allow oxidizing different nodes.
|
|
@ -34,6 +34,64 @@ function mcl_util.mcl_log(message, module, bypass_default_logger)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local player_timers = {}
|
||||||
|
|
||||||
|
-- This is a dtime timer than can be used in on_step functions so it works every x seconds
|
||||||
|
-- self - Object you want to store timer data on. E.g. mob or a minecart, or player_name
|
||||||
|
-- dtime - The time since last run of on_step, should be passed in to function
|
||||||
|
-- timer_name - This is the name of the timer and also the key to store the data. No spaces + lowercase.
|
||||||
|
-- threshold - The time before it returns successful. 0.2 if you want to run it 5 times a second.
|
||||||
|
function mcl_util.check_dtime_timer(self, dtime, timer_name, threshold)
|
||||||
|
if not self or not threshold or not dtime then return end
|
||||||
|
if not timer_name or timer_name == "" then return end
|
||||||
|
|
||||||
|
if type(self) == "string" then
|
||||||
|
local player_name = self
|
||||||
|
if not player_timers[player_name] then
|
||||||
|
player_timers[player_name] = {}
|
||||||
|
end
|
||||||
|
self = player_timers[player_name]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self._timers then
|
||||||
|
self._timers = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self._timers[timer_name] then
|
||||||
|
self._timers[timer_name] = 0
|
||||||
|
else
|
||||||
|
self._timers[timer_name] = self._timers[timer_name] + dtime
|
||||||
|
--minetest.log("dtime: " .. tostring(self._timers[timer_name]))
|
||||||
|
end
|
||||||
|
|
||||||
|
if self._timers[timer_name] > threshold then
|
||||||
|
--minetest.log("Over threshold")
|
||||||
|
self._timers[timer_name] = 0
|
||||||
|
return true
|
||||||
|
--else
|
||||||
|
--minetest.log("Not over threshold")
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Minetest 5.3.0 or less can only measure the light level. This came in at 5.4
|
||||||
|
-- This function has been known to fail in multiple places so the error handling is added increase safety and improve
|
||||||
|
-- debugging. See:
|
||||||
|
-- https://git.minetest.land/MineClone2/MineClone2/issues/1392
|
||||||
|
function mcl_util.get_natural_light (pos, time)
|
||||||
|
local status, retVal = pcall(minetest.get_natural_light, pos, time)
|
||||||
|
if status then
|
||||||
|
return retVal
|
||||||
|
else
|
||||||
|
minetest.log("warning", "Failed to get natural light at pos: " .. dump(pos) .. ", time: " .. dump(time))
|
||||||
|
if (pos) then
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
minetest.log("warning", "Node at pos: " .. dump(node.name))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
function mcl_util.file_exists(name)
|
function mcl_util.file_exists(name)
|
||||||
if type(name) ~= "string" then return end
|
if type(name) ~= "string" then return end
|
||||||
local f = io.open(name)
|
local f = io.open(name)
|
||||||
|
|
|
@ -8,3 +8,6 @@ Jungle Boat=Barca de la selva
|
||||||
Oak Boat=Barca de roble
|
Oak Boat=Barca de roble
|
||||||
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo.
|
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo.
|
||||||
Spruce Boat=Barca de abeto
|
Spruce Boat=Barca de abeto
|
||||||
|
Water vehicle=Vehículo acuático
|
||||||
|
Sneak to dismount=Agáchate para bajar
|
||||||
|
Obsidian Boat=Barca de obsidiana
|
||||||
|
|
|
@ -11,3 +11,11 @@ Spruce Boat=Bateau en sapin
|
||||||
Water vehicle=Véhicule aquatique
|
Water vehicle=Véhicule aquatique
|
||||||
Sneak to dismount=Se baisser pour descendre
|
Sneak to dismount=Se baisser pour descendre
|
||||||
Obsidian Boat=Bateau en obsidienne
|
Obsidian Boat=Bateau en obsidienne
|
||||||
|
Mangrove Boat=Bateau en palétuvier
|
||||||
|
Oak Chest Boat=Bateau en chêne avec coffre
|
||||||
|
Spruce Chest Boat=Bateau en sapin avec coffre
|
||||||
|
Birch Chest Boat=Bateau en bouleau avec coffre
|
||||||
|
Jungle Chest Boat=Bateau en acajou avec coffre
|
||||||
|
Acacia Chest Boat=Bateau en acacia avec coffre
|
||||||
|
Dark Oak Chest Boat=Bateau en chêne noir avec coffre
|
||||||
|
Mangrove Chest Boat=Bateau en palétuvier avec coffre
|
||||||
|
|
|
@ -11,3 +11,11 @@ Spruce Boat=
|
||||||
Water vehicle=
|
Water vehicle=
|
||||||
Sneak to dismount=
|
Sneak to dismount=
|
||||||
Obsidian Boat=
|
Obsidian Boat=
|
||||||
|
Mangrove Boat=
|
||||||
|
Oak Chest Boat=
|
||||||
|
Spruce Chest Boat=
|
||||||
|
Birch Chest Boat=
|
||||||
|
Jungle Chest Boat=
|
||||||
|
Acacia Chest Boat=
|
||||||
|
Dark Oak Chest Boat=
|
||||||
|
Mangrove Chest Boat=
|
||||||
|
|
|
@ -5,7 +5,12 @@ function mcl_burning.get_storage(obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_burning.is_burning(obj)
|
function mcl_burning.is_burning(obj)
|
||||||
|
local storage = mcl_burning.get_storage(obj)
|
||||||
|
if storage then
|
||||||
return mcl_burning.get_storage(obj).burn_time
|
return mcl_burning.get_storage(obj).burn_time
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_burning.is_affected_by_rain(obj)
|
function mcl_burning.is_affected_by_rain(obj)
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 fue aplastado por un yunque.
|
||||||
|
@1 was smashed by a falling block.=@1 fue aplastado por un bloque.
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 a été écrasé par une enclume
|
||||||
|
@1 was smashed by a falling block.=@1 a été écrasé par un bloc
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=
|
||||||
|
@1 was smashed by a falling block.=
|
|
@ -7,12 +7,7 @@ local pool = {}
|
||||||
local tick = false
|
local tick = false
|
||||||
|
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_item_entities", false)
|
|
||||||
local function mcl_log(message)
|
|
||||||
if LOGGING_ON then
|
|
||||||
mcl_util.mcl_log(message, "[Item Entities]", true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
pool[player:get_player_name()] = 0
|
pool[player:get_player_name()] = 0
|
||||||
|
@ -408,114 +403,176 @@ local function cxcz(o, cw, one, zero)
|
||||||
return o
|
return o
|
||||||
end
|
end
|
||||||
|
|
||||||
local function hopper_take_item(self, pos)
|
local function nodes_destroy_items (self, moveresult, def, nn)
|
||||||
--mcl_log("self.itemstring: ".. self.itemstring)
|
local lg = minetest.get_item_group(nn, "lava")
|
||||||
--mcl_log("self.itemstring: ".. minetest.pos_to_string(pos))
|
local fg = minetest.get_item_group(nn, "fire")
|
||||||
|
local dg = minetest.get_item_group(nn, "destroys_items")
|
||||||
|
|
||||||
local objs = minetest.get_objects_inside_radius(pos, 2)
|
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
|
||||||
|
local item_string = self.itemstring
|
||||||
|
local item_name = ItemStack(item_string):get_name()
|
||||||
|
|
||||||
if objs and self.itemstring then
|
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
|
||||||
--mcl_log("there is an itemstring. Number of objs: ".. #objs)
|
if self.age > 2 and minetest.get_item_group(item_name, "fire_immune") == 0 then
|
||||||
|
if dg ~= 2 then
|
||||||
for k, v in pairs(objs) do
|
minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 })
|
||||||
local ent = v:get_luaentity()
|
end
|
||||||
|
self._removed = true
|
||||||
-- Don't forget actual hoppers
|
self.object:remove()
|
||||||
if ent and ent.name == "mcl_minecarts:hopper_minecart" then
|
return true
|
||||||
local taken_items = false
|
end
|
||||||
|
|
||||||
mcl_log("ent.name: " .. tostring(ent.name))
|
|
||||||
mcl_log("ent pos: " .. tostring(ent.object:get_pos()))
|
|
||||||
|
|
||||||
local inv = mcl_entity_invs.load_inv(ent, 5)
|
|
||||||
|
|
||||||
if not inv then
|
|
||||||
mcl_log("No inv")
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local current_itemstack = ItemStack(self.itemstring)
|
-- Destroy item when it collides with a cactus
|
||||||
|
if moveresult and moveresult.collides then
|
||||||
mcl_log("inv. size: " .. ent._inv_size)
|
for _, collision in pairs(moveresult.collisions) do
|
||||||
if inv:room_for_item("main", current_itemstack) then
|
local pos = collision.node_pos
|
||||||
mcl_log("Room")
|
if collision.type == "node" and minetest.get_node(pos).name == "mcl_core:cactus" then
|
||||||
inv:add_item("main", current_itemstack)
|
-- TODO We need to play a sound when it gets destroyed
|
||||||
self.object:get_luaentity().itemstring = ""
|
self._removed = true
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
taken_items = true
|
return true
|
||||||
else
|
end
|
||||||
mcl_log("no Room")
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not taken_items then
|
local function push_out_item_stuck_in_solid(self, dtime, p, def, is_in_water)
|
||||||
local items_remaining = current_itemstack:get_count()
|
if not is_in_water and def and def.walkable and def.groups and def.groups.opaque == 1 then
|
||||||
|
local shootdir
|
||||||
|
local cx = (p.x % 1) - 0.5
|
||||||
|
local cz = (p.z % 1) - 0.5
|
||||||
|
local order = {}
|
||||||
|
|
||||||
-- This will take part of a floating item stack if no slot can hold the full amount
|
-- First prepare the order in which the 4 sides are to be checked.
|
||||||
for i = 1, ent._inv_size, 1 do
|
-- 1st: closest
|
||||||
local stack = inv:get_stack("main", i)
|
-- 2nd: other direction
|
||||||
|
-- 3rd and 4th: other axis
|
||||||
mcl_log("i: " .. tostring(i))
|
if math.abs(cx) < math.abs(cz) then
|
||||||
mcl_log("Items remaining: " .. items_remaining)
|
order = cxcz(order, cx, "x", "z")
|
||||||
mcl_log("Name: " .. tostring(stack:get_name()))
|
order = cxcz(order, cz, "z", "x")
|
||||||
|
|
||||||
if current_itemstack:get_name() == stack:get_name() then
|
|
||||||
mcl_log("We have a match. Name: " .. tostring(stack:get_name()))
|
|
||||||
|
|
||||||
local room_for = stack:get_stack_max() - stack:get_count()
|
|
||||||
mcl_log("Room for: " .. tostring(room_for))
|
|
||||||
|
|
||||||
if room_for == 0 then
|
|
||||||
-- Do nothing
|
|
||||||
mcl_log("No room")
|
|
||||||
elseif room_for < items_remaining then
|
|
||||||
mcl_log("We have more items remaining than space")
|
|
||||||
|
|
||||||
items_remaining = items_remaining - room_for
|
|
||||||
stack:set_count(stack:get_stack_max())
|
|
||||||
inv:set_stack("main", i, stack)
|
|
||||||
taken_items = true
|
|
||||||
else
|
else
|
||||||
local new_stack_size = stack:get_count() + items_remaining
|
order = cxcz(order, cz, "z", "x")
|
||||||
stack:set_count(new_stack_size)
|
order = cxcz(order, cx, "x", "z")
|
||||||
mcl_log("We have more than enough space. Now holds: " .. new_stack_size)
|
end
|
||||||
|
|
||||||
inv:set_stack("main", i, stack)
|
-- Check which one of the 4 sides is free
|
||||||
items_remaining = 0
|
for o = 1, #order do
|
||||||
|
local nn = minetest.get_node(vector.add(p, order[o])).name
|
||||||
self.object:get_luaentity().itemstring = ""
|
local def = minetest.registered_nodes[nn]
|
||||||
self.object:remove()
|
if def and def.walkable == false and nn ~= "ignore" then
|
||||||
|
shootdir = order[o]
|
||||||
taken_items = true
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_log("Count: " .. tostring(stack:get_count()))
|
|
||||||
mcl_log("stack max: " .. tostring(stack:get_stack_max()))
|
|
||||||
--mcl_log("Is it empty: " .. stack:to_string())
|
|
||||||
end
|
|
||||||
|
|
||||||
if i == ent._inv_size and taken_items then
|
|
||||||
mcl_log("We are on last item and still have items left. Set final stack size: " .. items_remaining)
|
|
||||||
current_itemstack:set_count(items_remaining)
|
|
||||||
--mcl_log("Itemstack2: " .. current_itemstack:to_string())
|
|
||||||
self.itemstring = current_itemstack:to_string()
|
|
||||||
end
|
end
|
||||||
|
-- If none of the 4 sides is free, shoot upwards
|
||||||
|
if shootdir == nil then
|
||||||
|
shootdir = vector.new(0, 1, 0)
|
||||||
|
local nn = minetest.get_node(vector.add(p, shootdir)).name
|
||||||
|
if nn == "ignore" then
|
||||||
|
-- Do not push into ignore
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Add in, and delete
|
-- Set new item moving speed accordingly
|
||||||
if taken_items then
|
local newv = vector.multiply(shootdir, 3)
|
||||||
mcl_log("Saving")
|
self.object:set_acceleration(vector.zero())
|
||||||
mcl_entity_invs.save_inv(ent)
|
self.object:set_velocity(newv)
|
||||||
return taken_items
|
disable_physics(self.object, self, false, false)
|
||||||
|
|
||||||
|
|
||||||
|
if shootdir.y == 0 then
|
||||||
|
self._force = newv
|
||||||
|
p.x = math.floor(p.x)
|
||||||
|
p.y = math.floor(p.y)
|
||||||
|
p.z = math.floor(p.z)
|
||||||
|
self._forcestart = p
|
||||||
|
self._forcetimer = 1
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This code is run after the entity got a push from above “push away” code.
|
||||||
|
-- It is responsible for making sure the entity is entirely outside the solid node
|
||||||
|
-- (with its full collision box), not just its center.
|
||||||
|
if self._forcetimer > 0 then
|
||||||
|
local cbox = self.object:get_properties().collisionbox
|
||||||
|
local ok = false
|
||||||
|
if self._force.x > 0 and (p.x > (self._forcestart.x + 0.5 + (cbox[4] - cbox[1]) / 2)) then ok = true
|
||||||
|
elseif self._force.x < 0 and (p.x < (self._forcestart.x + 0.5 - (cbox[4] - cbox[1]) / 2)) then ok = true
|
||||||
|
elseif self._force.z > 0 and (p.z > (self._forcestart.z + 0.5 + (cbox[6] - cbox[3]) / 2)) then ok = true
|
||||||
|
elseif self._force.z < 0 and (p.z < (self._forcestart.z + 0.5 - (cbox[6] - cbox[3]) / 2)) then ok = true end
|
||||||
|
-- Item was successfully forced out. No more pushing
|
||||||
|
if ok then
|
||||||
|
self._forcetimer = -1
|
||||||
|
self._force = nil
|
||||||
|
enable_physics(self.object, self)
|
||||||
else
|
else
|
||||||
mcl_log("No need to save")
|
self._forcetimer = self._forcetimer - dtime
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
|
elseif self._force then
|
||||||
|
self._force = nil
|
||||||
|
enable_physics(self.object, self)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
local function move_items_in_water (self, p, def, node, is_floating, is_in_water)
|
||||||
|
-- Move item around on flowing liquids; add 'source' check to allow items to continue flowing a bit in the source block of flowing water.
|
||||||
|
if def and not is_floating and (def.liquidtype == "flowing" or def.liquidtype == "source") then
|
||||||
|
self._flowing = true
|
||||||
|
|
||||||
|
--[[ Get flowing direction (function call from flowlib), if there's a liquid.
|
||||||
|
NOTE: According to Qwertymine, flowlib.quickflow is only reliable for liquids with a flowing distance of 7.
|
||||||
|
Luckily, this is exactly what we need if we only care about water, which has this flowing distance. ]]
|
||||||
|
local vec = flowlib.quick_flow(p, node)
|
||||||
|
-- Just to make sure we don't manipulate the speed for no reason
|
||||||
|
if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then
|
||||||
|
-- Minecraft Wiki: Flowing speed is "about 1.39 meters per second"
|
||||||
|
local f = 1.2
|
||||||
|
-- Set new item moving speed into the direciton of the liquid
|
||||||
|
local newv = vector.multiply(vec, f)
|
||||||
|
-- Swap to acceleration instead of a static speed to better mimic MC mechanics.
|
||||||
|
self.object:set_acceleration(vector.new(newv.x, -0.22, newv.z))
|
||||||
|
|
||||||
|
self.physical_state = true
|
||||||
|
self._flowing = true
|
||||||
|
self.object:set_properties({
|
||||||
|
physical = true
|
||||||
|
})
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
if is_in_water and def.liquidtype == "source" then
|
||||||
|
local cur_vec = self.object:get_velocity()
|
||||||
|
-- apply some acceleration in the opposite direction so it doesn't slide forever
|
||||||
|
local vec = {
|
||||||
|
x = 0 - cur_vec.x * 0.9,
|
||||||
|
y = 3 - cur_vec.y * 0.9,
|
||||||
|
z = 0 - cur_vec.z * 0.9
|
||||||
|
}
|
||||||
|
self.object:set_acceleration(vec)
|
||||||
|
-- slow down the item in water
|
||||||
|
local vel = self.object:get_velocity()
|
||||||
|
if vel.y < 0 then
|
||||||
|
vel.y = vel.y * 0.9
|
||||||
|
end
|
||||||
|
self.object:set_velocity(vel)
|
||||||
|
if self.physical_state ~= false or self._flowing ~= true then
|
||||||
|
self.physical_state = true
|
||||||
|
self._flowing = true
|
||||||
|
self.object:set_properties({
|
||||||
|
physical = true
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif self._flowing == true and not is_in_water and not is_floating then
|
||||||
|
-- Disable flowing physics if not on/in flowing liquid
|
||||||
|
self._flowing = false
|
||||||
|
enable_physics(self.object, self, true)
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_entity(":__builtin:item", {
|
minetest.register_entity(":__builtin:item", {
|
||||||
|
@ -564,13 +621,17 @@ minetest.register_entity(":__builtin:item", {
|
||||||
if speed ~= nil then self.random_velocity = speed end
|
if speed ~= nil then self.random_velocity = speed end
|
||||||
|
|
||||||
local vel = self.object:get_velocity()
|
local vel = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- There is perhaps a cleverer way of making this physical so it bounces off the wall like swords.
|
||||||
|
local max_vel = 6.5 -- Faster than this and it throws it into the wall / floor and turns black because of clipping.
|
||||||
|
|
||||||
if vel and vel.x == 0 and vel.z == 0 and self.random_velocity > 0 then
|
if vel and vel.x == 0 and vel.z == 0 and self.random_velocity > 0 then
|
||||||
local v = self.random_velocity
|
local v = self.random_velocity
|
||||||
local x = math.random(5, 10) / 10 * v
|
local x = math.random(5, max_vel) / 10 * v
|
||||||
if math.random(0, 10) < 5 then x = -x end
|
if math.random(0, 10) < 5 then x = -x end
|
||||||
local z = math.random(5, 10) / 10 * v
|
local z = math.random(5, max_vel) / 10 * v
|
||||||
if math.random(0, 10) < 5 then z = -z end
|
if math.random(0, 10) < 5 then z = -z end
|
||||||
local y = math.random(2, 4)
|
local y = math.random(1, 2)
|
||||||
self.object:set_velocity(vector.new(x, y, z))
|
self.object:set_velocity(vector.new(x, y, z))
|
||||||
end
|
end
|
||||||
self.random_velocity = 0
|
self.random_velocity = 0
|
||||||
|
@ -747,11 +808,19 @@ minetest.register_entity(":__builtin:item", {
|
||||||
if total_count > max_count then
|
if total_count > max_count then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
-- Merge the remote stack into this one
|
|
||||||
|
|
||||||
-- local pos = object:get_pos()
|
-- Merge the remote stack into this one
|
||||||
-- pos.y = pos.y + ((total_count - count) / max_count) * 0.15
|
local self_pos = self.object:get_pos()
|
||||||
-- self.object:move_to(pos)
|
local pos = object:get_pos()
|
||||||
|
|
||||||
|
--local y = pos.y + ((total_count - count) / max_count) * 0.15
|
||||||
|
local x_diff = (self_pos.x - pos.x) / 2
|
||||||
|
local z_diff = (self_pos.z - pos.z) / 2
|
||||||
|
|
||||||
|
local new_pos = vector.offset(pos, x_diff, 0, z_diff)
|
||||||
|
new_pos.y = math.max(self_pos.y, pos.y) + 0.1
|
||||||
|
|
||||||
|
self.object:move_to(new_pos)
|
||||||
|
|
||||||
self.age = 0 -- Handle as new entity
|
self.age = 0 -- Handle as new entity
|
||||||
own_stack:set_count(total_count)
|
own_stack:set_count(total_count)
|
||||||
|
@ -772,6 +841,7 @@ minetest.register_entity(":__builtin:item", {
|
||||||
self.object:set_acceleration(vector.zero())
|
self.object:set_acceleration(vector.zero())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.age = self.age + dtime
|
self.age = self.age + dtime
|
||||||
if self._collector_timer then
|
if self._collector_timer then
|
||||||
self._collector_timer = self._collector_timer + dtime
|
self._collector_timer = self._collector_timer + dtime
|
||||||
|
@ -785,19 +855,13 @@ minetest.register_entity(":__builtin:item", {
|
||||||
-- otherwise there might have some data corruption.
|
-- otherwise there might have some data corruption.
|
||||||
if self.itemstring == "" then
|
if self.itemstring == "" then
|
||||||
minetest.log("warning",
|
minetest.log("warning",
|
||||||
"Item entity with empty itemstring found at " .. minetest.pos_to_string(self.object:get_pos()) ..
|
"Item entity with empty itemstring found and being deleted at: " .. minetest.pos_to_string(self.object:get_pos()))
|
||||||
"! Deleting it now.")
|
|
||||||
self._removed = true
|
self._removed = true
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local p = self.object:get_pos()
|
local p = self.object:get_pos()
|
||||||
-- If hopper has taken item, it has gone, and no operations should be conducted on this item
|
|
||||||
if hopper_take_item(self, p) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local node = minetest.get_node(p)
|
local node = minetest.get_node(p)
|
||||||
local in_unloaded = node.name == "ignore"
|
local in_unloaded = node.name == "ignore"
|
||||||
|
|
||||||
|
@ -807,6 +871,9 @@ minetest.register_entity(":__builtin:item", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if self.is_clock then
|
if self.is_clock then
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
textures = { "mcl_clock:clock_" .. (mcl_worlds.clock_works(p) and mcl_clock.old_time or mcl_clock.random_frame) }
|
textures = { "mcl_clock:clock_" .. (mcl_worlds.clock_works(p) and mcl_clock.old_time or mcl_clock.random_frame) }
|
||||||
|
@ -842,167 +909,12 @@ minetest.register_entity(":__builtin:item", {
|
||||||
-- Destroy item in lava, fire or special nodes
|
-- Destroy item in lava, fire or special nodes
|
||||||
|
|
||||||
local def = minetest.registered_nodes[nn]
|
local def = minetest.registered_nodes[nn]
|
||||||
local lg = minetest.get_item_group(nn, "lava")
|
|
||||||
local fg = minetest.get_item_group(nn, "fire")
|
|
||||||
local dg = minetest.get_item_group(nn, "destroys_items")
|
|
||||||
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
|
|
||||||
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
|
|
||||||
if self.age > 2 and minetest.get_item_group(self.itemstring, "fire_immune") == 0 then
|
|
||||||
if dg ~= 2 then
|
|
||||||
minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 })
|
|
||||||
end
|
|
||||||
self._removed = true
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Destroy item when it collides with a cactus
|
if nodes_destroy_items(self, moveresult, def, nn) then return end
|
||||||
if moveresult and moveresult.collides then
|
|
||||||
for _, collision in pairs(moveresult.collisions) do
|
|
||||||
local pos = collision.node_pos
|
|
||||||
if collision.type == "node" and minetest.get_node(pos).name == "mcl_core:cactus" then
|
|
||||||
self._removed = true
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Push item out when stuck inside solid opaque node
|
if push_out_item_stuck_in_solid(self, dtime, p, def, is_in_water) then return end
|
||||||
if not is_in_water and def and def.walkable and def.groups and def.groups.opaque == 1 then
|
|
||||||
local shootdir
|
|
||||||
local cx = (p.x % 1) - 0.5
|
|
||||||
local cz = (p.z % 1) - 0.5
|
|
||||||
local order = {}
|
|
||||||
|
|
||||||
-- First prepare the order in which the 4 sides are to be checked.
|
if move_items_in_water (self, p, def, node, is_floating, is_in_water) then return end
|
||||||
-- 1st: closest
|
|
||||||
-- 2nd: other direction
|
|
||||||
-- 3rd and 4th: other axis
|
|
||||||
if math.abs(cx) < math.abs(cz) then
|
|
||||||
order = cxcz(order, cx, "x", "z")
|
|
||||||
order = cxcz(order, cz, "z", "x")
|
|
||||||
else
|
|
||||||
order = cxcz(order, cz, "z", "x")
|
|
||||||
order = cxcz(order, cx, "x", "z")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check which one of the 4 sides is free
|
|
||||||
for o = 1, #order do
|
|
||||||
local nn = minetest.get_node(vector.add(p, order[o])).name
|
|
||||||
local def = minetest.registered_nodes[nn]
|
|
||||||
if def and def.walkable == false and nn ~= "ignore" then
|
|
||||||
shootdir = order[o]
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- If none of the 4 sides is free, shoot upwards
|
|
||||||
if shootdir == nil then
|
|
||||||
shootdir = vector.new(0, 1, 0)
|
|
||||||
local nn = minetest.get_node(vector.add(p, shootdir)).name
|
|
||||||
if nn == "ignore" then
|
|
||||||
-- Do not push into ignore
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set new item moving speed accordingly
|
|
||||||
local newv = vector.multiply(shootdir, 3)
|
|
||||||
self.object:set_acceleration(vector.zero())
|
|
||||||
self.object:set_velocity(newv)
|
|
||||||
disable_physics(self.object, self, false, false)
|
|
||||||
|
|
||||||
|
|
||||||
if shootdir.y == 0 then
|
|
||||||
self._force = newv
|
|
||||||
p.x = math.floor(p.x)
|
|
||||||
p.y = math.floor(p.y)
|
|
||||||
p.z = math.floor(p.z)
|
|
||||||
self._forcestart = p
|
|
||||||
self._forcetimer = 1
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This code is run after the entity got a push from above “push away” code.
|
|
||||||
-- It is responsible for making sure the entity is entirely outside the solid node
|
|
||||||
-- (with its full collision box), not just its center.
|
|
||||||
if self._forcetimer > 0 then
|
|
||||||
local cbox = self.object:get_properties().collisionbox
|
|
||||||
local ok = false
|
|
||||||
if self._force.x > 0 and (p.x > (self._forcestart.x + 0.5 + (cbox[4] - cbox[1]) / 2)) then ok = true
|
|
||||||
elseif self._force.x < 0 and (p.x < (self._forcestart.x + 0.5 - (cbox[4] - cbox[1]) / 2)) then ok = true
|
|
||||||
elseif self._force.z > 0 and (p.z > (self._forcestart.z + 0.5 + (cbox[6] - cbox[3]) / 2)) then ok = true
|
|
||||||
elseif self._force.z < 0 and (p.z < (self._forcestart.z + 0.5 - (cbox[6] - cbox[3]) / 2)) then ok = true end
|
|
||||||
-- Item was successfully forced out. No more pushing
|
|
||||||
if ok then
|
|
||||||
self._forcetimer = -1
|
|
||||||
self._force = nil
|
|
||||||
enable_physics(self.object, self)
|
|
||||||
else
|
|
||||||
self._forcetimer = self._forcetimer - dtime
|
|
||||||
end
|
|
||||||
return
|
|
||||||
elseif self._force then
|
|
||||||
self._force = nil
|
|
||||||
enable_physics(self.object, self)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Move item around on flowing liquids; add 'source' check to allow items to continue flowing a bit in the source block of flowing water.
|
|
||||||
if def and not is_floating and (def.liquidtype == "flowing" or def.liquidtype == "source") then
|
|
||||||
self._flowing = true
|
|
||||||
|
|
||||||
--[[ Get flowing direction (function call from flowlib), if there's a liquid.
|
|
||||||
NOTE: According to Qwertymine, flowlib.quickflow is only reliable for liquids with a flowing distance of 7.
|
|
||||||
Luckily, this is exactly what we need if we only care about water, which has this flowing distance. ]]
|
|
||||||
local vec = flowlib.quick_flow(p, node)
|
|
||||||
-- Just to make sure we don't manipulate the speed for no reason
|
|
||||||
if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then
|
|
||||||
-- Minecraft Wiki: Flowing speed is "about 1.39 meters per second"
|
|
||||||
local f = 1.2
|
|
||||||
-- Set new item moving speed into the direciton of the liquid
|
|
||||||
local newv = vector.multiply(vec, f)
|
|
||||||
-- Swap to acceleration instead of a static speed to better mimic MC mechanics.
|
|
||||||
self.object:set_acceleration(vector.new(newv.x, -0.22, newv.z))
|
|
||||||
|
|
||||||
self.physical_state = true
|
|
||||||
self._flowing = true
|
|
||||||
self.object:set_properties({
|
|
||||||
physical = true
|
|
||||||
})
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if is_in_water and def.liquidtype == "source" then
|
|
||||||
local cur_vec = self.object:get_velocity()
|
|
||||||
-- apply some acceleration in the opposite direction so it doesn't slide forever
|
|
||||||
local vec = {
|
|
||||||
x = 0 - cur_vec.x * 0.9,
|
|
||||||
y = 3 - cur_vec.y * 0.9,
|
|
||||||
z = 0 - cur_vec.z * 0.9
|
|
||||||
}
|
|
||||||
self.object:set_acceleration(vec)
|
|
||||||
-- slow down the item in water
|
|
||||||
local vel = self.object:get_velocity()
|
|
||||||
if vel.y < 0 then
|
|
||||||
vel.y = vel.y * 0.9
|
|
||||||
end
|
|
||||||
self.object:set_velocity(vel)
|
|
||||||
if self.physical_state ~= false or self._flowing ~= true then
|
|
||||||
self.physical_state = true
|
|
||||||
self._flowing = true
|
|
||||||
self.object:set_properties({
|
|
||||||
physical = true
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif self._flowing == true and not is_in_water and not is_floating then
|
|
||||||
-- Disable flowing physics if not on/in flowing liquid
|
|
||||||
self._flowing = false
|
|
||||||
enable_physics(self.object, self, true)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- If node is not registered or node is walkably solid and resting on nodebox
|
-- If node is not registered or node is walkably solid and resting on nodebox
|
||||||
local nn = minetest.get_node(vector.offset(p, 0, -0.5, 0)).name
|
local nn = minetest.get_node(vector.offset(p, 0, -0.5, 0)).name
|
||||||
|
@ -1011,14 +923,13 @@ minetest.register_entity(":__builtin:item", {
|
||||||
local is_on_floor = def and (def.walkable
|
local is_on_floor = def and (def.walkable
|
||||||
and not def.groups.slippery and v.y == 0)
|
and not def.groups.slippery and v.y == 0)
|
||||||
|
|
||||||
if not minetest.registered_nodes[nn]
|
if not minetest.registered_nodes[nn] or is_floating or is_on_floor then
|
||||||
or is_floating or is_on_floor then
|
|
||||||
local own_stack = ItemStack(self.object:get_luaentity().itemstring)
|
local own_stack = ItemStack(self.object:get_luaentity().itemstring)
|
||||||
-- Merge with close entities of the same item
|
-- Merge with close entities of the same item
|
||||||
for _, object in pairs(minetest.get_objects_inside_radius(p, 0.8)) do
|
for _, object in pairs(minetest.get_objects_inside_radius(p, 0.8)) do
|
||||||
local obj = object:get_luaentity()
|
local obj = object:get_luaentity()
|
||||||
if obj and obj.name == "__builtin:item"
|
if obj and obj.name == "__builtin:item" and obj.physical_state == false then
|
||||||
and obj.physical_state == false then
|
|
||||||
if self:try_merge_with(own_stack, object, obj) then
|
if self:try_merge_with(own_stack, object, obj) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,6 +11,14 @@ mcl_minecarts.check_float_time = 15
|
||||||
dofile(mcl_minecarts.modpath.."/functions.lua")
|
dofile(mcl_minecarts.modpath.."/functions.lua")
|
||||||
dofile(mcl_minecarts.modpath.."/rails.lua")
|
dofile(mcl_minecarts.modpath.."/rails.lua")
|
||||||
|
|
||||||
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_minecarts", false)
|
||||||
|
local function mcl_log(message)
|
||||||
|
if LOGGING_ON then
|
||||||
|
mcl_util.mcl_log(message, "[Minecarts]", true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function detach_driver(self)
|
local function detach_driver(self)
|
||||||
if not self._driver then
|
if not self._driver then
|
||||||
return
|
return
|
||||||
|
@ -51,6 +59,134 @@ end
|
||||||
|
|
||||||
local activate_normal_minecart = detach_driver
|
local activate_normal_minecart = detach_driver
|
||||||
|
|
||||||
|
local function hopper_take_item(self, dtime)
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
if not pos then return end
|
||||||
|
|
||||||
|
if not self or self.name ~= "mcl_minecarts:hopper_minecart" then return end
|
||||||
|
|
||||||
|
if mcl_util.check_dtime_timer(self, dtime, "hoppermc_take", 0.15) then
|
||||||
|
--minetest.log("The check timer was triggered: " .. dump(pos) .. ", name:" .. self.name)
|
||||||
|
else
|
||||||
|
--minetest.log("The check timer was not triggered")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--mcl_log("self.itemstring: ".. self.itemstring)
|
||||||
|
|
||||||
|
local above_pos = vector.offset(pos, 0, 0.9, 0)
|
||||||
|
--mcl_log("self.itemstring: ".. minetest.pos_to_string(above_pos))
|
||||||
|
local objs = minetest.get_objects_inside_radius(above_pos, 1.25)
|
||||||
|
|
||||||
|
if objs then
|
||||||
|
|
||||||
|
mcl_log("there is an itemstring. Number of objs: ".. #objs)
|
||||||
|
|
||||||
|
for k, v in pairs(objs) do
|
||||||
|
local ent = v:get_luaentity()
|
||||||
|
|
||||||
|
if ent._removed or not ent.itemstring or ent.itemstring == "" then
|
||||||
|
--minetest.log("Ignore this item")
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Don't forget actual hoppers
|
||||||
|
|
||||||
|
local taken_items = false
|
||||||
|
|
||||||
|
mcl_log("ent.name: " .. tostring(ent.name))
|
||||||
|
mcl_log("ent pos: " .. tostring(ent.object:get_pos()))
|
||||||
|
|
||||||
|
local inv = mcl_entity_invs.load_inv(self, 5)
|
||||||
|
|
||||||
|
if not inv then
|
||||||
|
mcl_log("No inv")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local current_itemstack = ItemStack(ent.itemstring)
|
||||||
|
|
||||||
|
mcl_log("inv. size: " .. self._inv_size)
|
||||||
|
if inv:room_for_item("main", current_itemstack) then
|
||||||
|
mcl_log("Room")
|
||||||
|
inv:add_item("main", current_itemstack)
|
||||||
|
ent.object:get_luaentity().itemstring = ""
|
||||||
|
ent.object:remove()
|
||||||
|
taken_items = true
|
||||||
|
else
|
||||||
|
mcl_log("no Room")
|
||||||
|
end
|
||||||
|
|
||||||
|
if not taken_items then
|
||||||
|
local items_remaining = current_itemstack:get_count()
|
||||||
|
|
||||||
|
-- This will take part of a floating item stack if no slot can hold the full amount
|
||||||
|
for i = 1, self._inv_size, 1 do
|
||||||
|
local stack = inv:get_stack("main", i)
|
||||||
|
|
||||||
|
mcl_log("i: " .. tostring(i))
|
||||||
|
mcl_log("Items remaining: " .. items_remaining)
|
||||||
|
mcl_log("Name: " .. tostring(stack:get_name()))
|
||||||
|
|
||||||
|
if current_itemstack:get_name() == stack:get_name() then
|
||||||
|
mcl_log("We have a match. Name: " .. tostring(stack:get_name()))
|
||||||
|
|
||||||
|
local room_for = stack:get_stack_max() - stack:get_count()
|
||||||
|
mcl_log("Room for: " .. tostring(room_for))
|
||||||
|
|
||||||
|
if room_for == 0 then
|
||||||
|
-- Do nothing
|
||||||
|
mcl_log("No room")
|
||||||
|
elseif room_for < items_remaining then
|
||||||
|
mcl_log("We have more items remaining than space")
|
||||||
|
|
||||||
|
items_remaining = items_remaining - room_for
|
||||||
|
stack:set_count(stack:get_stack_max())
|
||||||
|
inv:set_stack("main", i, stack)
|
||||||
|
taken_items = true
|
||||||
|
else
|
||||||
|
local new_stack_size = stack:get_count() + items_remaining
|
||||||
|
stack:set_count(new_stack_size)
|
||||||
|
mcl_log("We have more than enough space. Now holds: " .. new_stack_size)
|
||||||
|
|
||||||
|
inv:set_stack("main", i, stack)
|
||||||
|
items_remaining = 0
|
||||||
|
|
||||||
|
ent.object:get_luaentity().itemstring = ""
|
||||||
|
ent.object:remove()
|
||||||
|
|
||||||
|
taken_items = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
mcl_log("Count: " .. tostring(stack:get_count()))
|
||||||
|
mcl_log("stack max: " .. tostring(stack:get_stack_max()))
|
||||||
|
--mcl_log("Is it empty: " .. stack:to_string())
|
||||||
|
end
|
||||||
|
|
||||||
|
if i == self._inv_size and taken_items then
|
||||||
|
mcl_log("We are on last item and still have items left. Set final stack size: " .. items_remaining)
|
||||||
|
current_itemstack:set_count(items_remaining)
|
||||||
|
--mcl_log("Itemstack2: " .. current_itemstack:to_string())
|
||||||
|
ent.itemstring = current_itemstack:to_string()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Add in, and delete
|
||||||
|
if taken_items then
|
||||||
|
mcl_log("Saving")
|
||||||
|
mcl_entity_invs.save_inv(ent)
|
||||||
|
return taken_items
|
||||||
|
else
|
||||||
|
mcl_log("No need to save")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- Table for item-to-entity mapping. Keys: itemstring, Values: Corresponding entity ID
|
-- Table for item-to-entity mapping. Keys: itemstring, Values: Corresponding entity ID
|
||||||
local entity_mapping = {}
|
local entity_mapping = {}
|
||||||
|
|
||||||
|
@ -182,6 +318,8 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
local passenger_attach_position = vector.new(0, -1.75, 0)
|
local passenger_attach_position = vector.new(0, -1.75, 0)
|
||||||
|
|
||||||
function cart:on_step(dtime)
|
function cart:on_step(dtime)
|
||||||
|
hopper_take_item(self, dtime)
|
||||||
|
|
||||||
local ctrl, player = nil, nil
|
local ctrl, player = nil, nil
|
||||||
if self._driver then
|
if self._driver then
|
||||||
player = minetest.get_player_by_name(self._driver)
|
player = minetest.get_player_by_name(self._driver)
|
||||||
|
@ -232,15 +370,12 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Make room in the minecart after the mob dies
|
|
||||||
elseif self._passenger then
|
elseif self._passenger then
|
||||||
if math.random(1,20) == 1 then
|
local passenger_pos = self._passenger.object:get_pos()
|
||||||
local dead = self._passenger:check_for_death()
|
if not passenger_pos then
|
||||||
if dead == true then
|
|
||||||
self._passenger = nil
|
self._passenger = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- Drop minecart if it isn't on a rail anymore
|
-- Drop minecart if it isn't on a rail anymore
|
||||||
if self._last_float_check >= mcl_minecarts.check_float_time then
|
if self._last_float_check >= mcl_minecarts.check_float_time then
|
||||||
|
@ -266,19 +401,8 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Drop items and remove cart entity
|
-- Do not drop minecart. It goes off the rails too frequently, and anyone using them for farms won't
|
||||||
local pname = ""
|
-- notice and lose their iron and not bother. Not cool until fixed.
|
||||||
if player then
|
|
||||||
pname = player:get_player_name()
|
|
||||||
end
|
|
||||||
if not minetest.is_creative_enabled(pname) then
|
|
||||||
for d=1, #drop do
|
|
||||||
minetest.add_item(self.object:get_pos(), drop[d])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
self._last_float_check = 0
|
self._last_float_check = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -78,11 +78,10 @@ function mob_class:get_staticdata()
|
||||||
for _,p in pairs(minetest.get_connected_players()) do
|
for _,p in pairs(minetest.get_connected_players()) do
|
||||||
self:remove_particlespawners(p:get_player_name())
|
self:remove_particlespawners(p:get_player_name())
|
||||||
end
|
end
|
||||||
|
|
||||||
-- remove mob when out of range unless tamed
|
-- remove mob when out of range unless tamed
|
||||||
if remove_far
|
if remove_far
|
||||||
and self.can_despawn
|
and self:despawn_allowed()
|
||||||
and self.remove_ok
|
|
||||||
and ((not self.nametag) or (self.nametag == ""))
|
|
||||||
and self.lifetimer <= 20 then
|
and self.lifetimer <= 20 then
|
||||||
if spawn_logging then
|
if spawn_logging then
|
||||||
minetest.log("action", "[mcl_mobs] Mob "..tostring(self.name).." despawns at "..minetest.pos_to_string(vector.round(self.object:get_pos())) .. " - out of range")
|
minetest.log("action", "[mcl_mobs] Mob "..tostring(self.name).." despawns at "..minetest.pos_to_string(vector.round(self.object:get_pos())) .. " - out of range")
|
||||||
|
@ -91,7 +90,6 @@ function mob_class:get_staticdata()
|
||||||
return "remove"-- nil
|
return "remove"-- nil
|
||||||
end
|
end
|
||||||
|
|
||||||
self.remove_ok = true
|
|
||||||
self.attack = nil
|
self.attack = nil
|
||||||
self.following = nil
|
self.following = nil
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
|
@ -113,6 +111,21 @@ function mob_class:get_staticdata()
|
||||||
return minetest.serialize(tmp)
|
return minetest.serialize(tmp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function valid_texture(self, def_textures)
|
||||||
|
if not self.base_texture then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.texture_selected then
|
||||||
|
if #def_textures < self.texture_selected then
|
||||||
|
self.texture_selected = nil
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:mob_activate(staticdata, def, dtime)
|
function mob_class:mob_activate(staticdata, def, dtime)
|
||||||
if not self.object:get_pos() or staticdata == "remove" then
|
if not self.object:get_pos() or staticdata == "remove" then
|
||||||
mcl_burning.extinguish(self.object)
|
mcl_burning.extinguish(self.object)
|
||||||
|
@ -135,16 +148,20 @@ function mob_class:mob_activate(staticdata, def, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
--If textures in definition change, reload textures
|
--If textures in definition change, reload textures
|
||||||
if not self.base_texture or (def.textures and table.indexof(def.textures, self.base_texture) == -1) then
|
if not valid_texture(self, def.textures) then
|
||||||
|
|
||||||
-- compatiblity with old simple mobs textures
|
-- compatiblity with old simple mobs textures
|
||||||
if type(def.textures[1]) == "string" then
|
if type(def.textures[1]) == "string" then
|
||||||
def.textures = {def.textures}
|
def.textures = {def.textures}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not self.texture_selected then
|
||||||
local c = 1
|
local c = 1
|
||||||
if #def.textures > c then c = #def.textures end
|
if #def.textures > c then c = #def.textures end
|
||||||
|
self.texture_selected = math.random(c)
|
||||||
|
end
|
||||||
|
|
||||||
self.base_texture = def.textures[math.random(c)]
|
self.base_texture = def.textures[self.texture_selected]
|
||||||
self.base_mesh = def.mesh
|
self.base_mesh = def.mesh
|
||||||
self.base_size = self.visual_size
|
self.base_size = self.visual_size
|
||||||
self.base_colbox = self.collisionbox
|
self.base_colbox = self.collisionbox
|
||||||
|
@ -299,46 +316,33 @@ end
|
||||||
|
|
||||||
-- execute current state (stand, walk, run, attacks)
|
-- execute current state (stand, walk, run, attacks)
|
||||||
-- returns true if mob has died
|
-- returns true if mob has died
|
||||||
function mob_class:do_states(dtime)
|
function mob_class:do_states(dtime, player_in_active_range)
|
||||||
--if self.can_open_doors then check_doors(self) end
|
--if self.can_open_doors then check_doors(self) end
|
||||||
|
|
||||||
if self.state == "stand" then
|
|
||||||
self:do_states_stand()
|
|
||||||
elseif self.state == PATHFINDING then
|
|
||||||
self:check_gowp(dtime)
|
|
||||||
elseif self.state == "walk" then
|
|
||||||
self:do_states_walk()
|
|
||||||
elseif self.state == "runaway" then
|
|
||||||
-- runaway when punched
|
|
||||||
self:do_states_runaway()
|
|
||||||
elseif self.state == "attack" then
|
|
||||||
-- attack routines (explode, dogfight, shoot, dogshoot)
|
|
||||||
if self:do_states_attack(dtime) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function update_timers (self, dtime)
|
|
||||||
-- knockback timer. set in on_punch
|
-- knockback timer. set in on_punch
|
||||||
if self.pause_timer > 0 then
|
if self.pause_timer > 0 then
|
||||||
self.pause_timer = self.pause_timer - dtime
|
self.pause_timer = self.pause_timer - dtime
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
self:env_danger_movement_checks(player_in_active_range)
|
||||||
|
|
||||||
|
if self.state == PATHFINDING then
|
||||||
|
self:check_gowp(dtime)
|
||||||
|
elseif self.state == "attack" then
|
||||||
|
if self:do_states_attack(dtime) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
else
|
||||||
-- attack timer. Not anymore, it seems. Used for also occassionally processing mob step too!
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_dostates", 1) then
|
||||||
self.timer = self.timer + dtime
|
if self.state == "stand" then
|
||||||
|
self:do_states_stand(player_in_active_range)
|
||||||
if self.state ~= "attack" and self.state ~= PATHFINDING then
|
elseif self.state == "walk" then
|
||||||
if self.timer < 1 then
|
self:do_states_walk()
|
||||||
return true
|
elseif self.state == "runaway" then
|
||||||
|
self:do_states_runaway()
|
||||||
end
|
end
|
||||||
self.timer = 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- never go over 100
|
|
||||||
if self.timer > 100 then
|
|
||||||
self.timer = 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -366,6 +370,8 @@ function mob_class:outside_limits()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function on_step_work (self, dtime)
|
local function on_step_work (self, dtime)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if not pos then return end
|
if not pos then return end
|
||||||
|
@ -381,30 +387,22 @@ local function on_step_work (self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:falling(pos) then return end
|
if self:falling(pos) then return end
|
||||||
|
if self:step_damage (dtime, pos) then return end
|
||||||
local player_in_active_range = self:player_in_active_range()
|
|
||||||
|
|
||||||
self:check_suspend(player_in_active_range)
|
|
||||||
|
|
||||||
if not self.fire_resistant then
|
|
||||||
mcl_burning.tick(self.object, dtime, self)
|
|
||||||
if not self.object:get_pos() then return end -- mcl_burning.tick may remove object immediately
|
|
||||||
|
|
||||||
if self:check_for_death("fire", {type = "fire"}) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if self:env_damage (dtime, pos) then return end
|
|
||||||
|
|
||||||
if self.state == "die" then return end
|
if self.state == "die" then return end
|
||||||
-- End: Death/damage processing
|
-- End: Death/damage processing
|
||||||
|
|
||||||
self:check_water_flow()
|
local player_in_active_range = self:player_in_active_range()
|
||||||
self:env_danger_movement_checks (dtime)
|
self:check_suspend(player_in_active_range)
|
||||||
|
|
||||||
|
self:check_water_flow()
|
||||||
|
|
||||||
|
if not self._jumping_cliff then
|
||||||
|
self._can_jump_cliff = self:can_jump_cliff()
|
||||||
|
else
|
||||||
|
self._can_jump_cliff = false
|
||||||
|
end
|
||||||
|
|
||||||
-- Follow code is heavy and probably shouldn't run when not in range, but we need to extract the cancel follow stuff
|
|
||||||
self:check_follow()
|
|
||||||
self:flop()
|
self:flop()
|
||||||
|
|
||||||
self:check_smooth_rotation(dtime)
|
self:check_smooth_rotation(dtime)
|
||||||
|
@ -414,46 +412,37 @@ local function on_step_work (self, dtime)
|
||||||
|
|
||||||
self:check_head_swivel(dtime)
|
self:check_head_swivel(dtime)
|
||||||
|
|
||||||
if self.jump_sound_cooloff > 0 then self.jump_sound_cooloff = self.jump_sound_cooloff - dtime end
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_engage", 0.2) then
|
||||||
self:do_jump()
|
self:check_follow()
|
||||||
|
|
||||||
self:check_runaway_from()
|
self:check_runaway_from()
|
||||||
self:monster_attack()
|
self:monster_attack()
|
||||||
self:npc_attack()
|
self:npc_attack()
|
||||||
|
end
|
||||||
|
|
||||||
self:check_herd(dtime)
|
self:check_herd(dtime)
|
||||||
|
|
||||||
|
if self.jump_sound_cooloff > 0 then self.jump_sound_cooloff = self.jump_sound_cooloff - dtime end
|
||||||
|
self:do_jump()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:check_aggro(dtime)
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_occassional", 1) then
|
||||||
|
|
||||||
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
|
||||||
|
|
||||||
-- In certain circumstances, we abandon processing of certain functionality
|
|
||||||
local skip_processing = false
|
|
||||||
if update_timers(self, dtime) then
|
|
||||||
skip_processing = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if not skip_processing then
|
|
||||||
self:check_breeding()
|
|
||||||
|
|
||||||
if player_in_active_range then
|
if player_in_active_range then
|
||||||
self:check_item_pickup()
|
self:check_item_pickup()
|
||||||
self:set_armor_texture()
|
self:set_armor_texture()
|
||||||
|
self:step_opinion_sound(dtime)
|
||||||
|
end
|
||||||
|
|
||||||
if self.opinion_sound_cooloff > 0 then
|
self:check_breeding()
|
||||||
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
|
|
||||||
end
|
|
||||||
-- mob plays random sound at times. Should be 120. Zombie and mob farms are ridiculous
|
|
||||||
if math.random(1, 70) == 1 then
|
|
||||||
self:mob_sound("random", true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:check_aggro(dtime)
|
||||||
|
|
||||||
self:check_particlespawners(dtime)
|
self:check_particlespawners(dtime)
|
||||||
|
|
||||||
if self:do_states(dtime) then return end
|
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
||||||
end
|
|
||||||
|
if self:do_states(dtime, player_in_active_range) then return end
|
||||||
|
|
||||||
if mobs_debug then self:update_tag() end
|
if mobs_debug then self:update_tag() end
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,7 @@ functions needed for the mob to work properly which contains the following:
|
||||||
'custom_visual_size' will not reset visual_size from the base class on reload
|
'custom_visual_size' will not reset visual_size from the base class on reload
|
||||||
'noyaw' If true this mob will not automatically change yaw
|
'noyaw' If true this mob will not automatically change yaw
|
||||||
'particlespawners' Table of particlespawners attached to the mob. This is implemented in a coord safe manner i.e. spawners are only sent to players within the player_transfer_distance (and automatically removed). This enables infinitely lived particlespawners.
|
'particlespawners' Table of particlespawners attached to the mob. This is implemented in a coord safe manner i.e. spawners are only sent to players within the player_transfer_distance (and automatically removed). This enables infinitely lived particlespawners.
|
||||||
|
'attack_frequency' Attack frequency in seconds. If unset, this defaults to 1. Implemented for melee only atm.
|
||||||
|
|
||||||
mobs:gopath(self,target,callback_arrived) pathfind a way to target and run callback on arrival
|
mobs:gopath(self,target,callback_arrived) pathfind a way to target and run callback on arrival
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ function mob_class:feed_tame(clicker, feed_count, breed, tame, notake)
|
||||||
if self.food >= feed_count then
|
if self.food >= feed_count then
|
||||||
self.food = 0
|
self.food = 0
|
||||||
self.horny = true
|
self.horny = true
|
||||||
|
self.persistent = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ local stuck_path_timeout = 10 -- how long will mob follow path before giving up
|
||||||
|
|
||||||
local enable_pathfinding = true
|
local enable_pathfinding = true
|
||||||
|
|
||||||
|
local TIME_TO_FORGET_TARGET = 15
|
||||||
|
|
||||||
local atann = math.atan
|
local atann = math.atan
|
||||||
local function atan(x)
|
local function atan(x)
|
||||||
if not x or x ~= x then
|
if not x or x ~= x then
|
||||||
|
@ -398,7 +400,8 @@ function mob_class:monster_attack()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- choose closest player to attack
|
-- choose closest player to attack
|
||||||
if dist < min_dist and not attacked_p and self:line_of_sight( sp, p, 2) == true then
|
local line_of_sight = self:line_of_sight( sp, p, 2) == true
|
||||||
|
if dist < min_dist and not attacked_p and line_of_sight then
|
||||||
min_dist = dist
|
min_dist = dist
|
||||||
min_player = player
|
min_player = player
|
||||||
end
|
end
|
||||||
|
@ -810,19 +813,9 @@ function mob_class:check_aggro(dtime)
|
||||||
self._check_aggro_timer = self._check_aggro_timer + dtime
|
self._check_aggro_timer = self._check_aggro_timer + dtime
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:do_states_attack (dtime)
|
|
||||||
local yaw = self.object:get_yaw() or 0
|
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
|
||||||
local p = self.attack:get_pos() or s
|
|
||||||
|
|
||||||
-- stop attacking if player invisible or out of range
|
|
||||||
if not self.attack
|
|
||||||
or not self.attack:get_pos()
|
|
||||||
or not self:object_in_range(self.attack)
|
|
||||||
or self.attack:get_hp() <= 0
|
|
||||||
or (self.attack:is_player() and mcl_mobs.invis[ self.attack:get_player_name() ]) then
|
|
||||||
|
|
||||||
|
local function clear_aggro(self)
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
|
@ -834,24 +827,55 @@ function mob_class:do_states_attack (dtime)
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
self.path.way = nil
|
self.path.way = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function mob_class:do_states_attack (dtime)
|
||||||
|
self.timer = self.timer + dtime
|
||||||
|
if self.timer > 100 then
|
||||||
|
self.timer = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
local s = self.object:get_pos()
|
||||||
|
if not s then return end
|
||||||
|
|
||||||
|
local p = self.attack:get_pos() or s
|
||||||
|
|
||||||
|
local yaw = self.object:get_yaw() or 0
|
||||||
|
|
||||||
|
-- stop attacking if player invisible or out of range
|
||||||
|
if not self.attack
|
||||||
|
or not self.attack:get_pos()
|
||||||
|
or not self:object_in_range(self.attack)
|
||||||
|
or self.attack:get_hp() <= 0
|
||||||
|
or (self.attack:is_player() and mcl_mobs.invis[ self.attack:get_player_name() ]) then
|
||||||
|
|
||||||
|
clear_aggro(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local target_line_of_sight = self:line_of_sight(s, p, 2)
|
||||||
|
if not target_line_of_sight then
|
||||||
|
if self.target_time_lost then
|
||||||
|
local time_since_seen = os.time() - self.target_time_lost
|
||||||
|
if time_since_seen > TIME_TO_FORGET_TARGET then
|
||||||
|
self.target_time_lost = nil
|
||||||
|
clear_aggro(self)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.target_time_lost = os.time()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.target_time_lost = nil
|
||||||
|
end
|
||||||
|
|
||||||
-- calculate distance from mob and enemy
|
-- calculate distance from mob and enemy
|
||||||
local dist = vector.distance(p, s)
|
local dist = vector.distance(p, s)
|
||||||
|
|
||||||
if self.attack_type == "explode" then
|
if self.attack_type == "explode" then
|
||||||
|
local vec = { x = p.x - s.x, z = p.z - s.z }
|
||||||
local vec = {
|
|
||||||
x = p.x - s.x,
|
|
||||||
z = p.z - s.z
|
|
||||||
}
|
|
||||||
|
|
||||||
yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
|
yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
|
||||||
|
|
||||||
if p.x > s.x then yaw = yaw +math.pi end
|
if p.x > s.x then yaw = yaw +math.pi end
|
||||||
|
|
||||||
yaw = self:set_yaw( yaw, 0, dtime)
|
yaw = self:set_yaw( yaw, 0, dtime)
|
||||||
|
|
||||||
local node_break_radius = self.explosion_radius or 1
|
local node_break_radius = self.explosion_radius or 1
|
||||||
|
@ -859,20 +883,15 @@ function mob_class:do_states_attack (dtime)
|
||||||
or (node_break_radius * 2)
|
or (node_break_radius * 2)
|
||||||
|
|
||||||
-- start timer when in reach and line of sight
|
-- start timer when in reach and line of sight
|
||||||
if not self.v_start
|
if not self.v_start and dist <= self.reach and target_line_of_sight then
|
||||||
and dist <= self.reach
|
|
||||||
and self:line_of_sight( s, p, 2) then
|
|
||||||
|
|
||||||
self.v_start = true
|
self.v_start = true
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
self:mob_sound("fuse", nil, false)
|
self:mob_sound("fuse", nil, false)
|
||||||
|
|
||||||
-- stop timer if out of reach or direct line of sight
|
-- stop timer if out of reach or direct line of sight
|
||||||
elseif self.allow_fuse_reset
|
elseif self.allow_fuse_reset and self.v_start
|
||||||
and self.v_start
|
and (dist >= self.explosiontimer_reset_radius or not target_line_of_sight) then
|
||||||
and (dist >= self.explosiontimer_reset_radius
|
|
||||||
or not self:line_of_sight( s, p, 2)) then
|
|
||||||
self.v_start = false
|
self.v_start = false
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
|
@ -894,25 +913,20 @@ function mob_class:do_states_attack (dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.v_start then
|
if self.v_start then
|
||||||
|
|
||||||
self.timer = self.timer + dtime
|
self.timer = self.timer + dtime
|
||||||
self.blinktimer = (self.blinktimer or 0) + dtime
|
self.blinktimer = (self.blinktimer or 0) + dtime
|
||||||
|
|
||||||
if self.blinktimer > 0.2 then
|
if self.blinktimer > 0.2 then
|
||||||
|
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
|
|
||||||
if self.blinkstatus then
|
if self.blinkstatus then
|
||||||
self:remove_texture_mod("^[brighten")
|
self:remove_texture_mod("^[brighten")
|
||||||
else
|
else
|
||||||
self:add_texture_mod("^[brighten")
|
self:add_texture_mod("^[brighten")
|
||||||
end
|
end
|
||||||
|
|
||||||
self.blinkstatus = not self.blinkstatus
|
self.blinkstatus = not self.blinkstatus
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.timer > self.explosion_timer then
|
if self.timer > self.explosion_timer then
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if mobs_griefing and not minetest.is_protected(pos, "") then
|
if mobs_griefing and not minetest.is_protected(pos, "") then
|
||||||
|
@ -1026,51 +1040,42 @@ function mob_class:do_states_attack (dtime)
|
||||||
|
|
||||||
-- move towards enemy if beyond mob reach
|
-- move towards enemy if beyond mob reach
|
||||||
if dist > self.reach then
|
if dist > self.reach then
|
||||||
|
|
||||||
-- path finding by rnd
|
-- path finding by rnd
|
||||||
if self.pathfinding -- only if mob has pathfinding enabled
|
if enable_pathfinding and self.pathfinding then
|
||||||
and enable_pathfinding then
|
|
||||||
|
|
||||||
self:smart_mobs(s, p, dist, dtime)
|
self:smart_mobs(s, p, dist, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:is_at_cliff_or_danger() then
|
if self:is_at_cliff_or_danger() then
|
||||||
|
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
yaw = self:set_yaw( yaw + 0.78, 8)
|
yaw = self:set_yaw( yaw + 0.78, 8)
|
||||||
else
|
else
|
||||||
|
|
||||||
if self.path.stuck then
|
if self.path.stuck then
|
||||||
self:set_velocity(self.walk_velocity)
|
self:set_velocity(self.walk_velocity)
|
||||||
else
|
else
|
||||||
self:set_velocity(self.run_velocity)
|
self:set_velocity(self.run_velocity)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.animation and self.animation.run_start then
|
if self.animation and self.animation.run_start then
|
||||||
self:set_animation("run")
|
self:set_animation("run")
|
||||||
else
|
else
|
||||||
self:set_animation("walk")
|
self:set_animation("walk")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else -- rnd: if inside reach range
|
else -- rnd: if inside reach range
|
||||||
|
|
||||||
self.path.stuck = false
|
self.path.stuck = false
|
||||||
self.path.stuck_timer = 0
|
self.path.stuck_timer = 0
|
||||||
self.path.following = false -- not stuck anymore
|
self.path.following = false -- not stuck anymore
|
||||||
|
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
|
|
||||||
if not self.custom_attack then
|
local attack_frequency = self.attack_frequency or 1
|
||||||
|
|
||||||
if self.timer > 1 then
|
|
||||||
|
|
||||||
|
if self.timer > attack_frequency then
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
|
|
||||||
if self.double_melee_attack
|
if not self.custom_attack then
|
||||||
and math.random(1, 2) == 1 then
|
if self.double_melee_attack and math.random(1, 2) == 1 then
|
||||||
self:set_animation("punch2")
|
self:set_animation("punch2")
|
||||||
else
|
else
|
||||||
self:set_animation("punch")
|
self:set_animation("punch")
|
||||||
|
@ -1083,8 +1088,6 @@ function mob_class:do_states_attack (dtime)
|
||||||
s2.y = s2.y + .5
|
s2.y = s2.y + .5
|
||||||
|
|
||||||
if self:line_of_sight( p2, s2) == true then
|
if self:line_of_sight( p2, s2) == true then
|
||||||
|
|
||||||
-- play attack sound
|
|
||||||
self:mob_sound("attack")
|
self:mob_sound("attack")
|
||||||
|
|
||||||
-- punch player (or what player is attached to)
|
-- punch player (or what player is attached to)
|
||||||
|
@ -1097,13 +1100,7 @@ function mob_class:do_states_attack (dtime)
|
||||||
damage_groups = {fleshy = self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
else -- call custom attack every second
|
|
||||||
if self.custom_attack
|
|
||||||
and self.timer > 1 then
|
|
||||||
|
|
||||||
self.timer = 0
|
|
||||||
|
|
||||||
self.custom_attack(self, p)
|
self.custom_attack(self, p)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1129,7 +1126,7 @@ function mob_class:do_states_attack (dtime)
|
||||||
|
|
||||||
yaw = self:set_yaw( yaw, 0, dtime)
|
yaw = self:set_yaw( yaw, 0, dtime)
|
||||||
|
|
||||||
local stay_away_from_player = vector.new(0,0,0)
|
local stay_away_from_player = vector.zero()
|
||||||
|
|
||||||
--strafe back and fourth
|
--strafe back and fourth
|
||||||
|
|
||||||
|
@ -1146,7 +1143,13 @@ function mob_class:do_states_attack (dtime)
|
||||||
if math.random(40) == 1 then
|
if math.random(40) == 1 then
|
||||||
self.strafe_direction = self.strafe_direction*-1
|
self.strafe_direction = self.strafe_direction*-1
|
||||||
end
|
end
|
||||||
self.acc = vector.add(vector.multiply(vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction), 0.3*self.walk_velocity), stay_away_from_player)
|
|
||||||
|
local dir = vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction)
|
||||||
|
local dir2 = vector.multiply(dir, 0.3 * self.walk_velocity)
|
||||||
|
|
||||||
|
if dir2 and stay_away_from_player then
|
||||||
|
self.acc = vector.add(dir2, stay_away_from_player)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,6 +4,8 @@ local active_particlespawners = {}
|
||||||
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
|
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
|
||||||
local DEFAULT_FALL_SPEED = -9.81*1.5
|
local DEFAULT_FALL_SPEED = -9.81*1.5
|
||||||
|
|
||||||
|
local PATHFINDING = "gowp"
|
||||||
|
|
||||||
local player_transfer_distance = tonumber(minetest.settings:get("player_transfer_distance")) or 128
|
local player_transfer_distance = tonumber(minetest.settings:get("player_transfer_distance")) or 128
|
||||||
if player_transfer_distance == 0 then player_transfer_distance = math.huge end
|
if player_transfer_distance == 0 then player_transfer_distance = math.huge end
|
||||||
|
|
||||||
|
@ -136,6 +138,19 @@ function mob_class:mob_sound(soundname, is_opinion, fixed_pitch)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mob_class:step_opinion_sound(dtime)
|
||||||
|
if self.state ~= "attack" and self.state ~= PATHFINDING then
|
||||||
|
|
||||||
|
if self.opinion_sound_cooloff > 0 then
|
||||||
|
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
|
||||||
|
end
|
||||||
|
-- mob plays random sound at times. Should be 120. Zombie and mob farms are ridiculous
|
||||||
|
if math.random(1, 70) == 1 then
|
||||||
|
self:mob_sound("random", true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:add_texture_mod(mod)
|
function mob_class:add_texture_mod(mod)
|
||||||
local full_mod = ""
|
local full_mod = ""
|
||||||
local already_added = false
|
local already_added = false
|
||||||
|
@ -254,7 +269,7 @@ function mob_class:set_animation(anim, fixed_frame)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if self:flight_check() and self.fly and anim == "walk" then anim = "fly" end
|
if self.fly and self:flight_check() and anim == "walk" then anim = "fly" end
|
||||||
|
|
||||||
self._current_animation = self._current_animation or ""
|
self._current_animation = self._current_animation or ""
|
||||||
|
|
||||||
|
@ -293,7 +308,7 @@ local function dir_to_pitch(dir)
|
||||||
return -math.atan2(-dir.y, xz)
|
return -math.atan2(-dir.y, xz)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function who_are_you_looking_at (self)
|
local function who_are_you_looking_at (self, dtime)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
local stop_look_at_player_chance = math.random(833/self.curiosity)
|
local stop_look_at_player_chance = math.random(833/self.curiosity)
|
||||||
|
@ -309,12 +324,12 @@ local function who_are_you_looking_at (self)
|
||||||
self._locked_object = nil
|
self._locked_object = nil
|
||||||
end
|
end
|
||||||
elseif not self._locked_object then
|
elseif not self._locked_object then
|
||||||
if math.random(1, 30) then
|
if mcl_util.check_dtime_timer(self, dtime, "step_look_for_someone", 0.2) then
|
||||||
--minetest.log("Change look check: ".. self.name)
|
--minetest.log("Change look check: ".. self.name)
|
||||||
|
|
||||||
-- For the wither this was 20/60=0.33, so probably need to rebalance and divide rates.
|
-- For the wither this was 20/60=0.33, so probably need to rebalance and divide rates.
|
||||||
-- but frequency of check isn't good as it is costly. Making others too infrequent requires testing
|
-- but frequency of check isn't good as it is costly. Making others too infrequent requires testing
|
||||||
local chance = 20/self.curiosity
|
local chance = 150/self.curiosity
|
||||||
|
|
||||||
if chance < 1 then chance = 1 end
|
if chance < 1 then chance = 1 end
|
||||||
local look_at_player_chance = math.random(chance)
|
local look_at_player_chance = math.random(chance)
|
||||||
|
@ -346,9 +361,9 @@ function mob_class:check_head_swivel(dtime)
|
||||||
if not self.head_swivel or type(self.head_swivel) ~= "string" then return end
|
if not self.head_swivel or type(self.head_swivel) ~= "string" then return end
|
||||||
|
|
||||||
|
|
||||||
who_are_you_looking_at (self)
|
who_are_you_looking_at (self, dtime)
|
||||||
|
|
||||||
local final_rotation = vector.new(0,0,0)
|
local final_rotation = vector.zero()
|
||||||
local oldp,oldr = self.object:get_bone_position(self.head_swivel)
|
local oldp,oldr = self.object:get_bone_position(self.head_swivel)
|
||||||
|
|
||||||
if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then
|
if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then
|
||||||
|
@ -360,8 +375,11 @@ function mob_class:check_head_swivel(dtime)
|
||||||
_locked_object_eye_height = self._locked_object:get_properties().eye_height
|
_locked_object_eye_height = self._locked_object:get_properties().eye_height
|
||||||
end
|
end
|
||||||
if _locked_object_eye_height then
|
if _locked_object_eye_height then
|
||||||
|
|
||||||
local self_rot = self.object:get_rotation()
|
local self_rot = self.object:get_rotation()
|
||||||
if self.object:get_attach() then
|
-- If a mob is attached, should we really be messing with what they are looking at?
|
||||||
|
-- Should this be excluded?
|
||||||
|
if self.object:get_attach() and self.object:get_attach():get_rotation() then
|
||||||
self_rot = self.object:get_attach():get_rotation()
|
self_rot = self.object:get_attach():get_rotation()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ function mcl_mobs.register_mob(name, def)
|
||||||
description = def.description,
|
description = def.description,
|
||||||
type = def.type,
|
type = def.type,
|
||||||
attack_type = def.attack_type,
|
attack_type = def.attack_type,
|
||||||
|
attack_frequency = def.attack_frequency,
|
||||||
fly = def.fly or false,
|
fly = def.fly or false,
|
||||||
fly_in = def.fly_in or {"air", "__airlike"},
|
fly_in = def.fly_in or {"air", "__airlike"},
|
||||||
owner = def.owner or "",
|
owner = def.owner or "",
|
||||||
|
@ -556,7 +557,7 @@ function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addeg
|
||||||
nametag = string.sub(nametag, 1, MAX_MOB_NAME_LENGTH)
|
nametag = string.sub(nametag, 1, MAX_MOB_NAME_LENGTH)
|
||||||
end
|
end
|
||||||
ent.nametag = nametag
|
ent.nametag = nametag
|
||||||
update_tag(ent)
|
ent:update_tag()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if not in creative then take item
|
-- if not in creative then take item
|
||||||
|
|
|
@ -9,3 +9,5 @@ Before you use the name tag, you need to set a name at an anvil. Then you can us
|
||||||
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!
|
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!
|
||||||
Give names to mobs=Donne des noms aux mobs
|
Give names to mobs=Donne des noms aux mobs
|
||||||
Set name at anvil=Définir le nom sur l'enclume
|
Set name at anvil=Définir le nom sur l'enclume
|
||||||
|
Removes specified mobs except nametagged and tamed ones. For the second parameter, use nametagged/tamed to select only nametagged/tamed mobs, or a range to specify a maximum distance from the player.=Enlève les mobs spécifiés sauf ceux qui sont nommés et apprivoisés. Pour le deuxième paramètre, utiliser nametagged/tamed pour ne sélectionner que les mobs nommés/apprivoisés, ou une distance pour spécifier la distance maximale par rapport au joueur.
|
||||||
|
Default usage. Clearing hostile mobs. For more options please type: /help clearmobs=Usage par défaut. Enlève les mobs hostiles. Pour plus d'options saisir : /help clearmobs
|
||||||
|
|
|
@ -4,8 +4,11 @@ local DEFAULT_FALL_SPEED = -9.81*1.5
|
||||||
local FLOP_HEIGHT = 6
|
local FLOP_HEIGHT = 6
|
||||||
local FLOP_HOR_SPEED = 1.5
|
local FLOP_HOR_SPEED = 1.5
|
||||||
|
|
||||||
local node_snow = "mcl_core:snow"
|
local CHECK_HERD_FREQUENCY = 4
|
||||||
|
|
||||||
|
local PATHFINDING = "gowp"
|
||||||
|
|
||||||
|
local node_snow = "mcl_core:snow"
|
||||||
|
|
||||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
||||||
|
|
||||||
|
@ -202,12 +205,8 @@ function mob_class:can_jump_cliff()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- is mob facing a cliff or danger
|
-- is mob facing a cliff or danger
|
||||||
function mob_class:is_at_cliff_or_danger(can_jump_cliff)
|
function mob_class:is_at_cliff_or_danger()
|
||||||
if can_jump_cliff == nil then
|
if self.fear_height == 0 or self._jumping_cliff or self._can_jump_cliff or not self.object:get_luaentity() then -- 0 for no falling protection!
|
||||||
can_jump_cliff = self:can_jump_cliff()
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.fear_height == 0 or can_jump_cliff or self._jumping_cliff or not self.object:get_luaentity() then -- 0 for no falling protection!
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -219,8 +218,9 @@ function mob_class:is_at_cliff_or_danger(can_jump_cliff)
|
||||||
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
||||||
|
|
||||||
local free_fall, blocker = minetest.line_of_sight(
|
local free_fall, blocker = minetest.line_of_sight(
|
||||||
{x = pos.x + dir_x, y = ypos, z = pos.z + dir_z},
|
vector.new(pos.x + dir_x, ypos, pos.z + dir_z),
|
||||||
{x = pos.x + dir_x, y = ypos - self.fear_height, z = pos.z + dir_z})
|
vector.new(pos.x + dir_x, ypos - self.fear_height, pos.z + dir_z))
|
||||||
|
|
||||||
if free_fall then
|
if free_fall then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
|
@ -241,12 +241,16 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water
|
-- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water
|
||||||
function mob_class:is_at_water_danger(can_jump_cliff)
|
function mob_class:is_at_water_danger()
|
||||||
if can_jump_cliff == nil then
|
if self.water_damage == 0 and self.breath_max == -1 then
|
||||||
can_jump_cliff = self:can_jump_cliff()
|
--minetest.log("Do not need a water check for: " .. self.name)
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self.object:get_luaentity() or can_jump_cliff or self._jumping_cliff then
|
local in_water_danger = self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard(self.standing_on)
|
||||||
|
if in_water_danger then return false end -- If you're in trouble, do not stop
|
||||||
|
|
||||||
|
if not self.object:get_luaentity() or self._jumping_cliff or self._can_jump_cliff then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local yaw = self.object:get_yaw()
|
local yaw = self.object:get_yaw()
|
||||||
|
@ -261,51 +265,57 @@ function mob_class:is_at_water_danger(can_jump_cliff)
|
||||||
|
|
||||||
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
||||||
|
|
||||||
local free_fall, blocker = minetest.line_of_sight(
|
local los, blocker = minetest.line_of_sight(
|
||||||
{x = pos.x + dir_x, y = ypos, z = pos.z + dir_z},
|
vector.new(pos.x + dir_x, ypos, pos.z + dir_z),
|
||||||
{x = pos.x + dir_x, y = ypos - 3, z = pos.z + dir_z})
|
vector.new(pos.x + dir_x, ypos - 3, pos.z + dir_z))
|
||||||
if free_fall then
|
|
||||||
return true
|
if not los then
|
||||||
else
|
|
||||||
local bnode = minetest.get_node(blocker)
|
local bnode = minetest.get_node(blocker)
|
||||||
local waterdanger = self:is_node_waterhazard(bnode.name)
|
local waterdanger = self:is_node_waterhazard(bnode.name)
|
||||||
if
|
|
||||||
waterdanger and (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard( self.standing_on)) then
|
if waterdanger and not in_water_danger then
|
||||||
return false
|
|
||||||
elseif waterdanger and (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard(self.standing_on)) == false then
|
|
||||||
return true
|
return true
|
||||||
else
|
|
||||||
local def = minetest.registered_nodes[bnode.name]
|
|
||||||
if def and def.walkable then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:env_danger_movement_checks(dtime)
|
function mob_class:env_danger_movement_checks(player_in_active_range)
|
||||||
local yaw = 0
|
local yaw = 0
|
||||||
|
|
||||||
local can_jump_cliff = self:can_jump_cliff()
|
if not player_in_active_range then return end
|
||||||
if self.state ~= "attack" and self:is_at_water_danger(can_jump_cliff) then
|
|
||||||
if math.random(1, 10) <= 6 then
|
if self.state == PATHFINDING
|
||||||
|
or self.state == "attack"
|
||||||
|
or self.state == "stand"
|
||||||
|
or self.state == "runaway" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:is_at_water_danger() then
|
||||||
|
--minetest.log("At water danger for mob, stop?: " .. self.name)
|
||||||
|
if math.random(1, 10) <= 7 then
|
||||||
|
if self.state ~= "stand" then
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
|
end
|
||||||
yaw = yaw + math.random(-0.5, 0.5)
|
yaw = yaw + math.random(-0.5, 0.5)
|
||||||
yaw = self:set_yaw( yaw, 8)
|
yaw = self:set_yaw( yaw, 8)
|
||||||
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:is_at_cliff_or_danger(can_jump_cliff) then
|
--[[if self:is_at_cliff_or_danger(can_jump_cliff) then
|
||||||
|
if self.state ~= "stand" then
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
|
end
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
yaw = self:set_yaw( yaw + 0.78, 8)
|
yaw = self:set_yaw( yaw + 0.78, 8)
|
||||||
end
|
end--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- jump if facing a solid node (not fences or gates)
|
-- jump if facing a solid node (not fences or gates)
|
||||||
|
@ -376,7 +386,7 @@ function mob_class:do_jump()
|
||||||
end
|
end
|
||||||
|
|
||||||
local ndef = minetest.registered_nodes[nod.name]
|
local ndef = minetest.registered_nodes[nod.name]
|
||||||
if self.walk_chance == 0 or ndef and ndef.walkable or self:can_jump_cliff() then
|
if self.walk_chance == 0 or ndef and ndef.walkable or self._can_jump_cliff then
|
||||||
|
|
||||||
if minetest.get_item_group(nod.name, "fence") == 0
|
if minetest.get_item_group(nod.name, "fence") == 0
|
||||||
and minetest.get_item_group(nod.name, "fence_gate") == 0
|
and minetest.get_item_group(nod.name, "fence_gate") == 0
|
||||||
|
@ -386,7 +396,7 @@ function mob_class:do_jump()
|
||||||
|
|
||||||
v.y = self.jump_height + 0.1 * 3
|
v.y = self.jump_height + 0.1 * 3
|
||||||
|
|
||||||
if self:can_jump_cliff() then
|
if self._can_jump_cliff then
|
||||||
v=vector.multiply(v, vector.new(2.8,1,2.8))
|
v=vector.multiply(v, vector.new(2.8,1,2.8))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -621,7 +631,7 @@ function mob_class:check_runaway_from()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- follow player if owner or holding item, if fish outta water then flop
|
-- follow player if owner or holding item
|
||||||
function mob_class:check_follow()
|
function mob_class:check_follow()
|
||||||
-- find player to follow
|
-- find player to follow
|
||||||
if (self.follow ~= "" or self.order == "follow") and not self.following
|
if (self.follow ~= "" or self.order == "follow") and not self.following
|
||||||
|
@ -722,7 +732,7 @@ function mob_class:flop()
|
||||||
return
|
return
|
||||||
elseif self.state == "flop" then
|
elseif self.state == "flop" then
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
self.object:set_acceleration(vector.zero())
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -754,7 +764,7 @@ function mob_class:check_herd(dtime)
|
||||||
if self.move_in_group == false then return end
|
if self.move_in_group == false then return end
|
||||||
|
|
||||||
check_herd_timer = check_herd_timer + dtime
|
check_herd_timer = check_herd_timer + dtime
|
||||||
if check_herd_timer < 4 then return end
|
if check_herd_timer < CHECK_HERD_FREQUENCY then return end
|
||||||
check_herd_timer = 0
|
check_herd_timer = 0
|
||||||
for _,o in pairs(minetest.get_objects_inside_radius(pos,self.view_range)) do
|
for _,o in pairs(minetest.get_objects_inside_radius(pos,self.view_range)) do
|
||||||
local l = o:get_luaentity()
|
local l = o:get_luaentity()
|
||||||
|
@ -885,7 +895,7 @@ function mob_class:do_states_walk()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:do_states_stand()
|
function mob_class:do_states_stand(player_in_active_range)
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
|
|
||||||
if math.random(1, 4) == 1 then
|
if math.random(1, 4) == 1 then
|
||||||
|
@ -929,6 +939,7 @@ function mob_class:do_states_stand()
|
||||||
if self.order == "stand" or self.order == "sleep" or self.order == "work" then
|
if self.order == "stand" or self.order == "sleep" or self.order == "work" then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
if player_in_active_range then
|
||||||
if self.walk_chance ~= 0
|
if self.walk_chance ~= 0
|
||||||
and self.facing_fence ~= true
|
and self.facing_fence ~= true
|
||||||
and math.random(1, 100) <= self.walk_chance
|
and math.random(1, 100) <= self.walk_chance
|
||||||
|
@ -940,6 +951,7 @@ function mob_class:do_states_stand()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:do_states_runaway()
|
function mob_class:do_states_runaway()
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
|
|
|
@ -198,6 +198,8 @@ end
|
||||||
|
|
||||||
-- move mob in facing direction
|
-- move mob in facing direction
|
||||||
function mob_class:set_velocity(v)
|
function mob_class:set_velocity(v)
|
||||||
|
if not v then return end
|
||||||
|
|
||||||
local c_x, c_y = 0, 0
|
local c_x, c_y = 0, 0
|
||||||
|
|
||||||
-- can mob be pushed, if so calculate direction
|
-- can mob be pushed, if so calculate direction
|
||||||
|
@ -207,18 +209,15 @@ function mob_class:set_velocity(v)
|
||||||
|
|
||||||
-- halt mob if it has been ordered to stay
|
-- halt mob if it has been ordered to stay
|
||||||
if self.order == "stand" or self.order == "sit" then
|
if self.order == "stand" or self.order == "sit" then
|
||||||
self.acc=vector.new(0,0,0)
|
self.acc = vector.zero()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local yaw = (self.object:get_yaw() or 0) + self.rotate
|
local yaw = (self.object:get_yaw() or 0) + self.rotate
|
||||||
local vv = self.object:get_velocity()
|
local vv = self.object:get_velocity()
|
||||||
if vv then
|
|
||||||
self.acc={
|
if vv and yaw then
|
||||||
x = ((math.sin(yaw) * -v) + c_x)*.27,
|
self.acc = vector.new(((math.sin(yaw) * -v) + c_x) * .27, 0, ((math.cos(yaw) * v) + c_y) * .27)
|
||||||
y = 0,
|
|
||||||
z = ((math.cos(yaw) * v) + c_y)*.27,
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -643,7 +642,7 @@ function mob_class:do_env_damage()
|
||||||
--minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
--minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
||||||
end
|
end
|
||||||
|
|
||||||
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
local sunlight = mcl_util.get_natural_light(pos, self.time_of_day)
|
||||||
|
|
||||||
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
||||||
if self:deal_light_damage(pos, self.light_damage) then
|
if self:deal_light_damage(pos, self.light_damage) then
|
||||||
|
@ -821,11 +820,19 @@ function mob_class:do_env_damage()
|
||||||
return self:check_for_death("unknown", {type = "unknown"})
|
return self:check_for_death("unknown", {type = "unknown"})
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:env_damage (dtime, pos)
|
function mob_class:step_damage (dtime, pos)
|
||||||
|
if not self.fire_resistant then
|
||||||
|
mcl_burning.tick(self.object, dtime, self)
|
||||||
|
if not self.object:get_pos() then return true end -- mcl_burning.tick may remove object immediately
|
||||||
|
|
||||||
|
if self:check_for_death("fire", {type = "fire"}) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- environmental damage timer (every 1 second)
|
-- environmental damage timer (every 1 second)
|
||||||
self.env_damage_timer = self.env_damage_timer + dtime
|
self.env_damage_timer = self.env_damage_timer + dtime
|
||||||
|
|
||||||
|
|
||||||
if self.env_damage_timer > 1 then
|
if self.env_damage_timer > 1 then
|
||||||
self.env_damage_timer = 0
|
self.env_damage_timer = 0
|
||||||
|
|
||||||
|
@ -904,47 +911,36 @@ function mob_class:falling(pos)
|
||||||
-- floating in water (or falling)
|
-- floating in water (or falling)
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
if v then
|
if v then
|
||||||
|
local new_acceleration
|
||||||
|
|
||||||
if v.y > 0 then
|
if v.y > 0 then
|
||||||
-- apply gravity when moving up
|
-- apply gravity when moving up
|
||||||
self.object:set_acceleration({
|
new_acceleration = vector.new(0, DEFAULT_FALL_SPEED, 0)
|
||||||
x = 0,
|
|
||||||
y = DEFAULT_FALL_SPEED,
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
|
|
||||||
elseif v.y <= 0 and v.y > self.fall_speed then
|
elseif v.y <= 0 and v.y > self.fall_speed then
|
||||||
-- fall downwards at set speed
|
-- fall downwards at set speed
|
||||||
self.object:set_acceleration({
|
new_acceleration = vector.new(0, self.fall_speed, 0)
|
||||||
x = 0,
|
|
||||||
y = self.fall_speed,
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
else
|
else
|
||||||
-- stop accelerating once max fall speed hit
|
-- stop accelerating once max fall speed hit
|
||||||
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
new_acceleration =vector.zero()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.object:set_acceleration(new_acceleration)
|
||||||
end
|
end
|
||||||
|
|
||||||
local acc = self.object:get_acceleration()
|
local acc = self.object:get_acceleration()
|
||||||
|
|
||||||
if minetest.registered_nodes[node_ok(pos).name].groups.lava then
|
local registered_node = minetest.registered_nodes[node_ok(pos).name]
|
||||||
|
|
||||||
|
if registered_node.groups.lava then
|
||||||
if acc and self.floats_on_lava == 1 then
|
if acc and self.floats_on_lava == 1 then
|
||||||
self.object:set_acceleration({
|
self.object:set_acceleration(vector.new(0, -self.fall_speed / (math.max(1, v.y) ^ 2), 0))
|
||||||
x = 0,
|
|
||||||
y = -self.fall_speed / (math.max(1, v.y) ^ 2),
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- in water then float up
|
-- in water then float up
|
||||||
if minetest.registered_nodes[node_ok(pos).name].groups.water then
|
if registered_node.groups.water then
|
||||||
if acc and self.floats == 1 then
|
if acc and self.floats == 1 then
|
||||||
self.object:set_acceleration({
|
self.object:set_acceleration(vector.new(0, -self.fall_speed / (math.max(1, v.y) ^ 2), 0))
|
||||||
x = 0,
|
|
||||||
y = -self.fall_speed / (math.max(1, v.y) ^ 2),
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- fall damage onto solid ground
|
-- fall damage onto solid ground
|
||||||
|
@ -1031,9 +1027,6 @@ function mob_class:check_suspend(player_in_active_range)
|
||||||
self.object:set_acceleration(vector.zero())
|
self.object:set_acceleration(vector.zero())
|
||||||
self.object:set_velocity(vector.zero())
|
self.object:set_velocity(vector.zero())
|
||||||
end
|
end
|
||||||
if acc.y == 0 and node_under == "air" then
|
|
||||||
self:falling(pos)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,8 +27,11 @@ local table_remove = table.remove
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_spawning", false)
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_spawning", false)
|
||||||
local function mcl_log (message)
|
local function mcl_log (message, property)
|
||||||
if LOGGING_ON then
|
if LOGGING_ON then
|
||||||
|
if property then
|
||||||
|
message = message .. ": " .. dump(property)
|
||||||
|
end
|
||||||
mcl_util.mcl_log (message, "[Mobs spawn]", true)
|
mcl_util.mcl_log (message, "[Mobs spawn]", true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -52,21 +55,25 @@ local MOB_CAP_INNER_RADIUS = 32
|
||||||
local aoc_range = 136
|
local aoc_range = 136
|
||||||
|
|
||||||
local MISSING_CAP_DEFAULT = 15
|
local MISSING_CAP_DEFAULT = 15
|
||||||
local MOBS_CAP_CLOSE = 5
|
local MOBS_CAP_CLOSE = 10
|
||||||
|
|
||||||
local SPAWN_MAPGEN_LIMIT = mcl_vars.mapgen_limit - 150
|
local SPAWN_MAPGEN_LIMIT = mcl_vars.mapgen_limit - 150
|
||||||
|
|
||||||
local mob_cap = {
|
local mob_cap = {
|
||||||
hostile = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,
|
hostile = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,
|
||||||
passive = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 13,
|
passive = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 10,
|
||||||
ambient = tonumber(minetest.settings:get("mcl_mob_cap_ambient")) or 15,
|
ambient = tonumber(minetest.settings:get("mcl_mob_cap_ambient")) or 15,
|
||||||
water = tonumber(minetest.settings:get("mcl_mob_cap_water")) or 8,
|
water = tonumber(minetest.settings:get("mcl_mob_cap_water")) or 8,
|
||||||
water_ambient = tonumber(minetest.settings:get("mcl_mob_cap_water_ambient")) or 20, --currently unused
|
water_ambient = tonumber(minetest.settings:get("mcl_mob_cap_water_ambient")) or 20,
|
||||||
|
water_underground = tonumber(minetest.settings:get("mcl_mob_cap_water_underground")) or 5,
|
||||||
|
axolotl = tonumber(minetest.settings:get("mcl_mob_cap_axolotl")) or 2, -- TODO should be 5 when lush caves added
|
||||||
player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75,
|
player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75,
|
||||||
|
global_hostile = tonumber(minetest.settings:get("mcl_mob_cap_hostile")) or 300,
|
||||||
|
global_non_hostile = tonumber(minetest.settings:get("mcl_mob_cap_non_hostile")) or 300,
|
||||||
total = tonumber(minetest.settings:get("mcl_mob_cap_total")) or 500,
|
total = tonumber(minetest.settings:get("mcl_mob_cap_total")) or 500,
|
||||||
}
|
}
|
||||||
|
|
||||||
local peaceful_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_percentage_spawned")) or 35
|
local peaceful_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_percentage_spawned")) or 30
|
||||||
local peaceful_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_group_percentage_spawned")) or 15
|
local peaceful_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_group_percentage_spawned")) or 15
|
||||||
local hostile_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_hostile_group_percentage_spawned")) or 20
|
local hostile_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_hostile_group_percentage_spawned")) or 20
|
||||||
|
|
||||||
|
@ -340,15 +347,32 @@ local function count_mobs_all(categorise_by, pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function count_mobs_total_cap(mob_type)
|
local function count_mobs_total_cap(mob_type)
|
||||||
|
local total = 0
|
||||||
local num = 0
|
local num = 0
|
||||||
|
local hostile = 0
|
||||||
|
local non_hostile = 0
|
||||||
for _,l in pairs(minetest.luaentities) do
|
for _,l in pairs(minetest.luaentities) do
|
||||||
if l.is_mob then
|
if l.is_mob then
|
||||||
if ( mob_type == nil or l.type == mob_type ) and l.can_despawn and not l.nametag then
|
total = total + 1
|
||||||
|
local nametagged = l.nametag and l.nametag ~= ""
|
||||||
|
if ( mob_type == nil or l.type == mob_type ) and not nametagged then
|
||||||
|
if l.spawn_class == "hostile" then
|
||||||
|
hostile = hostile + 1
|
||||||
|
else
|
||||||
|
non_hostile = non_hostile + 1
|
||||||
|
end
|
||||||
num = num + 1
|
num = num + 1
|
||||||
|
else
|
||||||
|
mcl_log("l.name", l.name)
|
||||||
|
mcl_log("l.nametag", l.nametag)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return num
|
mcl_log("Total mobs", total)
|
||||||
|
mcl_log("hostile", hostile)
|
||||||
|
mcl_log("non_hostile", non_hostile)
|
||||||
|
return num, non_hostile, hostile
|
||||||
end
|
end
|
||||||
|
|
||||||
local function output_mob_stats(mob_counts, total_mobs, chat_display)
|
local function output_mob_stats(mob_counts, total_mobs, chat_display)
|
||||||
|
@ -704,13 +728,13 @@ local function spawn_check(pos, spawn_def)
|
||||||
--mcl_log("Level 3 spawn check passed")
|
--mcl_log("Level 3 spawn check passed")
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
mcl_log("Spawn check level 3 failed")
|
--mcl_log("Spawn check level 3 failed")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mcl_log("Spawn check level 2 failed")
|
--mcl_log("Spawn check level 2 failed")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mcl_log("Spawn check level 1 failed")
|
--mcl_log("Spawn check level 1 failed")
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -831,7 +855,7 @@ if mobs_spawn then
|
||||||
-- Get pos to spawn, x and z are randomised, y is range
|
-- Get pos to spawn, x and z are randomised, y is range
|
||||||
|
|
||||||
|
|
||||||
local function mob_cap_space (pos, mob_type, mob_counts_close, mob_counts_wide)
|
local function mob_cap_space (pos, mob_type, mob_counts_close, mob_counts_wide, cap_space_hostile, cap_space_non_hostile)
|
||||||
|
|
||||||
-- Some mob examples
|
-- Some mob examples
|
||||||
--type = "monster", spawn_class = "hostile",
|
--type = "monster", spawn_class = "hostile",
|
||||||
|
@ -847,9 +871,18 @@ if mobs_spawn then
|
||||||
mob_total_wide = 0
|
mob_total_wide = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
local cap_space_wide = type_cap - mob_total_wide
|
local cap_space_wide = math.max(type_cap - mob_total_wide, 0)
|
||||||
if cap_space_wide < 1 then
|
|
||||||
cap_space_wide = 0
|
mcl_log("mob_type", mob_type)
|
||||||
|
mcl_log("cap_space_wide", cap_space_wide)
|
||||||
|
|
||||||
|
local cap_space_available = 0
|
||||||
|
if mob_type == "hostile" then
|
||||||
|
mcl_log("cap_space_global", cap_space_hostile)
|
||||||
|
cap_space_available = math.min(cap_space_hostile, cap_space_wide)
|
||||||
|
else
|
||||||
|
mcl_log("cap_space_global", cap_space_non_hostile)
|
||||||
|
cap_space_available = math.min(cap_space_non_hostile, cap_space_wide)
|
||||||
end
|
end
|
||||||
|
|
||||||
local mob_total_close = mob_counts_close[mob_type]
|
local mob_total_close = mob_counts_close[mob_type]
|
||||||
|
@ -858,12 +891,11 @@ if mobs_spawn then
|
||||||
mob_total_close = 0
|
mob_total_close = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
local cap_space_close = close_zone_cap - mob_total_close
|
local cap_space_close = math.max(close_zone_cap - mob_total_close, 0)
|
||||||
if cap_space_close < 1 then
|
cap_space_available = math.min(cap_space_available, cap_space_close)
|
||||||
cap_space_close = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
--mcl_log("spawn_class: " .. spawn_class)
|
mcl_log("cap_space_close", cap_space_close)
|
||||||
|
mcl_log("cap_space_available", cap_space_available)
|
||||||
|
|
||||||
if false and mob_type == "water" then
|
if false and mob_type == "water" then
|
||||||
mcl_log("mob_type: " .. mob_type .. " and pos: " .. minetest.pos_to_string(pos))
|
mcl_log("mob_type: " .. mob_type .. " and pos: " .. minetest.pos_to_string(pos))
|
||||||
|
@ -873,7 +905,7 @@ if mobs_spawn then
|
||||||
mcl_log("cap_space_close: " .. cap_space_close)
|
mcl_log("cap_space_close: " .. cap_space_close)
|
||||||
end
|
end
|
||||||
|
|
||||||
return cap_space_wide, cap_space_close
|
return cap_space_available
|
||||||
end
|
end
|
||||||
|
|
||||||
local function find_spawning_position(pos, max_times)
|
local function find_spawning_position(pos, max_times)
|
||||||
|
@ -884,7 +916,7 @@ if mobs_spawn then
|
||||||
|
|
||||||
local y_min, y_max = decypher_limits(pos.y)
|
local y_min, y_max = decypher_limits(pos.y)
|
||||||
|
|
||||||
mcl_log("mapgen_limit: " .. SPAWN_MAPGEN_LIMIT)
|
--mcl_log("mapgen_limit: " .. SPAWN_MAPGEN_LIMIT)
|
||||||
local i = 0
|
local i = 0
|
||||||
repeat
|
repeat
|
||||||
local goal_pos = get_next_mob_spawn_pos(pos)
|
local goal_pos = get_next_mob_spawn_pos(pos)
|
||||||
|
@ -916,7 +948,7 @@ if mobs_spawn then
|
||||||
return spawning_position
|
return spawning_position
|
||||||
end
|
end
|
||||||
|
|
||||||
local function spawn_a_mob(pos)
|
local function spawn_a_mob(pos, cap_space_hostile, cap_space_non_hostile)
|
||||||
--create a disconnected clone of the spawn dictionary, prevents memory leak
|
--create a disconnected clone of the spawn dictionary, prevents memory leak
|
||||||
local mob_library_worker_table = table_copy(spawn_dictionary)
|
local mob_library_worker_table = table_copy(spawn_dictionary)
|
||||||
|
|
||||||
|
@ -954,22 +986,18 @@ if mobs_spawn then
|
||||||
if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then
|
if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then
|
||||||
|
|
||||||
local mob_def_ent = minetest.registered_entities[mob_def.name]
|
local mob_def_ent = minetest.registered_entities[mob_def.name]
|
||||||
--local mob_type = mob_def_ent.type
|
|
||||||
local mob_spawn_class = mob_def_ent.spawn_class
|
local mob_spawn_class = mob_def_ent.spawn_class
|
||||||
|
|
||||||
--mcl_log("mob_spawn_class: " .. mob_spawn_class)
|
local cap_space_available = mob_cap_space (spawning_position, mob_spawn_class, mob_counts_close, mob_counts_wide, cap_space_hostile, cap_space_non_hostile)
|
||||||
|
|
||||||
local cap_space_wide, cap_space_close = mob_cap_space (spawning_position, mob_spawn_class, mob_counts_close, mob_counts_wide)
|
if cap_space_available > 0 then
|
||||||
|
|
||||||
|
|
||||||
if cap_space_close > 0 and cap_space_wide > 0 then
|
|
||||||
--mcl_log("Cap space available")
|
--mcl_log("Cap space available")
|
||||||
|
|
||||||
-- Spawn caps for animals and water creatures fill up rapidly. Need to throttle this somewhat
|
-- Spawn caps for animals and water creatures fill up rapidly. Need to throttle this somewhat
|
||||||
-- for performance and for early game challenge. We don't want to reduce hostiles though.
|
-- for performance and for early game challenge. We don't want to reduce hostiles though.
|
||||||
local spawn_hostile = (mob_spawn_class == "hostile")
|
local spawn_hostile = (mob_spawn_class == "hostile")
|
||||||
local spawn_passive = (mob_spawn_class ~= "hostile") and math.random(100) < peaceful_percentage_spawned
|
local spawn_passive = (mob_spawn_class ~= "hostile") and math.random(100) < peaceful_percentage_spawned
|
||||||
-- or not hostile
|
|
||||||
--mcl_log("Spawn_passive: " .. tostring(spawn_passive))
|
--mcl_log("Spawn_passive: " .. tostring(spawn_passive))
|
||||||
--mcl_log("Spawn_hostile: " .. tostring(spawn_hostile))
|
--mcl_log("Spawn_hostile: " .. tostring(spawn_hostile))
|
||||||
|
|
||||||
|
@ -1001,12 +1029,9 @@ if mobs_spawn then
|
||||||
if not group_min then group_min = 1 end
|
if not group_min then group_min = 1 end
|
||||||
|
|
||||||
local amount_to_spawn = math.random(group_min, spawn_in_group)
|
local amount_to_spawn = math.random(group_min, spawn_in_group)
|
||||||
|
|
||||||
if amount_to_spawn > cap_space_wide then
|
|
||||||
mcl_log("Spawning quantity: " .. amount_to_spawn)
|
mcl_log("Spawning quantity: " .. amount_to_spawn)
|
||||||
mcl_log("Throttle amount to cap space: " .. cap_space_wide)
|
amount_to_spawn = math.min(amount_to_spawn, cap_space_available)
|
||||||
amount_to_spawn = cap_space_wide
|
mcl_log("throttled spawning quantity: " .. amount_to_spawn)
|
||||||
end
|
|
||||||
|
|
||||||
if logging then
|
if logging then
|
||||||
minetest.log("action", "[mcl_mobs] A group of " ..amount_to_spawn .. " " .. mob_def.name .. " mob spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
|
minetest.log("action", "[mcl_mobs] A group of " ..amount_to_spawn .. " " .. mob_def.name .. " mob spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
|
||||||
|
@ -1021,7 +1046,7 @@ if mobs_spawn then
|
||||||
|
|
||||||
if spawned then
|
if spawned then
|
||||||
--mcl_log("We have spawned")
|
--mcl_log("We have spawned")
|
||||||
mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("type", pos)
|
mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("spawn_class", pos)
|
||||||
local new_spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES_SUCCESS_RESPIN)
|
local new_spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES_SUCCESS_RESPIN)
|
||||||
if new_spawning_position then
|
if new_spawning_position then
|
||||||
mcl_log("Setting new spawning position")
|
mcl_log("Setting new spawning position")
|
||||||
|
@ -1034,7 +1059,7 @@ if mobs_spawn then
|
||||||
--mcl_log("Spawn check failed")
|
--mcl_log("Spawn check failed")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mcl_log("Cap space full")
|
--mcl_log("Cap space full")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1054,7 +1079,13 @@ if mobs_spawn then
|
||||||
timer = 0
|
timer = 0
|
||||||
|
|
||||||
local players = get_connected_players()
|
local players = get_connected_players()
|
||||||
local total_mobs = count_mobs_total_cap()
|
local total_mobs, total_non_hostile, total_hostile = count_mobs_total_cap()
|
||||||
|
|
||||||
|
local cap_space_hostile = math.max(mob_cap.global_hostile - total_hostile, 0)
|
||||||
|
local cap_space_non_hostile = math.max(mob_cap.global_non_hostile - total_non_hostile, 0)
|
||||||
|
mcl_log("global cap_space_hostile", cap_space_hostile)
|
||||||
|
mcl_log("global cap_space_non_hostile", cap_space_non_hostile)
|
||||||
|
|
||||||
if total_mobs > mob_cap.total or total_mobs > #players * mob_cap.player then
|
if total_mobs > mob_cap.total or total_mobs > #players * mob_cap.player then
|
||||||
minetest.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
|
minetest.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
|
||||||
return
|
return
|
||||||
|
@ -1065,21 +1096,49 @@ if mobs_spawn then
|
||||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||||
-- ignore void and unloaded area
|
-- ignore void and unloaded area
|
||||||
if dimension ~= "void" and dimension ~= "default" then
|
if dimension ~= "void" and dimension ~= "default" then
|
||||||
spawn_a_mob(pos)
|
spawn_a_mob(pos, cap_space_hostile, cap_space_non_hostile)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function despawn_allowed(self)
|
||||||
|
local nametag = self.nametag and self.nametag ~= ""
|
||||||
|
local not_busy = self.state ~= "attack" and self.following == nil
|
||||||
|
if self.can_despawn == true then
|
||||||
|
if not nametag and not_busy and not self.tamed == true and not self.persistent == true then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function mob_class:despawn_allowed()
|
||||||
|
despawn_allowed(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=false}) == false, "despawn_allowed - can_despawn false failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true}) == true, "despawn_allowed - can_despawn true failed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, nametag=""}) == true, "despawn_allowed - blank nametag failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, nametag=nil}) == true, "despawn_allowed - nil nametag failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, nametag="bob"}) == false, "despawn_allowed - nametag failed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, state="attack"}) == false, "despawn_allowed - attack state failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, following="blah"}) == false, "despawn_allowed - following state failed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, tamed=false}) == true, "despawn_allowed - not tamed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, tamed=true}) == false, "despawn_allowed - tamed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, persistent=true}) == false, "despawn_allowed - persistent")
|
||||||
|
assert(despawn_allowed({can_despawn=true, persistent=false}) == true, "despawn_allowed - not persistent")
|
||||||
|
|
||||||
function mob_class:check_despawn(pos, dtime)
|
function mob_class:check_despawn(pos, dtime)
|
||||||
self.lifetimer = self.lifetimer - dtime
|
self.lifetimer = self.lifetimer - dtime
|
||||||
|
|
||||||
-- Despawning: when lifetimer expires, remove mob
|
-- Despawning: when lifetimer expires, remove mob
|
||||||
if remove_far
|
if remove_far and despawn_allowed(self) then
|
||||||
and self.can_despawn == true
|
|
||||||
and ((not self.nametag) or (self.nametag == ""))
|
|
||||||
and self.state ~= "attack"
|
|
||||||
and self.following == nil then
|
|
||||||
if self.despawn_immediately or self.lifetimer <= 0 then
|
if self.despawn_immediately or self.lifetimer <= 0 then
|
||||||
if logging then
|
if logging then
|
||||||
minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out")
|
minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out")
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_paintings
|
||||||
|
Painting=Cuadro
|
|
@ -39,7 +39,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers
|
||||||
* Cave Spider
|
* Cave Spider
|
||||||
* Enderman
|
* Enderman
|
||||||
* Zombie Villager
|
* Zombie Villager
|
||||||
* Zombie Pigman
|
* Zombie Piglin
|
||||||
* Wither Skeleton
|
* Wither Skeleton
|
||||||
* Magma Cube
|
* Magma Cube
|
||||||
* Blaze
|
* Blaze
|
||||||
|
|
|
@ -2,7 +2,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local axolotl = {
|
local axolotl = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "axolotl",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = false,
|
passive = false,
|
||||||
hp_min = 14,
|
hp_min = 14,
|
||||||
|
|
|
@ -31,7 +31,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local cod = {
|
local cod = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_ambient",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 3,
|
hp_min = 3,
|
||||||
|
|
|
@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:creeper", {
|
mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
|
description = S("Creeper"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
spawn_in_group = 1,
|
spawn_in_group = 1,
|
||||||
|
|
|
@ -24,6 +24,12 @@
|
||||||
-- added rain damage.
|
-- added rain damage.
|
||||||
-- fixed the grass_with_dirt issue.
|
-- fixed the grass_with_dirt issue.
|
||||||
|
|
||||||
|
-- How freqeuntly to take and place blocks, in seconds
|
||||||
|
local take_frequency_min = 235
|
||||||
|
local take_frequency_max = 245
|
||||||
|
local place_frequency_min = 235
|
||||||
|
local place_frequency_max = 245
|
||||||
|
|
||||||
minetest.register_entity("mobs_mc:ender_eyes", {
|
minetest.register_entity("mobs_mc:ender_eyes", {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_spider.b3d",
|
mesh = "mobs_mc_spider.b3d",
|
||||||
|
@ -60,13 +66,6 @@ end
|
||||||
|
|
||||||
local pr = PseudoRandom(os.time()*(-334))
|
local pr = PseudoRandom(os.time()*(-334))
|
||||||
|
|
||||||
-- How freqeuntly to take and place blocks, in seconds
|
|
||||||
local take_frequency_min = 235
|
|
||||||
local take_frequency_max = 245
|
|
||||||
local place_frequency_min = 235
|
|
||||||
local place_frequency_max = 245
|
|
||||||
|
|
||||||
|
|
||||||
-- Texuture overrides for enderman block. Required for cactus because it's original is a nodebox
|
-- Texuture overrides for enderman block. Required for cactus because it's original is a nodebox
|
||||||
-- and the textures have tranparent pixels.
|
-- and the textures have tranparent pixels.
|
||||||
local block_texture_overrides
|
local block_texture_overrides
|
||||||
|
@ -491,7 +490,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
||||||
local dug = minetest.get_node_or_nil(take_pos)
|
local dug = minetest.get_node_or_nil(take_pos)
|
||||||
if dug and dug.name == "air" then
|
if dug and dug.name == "air" then
|
||||||
self._taken_node = node.name
|
self._taken_node = node.name
|
||||||
self.can_despawn = false
|
self.persistent = true
|
||||||
local def = minetest.registered_nodes[self._taken_node]
|
local def = minetest.registered_nodes[self._taken_node]
|
||||||
-- Update animation and texture accordingly (adds visibly carried block)
|
-- Update animation and texture accordingly (adds visibly carried block)
|
||||||
local block_type
|
local block_type
|
||||||
|
@ -542,7 +541,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
||||||
if success then
|
if success then
|
||||||
local def = minetest.registered_nodes[self._taken_node]
|
local def = minetest.registered_nodes[self._taken_node]
|
||||||
-- Update animation accordingly (removes visible block)
|
-- Update animation accordingly (removes visible block)
|
||||||
self.can_despawn = true
|
self.persistent = false
|
||||||
self.animation = select_enderman_animation("normal")
|
self.animation = select_enderman_animation("normal")
|
||||||
self:set_animation(self.animation.current)
|
self:set_animation(self.animation.current)
|
||||||
if def.sounds and def.sounds.place then
|
if def.sounds and def.sounds.place then
|
||||||
|
|
|
@ -31,7 +31,7 @@ end
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_underground",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 10,
|
hp_min = 10,
|
||||||
|
|
|
@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
local hoglin = {
|
local hoglin = {
|
||||||
|
description = S("Hoglin"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
|
@ -19,8 +20,9 @@ local hoglin = {
|
||||||
xp_max = 9,
|
xp_max = 9,
|
||||||
armor = {fleshy = 90},
|
armor = {fleshy = 90},
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
|
attack_frequency = 3;
|
||||||
damage = 4,
|
damage = 4,
|
||||||
reach = 3,
|
reach = 1.9,
|
||||||
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
|
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "extra_mobs_hoglin.b3d",
|
mesh = "extra_mobs_hoglin.b3d",
|
||||||
|
@ -63,7 +65,7 @@ local hoglin = {
|
||||||
punch_end = 32,
|
punch_end = 32,
|
||||||
},
|
},
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
view_range = 32,
|
view_range = 16,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then
|
if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then
|
||||||
|
@ -87,6 +89,7 @@ local hoglin = {
|
||||||
mcl_mobs.register_mob("mobs_mc:hoglin", hoglin)
|
mcl_mobs.register_mob("mobs_mc:hoglin", hoglin)
|
||||||
|
|
||||||
local zoglin = table.copy(hoglin)
|
local zoglin = table.copy(hoglin)
|
||||||
|
zoglin.description = S("Zoglin")
|
||||||
zoglin.fire_resistant = 1
|
zoglin.fire_resistant = 1
|
||||||
zoglin.textures = {"extra_mobs_zoglin.png"}
|
zoglin.textures = {"extra_mobs_zoglin.png"}
|
||||||
zoglin.do_custom = function()
|
zoglin.do_custom = function()
|
||||||
|
@ -100,6 +103,7 @@ mcl_mobs.register_mob("mobs_mc:zoglin", zoglin)
|
||||||
-- Baby hoglin.
|
-- Baby hoglin.
|
||||||
|
|
||||||
local baby_hoglin = table.copy(hoglin)
|
local baby_hoglin = table.copy(hoglin)
|
||||||
|
baby_hoglin.description = S("Baby hoglin")
|
||||||
baby_hoglin.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
|
baby_hoglin.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
|
||||||
baby_hoglin.xp_min = 20
|
baby_hoglin.xp_min = 20
|
||||||
baby_hoglin.xp_max = 20
|
baby_hoglin.xp_max = 20
|
||||||
|
|
|
@ -139,7 +139,6 @@ dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt
|
||||||
dofile(path .. "/skeleton+stray.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/skeleton+stray.lua") -- Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/skeleton_wither.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/skeleton_wither.lua") -- Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/zombiepig.lua") -- Mesh by Morn76 Animation by Pavel_S
|
|
||||||
dofile(path .. "/slime+magma_cube.lua") -- Wuzzy
|
dofile(path .. "/slime+magma_cube.lua") -- Wuzzy
|
||||||
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
||||||
dofile(path .. "/vex.lua") -- KrupnoPavel
|
dofile(path .. "/vex.lua") -- KrupnoPavel
|
||||||
|
@ -153,7 +152,7 @@ dofile(path .. "/dolphin.lua")
|
||||||
|
|
||||||
dofile(path .. "/glow_squid.lua")
|
dofile(path .. "/glow_squid.lua")
|
||||||
|
|
||||||
dofile(path .. "/piglin.lua")
|
dofile(path .. "/piglin.lua") -- "mobs_mc_zombie_pigman.b3d" Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/hoglin+zoglin.lua")
|
dofile(path .. "/hoglin+zoglin.lua")
|
||||||
|
|
||||||
dofile(path .. "/strider.lua")
|
dofile(path .. "/strider.lua")
|
||||||
|
|
|
@ -48,7 +48,7 @@ Wither=Wither
|
||||||
Wolf=Wolf
|
Wolf=Wolf
|
||||||
Husk=Wüstenzombie
|
Husk=Wüstenzombie
|
||||||
Zombie=Zombie
|
Zombie=Zombie
|
||||||
Zombie Pigman=Schweinezombie
|
Zombie Piglin=Schweinezombie
|
||||||
Farmer=Bauer
|
Farmer=Bauer
|
||||||
Fisherman=Fischer
|
Fisherman=Fischer
|
||||||
Fletcher=Pfeilmacher
|
Fletcher=Pfeilmacher
|
||||||
|
|
|
@ -54,5 +54,18 @@ Baby Husk=Bebé Zombi Momificado
|
||||||
Baby Zombie=Bebé Zombi
|
Baby Zombie=Bebé Zombi
|
||||||
Husk=Zombi Momificado
|
Husk=Zombi Momificado
|
||||||
Zombie=Zombi
|
Zombie=Zombi
|
||||||
Baby Zombie Pigman=Bebé Hombrecerdo Zombi
|
Baby Zombie Piglin=Bebé Hombrecerdo Zombi
|
||||||
Zombie Pigman=Hombrecerdo Zombi
|
Zombie Piglin=Hombrecerdo Zombi
|
||||||
|
Cartographer=Cartógrafo
|
||||||
|
Armorer=Escudero
|
||||||
|
Leatherworker=Peletero
|
||||||
|
Butcher=Carnicero
|
||||||
|
Weapon Smith=Armero
|
||||||
|
Tool Smith=Herrero
|
||||||
|
Cleric=Clérigo
|
||||||
|
Nitwit=Holgazán
|
||||||
|
Cod=Bacalao
|
||||||
|
Salmon=Salmón
|
||||||
|
Dolphin=Delfín
|
||||||
|
Pillager=Saqueador
|
||||||
|
Tropical fish=Pez tropical
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# textdomain: mobs_mc
|
# textdomain: mobs_mc
|
||||||
Agent=Agent
|
Agent=Agent
|
||||||
|
Axolotl=Axolotl
|
||||||
Bat=Chauve-souris
|
Bat=Chauve-souris
|
||||||
Blaze=Blaze
|
Blaze=Blaze
|
||||||
Chicken=Poulet
|
Chicken=Poulet
|
||||||
|
@ -48,7 +49,7 @@ Wither=Wither
|
||||||
Wolf=Loup
|
Wolf=Loup
|
||||||
Husk=Zombie Momifié
|
Husk=Zombie Momifié
|
||||||
Zombie=Zombie
|
Zombie=Zombie
|
||||||
Zombie Pigman=Zombie Cochon
|
Zombie Piglin=Zombie Cochon
|
||||||
Farmer=Fermier
|
Farmer=Fermier
|
||||||
Fisherman=Pêcheur
|
Fisherman=Pêcheur
|
||||||
Fletcher=Archer
|
Fletcher=Archer
|
||||||
|
@ -67,3 +68,6 @@ Salmon=Saumon
|
||||||
Dolphin=Dauphin
|
Dolphin=Dauphin
|
||||||
Pillager=Pilleur
|
Pillager=Pilleur
|
||||||
Tropical fish=Poisson tropical
|
Tropical fish=Poisson tropical
|
||||||
|
Hoglin=Hoglin
|
||||||
|
Strider=Arpenteur
|
||||||
|
Glow Squid=Poulpe Brillant
|
|
@ -49,7 +49,7 @@ Wither=ウィザー
|
||||||
Wolf=オオカミ
|
Wolf=オオカミ
|
||||||
Husk=ハスク
|
Husk=ハスク
|
||||||
Zombie=ゾンビ
|
Zombie=ゾンビ
|
||||||
Zombie Pigman=ゾンビピッグマン
|
Zombie Piglin=ゾンビピッグマン
|
||||||
Farmer=農民
|
Farmer=農民
|
||||||
Fisherman=漁師
|
Fisherman=漁師
|
||||||
Fletcher=矢師
|
Fletcher=矢師
|
||||||
|
|
|
@ -49,7 +49,12 @@ Wither=
|
||||||
Wolf=
|
Wolf=
|
||||||
Husk=
|
Husk=
|
||||||
Zombie=
|
Zombie=
|
||||||
Zombie Pigman=
|
Piglin=
|
||||||
|
Baby Piglin=
|
||||||
|
Zombie Piglin=
|
||||||
|
Baby Zombie Piglin=
|
||||||
|
Sword Piglin=
|
||||||
|
Piglin Brute=
|
||||||
Farmer=
|
Farmer=
|
||||||
Fisherman=
|
Fisherman=
|
||||||
Fletcher=
|
Fletcher=
|
||||||
|
@ -68,3 +73,6 @@ Salmon=
|
||||||
Dolphin=
|
Dolphin=
|
||||||
Pillager=
|
Pillager=
|
||||||
Tropical fish=
|
Tropical fish=
|
||||||
|
Hoglin=
|
||||||
|
Strider=
|
||||||
|
Glow Squid=
|
|
@ -82,7 +82,7 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if driver present allow control of horse
|
-- if driver present allow control of horse
|
||||||
if self.driver then
|
if self.driver and self.driver:get_wielded_item():get_name() == "mcl_mobitems:carrot_on_a_stick" then
|
||||||
|
|
||||||
mcl_mobs.drive(self, "walk", "stand", false, dtime)
|
mcl_mobs.drive(self, "walk", "stand", false, dtime)
|
||||||
|
|
||||||
|
@ -149,18 +149,14 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Mount or detach player
|
-- Should make pig go faster when right clicked with carrot on a stick.
|
||||||
local name = clicker:get_player_name()
|
-- FIXME: needs work on the going faster part.
|
||||||
if self.driver and clicker == self.driver then
|
--[[if self.driver and clicker == self.driver and self.driver:get_wielded_item():get_name() == "mcl_mobitems:carrot_on_a_stick" then
|
||||||
-- Detach if already attached
|
if not self.v3 then
|
||||||
mcl_mobs.detach(clicker, {x=1, y=0, z=0})
|
self.v3 = 0
|
||||||
return
|
self.max_speed_forward = 100
|
||||||
|
self.accel = 10
|
||||||
elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == "mcl_mobitems:carrot_on_a_stick" then
|
end
|
||||||
-- Ride pig if it has a saddle and player uses a carrot on a stick
|
|
||||||
|
|
||||||
mcl_mobs.attach(self, clicker)
|
|
||||||
|
|
||||||
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||||
|
|
||||||
local inv = self.driver:get_inventory()
|
local inv = self.driver:get_inventory()
|
||||||
|
@ -177,6 +173,19 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
end
|
end
|
||||||
inv:set_stack("main",self.driver:get_wield_index(), wielditem)
|
inv:set_stack("main",self.driver:get_wield_index(), wielditem)
|
||||||
end
|
end
|
||||||
|
end]]
|
||||||
|
|
||||||
|
-- Mount or detach player
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
if self.driver and clicker == self.driver then -- and self.driver:get_wielded_item():get_name() ~= "mcl_mobitems:carrot_on_a_stick" then -- Note: This is for when the ability to make the pig go faster is implemented
|
||||||
|
-- Detach if already attached
|
||||||
|
mcl_mobs.detach(clicker, {x=1, y=0, z=0})
|
||||||
|
return
|
||||||
|
|
||||||
|
elseif not self.driver and self.saddle == "yes" then
|
||||||
|
-- Ride pig if it has a saddle
|
||||||
|
|
||||||
|
mcl_mobs.attach(self, clicker)
|
||||||
return
|
return
|
||||||
|
|
||||||
-- Capture pig
|
-- Capture pig
|
||||||
|
@ -195,6 +204,18 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
after_activate = function(self, staticdata, def, dtime)
|
||||||
|
if self.saddle == "yes" then -- Make saddle load upon rejoin
|
||||||
|
self.base_texture = {
|
||||||
|
"mobs_mc_pig.png", -- base
|
||||||
|
"mobs_mc_pig_saddle.png", -- saddle
|
||||||
|
}
|
||||||
|
self.object:set_properties({
|
||||||
|
textures = self.base_texture
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
|
|
|
@ -25,7 +25,10 @@ function mobs_mc.player_wears_gold(player)
|
||||||
for i=1, 6 do
|
for i=1, 6 do
|
||||||
local stack = player:get_inventory():get_stack("armor", i)
|
local stack = player:get_inventory():get_stack("armor", i)
|
||||||
local item = stack:get_name()
|
local item = stack:get_name()
|
||||||
if item == "mcl_armor:chestplate_gold" or item == "mcl_armor:leggings_gold" or item == "mcl_armor:helmet_gold" or item == "mcl_armor:boots_gold" then
|
if string.find(item, "mcl_armor:chestplate_gold")
|
||||||
|
or string.find(item, "mcl_armor:leggings_gold")
|
||||||
|
or string.find(item, "mcl_armor:helmet_gold")
|
||||||
|
or string.find(item, "mcl_armor:boots_gold") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -35,9 +38,11 @@ end
|
||||||
--################### piglin
|
--################### piglin
|
||||||
--###################
|
--###################
|
||||||
local piglin = {
|
local piglin = {
|
||||||
|
description = S("Piglin"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
|
group_attack = {"mobs_mc:piglin", "mobs_mc:sword_piglin", "mobs_mc:piglin_brute"},
|
||||||
hp_min = 16,
|
hp_min = 16,
|
||||||
hp_max = 16,
|
hp_max = 16,
|
||||||
xp_min = 9,
|
xp_min = 9,
|
||||||
|
@ -178,6 +183,7 @@ mcl_mobs.register_mob("mobs_mc:piglin", piglin)
|
||||||
|
|
||||||
|
|
||||||
local sword_piglin = table.copy(piglin)
|
local sword_piglin = table.copy(piglin)
|
||||||
|
sword_piglin.description = S("Sword Piglin")
|
||||||
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
||||||
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
|
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
|
||||||
sword_piglin.on_spawn = function(self)
|
sword_piglin.on_spawn = function(self)
|
||||||
|
@ -206,43 +212,127 @@ sword_piglin.animation = {
|
||||||
punch_start = 189,
|
punch_start = 189,
|
||||||
punch_end = 198,
|
punch_end = 198,
|
||||||
}
|
}
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
|
mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
|
||||||
|
|
||||||
local zombified_piglin = table.copy(piglin)
|
|
||||||
zombified_piglin.fire_resistant = 1
|
-- Zombified Piglin --
|
||||||
zombified_piglin.do_custom = function()
|
|
||||||
return
|
|
||||||
end
|
local zombified_piglin = {
|
||||||
zombified_piglin.on_spawn = function()
|
description = S("Zombie Piglin"),
|
||||||
return
|
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
|
||||||
end
|
type = "animal",
|
||||||
zombified_piglin.on_rightclick = function()
|
passive = false,
|
||||||
return
|
spawn_class = "passive",
|
||||||
end
|
hp_min = 20,
|
||||||
zombified_piglin.lava_damage = 0
|
hp_max = 20,
|
||||||
zombified_piglin.fire_damage = 0
|
xp_min = 6,
|
||||||
zombified_piglin.attack_animals = true
|
xp_max = 6,
|
||||||
zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
armor = {undead = 90, fleshy = 90},
|
||||||
zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"}
|
attack_type = "dogfight",
|
||||||
zombified_piglin.attack_type = "dogfight"
|
group_attack = {"mobs_mc:zombified_piglin", "mobs_mc:baby_zombified_piglin"},
|
||||||
zombified_piglin.animation = {
|
damage = 9,
|
||||||
stand_speed = 30,
|
reach = 2,
|
||||||
walk_speed = 30,
|
head_swivel = "head.control",
|
||||||
punch_speed = 45,
|
bone_eye_height = 2.4,
|
||||||
run_speed = 30,
|
head_eye_height = 1.4,
|
||||||
stand_start = 0,
|
curiosity = 15,
|
||||||
stand_end = 79,
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, -- same
|
||||||
walk_start = 168,
|
visual = "mesh",
|
||||||
walk_end = 187,
|
mesh = "mobs_mc_zombie_pigman.b3d",
|
||||||
run_start = 440,
|
textures = { {
|
||||||
run_end = 459,
|
"blank.png", --baby
|
||||||
punch_start = 189,
|
"default_tool_goldsword.png", --sword
|
||||||
punch_end = 198,
|
"mobs_mc_zombie_pigman.png", --pigman
|
||||||
|
} },
|
||||||
|
visual_size = {x=3, y=3},
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_mc_zombiepig_random",
|
||||||
|
war_cry = "mobs_mc_zombiepig_war_cry",
|
||||||
|
death = "mobs_mc_zombiepig_death",
|
||||||
|
damage = "mobs_mc_zombiepig_hurt",
|
||||||
|
distance = 16,
|
||||||
|
},
|
||||||
|
jump = true,
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
walk_velocity = .8,
|
||||||
|
run_velocity = 2.6,
|
||||||
|
pathfinding = 1,
|
||||||
|
drops = {
|
||||||
|
{name = "mcl_mobitems:rotten_flesh",
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,
|
||||||
|
looting = "common"},
|
||||||
|
{name = "mcl_core:gold_nugget",
|
||||||
|
chance = 1,
|
||||||
|
min = 0,
|
||||||
|
max = 1,
|
||||||
|
looting = "common"},
|
||||||
|
{name = "mcl_core:gold_ingot",
|
||||||
|
chance = 40, -- 2.5%
|
||||||
|
min = 1,
|
||||||
|
max = 1,
|
||||||
|
looting = "rare"},
|
||||||
|
{name = "mcl_tools:sword_gold",
|
||||||
|
chance = 100 / 8.5,
|
||||||
|
min = 1,
|
||||||
|
max = 1,
|
||||||
|
looting = "rare"},
|
||||||
|
},
|
||||||
|
animation = {
|
||||||
|
stand_speed = 25,
|
||||||
|
walk_speed = 25,
|
||||||
|
run_speed = 50,
|
||||||
|
stand_start = 40,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 0,
|
||||||
|
walk_end = 40,
|
||||||
|
run_start = 0,
|
||||||
|
run_end = 40,
|
||||||
|
punch_start = 90,
|
||||||
|
punch_end = 130,
|
||||||
|
},
|
||||||
|
lava_damage = 0,
|
||||||
|
fire_damage = 0,
|
||||||
|
fear_height = 4,
|
||||||
|
view_range = 16,
|
||||||
|
harmed_by_heal = true,
|
||||||
|
fire_damage_resistant = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:zombified_piglin", zombified_piglin)
|
mcl_mobs.register_mob("mobs_mc:zombified_piglin", zombified_piglin)
|
||||||
|
|
||||||
|
local baby_zombified_piglin = table.copy(zombified_piglin)
|
||||||
|
baby_zombified_piglin.description = S("Baby Zombie Piglin")
|
||||||
|
baby_zombified_piglin.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
|
||||||
|
baby_zombified_piglin.xp_min = 13
|
||||||
|
baby_zombified_piglin.xp_max = 13
|
||||||
|
baby_zombified_piglin.textures = {
|
||||||
|
{
|
||||||
|
"mobs_mc_zombie_pigman.png", --baby
|
||||||
|
"default_tool_goldsword.png", --sword
|
||||||
|
"mobs_mc_zombie_pigman.png", --pigman
|
||||||
|
}
|
||||||
|
}
|
||||||
|
baby_zombified_piglin.walk_velocity = 1.2
|
||||||
|
baby_zombified_piglin.run_velocity = 2.4
|
||||||
|
baby_zombified_piglin.light_damage = 0
|
||||||
|
baby_zombified_piglin.child = 1
|
||||||
|
|
||||||
|
mcl_mobs.register_mob("mobs_mc:baby_zombified_piglin", baby_zombified_piglin)
|
||||||
|
|
||||||
|
-- Compatibility code. These were removed, and now are called zombie piglins. They don't spawn.
|
||||||
|
-- This is only to catch old cases. Maybe could be an alias?
|
||||||
|
mcl_mobs.register_mob("mobs_mc:pigman", zombified_piglin)
|
||||||
|
mcl_mobs.register_mob("mobs_mc:baby_pigman", baby_zombified_piglin)
|
||||||
|
|
||||||
|
|
||||||
|
-- Piglin Brute --
|
||||||
|
|
||||||
local piglin_brute = table.copy(piglin)
|
local piglin_brute = table.copy(piglin)
|
||||||
|
piglin_brute.description = S("Piglin Brute")
|
||||||
piglin_brute.xp_min = 20
|
piglin_brute.xp_min = 20
|
||||||
piglin_brute.xp_max = 20
|
piglin_brute.xp_max = 20
|
||||||
piglin_brute.hp_min = 50
|
piglin_brute.hp_min = 50
|
||||||
|
@ -279,11 +369,17 @@ piglin_brute.animation = {
|
||||||
punch_end = 198,
|
punch_end = 198,
|
||||||
}
|
}
|
||||||
piglin_brute.can_despawn = false
|
piglin_brute.can_despawn = false
|
||||||
piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" }
|
|
||||||
|
piglin_brute.drops = {
|
||||||
|
{name = "mcl_tools:axe_gold",
|
||||||
|
chance = 8.5,
|
||||||
|
min = 1,
|
||||||
|
max = 1,},
|
||||||
|
}
|
||||||
mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)
|
mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7)
|
|
||||||
-- Regular spawning in the Nether
|
-- Regular spawning in the Nether
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:piglin",
|
"mobs_mc:piglin",
|
||||||
|
@ -300,7 +396,7 @@ minetest.LIGHT_MAX+1,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_lava_nether_max,
|
mcl_vars.mg_lava_nether_max,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7)
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:sword_piglin",
|
"mobs_mc:sword_piglin",
|
||||||
"nether",
|
"nether",
|
||||||
|
@ -316,7 +412,45 @@ minetest.LIGHT_MAX+1,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_lava_nether_max,
|
mcl_vars.mg_lava_nether_max,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
-- spawn eggs
|
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc:zombified_piglin",
|
||||||
|
"nether",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"Nether",
|
||||||
|
"CrimsonForest",
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
minetest.LIGHT_MAX+1,
|
||||||
|
30,
|
||||||
|
6000,
|
||||||
|
3,
|
||||||
|
mcl_vars.mg_nether_min,
|
||||||
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
|
-- Baby zombie is 20 times less likely than regular zombies
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc:baby_zombified_piglin",
|
||||||
|
"nether",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"Nether",
|
||||||
|
"CrimsonForest",
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
minetest.LIGHT_MAX+1,
|
||||||
|
30,
|
||||||
|
100000,
|
||||||
|
4,
|
||||||
|
mcl_vars.mg_nether_min,
|
||||||
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7)
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7)
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:piglin_brute","overworld",0,7)
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:zombified_piglin","overworld",0,minetest.LIGHT_MAX+1)
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0)
|
mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0)
|
||||||
mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0)
|
mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:piglin_brute","overworld",0,7)
|
mcl_mobs.register_egg("mobs_mc:zombified_piglin", S("Zombie Piglin"), "#ea9393", "#4c7129", 0)
|
||||||
|
|
|
@ -11,7 +11,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local salmon = {
|
local salmon = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_ambient",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 3,
|
hp_min = 3,
|
||||||
|
|
|
@ -269,7 +269,6 @@ local cave_biomes = {
|
||||||
"RoofedForest_underground",
|
"RoofedForest_underground",
|
||||||
"Jungle_underground",
|
"Jungle_underground",
|
||||||
"Swampland_underground",
|
"Swampland_underground",
|
||||||
"MushroomIsland_underground",
|
|
||||||
"BirchForest_underground",
|
"BirchForest_underground",
|
||||||
"Plains_underground",
|
"Plains_underground",
|
||||||
"MesaPlateauF_underground",
|
"MesaPlateauF_underground",
|
||||||
|
|
|
@ -59,7 +59,7 @@ end
|
||||||
|
|
||||||
local tropical_fish = {
|
local tropical_fish = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_ambient",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 3,
|
hp_min = 3,
|
||||||
|
|
|
@ -137,7 +137,7 @@ local professions = {
|
||||||
{
|
{
|
||||||
{ { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:fish_cooked", 6, 6 } },
|
{ { "mcl_fishing:fish_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:fish_cooked", 6, 6 } },
|
||||||
{ { "mcl_mobitems:string", 15, 20 }, E1 },
|
{ { "mcl_mobitems:string", 15, 20 }, E1 },
|
||||||
{ { "mcl_core:coal_lump", 15, 10 }, E1 },
|
{ { "mcl_core:coal_lump", 10, 15 }, E1 },
|
||||||
-- FIXME missing: bucket of cod + fish should be cod.
|
-- FIXME missing: bucket of cod + fish should be cod.
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,7 @@ mcl_mobs.register_mob("mobs_mc:villager_zombie", {
|
||||||
clicker:set_wielded_item(wielditem)
|
clicker:set_wielded_item(wielditem)
|
||||||
self._curing = math.random(3 * 60, 5 * 60)
|
self._curing = math.random(3 * 60, 5 * 60)
|
||||||
self.shaking = true
|
self.shaking = true
|
||||||
self.can_despawn = false
|
self.persistent = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -216,7 +216,6 @@ mcl_mobs:spawn_specific(
|
||||||
"MegaTaiga",
|
"MegaTaiga",
|
||||||
"Forest",
|
"Forest",
|
||||||
"ColdTaiga",
|
"ColdTaiga",
|
||||||
"FlowerForest_beach",
|
|
||||||
"Forest_beach",
|
"Forest_beach",
|
||||||
"ColdTaiga_beach_water",
|
"ColdTaiga_beach_water",
|
||||||
"Taiga_beach",
|
"Taiga_beach",
|
||||||
|
|
|
@ -1,156 +0,0 @@
|
||||||
--MCmobs v0.4
|
|
||||||
--maikerumine
|
|
||||||
--made for MC like Survival game
|
|
||||||
--License for code WTFPL and otherwise stated in readmes
|
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
|
||||||
|
|
||||||
--###################
|
|
||||||
--################### ZOMBIE PIGMAN
|
|
||||||
--###################
|
|
||||||
|
|
||||||
|
|
||||||
local pigman = {
|
|
||||||
description = S("Zombie Pigman"),
|
|
||||||
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
|
|
||||||
type = "animal",
|
|
||||||
passive = false,
|
|
||||||
spawn_class = "passive",
|
|
||||||
hp_min = 20,
|
|
||||||
hp_max = 20,
|
|
||||||
xp_min = 6,
|
|
||||||
xp_max = 6,
|
|
||||||
armor = {undead = 90, fleshy = 90},
|
|
||||||
attack_type = "dogfight",
|
|
||||||
group_attack = { "mobs_mc:pigman", "mobs_mc:baby_pigman" },
|
|
||||||
damage = 9,
|
|
||||||
reach = 2,
|
|
||||||
head_swivel = "head.control",
|
|
||||||
bone_eye_height = 2.4,
|
|
||||||
head_eye_height = 1.4,
|
|
||||||
curiosity = 15,
|
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
|
||||||
visual = "mesh",
|
|
||||||
mesh = "mobs_mc_zombie_pigman.b3d",
|
|
||||||
textures = { {
|
|
||||||
"blank.png", --baby
|
|
||||||
"default_tool_goldsword.png", --sword
|
|
||||||
"mobs_mc_zombie_pigman.png", --pigman
|
|
||||||
} },
|
|
||||||
visual_size = {x=3, y=3},
|
|
||||||
sounds = {
|
|
||||||
random = "mobs_mc_zombiepig_random",
|
|
||||||
war_cry = "mobs_mc_zombiepig_war_cry",
|
|
||||||
death = "mobs_mc_zombiepig_death",
|
|
||||||
damage = "mobs_mc_zombiepig_hurt",
|
|
||||||
distance = 16,
|
|
||||||
},
|
|
||||||
jump = true,
|
|
||||||
makes_footstep_sound = true,
|
|
||||||
walk_velocity = .8,
|
|
||||||
run_velocity = 2.6,
|
|
||||||
pathfinding = 1,
|
|
||||||
drops = {
|
|
||||||
{name = "mcl_mobitems:rotten_flesh",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,
|
|
||||||
looting = "common"},
|
|
||||||
{name = "mcl_core:gold_nugget",
|
|
||||||
chance = 1,
|
|
||||||
min = 0,
|
|
||||||
max = 1,
|
|
||||||
looting = "common"},
|
|
||||||
{name = "mcl_core:gold_ingot",
|
|
||||||
chance = 40, -- 2.5%
|
|
||||||
min = 1,
|
|
||||||
max = 1,
|
|
||||||
looting = "rare"},
|
|
||||||
{name = "mcl_tools:sword_gold",
|
|
||||||
chance = 100 / 8.5,
|
|
||||||
min = 1,
|
|
||||||
max = 1,
|
|
||||||
looting = "rare"},
|
|
||||||
},
|
|
||||||
animation = {
|
|
||||||
stand_speed = 25,
|
|
||||||
walk_speed = 25,
|
|
||||||
run_speed = 50,
|
|
||||||
stand_start = 40,
|
|
||||||
stand_end = 80,
|
|
||||||
walk_start = 0,
|
|
||||||
walk_end = 40,
|
|
||||||
run_start = 0,
|
|
||||||
run_end = 40,
|
|
||||||
punch_start = 90,
|
|
||||||
punch_end = 130,
|
|
||||||
},
|
|
||||||
lava_damage = 0,
|
|
||||||
fire_damage = 0,
|
|
||||||
fear_height = 4,
|
|
||||||
view_range = 16,
|
|
||||||
harmed_by_heal = true,
|
|
||||||
fire_damage_resistant = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:pigman", pigman)
|
|
||||||
|
|
||||||
-- Baby pigman.
|
|
||||||
-- A smaller and more dangerous variant of the pigman
|
|
||||||
|
|
||||||
local baby_pigman = table.copy(pigman)
|
|
||||||
baby_pigman.description = S("Baby Zombie Pigman")
|
|
||||||
baby_pigman.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
|
|
||||||
baby_pigman.xp_min = 13
|
|
||||||
baby_pigman.xp_max = 13
|
|
||||||
baby_pigman.textures = { {
|
|
||||||
"mobs_mc_zombie_pigman.png", --baby
|
|
||||||
"default_tool_goldsword.png", --sword
|
|
||||||
"mobs_mc_zombie_pigman.png", --pigman
|
|
||||||
} }
|
|
||||||
baby_pigman.walk_velocity = 1.2
|
|
||||||
baby_pigman.run_velocity = 2.4
|
|
||||||
baby_pigman.light_damage = 0
|
|
||||||
baby_pigman.child = 1
|
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:baby_pigman", baby_pigman)
|
|
||||||
|
|
||||||
-- Regular spawning in the Nether
|
|
||||||
mcl_mobs:spawn_specific(
|
|
||||||
"mobs_mc:pigman",
|
|
||||||
"nether",
|
|
||||||
"ground",
|
|
||||||
{
|
|
||||||
"Nether",
|
|
||||||
"CrimsonForest",
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
minetest.LIGHT_MAX+1,
|
|
||||||
30,
|
|
||||||
6000,
|
|
||||||
3,
|
|
||||||
mcl_vars.mg_nether_min,
|
|
||||||
mcl_vars.mg_nether_max)
|
|
||||||
-- Baby zombie is 20 times less likely than regular zombies
|
|
||||||
mcl_mobs:spawn_specific(
|
|
||||||
"mobs_mc:baby_pigman",
|
|
||||||
"nether",
|
|
||||||
"ground",
|
|
||||||
{
|
|
||||||
"Nether",
|
|
||||||
"CrimsonForest",
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
minetest.LIGHT_MAX+1,
|
|
||||||
30,
|
|
||||||
100000,
|
|
||||||
4,
|
|
||||||
mcl_vars.mg_nether_min,
|
|
||||||
mcl_vars.mg_nether_max)
|
|
||||||
|
|
||||||
-- Spawning in Nether portals in the Overworld
|
|
||||||
--mobs:spawn_specific("mobs_mc:pigman", {"mcl_portals:portal"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 500, 4, mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max)
|
|
||||||
|
|
||||||
-- spawn eggs
|
|
||||||
mcl_mobs.register_egg("mobs_mc:pigman", S("Zombie Pigman"), "#ea9393", "#4c7129", 0)
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:pigman","overworld",0,minetest.LIGHT_MAX+1)
|
|
|
@ -240,7 +240,7 @@ end
|
||||||
local function start_firework_rocket(pos)
|
local function start_firework_rocket(pos)
|
||||||
local p = get_point_on_circle(pos,math.random(32,64),32)
|
local p = get_point_on_circle(pos,math.random(32,64),32)
|
||||||
local n = minetest.get_node(p)
|
local n = minetest.get_node(p)
|
||||||
local l = minetest.get_natural_light(pos,0.5)
|
local l = mcl_util.get_natural_light(pos,0.5)
|
||||||
if n.name ~= "air" or l <= minetest.LIGHT_MAX then return end
|
if n.name ~= "air" or l <= minetest.LIGHT_MAX then return end
|
||||||
local o = minetest.add_entity(p,"mcl_bows:rocket_entity")
|
local o = minetest.add_entity(p,"mcl_bows:rocket_entity")
|
||||||
o:get_luaentity()._harmless = true
|
o:get_luaentity()._harmless = true
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
local mods_loaded = false
|
local mods_loaded = false
|
||||||
local NIGHT_VISION_RATIO = 0.45
|
local NIGHT_VISION_RATIO = 0.45
|
||||||
|
|
||||||
|
local MINIMUM_LIGHT_LEVEL = 0.2
|
||||||
|
|
||||||
local water_color = "#3F76E4"
|
local water_color = "#3F76E4"
|
||||||
|
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||||
|
@ -45,6 +47,24 @@ function mcl_weather.set_sky_color(player, def)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Function to work out light modifier at different times
|
||||||
|
-- Noon is brightest, midnight is darkest, 0600 and 18000 is in the middle of this
|
||||||
|
local function get_light_modifier(time)
|
||||||
|
-- 0.1 = 0.2
|
||||||
|
-- 0.4 = 0.8
|
||||||
|
-- 0.5 = 1
|
||||||
|
-- 0.6 = 0.8
|
||||||
|
-- 0.9 = 0.2
|
||||||
|
|
||||||
|
local light_multiplier = time * 2
|
||||||
|
if time > 0.5 then
|
||||||
|
light_multiplier = 2 * (1 - time)
|
||||||
|
else
|
||||||
|
light_multiplier = time / 0.5
|
||||||
|
end
|
||||||
|
return light_multiplier
|
||||||
|
end
|
||||||
|
|
||||||
mcl_weather.skycolor = {
|
mcl_weather.skycolor = {
|
||||||
-- Should be activated before do any effect.
|
-- Should be activated before do any effect.
|
||||||
active = true,
|
active = true,
|
||||||
|
@ -211,17 +231,14 @@ mcl_weather.skycolor = {
|
||||||
player:set_moon({visible = false})
|
player:set_moon({visible = false})
|
||||||
player:set_stars({visible = false})
|
player:set_stars({visible = false})
|
||||||
|
|
||||||
local lf = mcl_weather.get_current_light_factor()
|
local light_factor = mcl_weather.get_current_light_factor()
|
||||||
if mcl_weather.skycolor.current_layer_name() == "lightning" then
|
if mcl_weather.skycolor.current_layer_name() == "lightning" then
|
||||||
mcl_weather.skycolor.override_day_night_ratio(player, 1)
|
mcl_weather.skycolor.override_day_night_ratio(player, 1)
|
||||||
elseif lf then
|
elseif light_factor then
|
||||||
local w = minetest.get_timeofday()
|
local time = minetest.get_timeofday()
|
||||||
local light = (w * (lf*2))
|
local light_multiplier = get_light_modifier(time)
|
||||||
if light > 1 then
|
local new_light = math.max(light_factor * light_multiplier, MINIMUM_LIGHT_LEVEL)
|
||||||
light = 1 - (light - 1)
|
mcl_weather.skycolor.override_day_night_ratio(player, new_light)
|
||||||
end
|
|
||||||
light = (light * lf) + 0.15
|
|
||||||
mcl_weather.skycolor.override_day_night_ratio(player, light)
|
|
||||||
else
|
else
|
||||||
mcl_weather.skycolor.override_day_night_ratio(player, nil)
|
mcl_weather.skycolor.override_day_night_ratio(player, nil)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local zombie_siege_enabled = minetest.settings:get_bool("mcl_raids_zombie_siege", false)
|
local zombie_siege_enabled = minetest.settings:get_bool("mcl_raids_zombie_siege", false)
|
||||||
|
|
||||||
local function check_spawn_pos(pos)
|
local function check_spawn_pos(pos)
|
||||||
return minetest.get_natural_light(pos) < 7
|
return mcl_util.get_natural_light(pos) < 7
|
||||||
end
|
end
|
||||||
|
|
||||||
local function spawn_zombies(self)
|
local function spawn_zombies(self)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Water can flow into this block and cause it to drop as an item.=L'eau peut s'écouler dans ce bloc et provoquer sa chute en tant qu'élément.
|
Water can flow into this block and cause it to drop as an item.=L'eau peut s'écouler dans ce bloc et provoquer sa chute en tant qu'élément.
|
||||||
This block can be turned into dirt with a hoe.=Ce bloc peut être transformé en terre avec une houe.
|
This block can be turned into dirt with a hoe.=Ce bloc peut être transformé en terre avec une houe.
|
||||||
This block can be turned into farmland with a hoe.=Ce bloc peut être transformé en terres agricoles avec une houe.
|
This block can be turned into farmland with a hoe.=Ce bloc peut être transformé en terres agricoles avec une houe.
|
||||||
|
This block can be turned into grass path with a shovel.=Ce bloc peut être transformé en chemin d'herbe avec une pelle.
|
||||||
This block acts as a soil for all saplings.=Ce bloc agit comme un sol pour tous les pousses arbres.
|
This block acts as a soil for all saplings.=Ce bloc agit comme un sol pour tous les pousses arbres.
|
||||||
This block acts as a soil for some saplings.=Ce bloc agit comme un sol pour certains pousses arbres.
|
This block acts as a soil for some saplings.=Ce bloc agit comme un sol pour certains pousses arbres.
|
||||||
Sugar canes will grow on this block.=Les cannes à sucre pousseront sur ce bloc.
|
Sugar canes will grow on this block.=Les cannes à sucre pousseront sur ce bloc.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Water can flow into this block and cause it to drop as an item.=
|
Water can flow into this block and cause it to drop as an item.=
|
||||||
This block can be turned into dirt with a hoe.=
|
This block can be turned into dirt with a hoe.=
|
||||||
This block can be turned into farmland with a hoe.=
|
This block can be turned into farmland with a hoe.=
|
||||||
|
This block can be turned into grass path with a shovel.=
|
||||||
This block acts as a soil for all saplings.=
|
This block acts as a soil for all saplings.=
|
||||||
This block acts as a soil for some saplings.=
|
This block acts as a soil for some saplings.=
|
||||||
Sugar canes will grow on this block.=
|
Sugar canes will grow on this block.=
|
||||||
|
|
|
@ -435,7 +435,7 @@ Note that “transparency” here only means that the block is able to carry bri
|
||||||
Coordinates=Coordonnées
|
Coordinates=Coordonnées
|
||||||
The world is a large cube. And because of this, a position in the world can be easily expressed with Cartesian coordinates. That is, for each position in the world, there are 3 values X, Y and Z.=Le monde est un grand cube. Et pour cette raison, une position dans le monde peut être facilement exprimée avec des coordonnées cartésiennes. Autrement dit, pour chaque position dans le monde, il existe 3 valeurs X, Y et Z.
|
The world is a large cube. And because of this, a position in the world can be easily expressed with Cartesian coordinates. That is, for each position in the world, there are 3 values X, Y and Z.=Le monde est un grand cube. Et pour cette raison, une position dans le monde peut être facilement exprimée avec des coordonnées cartésiennes. Autrement dit, pour chaque position dans le monde, il existe 3 valeurs X, Y et Z.
|
||||||
Like this: (5, 45, -12)=Comme ceci : (5, 45, -12)
|
Like this: (5, 45, -12)=Comme ceci : (5, 45, -12)
|
||||||
This refers to the position where X@=5, Y@=45 and Z@=-12. The 3 letters are called “axes” : Y is for the height. X and Z are for the horizontal position.=Cela fait référence à la position où X@=5, Y@=45 et Z@=-12. Les 3 lettres sont appelées "axes" : Y est pour la hauteur. X et Z sont pour la position horizontale.
|
This refers to the position where X@=5, Y@=45 and Z@=-12. The 3 letters are called “axes”: Y is for the height. X and Z are for the horizontal position.=Cela fait référence à la position où X@=5, Y@=45 et Z@=-12. Les 3 lettres sont appelées “axes” : Y est pour la hauteur. X et Z sont pour la position horizontale.
|
||||||
The values for X, Y and Z work like this:=Les valeurs pour X, Y et Z fonctionnent comme ceci:
|
The values for X, Y and Z work like this:=Les valeurs pour X, Y et Z fonctionnent comme ceci:
|
||||||
• If you go up, Y increases=• Si vous montez, Y augmente
|
• If you go up, Y increases=• Si vous montez, Y augmente
|
||||||
• If you go down, Y decreases=• Si vous descendez, Y diminue
|
• If you go down, Y decreases=• Si vous descendez, Y diminue
|
||||||
|
|
|
@ -61,4 +61,4 @@ Advancement “@1” does not exist.=Le progrès «@1» n'existe pas.
|
||||||
@1 has made the advancement @2=@1 a obtenu le progrès @2
|
@1 has made the advancement @2=@1 a obtenu le progrès @2
|
||||||
Mine a block: @1=Miner un bloc : @1
|
Mine a block: @1=Miner un bloc : @1
|
||||||
Mine blocks: @1×@2=Miner des blocs : @1×@2
|
Mine blocks: @1×@2=Miner des blocs : @1×@2
|
||||||
Awards are disabled, enable them first by using /awards enable!=Les récompenses sont désactivés, activez les d'abord en utilisant /awards enable !
|
Awards are disabled, enable them first by using /awards enable!=Les récompenses sont désactivées, activez les d'abord en utilisant /awards enable !
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# textdomain: hudbars
|
# textdomain: hudbars
|
||||||
Health=Santé
|
Health=Santé
|
||||||
Breath=Breath
|
Breath=Respiration
|
||||||
|
|
||||||
# Default format string for progress bar-style HUD bars, e.g. “Health 5/20”
|
# Default format string for progress bar-style HUD bars, e.g. “Health 5/20”
|
||||||
@1: @2/@3=@1 : @2/@3
|
@1: @2/@3=@1 : @2/@3
|
||||||
|
|
|
@ -198,7 +198,7 @@ awards.register_achievement("mcl:skysTheLimit", {
|
||||||
-- Smelting achivements: These are awarded when picking up an item from a furnace
|
-- Smelting achivements: These are awarded when picking up an item from a furnace
|
||||||
-- output. They are given in mcl_furnaces.
|
-- output. They are given in mcl_furnaces.
|
||||||
awards.register_achievement("mcl:acquireIron", {
|
awards.register_achievement("mcl:acquireIron", {
|
||||||
title = S("Aquire Hardware"),
|
title = S("Acquire Hardware"),
|
||||||
description = S("Take an iron ingot from a furnace's output slot.\nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace."),
|
description = S("Take an iron ingot from a furnace's output slot.\nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace."),
|
||||||
icon = "default_steel_ingot.png",
|
icon = "default_steel_ingot.png",
|
||||||
type = "Advancement",
|
type = "Advancement",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=Schmied
|
Acquire Hardware=Schmied
|
||||||
Bake Bread=Brot backen
|
Bake Bread=Brot backen
|
||||||
Benchmarking=Tischler
|
Benchmarking=Tischler
|
||||||
Cow Tipper=Kuhschubser
|
Cow Tipper=Kuhschubser
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=Obteniendo un lingote
|
Acquire Hardware=Obteniendo un lingote
|
||||||
Bake Bread=Horneando pan
|
Bake Bread=Horneando pan
|
||||||
Benchmarking=Crea tu mesa de trabajo
|
Benchmarking=Crea tu mesa de trabajo
|
||||||
Cow Tipper=Consiguiendo cuero
|
Cow Tipper=Consiguiendo cuero
|
||||||
|
@ -47,3 +47,68 @@ Use a crafting table to craft a wooden hoe from wooden planks and sticks.=Usa un
|
||||||
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Usa una mesa de trabajo para hacer un pico de madera con tablas de madera procesada y palos de madera.
|
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Usa una mesa de trabajo para hacer un pico de madera con tablas de madera procesada y palos de madera.
|
||||||
Use obsidian and a fire starter to construct a Nether portal.=Usa obsidiana y un iniciador de fuego para construir un portal abisal.
|
Use obsidian and a fire starter to construct a Nether portal.=Usa obsidiana y un iniciador de fuego para construir un portal abisal.
|
||||||
Use wheat to craft a bread.=Usa trigo para elaborar pan.
|
Use wheat to craft a bread.=Usa trigo para elaborar pan.
|
||||||
|
Who is Cutting Onions?=¿Quién esta cortando cebollas?
|
||||||
|
Pick up a crying obsidian from the floor.=Recoge una obsidiana llorosa del suelo
|
||||||
|
Hidden in the Depths=Oculto en las profundidades
|
||||||
|
Pick up an Ancient Debris from the floor.=Recoge un Escombro Ancestral del suelo
|
||||||
|
The Nether=El Nether
|
||||||
|
Bring summer clothes.@nHint: Enter the Nether.=Tráete ropa de verano.@nSugerencia: Entra al Nether
|
||||||
|
Isn't It Iron Pick=¿No es hierrónico?
|
||||||
|
Craft a iron pickaxe using sticks and iron.=Crea un pico de hierro usando palos y hierro.
|
||||||
|
Postmortal=Post mortem
|
||||||
|
Use a Totem of Undying to cheat death.=Usa un tótem de inmortalidad para engañar a la muerte
|
||||||
|
Sweet Dreams=Dulces sueños
|
||||||
|
Sleep in a bed to change your respawn point.=Duerme en una cama para cambiar tu punto de reaparición.
|
||||||
|
Not Quite "Nine" Lives=No "siete" vidas exactamente
|
||||||
|
Charge a Respawn Anchor to the maximum.=Carga un nexo de reaparición al máximo.
|
||||||
|
What A Deal!=¡Qué buen trato!
|
||||||
|
Successfully trade with a Villager.=Comercia con un aldeano.
|
||||||
|
Withering Heights=Dr. Witherstein
|
||||||
|
Summon the wither from the dead.=Invoca al wither desde los muertos.
|
||||||
|
The Cutest Predator=El depredador más lindo
|
||||||
|
Catch an Axolotl with a bucket!=Atrapa a un ajolote en un cubo
|
||||||
|
Fishy Business=Un asuno escamoso
|
||||||
|
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=Atrapa un pez.@nSugerencia: Atrapa un pez, salmón, pez payaso, o pez globo.
|
||||||
|
Country Lode, Take Me Home=Magnetita llévame a casita
|
||||||
|
Use a compass on a Lodestone.=Usa una brújula sobre una magnetita
|
||||||
|
Serious Dedication=Dedicación seria
|
||||||
|
Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices.=Usa un lingote de netherita para mejorar una azada, y luego revalúa lo que estás haciendo con tu vida.
|
||||||
|
Local Brewery=Destilería local
|
||||||
|
Brew a Potion.@nHint: Take a potion or glass bottle out of the brewing stand.=Prepara una poción.@nSugerencia: Saca una poción o botella de vidrio de la destiladora
|
||||||
|
Enchanter=Aprendiz de mago
|
||||||
|
Enchant an item using an Enchantment Table.=Encanta un objeto usando la mesa de encantamientos
|
||||||
|
Bring Home the Beacon=Hágase la luz
|
||||||
|
Use a beacon.=Usa un faro.
|
||||||
|
Beaconator=Faroneitor
|
||||||
|
Use a fully powered beacon.=Utiliza un faro a máxima potencia.
|
||||||
|
The Next Generation=La nueva generación
|
||||||
|
Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.=Consigue el huevo de dragón.@nSugerencia: Recoge el huevo del suelo, y colócalo en tu inventario.
|
||||||
|
The End... Again...=El fin... de nuevo...
|
||||||
|
Respawn the Ender Dragon.=Vuelve a invocar al Enderdragón.
|
||||||
|
Sky's the Limit=El cielo es el límite
|
||||||
|
Find the elytra and prepare to fly above and beyond!=¿Encuentra los élitros y prepárate para volar al infinito y más allá!
|
||||||
|
Free the End=Libera el End
|
||||||
|
Kill the ender dragon. Good Luck!=Mata al Enderdragón. Buena suerte!
|
||||||
|
Bee Our Guest=Abelante, esta es tu casa
|
||||||
|
Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside.=Usa una fogata y una botella para obtener miel de una colmena sin enojar a las abejas.
|
||||||
|
Total Beelocation=Abejémonos de aquí
|
||||||
|
Move a bee nest, with 3 bees inside, using a silk touch enchanted tool.=Mueve una colmena que tenga 3 abejas usando una herramienta con toque de seda.
|
||||||
|
Wax On=Encerando ando
|
||||||
|
Apply honeycomb to a copper block to protect it from the elements.=Encera un bloque de cobre con un panal de abejas para protegerlo de los elementos.
|
||||||
|
Wax Off=Pulir cera
|
||||||
|
Scrape wax off of a copper block.=Quita la cera de un bloque de cobre
|
||||||
|
The End?=¿El End?
|
||||||
|
Or the beginning?@nHint: Enter an end portal.=¿O el principio?@nSugerencia: Entra al portal del End
|
||||||
|
Stone Age=La edad de piedra
|
||||||
|
Mine a stone with new pickaxe.=Mina piedra con tu nuevo pico.
|
||||||
|
Ice Bucket Challenge=Mente fría
|
||||||
|
Obtain an obsidian block.=Consigue un bloque de obsidiana.
|
||||||
|
Hot Stuff=¡La cosa está que arde!
|
||||||
|
Put lava in a bucket.=Pon lava en un cubo.
|
||||||
|
Hero of the Village=Héroe de la aldea
|
||||||
|
Successfully defend a village from a raid=Defiende una aldea de una invasión
|
||||||
|
Voluntary Exile=Exilio voluntario
|
||||||
|
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Mata al capitán de una invasión.
|
||||||
|
Sería mejor alejarte de las aldeas por un tiempo...
|
||||||
|
Tactical Fishing=Pesca táctica
|
||||||
|
Catch a fish... without a fishing rod!=Atrapa a un pez... ¡sin una caña de pescar!
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=Acquérir du matériel
|
Acquire Hardware=Acquérir du matériel
|
||||||
Bake Bread=Faire du pain
|
Bake Bread=Faire du pain
|
||||||
Benchmarking=Fabriquer
|
Benchmarking=Fabriquer
|
||||||
Cow Tipper=Chevaucher une vache
|
Cow Tipper=Chevaucher une vache
|
||||||
|
@ -54,9 +54,9 @@ Pick up an Ancient Debris from the floor.=Ramassez un Ancien Débris par terre.
|
||||||
The Nether=Le Nether
|
The Nether=Le Nether
|
||||||
Bring summer clothes.@nHint: Enter the Nether.=Apportez des vêtements d'été.@nAstuce : Entrez dans le Nether
|
Bring summer clothes.@nHint: Enter the Nether.=Apportez des vêtements d'été.@nAstuce : Entrez dans le Nether
|
||||||
Isn't It Iron Pick=Bonne Pioche !
|
Isn't It Iron Pick=Bonne Pioche !
|
||||||
Craft a iron pickaxe using sticks and iron.=Fabriquez une pioche de fer avec des batons et du fer.
|
Craft a iron pickaxe using sticks and iron.=Fabriquez une pioche de fer avec des bâtons et du fer.
|
||||||
Postmortal=Aux frontières de la mort
|
Postmortal=Aux frontières de la mort
|
||||||
Use a Totem of Undying to cheat death.=Utilisez un Totem d'imortalité pour tromper la mort.
|
Use a Totem of Undying to cheat death.=Utilisez un Totem d’immortalité pour tromper la mort.
|
||||||
Sweet Dreams=Bonne nuit les petits
|
Sweet Dreams=Bonne nuit les petits
|
||||||
Sleep in a bed to change your respawn point.=Dormez dans un lit pour changer votre point de réapparition.
|
Sleep in a bed to change your respawn point.=Dormez dans un lit pour changer votre point de réapparition.
|
||||||
Not Quite "Nine" Lives=Presque "neuf" vies
|
Not Quite "Nine" Lives=Presque "neuf" vies
|
||||||
|
@ -65,6 +65,8 @@ What A Deal!=Adjugé, Vendu !
|
||||||
Successfully trade with a Villager.=Commercez avec succès avec un villageois.
|
Successfully trade with a Villager.=Commercez avec succès avec un villageois.
|
||||||
Withering Heights=Les Witherables
|
Withering Heights=Les Witherables
|
||||||
Summon the wither from the dead.=Invoquez le Wither d'entre les morts.
|
Summon the wither from the dead.=Invoquez le Wither d'entre les morts.
|
||||||
|
The Cutest Predator=Le plus mignon des prédateurs
|
||||||
|
Catch an Axolotl with a bucket!=Attrapez un Axolotl avec un seau !
|
||||||
Fishy Business=Merci pour le poisson
|
Fishy Business=Merci pour le poisson
|
||||||
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=Attrapez un poisson.@nAstuce : attrapez un poisson, saumon, poisson-clown, ou poisson-globe.
|
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=Attrapez un poisson.@nAstuce : attrapez un poisson, saumon, poisson-clown, ou poisson-globe.
|
||||||
Country Lode, Take Me Home=Petit Poucet
|
Country Lode, Take Me Home=Petit Poucet
|
||||||
|
@ -79,3 +81,33 @@ Bring Home the Beacon=Fais ta balise
|
||||||
Use a beacon.=Utilisez une balise.
|
Use a beacon.=Utilisez une balise.
|
||||||
Beaconator=Phare allumé
|
Beaconator=Phare allumé
|
||||||
Use a fully powered beacon.=Utilisez une balise à pleine puissance.
|
Use a fully powered beacon.=Utilisez une balise à pleine puissance.
|
||||||
|
The Next Generation=La nouvelle génération
|
||||||
|
Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.=Tenez l'oeuf de dragon.@nAstuce: Ramassez l’œuf sur le sol pour l'avoir dans votre inventaire.
|
||||||
|
The End... Again...=Un air de déjà vu...
|
||||||
|
Respawn the Ender Dragon.=Faites réapparaître l'Ender Dragon.
|
||||||
|
Sky's the Limit=Vers l'infini et au-delà
|
||||||
|
Find the elytra and prepare to fly above and beyond!=Trouvez des élytres et préparez vous à vous envoler !
|
||||||
|
Free the End=Libérez l'End
|
||||||
|
Kill the ender dragon. Good Luck!=Tuez l'Ender Dragon. Bonne chance !
|
||||||
|
Bee Our Guest=J'irai butinez chez vous
|
||||||
|
Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside.=Utilisez un feu de camp pour remplir une bouteille de miel sans provoquez les abeilles.
|
||||||
|
Total Beelocation=Dé-miel-nagement
|
||||||
|
Move a bee nest, with 3 bees inside, using a silk touch enchanted tool.=Déplacez une ruche, avec 3 abeilles à l'intérieur en utilisant un outil enchanté avec toucher de soie.
|
||||||
|
Wax On=Lustrer
|
||||||
|
Apply honeycomb to a copper block to protect it from the elements.=Étalez de la cire sur un bloc de cuivre pour le protéger des éléments.
|
||||||
|
Wax Off=Frotter
|
||||||
|
Scrape wax off of a copper block.=Retirer la cire d'un bloc de cuivre.
|
||||||
|
The End?=Fin ?
|
||||||
|
Or the beginning?@nHint: Enter an end portal.=Ou le commencement ?@nAstuce : Entrer dans un portail de l'End.
|
||||||
|
Stone Age=L'âge de pierre
|
||||||
|
Mine a stone with new pickaxe.=Minez de la roche avec votre pioche.
|
||||||
|
Ice Bucket Challenge=Ice Bucket Challenge
|
||||||
|
Obtain an obsidian block.=Obtenez un bloc d'obsidienne.
|
||||||
|
Hot Stuff=Chaud devant !
|
||||||
|
Put lava in a bucket.=Remplir un seau de lave.
|
||||||
|
Hero of the Village=Héros du village
|
||||||
|
Successfully defend a village from a raid=Protégez le village d'un raid
|
||||||
|
Voluntary Exile=Exil volontaire
|
||||||
|
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Tuez un capitaine de pillards. Mieux vaut rester loin des villages pour l'instant...
|
||||||
|
Tactical Fishing=Pêche tactique
|
||||||
|
Catch a fish... without a fishing rod!=Attrapez un poisson... sans canne à pêche !
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=金属を入手
|
Acquire Hardware=金属を入手
|
||||||
Bake Bread=パンを焼く
|
Bake Bread=パンを焼く
|
||||||
Benchmarking=土台作り
|
Benchmarking=土台作り
|
||||||
Cow Tipper=牛転がし
|
Cow Tipper=牛転がし
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=Zdobądź narzędzie
|
Acquire Hardware=Zdobądź narzędzie
|
||||||
Bake Bread=Upiecz chleb
|
Bake Bread=Upiecz chleb
|
||||||
Benchmarking=Rzemieślnictwo
|
Benchmarking=Rzemieślnictwo
|
||||||
Cow Tipper=Raz krowie śmierć
|
Cow Tipper=Raz krowie śmierć
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=Куй Железо
|
Acquire Hardware=Куй Железо
|
||||||
Bake Bread=Хлеб всему голова
|
Bake Bread=Хлеб всему голова
|
||||||
Benchmarking=Верстак
|
Benchmarking=Верстак
|
||||||
Cow Tipper=Кожа да кости
|
Cow Tipper=Кожа да кости
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain:mcl_achievements
|
# textdomain:mcl_achievements
|
||||||
Aquire Hardware=
|
Acquire Hardware=
|
||||||
Bake Bread=
|
Bake Bread=
|
||||||
Benchmarking=
|
Benchmarking=
|
||||||
Cow Tipper=
|
Cow Tipper=
|
||||||
|
@ -66,7 +66,7 @@ Successfully trade with a Villager.=
|
||||||
Withering Heights=
|
Withering Heights=
|
||||||
Summon the wither from the dead.=
|
Summon the wither from the dead.=
|
||||||
The Cutest Predator=
|
The Cutest Predator=
|
||||||
Catch an Axolotl with a bucket!
|
Catch an Axolotl with a bucket!=
|
||||||
Fishy Business=
|
Fishy Business=
|
||||||
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=
|
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=
|
||||||
Country Lode, Take Me Home=
|
Country Lode, Take Me Home=
|
||||||
|
@ -85,7 +85,7 @@ The Next Generation=
|
||||||
Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.=
|
Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.=
|
||||||
The End... Again...=
|
The End... Again...=
|
||||||
Respawn the Ender Dragon.=
|
Respawn the Ender Dragon.=
|
||||||
Sky's The Limit=
|
Sky's the Limit=
|
||||||
Find the elytra and prepare to fly above and beyond!=
|
Find the elytra and prepare to fly above and beyond!=
|
||||||
Free the End=
|
Free the End=
|
||||||
Kill the ender dragon. Good Luck!=
|
Kill the ender dragon. Good Luck!=
|
||||||
|
@ -97,3 +97,17 @@ Wax On=
|
||||||
Apply honeycomb to a copper block to protect it from the elements.=
|
Apply honeycomb to a copper block to protect it from the elements.=
|
||||||
Wax Off=
|
Wax Off=
|
||||||
Scrape wax off of a copper block.=
|
Scrape wax off of a copper block.=
|
||||||
|
The End?=
|
||||||
|
Or the beginning?@nHint: Enter an end portal.=
|
||||||
|
Stone Age=
|
||||||
|
Mine a stone with new pickaxe.=
|
||||||
|
Ice Bucket Challenge=
|
||||||
|
Obtain an obsidian block.=
|
||||||
|
Hot Stuff=
|
||||||
|
Put lava in a bucket.=
|
||||||
|
Hero of the Village=
|
||||||
|
Successfully defend a village from a raid=
|
||||||
|
Voluntary Exile=
|
||||||
|
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=
|
||||||
|
Tactical Fishing=
|
||||||
|
Catch a fish... without a fishing rod!=
|
||||||
|
|
|
@ -38,6 +38,7 @@ return {
|
||||||
"talamh",
|
"talamh",
|
||||||
"Faerraven / Michieal",
|
"Faerraven / Michieal",
|
||||||
"FossFanatic ",
|
"FossFanatic ",
|
||||||
|
"SmokeyDope",
|
||||||
}},
|
}},
|
||||||
{S("Contributors"), 0x52FF00, {
|
{S("Contributors"), 0x52FF00, {
|
||||||
"Laurent Rocher",
|
"Laurent Rocher",
|
||||||
|
@ -82,15 +83,12 @@ return {
|
||||||
"aldum",
|
"aldum",
|
||||||
"Dieter44",
|
"Dieter44",
|
||||||
"Pepebotella",
|
"Pepebotella",
|
||||||
"MrRar",
|
|
||||||
"Lazerbeak12345",
|
"Lazerbeak12345",
|
||||||
"mrminer",
|
"mrminer",
|
||||||
"Thunder1035",
|
"Thunder1035",
|
||||||
"opfromthestart",
|
"opfromthestart",
|
||||||
"snowyu",
|
"snowyu",
|
||||||
"FaceDeer",
|
"FaceDeer",
|
||||||
"Faerraven / Michieal",
|
|
||||||
"FossFanatic",
|
|
||||||
"Herbert West",
|
"Herbert West",
|
||||||
"GuyLiner",
|
"GuyLiner",
|
||||||
"3raven",
|
"3raven",
|
||||||
|
@ -100,6 +98,10 @@ return {
|
||||||
"Gregor Parzefall",
|
"Gregor Parzefall",
|
||||||
"Wbjitscool",
|
"Wbjitscool",
|
||||||
"b3nderman",
|
"b3nderman",
|
||||||
|
"CyberMango",
|
||||||
|
"gldrk",
|
||||||
|
"atomdmac",
|
||||||
|
"emptyshore",
|
||||||
}},
|
}},
|
||||||
{S("MineClone5"), 0xA60014, {
|
{S("MineClone5"), 0xA60014, {
|
||||||
"kay27",
|
"kay27",
|
||||||
|
@ -173,6 +175,7 @@ return {
|
||||||
"cora",
|
"cora",
|
||||||
"Faerraven / Michieal",
|
"Faerraven / Michieal",
|
||||||
"Nicu",
|
"Nicu",
|
||||||
|
"Exhale",
|
||||||
}},
|
}},
|
||||||
{S("Translations"), 0x00FF60, {
|
{S("Translations"), 0x00FF60, {
|
||||||
"Wuzzy",
|
"Wuzzy",
|
||||||
|
@ -187,6 +190,8 @@ return {
|
||||||
"snowyu",
|
"snowyu",
|
||||||
"3raven",
|
"3raven",
|
||||||
"SakuraRiu",
|
"SakuraRiu",
|
||||||
|
"anarquimico",
|
||||||
|
"syl",
|
||||||
}},
|
}},
|
||||||
{S("Funders"), 0xF7FF00, {
|
{S("Funders"), 0xF7FF00, {
|
||||||
"40W",
|
"40W",
|
||||||
|
@ -199,6 +204,9 @@ return {
|
||||||
"wsor for working tirelessly in the shadows for the good of all of us, particularly helping with solving contentDB and copyright issues.",
|
"wsor for working tirelessly in the shadows for the good of all of us, particularly helping with solving contentDB and copyright issues.",
|
||||||
"The workaholics who spent way too much time writing for the Minecraft Wiki. It's an invaluable resource for creating this game",
|
"The workaholics who spent way too much time writing for the Minecraft Wiki. It's an invaluable resource for creating this game",
|
||||||
"Notch and Jeb for being the major forces behind Minecraft",
|
"Notch and Jeb for being the major forces behind Minecraft",
|
||||||
"Dark Reaven Music (https://soundcloud.com/dark-reaven-music) for the main menu theme (Calmed Cube), which is licensed under https://creativecommons.org/licenses/by-sa/3.0/",
|
"Dark Reaven Music (https://soundcloud.com/dark-reaven-music) for the main menu theme (Calmed Cube) and Traitor (horizonchris96), which is licensed under https://creativecommons.org/licenses/by-sa/3.0/",
|
||||||
|
"Jester for helping to finely tune MineClone2 (https://www.youtube.com/@Jester-8-bit). Songs: Hailing Forest, Gift, 0dd BL0ck, Flock of One (License CC BY-SA 4.0)",
|
||||||
|
"Exhale & Tim Unwin for some wonderful MineClone2 tracks (https://www.youtube.com/channel/UClFo_JDWoG4NGrPQY0JPD_g). Songs: Valley of Ghosts, Lonely Blossom, Farmer (License CC BY-SA 4.0)",
|
||||||
|
"Diminixed for 3 fantastic tracks and remastering and leveling volumes. Songs: Afternoon Lullaby (pianowtune02), Spooled (ambientwip02), Never Grow Up (License CC BY-SA 4.0)",
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,5 +56,5 @@ A ghast scared @1 to death.=Se ha asustado @1 hasta morir.
|
||||||
@1 was killed by a zombie villager.=@1 fue asesinado por un aldeano zombie.
|
@1 was killed by a zombie villager.=@1 fue asesinado por un aldeano zombie.
|
||||||
@1 was killed by a husk.=@1 fue asesinado por un husk.
|
@1 was killed by a husk.=@1 fue asesinado por un husk.
|
||||||
@1 was killed by a baby husk.=@1 fue asesinado por un bebé husk.
|
@1 was killed by a baby husk.=@1 fue asesinado por un bebé husk.
|
||||||
@1 was killed by a zombie pigman.=@1 fue asesinado por un cerdo zombie.
|
@1 was killed by a zombie piglin.=@1 fue asesinado por un cerdo zombie.
|
||||||
@1 was killed by a baby zombie pigman.=@1 fue asesinado por un bebé cerdo zombie.
|
@1 was killed by a baby zombie piglin.=@1 fue asesinado por un bebé cerdo zombie.
|
|
@ -57,5 +57,5 @@ A ghast scared @1 to death.=Гаст напугал @1 до смерти.
|
||||||
@1 was killed by a zombie villager.=@1 был(а) убит(а) зомби-жителем.
|
@1 was killed by a zombie villager.=@1 был(а) убит(а) зомби-жителем.
|
||||||
@1 was killed by a husk.=@1 был(а) убит(а) кадавром.
|
@1 was killed by a husk.=@1 был(а) убит(а) кадавром.
|
||||||
@1 was killed by a baby husk.=@1 был(а) убит(а) машылом-кадавром.
|
@1 was killed by a baby husk.=@1 был(а) убит(а) машылом-кадавром.
|
||||||
@1 was killed by a zombie pigman.=@1 был(а) убит(а) зомби-свиночеловеком.
|
@1 was killed by a zombie piglin.=@1 был(а) убит(а) зомби-свиночеловеком.
|
||||||
@1 was killed by a baby zombie pigman.=@1 был(а) убит(а) малышом-зомби-свиночеловеком.
|
@1 was killed by a baby zombie piglin.=@1 был(а) убит(а) малышом-зомби-свиночеловеком.
|
||||||
|
|
|
@ -50,7 +50,7 @@ local function throw_xp_bottle(pos, dir, velocity)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("mcl_experience:bottle", {
|
minetest.register_craftitem("mcl_experience:bottle", {
|
||||||
description = "Bottle o' Enchanting",
|
description = S("Bottle o' Enchanting"),
|
||||||
inventory_image = "mcl_experience_bottle.png",
|
inventory_image = "mcl_experience_bottle.png",
|
||||||
wield_image = "mcl_experience_bottle.png",
|
wield_image = "mcl_experience_bottle.png",
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
|
|
|
@ -5,3 +5,4 @@ Error: Too many parameters!=Erreur: Trop de paramètres!
|
||||||
Error: Incorrect value of XP=Erreur: Valeur incorrecte de XP
|
Error: Incorrect value of XP=Erreur: Valeur incorrecte de XP
|
||||||
Error: Player not found=Erreur: Joueur introuvable
|
Error: Player not found=Erreur: Joueur introuvable
|
||||||
Added @1 XP to @2, total: @3, experience level: @4=Ajout de @1 XP à @2, total: @3, niveau d'expérience: @4
|
Added @1 XP to @2, total: @3, experience level: @4=Ajout de @1 XP à @2, total: @3, niveau d'expérience: @4
|
||||||
|
Bottle o' Enchanting=Fiole d'expérience
|
||||||
|
|
|
@ -5,3 +5,4 @@ Error: Too many parameters!=
|
||||||
Error: Incorrect value of XP=
|
Error: Incorrect value of XP=
|
||||||
Error: Player not found=
|
Error: Player not found=
|
||||||
Added @1 XP to @2, total: @3, experience level: @4=
|
Added @1 XP to @2, total: @3, experience level: @4=
|
||||||
|
Bottle o' Enchanting=
|
||||||
|
|
|
@ -19,3 +19,4 @@ Survival Inventory=Inventaire de survie
|
||||||
Crafting=Artisanat
|
Crafting=Artisanat
|
||||||
Inventory=Inventaire
|
Inventory=Inventaire
|
||||||
@1/@2=@1/@2
|
@1/@2=@1/@2
|
||||||
|
Switch stack size=Changer la quantité maximale par pile
|
||||||
|
|
|
@ -19,3 +19,4 @@ Survival Inventory=
|
||||||
Crafting=
|
Crafting=
|
||||||
Inventory=
|
Inventory=
|
||||||
@1/@2=
|
@1/@2=
|
||||||
|
Switch stack size=
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain: mcl_ver_info
|
||||||
|
Sorry, but your version of Minetest doesn't support the latest API. Please upgrade your minetest.=Désolé, mais votre version de Minetest ne supporte la dernière API. Veuillez mettre à jour minetest.
|
|
@ -1,5 +1,5 @@
|
||||||
# textdomain: mcl_dispensers
|
# textdomain: mcl_dispensers
|
||||||
Dispenser=Dispenser
|
Dispenser=Distributeur
|
||||||
A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Un distributeur est un bloc qui agit comme un composant redstone qui, lorsqu'il est alimenté avec une puissance redstone, distribue un article. Il a un conteneur avec 9 emplacements d'inventaire.
|
A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Un distributeur est un bloc qui agit comme un composant redstone qui, lorsqu'il est alimenté avec une puissance redstone, distribue un article. Il a un conteneur avec 9 emplacements d'inventaire.
|
||||||
Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Placez le distributeur dans l'une des 6 directions possibles. Le "trou" est l'endroit où les articles sortiront du distributeur. Utilisez le distributeur pour accéder à son inventaire. Insérez les articles que vous souhaitez distribuer. Fournissez au distributeur de l'énergie de redstone une fois pour distribuer un objet aléatoire.
|
Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Placez le distributeur dans l'une des 6 directions possibles. Le "trou" est l'endroit où les articles sortiront du distributeur. Utilisez le distributeur pour accéder à son inventaire. Insérez les articles que vous souhaitez distribuer. Fournissez au distributeur de l'énergie de redstone une fois pour distribuer un objet aléatoire.
|
||||||
The dispenser will do different things, depending on the dispensed item:=Le distributeur fera différentes choses, selon l'article distribué:
|
The dispenser will do different things, depending on the dispensed item:=Le distributeur fera différentes choses, selon l'article distribué:
|
||||||
|
|
|
@ -89,6 +89,8 @@ minetest.register_globalstep(function (dtime)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function mesecon.queue:execute(action)
|
function mesecon.queue:execute(action)
|
||||||
|
if not action.pos then return end
|
||||||
|
|
||||||
-- ignore if action queue function name doesn't exist,
|
-- ignore if action queue function name doesn't exist,
|
||||||
-- (e.g. in case the action queue savegame was written by an old mesecons version)
|
-- (e.g. in case the action queue savegame was written by an old mesecons version)
|
||||||
if mesecon.queue.funcs[action.func] then
|
if mesecon.queue.funcs[action.func] then
|
||||||
|
|
|
@ -521,6 +521,7 @@ end
|
||||||
-- outputnode (receptor or conductor) at position `output` and has an output in direction `rule`
|
-- outputnode (receptor or conductor) at position `output` and has an output in direction `rule`
|
||||||
function mesecon.rules_link_rule_all(output, rule)
|
function mesecon.rules_link_rule_all(output, rule)
|
||||||
local input = vector.add(output, rule)
|
local input = vector.add(output, rule)
|
||||||
|
if not input then return {} end
|
||||||
local inputnode = get_node_force(input)
|
local inputnode = get_node_force(input)
|
||||||
local inputrules = mesecon.get_any_inputrules(inputnode)
|
local inputrules = mesecon.get_any_inputrules(inputnode)
|
||||||
if not inputrules then
|
if not inputrules then
|
||||||
|
|
|
@ -216,6 +216,18 @@ mesecon.register_button(
|
||||||
S("A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
|
S("A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
|
||||||
"mesecons_button_push")
|
"mesecons_button_push")
|
||||||
|
|
||||||
|
mesecon.register_button(
|
||||||
|
"polished_blackstone",
|
||||||
|
S("Polished Blackstone Button"),
|
||||||
|
"mcl_blackstone_polished.png",
|
||||||
|
"mcl_blackstone:blackstone_polished",
|
||||||
|
mcl_sounds.node_sound_stone_defaults(),
|
||||||
|
{material_stone=1,handy=1,pickaxey=1},
|
||||||
|
1,
|
||||||
|
false,
|
||||||
|
S("A polished blackstone button is a redstone component made out of polished blackstone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
|
||||||
|
"mesecons_button_push")
|
||||||
|
|
||||||
local woods = {
|
local woods = {
|
||||||
{ "wood", "mcl_core:wood", "default_wood.png", S("Oak Button") },
|
{ "wood", "mcl_core:wood", "default_wood.png", S("Oak Button") },
|
||||||
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Button") },
|
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Button") },
|
||||||
|
|
|
@ -2,12 +2,17 @@
|
||||||
Use the button to push it.=Utilisez le bouton pour le pousser.
|
Use the button to push it.=Utilisez le bouton pour le pousser.
|
||||||
Stone Button=Bouton de pierre
|
Stone Button=Bouton de pierre
|
||||||
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un bouton en pierre est un composant Redstone en pierre qui peut être poussé pour fournir de la puissance Redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1 seconde.
|
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un bouton en pierre est un composant Redstone en pierre qui peut être poussé pour fournir de la puissance Redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1 seconde.
|
||||||
|
Polished Blackstone Button=Bouton de pierre noire
|
||||||
|
A polished blackstone button is a redstone component made out of polished blackstone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un bouton en pierre noire est un composant Redstone en pierre noire qui peut être poussé pour fournir de la puissance Redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1 seconde.
|
||||||
Oak Button=Bouton en chêne
|
Oak Button=Bouton en chêne
|
||||||
Acacia Button=Bouton en acacia
|
Acacia Button=Bouton en acacia
|
||||||
Birch Button=Bouton en bouleau
|
Birch Button=Bouton en bouleau
|
||||||
Dark Oak Button=Bouton en chêne noir
|
Dark Oak Button=Bouton en chêne noir
|
||||||
Spruce Button=Bouton en sapin
|
Spruce Button=Bouton en sapin
|
||||||
Jungle Button=Bouton en acajou
|
Jungle Button=Bouton en acajou
|
||||||
|
Mangrove Button=Bouton en palétuvier
|
||||||
|
Crimson Button=Bouton écarlate
|
||||||
|
Warped Button=Bouton tordu
|
||||||
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=Un bouton en bois est un composant de redstone en bois qui peut être poussé pour fournir une puissance de redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1,5 seconde. Les boutons en bois peuvent également être poussés par des flèches.
|
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=Un bouton en bois est un composant de redstone en bois qui peut être poussé pour fournir une puissance de redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1,5 seconde. Les boutons en bois peuvent également être poussés par des flèches.
|
||||||
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
|
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
|
||||||
Push duration: @1s=Durée de poussée : @1s
|
Push duration: @1s=Durée de poussée : @1s
|
||||||
|
|
|
@ -2,12 +2,17 @@
|
||||||
Use the button to push it.=
|
Use the button to push it.=
|
||||||
Stone Button=
|
Stone Button=
|
||||||
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=
|
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=
|
||||||
|
Polished Blackstone Button=
|
||||||
|
A polished blackstone button is a redstone component made out of polished blackstone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=
|
||||||
Oak Button=
|
Oak Button=
|
||||||
Acacia Button=
|
Acacia Button=
|
||||||
Birch Button=
|
Birch Button=
|
||||||
Dark Oak Button=
|
Dark Oak Button=
|
||||||
Spruce Button=
|
Spruce Button=
|
||||||
Jungle Button=
|
Jungle Button=
|
||||||
|
Mangrove Button=
|
||||||
|
Crimson Button=
|
||||||
|
Warped Button=
|
||||||
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=
|
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=
|
||||||
Provides redstone power when pushed=
|
Provides redstone power when pushed=
|
||||||
Push duration: @1s=
|
Push duration: @1s=
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Note Block=Bloc de notes
|
Note Block=Bloc de notes
|
||||||
A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.=Un bloc de notes est un bloc musical qui joue l'une des nombreuses notes de musique et différents instruments lorsqu'il est frappé ou alimenté en redstone.
|
A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.=Un bloc de notes est un bloc musical qui joue l'une des nombreuses notes de musique et différents instruments lorsqu'il est frappé ou alimenté en redstone.
|
||||||
Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:=Utilisez le bloc de notes pour choisir la prochaine note de musique (il y a 25 demi-tons ou 2 octaves). L'instrument joué dépend du matériau du bloc situé sous le bloc de notes:
|
Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:=Utilisez le bloc de notes pour choisir la prochaine note de musique (il y a 25 demi-tons ou 2 octaves). L'instrument joué dépend du matériau du bloc situé sous le bloc de notes:
|
||||||
• Glass: Sticks=• Glass: Sticks
|
• Glass: Sticks=• Verre : Baguettes
|
||||||
• Wood: Bass guitar=• Bois : Guitare Basse
|
• Wood: Bass guitar=• Bois : Guitare Basse
|
||||||
• Stone: Bass drum=• Pierre : Grosse caisse
|
• Stone: Bass drum=• Pierre : Grosse caisse
|
||||||
• Sand or gravel: Snare drum=• Sable ou gravier : Caisse claire
|
• Sand or gravel: Snare drum=• Sable ou gravier : Caisse claire
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local PRESSURE_PLATE_INTERVAL = 0.04
|
local PRESSURE_PLATE_INTERVAL = 0.25
|
||||||
|
|
||||||
local pp_box_off = {
|
local pp_box_off = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -262,4 +262,17 @@ mesecon.register_pressure_plate(
|
||||||
{ player = true, mob = true },
|
{ player = true, mob = true },
|
||||||
S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
|
S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
|
||||||
|
|
||||||
|
mesecon.register_pressure_plate(
|
||||||
|
"mesecons_pressureplates:pressure_plate_polished_blackstone",
|
||||||
|
S("Polished Blackstone Pressure Plate"),
|
||||||
|
{"mcl_blackstone_polished.png"},
|
||||||
|
{"mcl_blackstone_polished.png"},
|
||||||
|
"mcl_blackstone_polished.png",
|
||||||
|
nil,
|
||||||
|
{{"mcl_blackstone:blackstone_polished", "mcl_blackstone:blackstone_polished"}},
|
||||||
|
mcl_sounds.node_sound_stone_defaults(),
|
||||||
|
{pickaxey=1, material_stone=1},
|
||||||
|
{ player = true, mob = true },
|
||||||
|
S("A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,12 @@ Birch Pressure Plate=Plaque de pression en bouleau
|
||||||
Dark Oak Pressure Plate=Plaque de pression en chêne noir
|
Dark Oak Pressure Plate=Plaque de pression en chêne noir
|
||||||
Spruce Pressure Plate=Plaque de pression en sapin
|
Spruce Pressure Plate=Plaque de pression en sapin
|
||||||
Jungle Pressure Plate=Plaque de pression en acajou
|
Jungle Pressure Plate=Plaque de pression en acajou
|
||||||
|
Mangrove Pressure Plate=Plaque de pression en palétuvier
|
||||||
|
Crimson Pressure Plate=Plaque de pression écarlate
|
||||||
|
Warped Pressure Plate=Plaque de pression tordue
|
||||||
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression en bois est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
|
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression en bois est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
|
||||||
|
Polished Blackstone Pressure Plate=Plaque de pression en pierre noire
|
||||||
|
A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre noire est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
|
||||||
Stone Pressure Plate=Plaque de pression en pierre
|
Stone Pressure Plate=Plaque de pression en pierre
|
||||||
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
|
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
|
||||||
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
|
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
|
||||||
|
|
|
@ -6,7 +6,12 @@ Birch Pressure Plate=
|
||||||
Dark Oak Pressure Plate=
|
Dark Oak Pressure Plate=
|
||||||
Spruce Pressure Plate=
|
Spruce Pressure Plate=
|
||||||
Jungle Pressure Plate=
|
Jungle Pressure Plate=
|
||||||
|
Mangrove Pressure Plate=
|
||||||
|
Crimson Pressure Plate=
|
||||||
|
Warped Pressure Plate=
|
||||||
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
|
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
|
||||||
|
Polished Blackstone Pressure Plate=
|
||||||
|
A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
|
||||||
Stone Pressure Plate=
|
Stone Pressure Plate=
|
||||||
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
|
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
|
||||||
Provides redstone power when pushed=
|
Provides redstone power when pushed=
|
||||||
|
|
|
@ -1,67 +1,8 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local function path_to_sunlight_exists(position, light_level)
|
|
||||||
local neighbours = {
|
|
||||||
{ x = 0, y = 0, z =-1 },
|
|
||||||
{ x = 0, y = 0, z = 1 },
|
|
||||||
{ x = 0, y =-1, z = 0 },
|
|
||||||
{ x = 0, y = 1, z = 0 },
|
|
||||||
{ x =-1, y = 0, z = 0 },
|
|
||||||
{ x = 1, y = 0, z = 0 },
|
|
||||||
}
|
|
||||||
for i=1, #neighbours do
|
|
||||||
local offset = neighbours[i]
|
|
||||||
local position_new = vector.add(
|
|
||||||
position,
|
|
||||||
offset
|
|
||||||
)
|
|
||||||
local light_level_new = minetest.get_node_light(
|
|
||||||
position_new,
|
|
||||||
nil
|
|
||||||
)
|
|
||||||
if 15 == light_level_new then
|
|
||||||
-- found the sunlight
|
|
||||||
return true
|
|
||||||
elseif light_level_new > light_level then
|
|
||||||
-- search where light is brighter
|
|
||||||
if path_to_sunlight_exists(
|
|
||||||
position_new,
|
|
||||||
light_level_new
|
|
||||||
) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sunlight_visible(position)
|
local function sunlight_visible(position)
|
||||||
local light_level
|
local light_level = mcl_util.get_natural_light(position)
|
||||||
-- Minetest 5.4.0+ can measure the daylight level at a position
|
return light_level ~= nil and light_level >= 12
|
||||||
if nil ~= minetest.get_natural_light then
|
|
||||||
light_level = minetest.get_natural_light(
|
|
||||||
position,
|
|
||||||
nil
|
|
||||||
)
|
|
||||||
if light_level >= 12 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
else -- Minetest 5.3.0 or less can only measure the light level
|
|
||||||
local time = minetest.get_timeofday() * 24000
|
|
||||||
-- only check light level during day
|
|
||||||
if time > 6000 and time < 18000 then
|
|
||||||
light_level = minetest.get_node_light(
|
|
||||||
position,
|
|
||||||
nil
|
|
||||||
)
|
|
||||||
if light_level >= 12 then
|
|
||||||
return path_to_sunlight_exists(
|
|
||||||
position,
|
|
||||||
12
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local boxes = { -8/16, -8/16, -8/16, 8/16, -2/16, 8/16 }
|
local boxes = { -8/16, -8/16, -8/16, 8/16, -2/16, 8/16 }
|
||||||
|
|
|
@ -13,3 +13,4 @@ Armor counts as a tool. It is possible to repair and rename a tool in a single s
|
||||||
The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=El yunque tiene una durabilidad limitada y 3 niveles de daño: sin daños, ligeramente dañado y muy dañado. Cada vez que reparas o cambias el nombre de algo, hay un 12% de posibilidades de que el yunque se dañe. Los yunques también tienen la posibilidad de dañarse cuando caen en más de 1 bloque. Si un yunque muy dañado se daña nuevamente, se destruye.
|
The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=El yunque tiene una durabilidad limitada y 3 niveles de daño: sin daños, ligeramente dañado y muy dañado. Cada vez que reparas o cambias el nombre de algo, hay un 12% de posibilidades de que el yunque se dañe. Los yunques también tienen la posibilidad de dañarse cuando caen en más de 1 bloque. Si un yunque muy dañado se daña nuevamente, se destruye.
|
||||||
Slightly Damaged Anvil=Yunque dañado
|
Slightly Damaged Anvil=Yunque dañado
|
||||||
Very Damaged Anvil=Yunque muy dañado
|
Very Damaged Anvil=Yunque muy dañado
|
||||||
|
Repair and rename items=Reparar y renombrar objetos
|
||||||
|
|
|
@ -1,23 +1,48 @@
|
||||||
# textdomain: mcl_armor
|
# textdomain: mcl_armor
|
||||||
This is a piece of equippable armor which reduces the amount of damage you receive.=Dies ist ein Teil einer tragbaren Rüstung, die die Menge an Schaden, den Sie erleiden, reduziert.
|
This is a piece of equippable armor which reduces the amount of damage you receive.=Esta es una pieza de armadura que se puede equipar, la cual reduce la cantidad de daño que recives.
|
||||||
To equip it, put it on the corresponding armor slot in your inventory menu.=Um es zu tragen, legen Sie es in den passenden Rüstungsplatz in ihrem Inventarmenü.
|
To equip it, put it on the corresponding armor slot in your inventory menu.=Para equiparla, colocala en la ranura de armadura en el menú de tu inventario.
|
||||||
Leather Cap=Sombrero de cuero
|
Leather Cap=Sombrero de cuero
|
||||||
Iron Helmet=Casco de hierro
|
Iron Helmet=Casco de hierro
|
||||||
Golden Helmet=Casco de oro
|
Golden Helmet=Casco de oro
|
||||||
Diamond Helmet=Casco de diamante
|
Diamond Helmet=Casco de diamante
|
||||||
Chain Helmet=Casco de cota de mallas
|
Chain Helmet=Casco de cota de mallas
|
||||||
|
Netherite Helmet=Casco de netherita
|
||||||
Leather Tunic=Túnica de cuero
|
Leather Tunic=Túnica de cuero
|
||||||
Iron Chestplate=Peto de hierro
|
Iron Chestplate=Peto de hierro
|
||||||
Golden Chestplate=Peto de oro
|
Golden Chestplate=Peto de oro
|
||||||
Diamond Chestplate=Peto de diamante
|
Diamond Chestplate=Peto de diamante
|
||||||
Chain Chestplate=Peto de cota de mallas
|
Chain Chestplate=Peto de cota de mallas
|
||||||
|
Netherite Chestplate=Peto de netherita
|
||||||
Leather Pants=Pantalones de cuero
|
Leather Pants=Pantalones de cuero
|
||||||
Iron Leggings=Grebas de hierro
|
Iron Leggings=Grebas de hierro
|
||||||
Golden Leggings=Grebas de oro
|
Golden Leggings=Grebas de oro
|
||||||
Diamond Leggings=Grebas de diamante
|
Diamond Leggings=Grebas de diamante
|
||||||
Chain Leggings=Grebas de cota de mallas
|
Chain Leggings=Grebas de cota de mallas
|
||||||
|
Netherite Leggings=Grebas de netherita
|
||||||
Leather Boots=Botas de cuero
|
Leather Boots=Botas de cuero
|
||||||
Iron Boots=Botas de hierro
|
Iron Boots=Botas de hierro
|
||||||
Golden Boots=Botas de oro
|
Golden Boots=Botas de oro
|
||||||
Diamond Boots=Botas de diamante
|
Diamond Boots=Botas de diamante
|
||||||
Chain Boots=Botas de cota de mallas
|
Chain Boots=Botas de cota de mallas
|
||||||
|
Netherite Boots=Botas de netherita
|
||||||
|
Elytra=Élitros
|
||||||
|
|
||||||
|
#Translations of enchantements
|
||||||
|
Increases underwater mining speed.=Aumenta la velocidad de minado bajo el agua.
|
||||||
|
Blast Protection=Protección contra explosiones
|
||||||
|
Reduces explosion damage and knockback.=Reduce el daño de explosiones y su empuje.
|
||||||
|
Curse of Binding=Maldicón de ligamiento
|
||||||
|
Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=El objeto no puede ser removido de las ranuras de inventario excepto al morir, al romperse, o en Modo Creativo.
|
||||||
|
Feather Falling=Caída de plumas
|
||||||
|
Reduces fall damage.=Reduce el daño por caída.
|
||||||
|
Fire Protection=Protección contra el fuego
|
||||||
|
Reduces fire damage.=Reduce el daño causado por fuego.
|
||||||
|
Shooting consumes no regular arrows.=Disparar no consume flechas normales.
|
||||||
|
Shoot 3 arrows at the cost of one.=Dispara 3 flechas por el costo de una.
|
||||||
|
Projectile Protection=Protección contra proyectiles
|
||||||
|
Reduces projectile damage.=Reduce el daño de proyectiles.
|
||||||
|
Protection=Protección
|
||||||
|
Reduces most types of damage by 4% for each level.=Reduce la mayoría de tipos de daño por 4% por cada nivel.
|
||||||
|
Thorns=Espinas
|
||||||
|
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=Refleja una parte del daño infligido, a costa de reducir la durabilidad con cada activación.
|
||||||
|
Aqua Affinity=Afinidad acuática
|
||||||
|
|
|
@ -6,25 +6,25 @@ Iron Helmet=Casque de fer
|
||||||
Golden Helmet=Casque d'or
|
Golden Helmet=Casque d'or
|
||||||
Diamond Helmet=Casque de diamant
|
Diamond Helmet=Casque de diamant
|
||||||
Chain Helmet=Casque de mailles
|
Chain Helmet=Casque de mailles
|
||||||
Netherite Helmet=Casque de Netherite
|
Netherite Helmet=Casque de netherite
|
||||||
Leather Tunic=Tunique en cuir
|
Leather Tunic=Tunique en cuir
|
||||||
Iron Chestplate=Plastron de fer
|
Iron Chestplate=Plastron de fer
|
||||||
Golden Chestplate=Plastron d'or
|
Golden Chestplate=Plastron d'or
|
||||||
Diamond Chestplate=Plastron de diamant
|
Diamond Chestplate=Plastron de diamant
|
||||||
Chain Chestplate=Cotte de mailles
|
Chain Chestplate=Cotte de mailles
|
||||||
Netherite Chestplate=Plastron de Netherite
|
Netherite Chestplate=Plastron de netherite
|
||||||
Leather Pants=Pantalon de cuir
|
Leather Pants=Pantalon de cuir
|
||||||
Iron Leggings=Jambières de fer
|
Iron Leggings=Jambières de fer
|
||||||
Golden Leggings=Jambières d'or
|
Golden Leggings=Jambières d'or
|
||||||
Diamond Leggings=Jambières de diamant
|
Diamond Leggings=Jambières de diamant
|
||||||
Chain Leggings=Jambières de mailles
|
Chain Leggings=Jambières de mailles
|
||||||
Netherite Leggings=Jambières de Netherite
|
Netherite Leggings=Jambières de netherite
|
||||||
Leather Boots=Bottes de cuir
|
Leather Boots=Bottes de cuir
|
||||||
Iron Boots=Bottes de fer
|
Iron Boots=Bottes de fer
|
||||||
Golden Boots=Bottes d'or
|
Golden Boots=Bottes d'or
|
||||||
Diamond Boots=Bottes de diamant
|
Diamond Boots=Bottes de diamant
|
||||||
Chain Boots=Bottes de mailles
|
Chain Boots=Bottes de mailles
|
||||||
Netherite Boots=Bottes de Netherite
|
Netherite Boots=Bottes de netherite
|
||||||
Elytra=Élytres
|
Elytra=Élytres
|
||||||
|
|
||||||
#Translations of enchantements
|
#Translations of enchantements
|
||||||
|
|
|
@ -158,8 +158,10 @@ minetest.register_on_player_inventory_action(function(player, action, inventory,
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
mcl_player.player_set_model(player, "mcl_armor_character.b3d")
|
|
||||||
player:get_inventory():set_size("armor", 5)
|
player:get_inventory():set_size("armor", 5)
|
||||||
|
if not minetest.global_exists("mcl_skins") then
|
||||||
|
mcl_player.player_set_model(player, "mcl_armor_character.b3d")
|
||||||
|
end
|
||||||
|
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
if player:is_player() then
|
if player:is_player() then
|
||||||
|
|
|
@ -219,7 +219,7 @@ minetest.register_tool("mcl_armor:elytra", {
|
||||||
_doc_items_longdesc = mcl_armor.longdesc,
|
_doc_items_longdesc = mcl_armor.longdesc,
|
||||||
_doc_items_usagehelp = mcl_armor.usage,
|
_doc_items_usagehelp = mcl_armor.usage,
|
||||||
inventory_image = "mcl_armor_inv_elytra.png",
|
inventory_image = "mcl_armor_inv_elytra.png",
|
||||||
groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10},
|
groups = {armor = 1, non_combat_armor = 1, armor_torso = 1, non_combat_torso = 1, mcl_armor_uses = 10, enchantability = 1, elytra = 1},
|
||||||
sounds = {
|
sounds = {
|
||||||
_mcl_armor_equip = "mcl_armor_equip_leather",
|
_mcl_armor_equip = "mcl_armor_equip_leather",
|
||||||
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
_mcl_armor_unequip = "mcl_armor_unequip_leather",
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
Armor Stand=Support d'armure
|
Armor Stand=Support d'armure
|
||||||
An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand.=Un support d'armure est un objet décoratif qui peut afficher différentes pièces d'armure. Tout ce que les joueurs peuvent porter comme armure peut également être placé sur un support d'armure.
|
An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand.=Un support d'armure est un objet décoratif qui peut afficher différentes pièces d'armure. Tout ce que les joueurs peuvent porter comme armure peut également être placé sur un support d'armure.
|
||||||
Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand.=Placez simplement un objet d'armure sur le support d'armure. Pour prendre la pièce d'armure du support d'armure, sélectionnez votre main et utilisez la touche "Placer" sur le support d'armure.
|
Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand.=Placez simplement un objet d'armure sur le support d'armure. Pour prendre la pièce d'armure du support d'armure, sélectionnez votre main et utilisez la touche "Placer" sur le support d'armure.
|
||||||
Displays pieces of armor=Displays pieces of armor
|
Displays pieces of armor=Expose des pièces d'armure
|
||||||
|
|
|
@ -25,7 +25,7 @@ end
|
||||||
|
|
||||||
-- basic bamboo nodes.
|
-- basic bamboo nodes.
|
||||||
local bamboo_def = {
|
local bamboo_def = {
|
||||||
description = "Bamboo",
|
description = S("Bamboo"),
|
||||||
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"},
|
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"},
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
|
@ -266,7 +266,7 @@ end
|
||||||
minetest.register_node(BAMBOO_ENDCAP_NAME, bamboo_top)
|
minetest.register_node(BAMBOO_ENDCAP_NAME, bamboo_top)
|
||||||
|
|
||||||
local bamboo_block_def = {
|
local bamboo_block_def = {
|
||||||
description = "Bamboo Block",
|
description = S("Bamboo Block"),
|
||||||
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block.png"},
|
tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block.png"},
|
||||||
groups = {handy = 1, building_block = 1, axey = 1, flammable = 2, material_wood = 1, bamboo_block = 1, fire_encouragement = 5, fire_flammability = 5},
|
groups = {handy = 1, building_block = 1, axey = 1, flammable = 2, material_wood = 1, bamboo_block = 1, fire_encouragement = 5, fire_flammability = 5},
|
||||||
sounds = node_sound,
|
sounds = node_sound,
|
||||||
|
|
|
@ -62,9 +62,11 @@ if minetest.get_modpath("mcl_doors") then
|
||||||
|
|
||||||
local name = "mcl_bamboo:bamboo_door"
|
local name = "mcl_bamboo:bamboo_door"
|
||||||
local def = {
|
local def = {
|
||||||
description = S("Bamboo Door."),
|
description = S("Bamboo Door"),
|
||||||
inventory_image = "mcl_bamboo_door_wield.png",
|
inventory_image = "mcl_bamboo_door_wield.png",
|
||||||
wield_image = "mcl_bamboo_door_wield.png",
|
wield_image = "mcl_bamboo_door_wield.png",
|
||||||
|
_doc_items_longdesc = S("Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal."),
|
||||||
|
_doc_items_usagehelp = S("To open or close a wooden door, rightclick it or supply its lower half with a redstone signal."),
|
||||||
groups = { handy = 1, axey = 1, material_wood = 1, flammable = -1 },
|
groups = { handy = 1, axey = 1, material_wood = 1, flammable = -1 },
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
|
@ -77,15 +79,13 @@ if minetest.get_modpath("mcl_doors") then
|
||||||
|
|
||||||
name = "mcl_bamboo:bamboo_trapdoor"
|
name = "mcl_bamboo:bamboo_trapdoor"
|
||||||
local trap_def = {
|
local trap_def = {
|
||||||
description = S("Bamboo Trapdoor."),
|
description = S("Bamboo Trapdoor"),
|
||||||
inventory_image = "mcl_bamboo_door_complete.png",
|
|
||||||
groups = {},
|
groups = {},
|
||||||
tile_front = "mcl_bamboo_trapdoor_side.png",
|
tile_front = "mcl_bamboo_trapdoor_side.png",
|
||||||
tile_side = "mcl_bamboo_trapdoor_side.png",
|
tile_side = "mcl_bamboo_trapdoor_side.png",
|
||||||
_doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."),
|
_doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder."),
|
||||||
_doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."),
|
_doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."),
|
||||||
wield_image = "mcl_bamboo_trapdoor_side.png",
|
wield_image = "mcl_bamboo_trapdoor_side.png",
|
||||||
inventory_image = "mcl_bamboo_trapdoor_side.png",
|
|
||||||
groups = { handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1 },
|
groups = { handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1 },
|
||||||
_mcl_hardness = 3,
|
_mcl_hardness = 3,
|
||||||
_mcl_blast_resistance = 3,
|
_mcl_blast_resistance = 3,
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
# textdomain: mcl_bamboo
|
||||||
|
|
||||||
|
### bamboo_base.lua ###
|
||||||
|
|
||||||
|
Bamboo Mosaic Plank=Madera de bambú de mosaico
|
||||||
|
Bamboo Plank=Madera de bambú
|
||||||
|
Stripped Bamboo Block=Bloque de bambú sin corteza
|
||||||
|
|
||||||
|
### bamboo_items.lua ###
|
||||||
|
|
||||||
|
A bamboo button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un botón de bambú es un componente de redstone hecho de piedra que se puede presionar para proporcionar energía de redstone. Cuando se empuja, alimenta los componentes adyacentes de redstone durante 1 segundo.
|
||||||
|
|
||||||
|
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Una placa de presión de madera es un componente de redstone que proporciona energía de redstone a sus bloques adyacentes mientras cualquier objeto movible (incluyendo objetos en el suelo, jugadores y mobs) descanse encima suya.
|
||||||
|
|
||||||
|
Bamboo=Bambú
|
||||||
|
Bamboo Button=Botón de bambú
|
||||||
|
Bamboo Door.=Puerta de bambú
|
||||||
|
Bamboo Fence=Valla de bambú
|
||||||
|
Bamboo Fence Gate=Puerta de valla de bambú
|
||||||
|
Bamboo Mosaic Slab=Losa de mosaico de bambú
|
||||||
|
Bamboo Mosaic Stair=Escaleras de mosaico de bambú
|
||||||
|
Bamboo Plank Slab=Losa de madera de bambú
|
||||||
|
Bamboo Plank Stair=Escalera de madera de bambú
|
||||||
|
Bamboo Pressure Plate=Placa de presión de bambú
|
||||||
|
Bamboo Slab=Losa de bambú
|
||||||
|
Bamboo Stair=Escalera de bambú
|
||||||
|
Bamboo Trapdoor.=Trampilla de bambú
|
||||||
|
Double Bamboo Mosaic Slab=Losa doble de mosaico de bambú
|
||||||
|
Double Bamboo Plank Slab=Losa doble de madera de bambú
|
||||||
|
Double Bamboo Slab=Losa doble de bambú
|
||||||
|
Double Stripped Bamboo Slab=Losa doble de bambú sin corteza
|
||||||
|
Scaffolding=Andamio
|
||||||
|
Scaffolding (horizontal)=Andamio (horizontal)
|
||||||
|
Scaffolding block used to climb up or out across areas.=El bloque de andamio sirve para subir o bajar entre zonas.
|
||||||
|
Stripped Bamboo Slab=Losa de bambú sin corteza
|
||||||
|
Stripped Bamboo Stair=Escalera de bambú sin corteza
|
||||||
|
|
||||||
|
To open or close the trapdoor, rightclick it or send a redstone signal to it.=Para abir o cerar una trampilla, haz click derecho o manda una señal de redstone hacia ella.
|
||||||
|
|
||||||
|
Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.=Las trampillas de madera son barreras horizontales que pueden ser abiertas y cerradas con la mano o por una señal de redstone.
|
|
@ -0,0 +1,45 @@
|
||||||
|
# textdomain: mcl_bamboo
|
||||||
|
|
||||||
|
### bamboo_base.lua ###
|
||||||
|
|
||||||
|
Bamboo=Bambou
|
||||||
|
Bamboo Mosaic Plank=Planche mosaïque de bambou
|
||||||
|
Bamboo Plank=Planche de bambou
|
||||||
|
Stripped Bamboo Block=Bloc de bambou écorcé
|
||||||
|
Bamboo Block=Bloc de bambou
|
||||||
|
|
||||||
|
### bamboo_items.lua ###
|
||||||
|
|
||||||
|
A bamboo button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un bouton en bambou est un composant redstone fait de bamboo qui peut être poussé pour fournir un signal redstone. Lorsque poussé, il alimente les composants redstone adjacents pendant 1 seconde.
|
||||||
|
|
||||||
|
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression en bois est un composant redstone qui envoie un signal aux blocs alentours lorsque n'importe quel objet mobile (objet jeté, joueurs et mobs) sont dessus.
|
||||||
|
|
||||||
|
Bamboo=Bambou
|
||||||
|
Bamboo Button=Bouton en bambou
|
||||||
|
Bamboo Door=Porte de bambou
|
||||||
|
Bamboo Fence=Barrière de bambou
|
||||||
|
Bamboo Fence Gate=Portillon de bambou
|
||||||
|
Bamboo Mosaic Slab=Dalle mosaïque de bambou
|
||||||
|
Bamboo Mosaic Stair=Escalier mosaïque de bambou
|
||||||
|
Bamboo Plank Slab=Dalle de planches de bambou
|
||||||
|
Bamboo Plank Stair=Escalier de planches de bambou
|
||||||
|
Bamboo Pressure Plate=Plaque de pression de bambou
|
||||||
|
Bamboo Slab=Dalle de bambou
|
||||||
|
Bamboo Stair=Escalier de bambou
|
||||||
|
Bamboo Trapdoor=Trappe de bambou
|
||||||
|
Double Bamboo Mosaic Slab=Double dalle mosaïque de bambou
|
||||||
|
Double Bamboo Plank Slab=Double dalle de planches de bambou
|
||||||
|
Double Bamboo Slab=Double dalle de bambou
|
||||||
|
Double Stripped Bamboo Slab=Double dalle de bambou écorcée
|
||||||
|
Scaffolding=Échafaudage
|
||||||
|
Scaffolding (horizontal)=Échafaudage (horizontal)
|
||||||
|
Scaffolding block used to climb up or out across areas.=Les blocs d'échafaudage servent à escalader ou à sortir d'une zone.
|
||||||
|
Stripped Bamboo Slab=Dalle de bambou écorcée
|
||||||
|
Stripped Bamboo Stair=Escalier de bambou écorcée
|
||||||
|
|
||||||
|
To open or close the trapdoor, rightclick it or send a redstone signal to it.=Pour ouvrir ou fermer la trappe, cliquer droit ou lui envoyer un signal redstone.
|
||||||
|
|
||||||
|
Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.=Les trappes de bois sont des barrières horizontales qui peuvent être ouvertes et fermées à la main ou par un signal redstone. Lorsqu'elles sont ouvertes, elles peuvent êtres escaladées comme une échelle.
|
||||||
|
|
||||||
|
Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.=Les portes en bois sont des barrières hautes à 2 blocs qui peuvent être ouvertes ou fermées à la main et par un signal redstone.
|
||||||
|
To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.=Pour ouvrir ou fermer une porte en bois, faites un clic droit dessus ou fournissez à sa moitié inférieure un signal redstone.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue