Merge branch 'master' into mcl_autogroup

This commit is contained in:
12 changed files with 140 additions and 120 deletions

View File

@ -1,5 +1,5 @@
# MineClone 2 # Mineclonia
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils. An unofficial Minecraft-like game for Minetest. Forked from MineClone2.
Developed by many people. Not developed or endorsed by Mojang AB. Developed by many people. Not developed or endorsed by Mojang AB.
Version: 0.71.0 Version: 0.71.0
@ -74,24 +74,24 @@ These items do not work yet, but you can get them with `/giveme` for testing:
* Minecart with Command Block: `mcl_minecarts:command_block_minecart` * Minecart with Command Block: `mcl_minecarts:command_block_minecart`
## Installation ## Installation
This game requires [Minetest](http://minetest.net) to run (version 5.0.0 or This game requires [Minetest](http://minetest.net) to run (version 5.4.0 or
later). So you need to install Minetest first. Only stable versions of Minetest later). So you need to install Minetest first. Only stable versions of Minetest
are officially supported. are officially supported.
There is no support for running MineClone 2 in development versions of Minetest. There is no support for running Mineclonia in development versions of Minetest.
To install MineClone 2 (if you haven't already), move this directory into the To install Mineclonia (if you haven't already), move this directory into the
“games” directory of your Minetest data directory. Consult the help of “games” directory of your Minetest data directory. Consult the help of
Minetest to learn more. Minetest to learn more.
## Project description ## Project description
The main goal of **MineClone 2** is to be a clone of Minecraft and to be released as free software. The main goal of **Mineclonia** is to be a clone of Minecraft and to be released as free software.
* **Target of development: Minecraft, PC Edition, version 1.12** (later known as “Java Edition”) * **Target of development: Minecraft, PC Edition, version 1.12** (later known as “Java Edition”)
* MineClone2 also includes Optifine features supported by the Minetest * Mineclonia also includes Optifine features supported by the Minetest
* Features of later Minecraft versions might sneak in, but they have a low priority * Features of later Minecraft versions might sneak in, but they have a low priority
* In general, Minecraft is aimed to be cloned as good as Minetest currently permits (no hacks) * In general, Minecraft is aimed to be cloned as good as Minetest currently permits (no hacks)
* Cloning the gameplay has highest priority * Cloning the gameplay has highest priority
* MineClone 2 will use different graphics and sounds, but with a similar style * Mineclonia will use different graphics and sounds, but with a similar style
* Cloning the interface has no priority. It will only be roughly imitated * Cloning the interface has no priority. It will only be roughly imitated
* Limitations found in Minetest will be written down and reported in the course of development * Limitations found in Minetest will be written down and reported in the course of development
@ -178,18 +178,18 @@ Technical differences from Minecraft:
* Different sounds (various sources) * Different sounds (various sources)
* Different engine (Minetest) * Different engine (Minetest)
… and finally, MineClone 2 is free software (“free” as in “freedom”)! … and finally, Mineclonia is free software (“free” as in “freedom”)!
## Reporting bugs ## Reporting bugs
Please report all bugs and missing Minecraft features here: Please report all bugs and missing Minecraft features here:
<https://git.minetest.land/MineClone2/MineClone2/issues> <https://git.minetest.land/Mineclonia/Mineclonia/issues>
## Other readme files ## Other readme files
* `LICENSE.txt`: The GPLv3 license text * `LICENSE.txt`: The GPLv3 license text
* `CONTRIBUTING.md`: Information for those who want to contribute * `CONTRIBUTING.md`: Information for those who want to contribute
* `MISSING_ENGINE_FEATURES.md`: List of missing features in Minetest which MineClone 2 would need for improvement * `MISSING_ENGINE_FEATURES.md`: List of missing features in Minetest which Mineclonia would need for improvement
* `API.md`: For Minetest modders who want to mod this game * `API.md`: For Minetest modders who want to mod this game
## Credits ## Credits
@ -197,15 +197,15 @@ There are so many people to list (sorry). Check out the respective mod directori
### Coding ### Coding
* [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082): Main programmer of most mods (retired) * [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082): Main programmer of most mods (retired)
* davedevils: Creator of MineClone on which MineClone 2 is based on * davedevils: Creator of MineClone on which Mineclonia is based on
* [ex-bart](https://github.com/ex-bart): Redstone comparators * [ex-bart](https://github.com/ex-bart): Redstone comparators
* [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes * [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes
* [aligator](https://github.com/aligator): Improvement of doors * [aligator](https://github.com/aligator): Improvement of doors
* [ryvnf](https://github.com/ryvnf): Explosion mechanics * [ryvnf](https://github.com/ryvnf): Explosion mechanics
* MysticTempest: Bugfixes * MysticTempest: Bugfixes
* [bzoss](https://github.com/bzoss): Status effects, potions, brewing stand * [bzoss](https://github.com/bzoss): Status effects, potions, brewing stand
* kay27 <kay27@bk.ru>: Experience system, bugfixes, optimizations (Current maintainer) * kay27 <kay27@bk.ru>: Experience system, bugfixes, optimizations
* [EliasFleckenstein03](https://github.com/EliasFleckenstein03): End crystals, enchanting, burning mobs / players, animated chests, bugfixes (Current maintainer) * [EliasFleckenstein03](https://github.com/EliasFleckenstein03): End crystals, enchanting, burning mobs / players, animated chests, bugfixes
* epCode: Better player animations, new logo * epCode: Better player animations, new logo
* 2mac: Fix bug with powered rail * 2mac: Fix bug with powered rail
* Lots of other people: TO BE WRITTEN (see mod directories for details) * Lots of other people: TO BE WRITTEN (see mod directories for details)
@ -255,7 +255,7 @@ Various sources. See the respective mod directories for details.
* davedevils for starting MineClone, the original version of this game * davedevils for starting MineClone, the original version of this game
* Wuzzy for starting and maintaining MineClone2 for several years * Wuzzy for starting and maintaining MineClone2 for several years
* celeron55 for creating Minetest * celeron55 for creating Minetest
* Minetest's modding community for providing a huge selection of mods, some of which ended up in MineClone 2 * Minetest's modding community for providing a huge selection of mods, some of which ended up in Mineclonia
* Jordach for the jukebox music compilation from Big Freaking Dig * Jordach for the jukebox music compilation from Big Freaking Dig
* 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
@ -273,10 +273,9 @@ Copying is an act of love. Please copy and share! <3
Here's the detailed legalese for those who need it: Here's the detailed legalese for those who need it:
### License of source code ### License of source code
MineClone 2 (by kay27, EliasFleckenstein, Wuzzy, davedevils and countless others) Mineclonia is an imitation of Minecraft.
is an imitation of Minecraft.
MineClone 2 is free software: you can redistribute it and/or modify Mineclonia is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
@ -290,15 +289,15 @@ details.
In the mods you might find in the read-me or license In the mods you might find in the read-me or license
text files a different license. This counts as dual-licensing. text files a different license. This counts as dual-licensing.
You can choose which license applies to you: Either the You can choose which license applies to you: Either the
license of MineClone 2 (GNU GPLv3) or the mod's license. license of Mineclonia (GNU GPLv3) or the mod's license.
MineClone 2 is a direct continuation of the discontinued MineClone Mineclonia is a continuation of the discontinued MineClone project by davedevils
project by davedevils. and the MineClone2 project by Wuzzy.
Mod credits: Mod credits:
See `README.txt` or `README.md` in each mod directory for information about other authors. See `README.txt` or `README.md` in each mod directory for information about other authors.
For mods that do not have such a file, the license is the source code license For mods that do not have such a file, the license is the source code license
of MineClone 2 and the author is Wuzzy. of Mineclonia and the author is Wuzzy.
### License of media (textures and sounds) ### License of media (textures and sounds)
No non-free licenses are used anywhere. No non-free licenses are used anywhere.

View File

@ -1,2 +1,2 @@
name = MineClone 2 name = Mineclonia
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.

View File

@ -202,7 +202,10 @@ local function trace_explode(pos, strength, raydirs, radius, info, puncher)
npos_x - emin_x + 1 npos_x - emin_x + 1
local cid = data[idx] local cid = data[idx]
local br = node_blastres[cid]
-- Set blast resistance to 0 for unknown nodes
local br = node_blastres[cid] or 0
if br < INDESTRUCT_BLASTRES and br > max_blast_resistance then if br < INDESTRUCT_BLASTRES and br > max_blast_resistance then
br = max_blast_resistance br = max_blast_resistance
end end

View File

@ -12,14 +12,15 @@ local function detach_driver(self)
if not self._driver then if not self._driver then
return return
end end
if self._driver:is_player() then mcl_player.player_attached[self._driver] = nil
mcl_player.player_attached[self._driver:get_player_name()] = nil local player = minetest.get_player_by_name(self._driver)
self._driver:set_detach()
self._driver:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
mcl_player.player_set_animation(self._driver, "stand" , 30)
end
self._driver = nil self._driver = nil
self._start_pos = nil self._start_pos = nil
if player then
player:set_detach()
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
mcl_player.player_set_animation(player, "stand" , 30)
end
end end
local function activate_tnt_minecart(self, timer) local function activate_tnt_minecart(self, timer)
@ -61,7 +62,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
on_rightclick = on_rightclick, on_rightclick = on_rightclick,
_driver = nil, -- player (or mob) who sits in and controls the minecart (only for minecart!) _driver = nil, -- player who sits in and controls the minecart (only for minecart!)
_punched = false, -- used to re-send _velocity and position _punched = false, -- used to re-send _velocity and position
_velocity = {x=0, y=0, z=0}, -- only used on punch _velocity = {x=0, y=0, z=0}, -- only used on punch
_start_pos = nil, -- Used to calculate distance for “On A Rail” achievement _start_pos = nil, -- Used to calculate distance for “On A Rail” achievement
@ -96,101 +97,111 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
end end
function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
-- Punch: Pick up minecart (unless TNT was ignited)
if self._boomtimer then return end
if self._driver then
detach_driver(self)
end
local pos = self.object:get_pos() local pos = self.object:get_pos()
if not self._railtype then
-- Disable detector rail local node = minetest.get_node(vector.floor(pos)).name
local rou_pos = vector.round(pos) self._railtype = minetest.get_item_group(node, "connect_to_raillike")
local node = minetest.get_node(rou_pos)
if node.name == "mcl_minecarts:detector_rail_on" then
local newnode = {name="mcl_minecarts:detector_rail", param2 = node.param2}
minetest.swap_node(rou_pos, newnode)
mesecon.receptor_off(rou_pos)
end end
-- Drop items and remove cart entity if not puncher or not puncher:is_player() then
if not minetest.is_creative_enabled(puncher:get_player_name()) then local cart_dir = mcl_minecarts:get_rail_direction(pos, {x=1, y=0, z=0}, nil, nil, self._railtype)
for d=1, #drop do if vector.equals(cart_dir, {x=0, y=0, z=0}) then
minetest.add_item(self.object:get_pos(), drop[d]) return
end end
elseif puncher and puncher:is_player() then self._velocity = vector.multiply(cart_dir, 3)
local inv = puncher:get_inventory() self._old_pos = nil
for d=1, #drop do self._punched = true
if not inv:contains_item("main", drop[d]) then return
inv:add_item("main", drop[d]) end
-- Punch+sneak: Pick up minecart (unless TNT was ignited)
if puncher:get_player_control().sneak and not self._boomtimer then
if self._driver then
if self._old_pos then
self.object:set_pos(self._old_pos)
end
detach_driver(self)
end
-- Disable detector rail
local rou_pos = vector.round(pos)
local node = minetest.get_node(rou_pos)
if node.name == "mcl_minecarts:detector_rail_on" then
local newnode = {name="mcl_minecarts:detector_rail", param2 = node.param2}
minetest.swap_node(rou_pos, newnode)
mesecon.receptor_off(rou_pos)
end
-- Drop items and remove cart entity
if not minetest.is_creative_enabled(puncher:get_player_name()) then
for d=1, #drop do
minetest.add_item(self.object:get_pos(), drop[d])
end
elseif puncher and puncher:is_player() then
local inv = puncher:get_inventory()
for d=1, #drop do
if not inv:contains_item("main", drop[d]) then
inv:add_item("main", drop[d])
end
end end
end end
self.object:remove()
return
end end
self.object:remove() local vel = self.object:get_velocity()
if puncher:get_player_name() == self._driver then
if math.abs(vel.x + vel.z) > 7 then
return
end
end
local punch_dir = mcl_minecarts:velocity_to_dir(puncher:get_look_dir())
punch_dir.y = 0
local cart_dir = mcl_minecarts:get_rail_direction(pos, punch_dir, nil, nil, self._railtype)
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
return
end
time_from_last_punch = math.min(time_from_last_punch, tool_capabilities.full_punch_interval)
local f = 3 * (time_from_last_punch / tool_capabilities.full_punch_interval)
self._velocity = vector.multiply(cart_dir, f)
self._old_pos = nil
self._punched = true
end end
cart.on_activate_by_rail = on_activate_by_rail cart.on_activate_by_rail = on_activate_by_rail
function cart:on_step(dtime) function cart:on_step(dtime)
local ctrl, player = nil, nil local ctrl, player = nil, nil
local update = {} if self._driver then
local vel = self.object:get_velocity() player = minetest.get_player_by_name(self._driver)
local pos, rou_pos, node if player then
pos = self.object:get_pos() ctrl = player:get_player_control()
rou_pos = vector.round(pos) -- player detach
node = minetest.get_node(rou_pos) if ctrl.sneak then
local g = minetest.get_item_group(node.name, "connect_to_raillike") detach_driver(self)
if self._driver and self._driver:is_player() then return
player = self._driver
ctrl = player:get_player_control()
-- player detach
if ctrl.sneak then
detach_driver(self)
return
end
if g == self._railtype then
if ctrl.right then
local c = vector.multiply(minetest.yaw_to_dir(self._driver:get_look_horizontal()-1.57), 0.2)
self.object:set_velocity(vector.add(vel, {x=c.x, y=0, z=c.z}))
end
if ctrl.left then
local c = vector.multiply(minetest.yaw_to_dir(self._driver:get_look_horizontal()+1.57), 0.2)
self.object:set_velocity(vector.add(vel, {x=c.x, y=0, z=c.z}))
end
if ctrl.up then
local c = vector.multiply(self._driver:get_look_dir(), 0.2)
self.object:set_velocity(vector.add(vel, {x=c.x, y=0, z=c.z}))
end
if ctrl.down then
local c = vector.multiply(self._driver:get_look_dir(), 0.2)
self.object:set_velocity(vector.subtract(vel, {x=c.x, y=0, z=c.z}))
end end
end end
end end
local vel = self.object:get_velocity()
local update = {}
if self._last_float_check == nil then if self._last_float_check == nil then
self._last_float_check = 0 self._last_float_check = 0
else else
self._last_float_check = self._last_float_check + dtime self._last_float_check = self._last_float_check + dtime
end end
local pos, rou_pos, node
-- 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
pos = self.object:get_pos()
rou_pos = vector.round(pos)
for _,object in pairs(minetest.get_objects_inside_radius(pos, 1.3)) do node = minetest.get_node(rou_pos)
if object ~= self.object then local g = minetest.get_item_group(node.name, "connect_to_raillike")
local mob = object:get_luaentity()
if mob then mob = mob._cmi_is_mob == true end
if mob and (not self._driver) and not object:get_attach() then
self._driver = object
object:set_attach(self.object, "", {x=0, y=-1.75, z=-2}, {x=0, y=0, z=0})
mobs:set_animation(self.object, "stand")
return
end
end
end
if g ~= self._railtype and self._railtype ~= nil then if g ~= self._railtype and self._railtype ~= nil then
-- Detach driver -- Detach driver
if player then if player then
@ -289,12 +300,8 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
end end
end end
if update.vel then if self._punched then
vel = vector.add(vel, self._velocity) vel = vector.add(vel, self._velocity)
if vel.x>8 then vel.x = 8 end
if vel.x<-8 then vel.x = -8 end
if vel.z>8 then vel.z = 8 end
if vel.z<-8 then vel.z = -8 end
self.object:set_velocity(vel) self.object:set_velocity(vel)
self._old_dir.y = 0 self._old_dir.y = 0
elseif vector.equals(vel, {x=0, y=0, z=0}) and (not has_fuel) then elseif vector.equals(vel, {x=0, y=0, z=0}) and (not has_fuel) then
@ -619,14 +626,17 @@ register_minecart(
"mcl_minecarts_minecart_normal.png", "mcl_minecarts_minecart_normal.png",
{"mcl_minecarts:minecart"}, {"mcl_minecarts:minecart"},
function(self, clicker) function(self, clicker)
if not clicker or not clicker:is_player() then return end local name = clicker:get_player_name()
if clicker == self._driver then if not clicker or not clicker:is_player() then
return
end
local player_name = clicker:get_player_name()
if self._driver and player_name == self._driver then
detach_driver(self) detach_driver(self)
else elseif not self._driver then
local name = clicker:get_player_name() self._driver = player_name
self._driver = clicker
self._start_pos = self.object:get_pos() self._start_pos = self.object:get_pos()
mcl_player.player_attached[name] = true mcl_player.player_attached[player_name] = true
clicker:set_attach(self.object, "", {x=0, y=-1.75, z=-2}, {x=0, y=0, z=0}) clicker:set_attach(self.object, "", {x=0, y=-1.75, z=-2}, {x=0, y=0, z=0})
mcl_player.player_attached[name] = true mcl_player.player_attached[name] = true
minetest.after(0.2, function(name) minetest.after(0.2, function(name)
@ -637,7 +647,6 @@ register_minecart(
mcl_tmp_message.message(clicker, S("Sneak to dismount")) mcl_tmp_message.message(clicker, S("Sneak to dismount"))
end end
end, name) end, name)
clicker:set_look_horizontal(self.object:get_yaw())
end end
end, activate_normal_minecart end, activate_normal_minecart
) )

View File

@ -28,6 +28,7 @@ Pig=Schwein
Polar Bear=Eisbär Polar Bear=Eisbär
Rabbit=Kaninchen Rabbit=Kaninchen
Killer Bunny=Killerkaninchen Killer Bunny=Killerkaninchen
The Killer Bunny=Das Killerkaninchen
Sheep=Schaf Sheep=Schaf
Shulker=Shulker Shulker=Shulker
Silverfish=Silberfischchen Silverfish=Silberfischchen

View File

@ -28,6 +28,7 @@ Pig=Cerdo
Polar Bear=Oso polar Polar Bear=Oso polar
Rabbit=Conejo Rabbit=Conejo
Killer Bunny=Conejo asesino Killer Bunny=Conejo asesino
The Killer Bunny=El Conejo asesino
Sheep=Oveja Sheep=Oveja
Shulker=Shulker Shulker=Shulker
Silverfish=Lepisma Silverfish=Lepisma

View File

@ -28,6 +28,7 @@ Pig=Cochon
Polar Bear=Ours blanc Polar Bear=Ours blanc
Rabbit=Lapin Rabbit=Lapin
Killer Bunny=Lapin tueur Killer Bunny=Lapin tueur
The Killer Bunny=Le Lapin tueur
Sheep=Mouton Sheep=Mouton
Shulker=Shulker Shulker=Shulker
Silverfish=Poisson d'argent Silverfish=Poisson d'argent

View File

@ -28,6 +28,7 @@ Pig=Свинья
Polar Bear=Полярный медведь Polar Bear=Полярный медведь
Rabbit=Кролик Rabbit=Кролик
Killer Bunny=Кролик-убийца Killer Bunny=Кролик-убийца
The Killer Bunny=Кролик-убийца
Sheep=Овца Sheep=Овца
Shulker=Шалкер Shulker=Шалкер
Silverfish=Чешуйница Silverfish=Чешуйница

View File

@ -99,7 +99,7 @@ killer_bunny.on_rightclick = nil
killer_bunny.run_velocity = 6 killer_bunny.run_velocity = 6
killer_bunny.do_custom = function(self) killer_bunny.do_custom = function(self)
if not self._killer_bunny_nametag_set then if not self._killer_bunny_nametag_set then
self.nametag = "The Killer Bunny" self.nametag = S("The Killer Bunny")
self._killer_bunny_nametag_set = true self._killer_bunny_nametag_set = true
end end
end end

View File

@ -41,6 +41,9 @@ local msgs = {
["murder"] = { ["murder"] = {
N("@1 was slain by @2 using [@3]"), N("@1 was slain by @2 using [@3]"),
}, },
["murder_by_named_mob"] = {
N("@1 was slain by @2."),
},
["murder_any"] = { ["murder_any"] = {
N("@1 was killed."), N("@1 was killed."),
}, },
@ -212,7 +215,7 @@ minetest.register_on_dieplayer(function(player, reason)
end end
hittersubtype = hitter:get_luaentity().name hittersubtype = hitter:get_luaentity().name
if hittername then if hittername then
msg = dmsg("murder", name, hittername) msg = dmsg("murder_by_named_mob", name, hittername)
elseif hittersubtype ~= nil and hittersubtype ~= "" then elseif hittersubtype ~= nil and hittersubtype ~= "" then
msg = mmsg(hittersubtype, name) msg = mmsg(hittersubtype, name)
else else

View File

@ -2043,7 +2043,7 @@ local function register_dimension_ores()
}) })
-- Nether quartz -- Nether quartz
if minetest.settings:get("mcl_generate_ores") == "true" then if minetest.settings:get_bool("mcl_generate_ores", true) then
minetest.register_ore({ minetest.register_ore({
ore_type = "scatter", ore_type = "scatter",
ore = "mcl_nether:quartz_ore", ore = "mcl_nether:quartz_ore",

View File

@ -2207,17 +2207,19 @@ local function basic(vm, data, data2, emin, emax, area, minp, maxp, blockseed)
lvm_used = true lvm_used = true
end end
return lvm_used, shadow
end
local function basic_node(minp, maxp, blockseed)
if mg_name ~= "singlenode" then if mg_name ~= "singlenode" then
-- Generate special decorations -- Generate special decorations
generate_underground_mushrooms(minp, maxp, blockseed) generate_underground_mushrooms(minp, maxp, blockseed)
generate_nether_decorations(minp, maxp, blockseed) generate_nether_decorations(minp, maxp, blockseed)
generate_structures(minp, maxp, blockseed, biomemap) generate_structures(minp, maxp, blockseed, minetest.get_mapgen_object("biomemap"))
end end
return lvm_used, shadow
end end
mcl_mapgen_core.register_generator("main", basic, nil, 1, true) mcl_mapgen_core.register_generator("main", basic, basic_node, 1, true)
-- "Trivial" (actually NOT) function to just read the node and some stuff to not just return "ignore", like 5.3.0 does. -- "Trivial" (actually NOT) function to just read the node and some stuff to not just return "ignore", like 5.3.0 does.
-- p: Position, if it's wrong, {name="error"} node will return. -- p: Position, if it's wrong, {name="error"} node will return.