Compare commits

..

646 Commits

Author SHA1 Message Date
NO11 627da6d305 Merge pull request 'master' (#16) from MineClone2/MineClone2:master into master
Reviewed-on: #16
2022-03-15 14:22:26 +00:00
cora 1803cc560d Merge pull request 'Remove stray work notes files.' (#2071) from delete-temp-notes into master
Reviewed-on: MineClone2/MineClone2#2071
2022-03-15 11:05:46 +00:00
kabou 3f787f8305 Remove stray work notes files.
* These temp files accidentally got added during the unregistered nodes
  fixes.
2022-03-15 07:42:11 +01:00
epCode 9534624b21 Merge pull request 'fix #2068' (#2070) from epcode-patch-1 into master
Reviewed-on: MineClone2/MineClone2#2070
2022-03-15 02:18:32 +00:00
epCode 4483f4b6b6 fix #2068 2022-03-15 02:18:02 +00:00
cora d3bfdb190e Merge pull request 'Fix frost walker enchant not protecting from magma block damage (#2064)' (#2065) from frost_walker_fix into master
Reviewed-on: MineClone2/MineClone2#2065
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-13 19:03:06 +00:00
AFCMS 47b1eeda74
fix frost walker enchant not protecting from magma block damage 2022-03-13 19:11:28 +01:00
cora ba0e2cbf29 Merge pull request 'item pickup sound gain more MC like' (#2054) from pepebotella/MineClone2:pop_sound into master
Reviewed-on: MineClone2/MineClone2#2054
2022-03-13 14:08:48 +00:00
Freedom f430aec0cd
item pickup sound gain more MC like 2022-03-13 14:58:01 +01:00
NO11 a44846a82c Merge pull request 'master' (#15) from MineClone2/MineClone2:master into master
Reviewed-on: #15
2022-03-12 22:42:24 +00:00
cora 22edd08387 Merge pull request 'Make carpets walkable.' (#2060) from fix-carpets-walkable into master
Reviewed-on: MineClone2/MineClone2#2060
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-12 13:37:29 +00:00
kabou 17b8eab368 Make carpets walkable.
* Make carpets walkable.  When a carpet is placed on top of a fence or a
  wall, the carpet can be jumped upon, allowing to in effect jump over
  fences and walls.
2022-03-12 13:35:12 +00:00
cora 119b4aa82c Merge pull request 'Update version and credits for release' (#2059) from update_docs_for_073 into master
Reviewed-on: MineClone2/MineClone2#2059
Reviewed-by: AFCMS <afcm.contact@gmail.com>
Reviewed-by: NO11 <no11@noreply.git.minetest.land>
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
2022-03-11 11:47:03 +00:00
cora 181c3f0c0f Remove kay27 from (previous) maintainers 2022-03-10 21:28:37 +01:00
cora 21e7ab1f2a Update mcl5 contributors, add mineclonia 2022-03-10 19:04:00 +01:00
cora 6f284c0c95 Update Credits 2022-03-10 19:04:00 +01:00
cora e0801ba7e4 Remove in development from readme 2022-03-10 19:03:06 +01:00
cora 267031793d Merge pull request 'Fix composters, & barrels not being able to be used as smelting fuel.' (#2057) from make_barrels_composters_furnace_fuel into master
Reviewed-on: MineClone2/MineClone2#2057
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-10 11:31:32 +00:00
MysticTempest de3cdee09e Make composters & barrels fuel for furnaces with the same burntime as chests. 2022-03-10 00:47:54 -06:00
cora c5993a60ae Merge pull request 'Fix daylight sensor.' (#2041) from fix-daylight-sensor into master
Reviewed-on: MineClone2/MineClone2#2041
2022-03-09 22:50:29 +00:00
Nils Dagsson Moskopp 77f8ecd6e8 Make daylight detector work in Minetest 5.3.0
This patch contains a function that searches for a path to a node with
light level 15, which is guaranteed to be sunlight.
2022-03-09 22:33:08 +00:00
Nils Dagsson Moskopp 4da5084daf Make daylight detector ignore artificial light
The daylight detector code used get_node_light(), which detects both
natural and artificial light. This patch improves the code to use
get_natural_light(), which was introduced with Minetest 5.4.0.
2022-03-09 22:33:08 +00:00
cora dca653651c Merge pull request 'Fix potential crashes due to unregistered nodes.' (#2055) from fix-unregistered-nodes into master
Reviewed-on: MineClone2/MineClone2#2055
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-09 22:16:27 +00:00
kabou deed231f28 Fix typos. 2022-03-09 18:50:41 +01:00
kabou 11ee1d133f Fix cut-n-paste error.
* Swap misplaced lines.
* Concatenate conditional expression.
2022-03-09 18:26:51 +01:00
kabou 1326b9e7e7 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.  By application of De Morgan's law, the compound logic
  expression can be rewritten so that the existence of the table is
  checked before all following attribute references.
2022-03-09 15:14:22 +01:00
kabou 6a69f49fa0 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
2022-03-09 14:59:49 +01:00
kabou f5a8d6d17a Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
* Clarify code flow.
2022-03-09 14:40:37 +01:00
kabou 3f4dafc68f Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 14:14:45 +01:00
kabou 9bac0da01a Fix registered_items oddity and add check for unknown nodes.
* Mobs redo uses `registered_items[]` where clearly the proper table
  accessed should be `registered_nodes[]`.  Perhaps this magically
  works, but it looks nonsensical.  Switch to the use the more
  sensible `registered_nodes[]` table.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 13:11:53 +01:00
kabou 818cbb2f48 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 12:11:59 +01:00
kabou 88f7a150c7 Add check for unknown nodes.
* Add check for unknown node in `handle_node_drops()` and return
  immediately if the dug node has no definition table.
2022-03-09 04:00:48 +01:00
kabou 962500b189 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 02:23:18 +01:00
kabou 95cfa43483 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 02:15:33 +01:00
kabou 4a1b93bbfa Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 02:05:38 +01:00
kabou b9c2c3bd0a Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
* Reduce redundant `== false` condition check.
2022-03-09 00:01:23 +01:00
cora 52333cea0f Merge pull request 'ITEMS/mcl_anvils: fix renaming items without description' (#1914) from fix-anvil-renaming into master
Reviewed-on: MineClone2/MineClone2#1914
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-03-07 01:43:47 +00:00
Dieter44 f8c60b5f75 ITEMS/mcl_anvils: fix renaming items w/o desc… 2022-03-05 15:35:39 +00:00
cora bcf302ceb0 Merge pull request 'Rename a few textures to help support texture packs.' (#2045) from MysticTempest/MineClone2:Texture_pack_support into master
Reviewed-on: MineClone2/MineClone2#2045
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-05 02:57:00 +00:00
MysticTempest 7a53ea8b70 Rename a few textures to help support texture packs. 2022-03-02 20:13:24 -06:00
cora e8ff33a741 Merge pull request 'Alternative solution to fix crash on nether portal destruction' (#2029) from ryvnf-portal-removal into master
Reviewed-on: MineClone2/MineClone2#2029
2022-03-03 01:51:49 +00:00
Elias Åström 3c10f0e970 Rewrite portal removal to avoid stack overflow
This solves a problem were nether portal removal would trigger deep
recursion through node callbacks.  For large portals this could result
in stack overflow crashes on LuaJIT.  The issue is solved by rewriting
the portal removal to avoid recursion and removing the portal in one
operation using minetest.bulk_set_node.
2022-03-03 01:42:49 +00:00
cora f7d712543f Merge pull request 'Fix fire HUD' (#2042) from kabou/MineClone2:fix-burning-HUD into master
Reviewed-on: MineClone2/MineClone2#2042
2022-03-03 01:40:05 +00:00
kabou c3e0996902 Fix fire HUD not showing on join while burning.
* Add the fire HUD to a player who joins the server while still burning
  from the previous session.
2022-03-02 17:15:05 +01:00
kabou d424d4f10e Add comments to mcl_burning.update_hud(). 2022-03-02 16:39:27 +01:00
kabou e80006f4ea Do not set fire to objects that are already burning.
Changes to mcl_burning.set_on_fire():
* Add logic that only updates the burn time, but skips adding fire
  entities to objects that are already burning.
* Condense code a little, remove single use variables.
* Add a comment to a questionable piece of code.
* Add comments to the function.
2022-03-02 16:25:40 +01:00
kabou b17776699e Add comments to "storage" table.
* Document attributes of the "storage" table.
2022-03-02 15:40:29 +01:00
kabou 86a4ece7d2 Add local copy of minetest.find_nodes_in_area. 2022-03-02 15:25:03 +01:00
kabou df5d24104d Make player burning HUD work without csm.
* Add update_hud() function.
* Remove the client channels.
* Unglobalize animation_frames variable.
* Fix bug where player state was not stored on shutdown of singleplayer
  game.
* Remove superfluous sanity_check() function, this code could easily be
  inlined in its only caller.
2022-03-02 15:21:55 +01:00
cora 8dd540269c Merge pull request 'Fix burning entity animation.' (#2039) from kabou/MineClone2:fix-burning-entities into master
Reviewed-on: MineClone2/MineClone2#2039
2022-03-02 11:34:37 +00:00
kabou 56b63463a5 Fix burning entity animation.
The parameters for the flames sprite were incorrect, causing the reverse
side of the sprite to appear as an opaque black rectangle.  Use the
correct incantation.
2022-03-02 10:47:46 +01:00
cora c2ae28aec1 Merge pull request 'Fix TGA file writing on Windows' (#1985) from fix-tga-file-writing-on-windows into master
Reviewed-on: MineClone2/MineClone2#1985
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
2022-02-28 17:10:51 +00:00
Nils Dagsson Moskopp 66bb209ad1 Fix TGA file writing on Windows
Before this patch, the tga_encoder mod would write corrupted TGA files
on Windows: Bytes that looked like newlines were replaced by a carriage
return and a newline.
2022-02-28 16:58:59 +00:00
cora a3e01e6dbe Merge pull request 'Add Target' (#2033) from AFCMS/MineClone2:target into master
Reviewed-on: MineClone2/MineClone2#2033
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-27 17:25:16 +00:00
AFCMS 5a7b1cc382
make all arrow types activate target (+ depends and code fixes) 2022-02-26 23:52:03 +01:00
AFCMS 210a0d8ee1
make lingering potions activate target (+ indentation fix) 2022-02-26 22:44:50 +01:00
AFCMS eae8effd57
make splash potions activate target 2022-02-26 22:42:27 +01:00
AFCMS b51e322304
make fire charges activate target (+ fix possible crash) 2022-02-26 22:38:34 +01:00
AFCMS 096d46152e
make bottle o enchanting activate target 2022-02-26 22:20:05 +01:00
AFCMS d89687984b
make ender pearls activate target 2022-02-26 22:16:10 +01:00
AFCMS c6f72c473f
make eggs activate target 2022-02-26 22:12:26 +01:00
AFCMS 540b72f1d6
add target help text 2022-02-26 19:12:02 +01:00
AFCMS 7449725a56
add target crafting receipe 2022-02-26 19:12:01 +01:00
AFCMS 9e7a525a0a
make snowballs activate target 2022-02-26 19:12:01 +01:00
AFCMS 4bd91750bc
add target with API 2022-02-26 19:12:01 +01:00
cora 8e1a9e1785 Merge pull request 'mapgen/mcl_mapgen_core: move set_node decorations a node callback' (#2028) from fix-nether-wart into master
Reviewed-on: MineClone2/MineClone2#2028
2022-02-25 21:28:40 +00:00
E 87e494f42b mapgen/mcl_mapgen_core: move set_node decorations a node callback
During the rewrite in 89e55e9065, a queue system was added to allow
using both VoxelManip-based generation steps, and set_node-based steps,
however some set_node-based steps (underground mushrooms, nether
decorations, and structures) were missed and remained in a VoxelManip
step. The result is that the changes made by the set_node stages were
overwritten after the (now-stale) VoxelManip data was committed later.

(ref. Mineclonia/Mineclonia#26)
2022-02-25 18:38:50 +01:00
cora dfed21ee14 Merge pull request 'Revert mob rewrite' (#1992) from revert-to-oldmobs into master
Reviewed-on: MineClone2/MineClone2#1992
2022-02-25 16:47:47 +00:00
cora 3feca330c9 fix the other 2 throw_xp occurences 2022-02-25 00:40:26 +00:00
cora caacb378de fix api change in enchanting 2022-02-25 00:40:26 +00:00
cora 379972ea11 fix crash when blaze attacks logged off player 2022-02-25 00:40:26 +00:00
cora 414e2e7725 fix crash on opening villager formspec 2022-02-25 00:40:26 +00:00
cora 435b5d756d throw_experience->throw_xp (api change) 2022-02-25 00:40:26 +00:00
cora 2bb416765c revert to old mobs ( 32c03dc27e )
This reverts the hierarchies ENTITIES/mcl_mobs, ENTITIES/mobs_mc
and ENTITIES/mobs_mc_gameconfig to the state of commit
32c03dc27e
2022-02-25 00:40:26 +00:00
cora 02361b2d01 Merge pull request 'ITEMS/mcl_fire: fix laggy fire spread' (#1998) from fix-fire into master
Reviewed-on: MineClone2/MineClone2#1998
2022-02-25 00:17:47 +00:00
cora 86ca401e4e do not randomseed twice 2022-02-25 00:08:26 +00:00
cora 378b5b30c9 fix beds dropping when burning up 2022-02-25 00:08:26 +00:00
cora 840b705a22 make fire use abms instead of laggy node timers 2022-02-25 00:08:26 +00:00
cora 80c79dde1c Merge pull request 'Fix handheld maps not displaying in Minetest 5.5.0' (#2010) from fix-mcl-maps-in-minetest-5.5 into master
Reviewed-on: MineClone2/MineClone2#2010
2022-02-24 22:47:26 +00:00
Nils Dagsson Moskopp 27842aa2f5 Fix handheld maps not displaying in Minetest 5.5.0
The function dynamic_add_media() was changed in incompatible ways in
several minor versions of Minetest, breaking the display of handheld
maps in Minetest 5.5.0. This patch makes handheld maps display there.

The function was blocking with one argument in Minetest 5.3. It was also
blocking in Minetest 5.4, but took an additional argument for a function
to execute once the media had been received. Calling dynamic_add_media()
with a single argument had been deprecated; a function that did nothing
was provided in mcl_maps to satisfy the changed argument requirements.

In Minetest 5.5, dynamic_add_media() was changed to non-blocking. This
introduced a race condition in mcl_maps, where a client often tried to
display a map before it had received the map texture from the server.

Opening an issue on the Minetest issue tracker led to it being closed in
about 20 minutes: <https://github.com/minetest/minetest/issues/11997>
2022-02-24 22:43:45 +00:00
cora 85e0e23c76 Merge pull request 'Fix redstone comparator flooding crash by erlehmann' (#2027) from fix-comparator-crash into master
Reviewed-on: MineClone2/MineClone2#2027
2022-02-24 21:35:12 +00:00
Nils Dagsson Moskopp 41550da87b Fix redstone comparator flooding crash
Redstone comparators have two modes, comparison mode & subtraction mode.
Before this patch, the functions to turn comparators on or off attempted
to swap nodes with comparators in the same mode, but failed to determine
the correct replacement node, if the existing node was not a comparator.

When a comparator in an on state (e.g. powered by a filled cauldron) was
flooded, the flooding dropped the comparator and replaced the comparator
node that was to be swapped out with air, which lead to a server crash.

This patch changes the functions that turn comparators on or off so they
only swap existing nodes with comparators in the same mode if the name
of the replacement node can be determined – i.e. if it is not nil.
2022-02-24 15:52:01 +01:00
cora a4e541bcd2 Merge pull request 'remove blend1 file / add blend1 files to gitignore (fix #2015)' (#2024) from AFCMS/MineClone2:remove-blend1 into master
Reviewed-on: MineClone2/MineClone2#2024
Reviewed-by: Nicu <kneekoo@noreply.git.minetest.land>
2022-02-24 14:48:51 +00:00
AFCMS 89a930ace3
add `.blend2` and `.blend3` files to gitignore 2022-02-24 10:16:48 +01:00
AFCMS 129117efb3
add `.blend1` files to gitignore 2022-02-24 10:16:47 +01:00
AFCMS cbfc71705d
remove blender backup file 2022-02-24 10:16:47 +01:00
cora 4b89398b3b Merge pull request 'Fix hopper breakage in get_item_group return value. (Fixes: #2022)' (#2023) from kabou/MineClone2:fix-hoppers into master
Reviewed-on: MineClone2/MineClone2#2023
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-24 02:23:09 +00:00
kabou 5431e206b0 Fix hopper breakage in get_item_group return value.
In commit 55009c257e that added vectors to
mcl_composters, mcl_hoppers was accidentally patched with a unrelated
change, updating it to get_item_group().  This mostly works, but in one
particular case the semantics of the return value differs.  Instead of
returning 'nil' it returns '0'.  That altered the evaluation of an if
condition, breaking the abm that sucks in items.

This commit fixes the conditional by explicitly comparing  '~= 0'.
2022-02-24 03:18:25 +01:00
cora c60fd92638 Merge pull request 'Traditional chinese by emojigit (partial)' (#2026) from emojigit-zh-trans into master
Reviewed-on: MineClone2/MineClone2#2026
2022-02-23 23:29:52 +00:00
1F616EMO 06deb92dd6 mcl_tools 2022-02-23 23:58:05 +01:00
1F616EMO 7685b4758f mcl_flowers 2022-02-23 23:58:05 +01:00
1F616EMO 9944abb328 mcl_books 2022-02-23 23:58:05 +01:00
1F616EMO 5ce1852c1d mcl_dye 2022-02-23 23:58:05 +01:00
1F616EMO 56a70025b8 mcl_flowerpots 2022-02-23 23:58:05 +01:00
1F616EMO 9fe3bbd2fa mcl_mushrooms 2022-02-23 23:58:05 +01:00
1F616EMO fb1d189d40 mcl_doors 2022-02-23 23:58:05 +01:00
1F616EMO 9cd24f4af5 mcl_commands 2022-02-23 23:58:05 +01:00
1F616EMO a64c3f87bc xpanes 2022-02-23 23:58:05 +01:00
1F616EMO 5075f2ca56 mcl_armor 2022-02-23 23:58:05 +01:00
1F616EMO 249dfac319 mcl_inventory 2022-02-23 23:58:05 +01:00
1F616EMO 2b5a0242db mcl_fire 2022-02-23 23:58:05 +01:00
1F616EMO 790ccf0812 mcl_fishing 2022-02-23 23:58:05 +01:00
1F616EMO 8d639794f3 mcl_fences 2022-02-23 23:58:05 +01:00
1F616EMO af8681c143 mcl_buckets 2022-02-23 23:58:05 +01:00
1F616EMO 1ef58f7250 mcl_walls 2022-02-23 23:58:05 +01:00
1F616EMO 15747220f2 mcl_hoppers 2022-02-23 23:58:05 +01:00
1F616EMO 925dad7f5e mcl_anvils 2022-02-23 23:58:05 +01:00
1F616EMO 729f653c85 mcl_portals 2022-02-23 23:58:05 +01:00
1F616EMO d1e328e57a mcl_bows 2022-02-23 23:58:05 +01:00
1F616EMO 615a968fbb mcl_skins 2022-02-23 23:58:05 +01:00
1F616EMO 7e5a9bd8b6 mcl_throwing 2022-02-23 23:58:05 +01:00
1F616EMO d018bee00a mcl_cake 2022-02-23 23:58:05 +01:00
1F616EMO 1365d0b257 mcl_jukebox 2022-02-23 23:58:05 +01:00
1F616EMO a289a00427 mcl_heads 2022-02-23 23:58:05 +01:00
1F616EMO a238aabbb0 mcl_cauldrons 2022-02-23 23:58:05 +01:00
1F616EMO b02f7cd974 mcl_mobs 2022-02-23 23:58:05 +01:00
1F616EMO e19113d4e0 findbiome 2022-02-23 23:58:05 +01:00
1F616EMO 4deac632e6 mcl_sponges 2022-02-23 23:58:05 +01:00
1F616EMO c480e6891d mcl_maps 2022-02-23 23:58:05 +01:00
1F616EMO 844eb3fb7c mcl_brewing 2022-02-23 23:58:05 +01:00
1F616EMO fc768cb1ad mcl_signs 2022-02-23 23:58:05 +01:00
1F616EMO 1f9a919459 mcl_monster_eggs 2022-02-23 23:58:05 +01:00
1F616EMO 70007e3453 mcl_furnaces 2022-02-23 23:58:05 +01:00
1F616EMO 3aff1f8981 mcl_hunger 2022-02-23 23:58:05 +01:00
1F616EMO c86a506672 mcl_tnt 2022-02-23 23:58:05 +01:00
1F616EMO f348223da2 mcl_crafting_table 2022-02-23 23:58:05 +01:00
1F616EMO ca6469b959 mcl_weather 2022-02-23 23:58:05 +01:00
1F616EMO c52e09ddcd mcl_structures 2022-02-23 23:58:05 +01:00
1F616EMO bb55120adc mcl_experience 2022-02-23 23:58:05 +01:00
1F616EMO 77339afbe2 mcl_cocoas 2022-02-23 23:58:05 +01:00
1F616EMO 9b15599bee hudbars 2022-02-23 23:58:05 +01:00
1F616EMO a685c3bc83 mclx_core 2022-02-23 23:58:05 +01:00
1F616EMO b01d4eba88 mcl_paintings 2022-02-23 23:58:05 +01:00
1F616EMO 952747d4da mcl_mobspawners 2022-02-23 23:58:05 +01:00
1F616EMO 430f5b05ab mcl_itemframes 2022-02-23 23:58:05 +01:00
1F616EMO e4a311e28a mcl_clock 2022-02-23 23:58:05 +01:00
1F616EMO 6a115a68ef mcl_armor_stand 2022-02-23 23:58:05 +01:00
1F616EMO f3d0ec845c mcl_spawn 2022-02-23 23:58:05 +01:00
1F616EMO 563daeed8a mcl_wip 2022-02-23 23:58:05 +01:00
1F616EMO a6c3cab791 mclx_fences 2022-02-23 23:58:05 +01:00
1F616EMO bb4ddee570 mcl_compass 2022-02-23 23:58:05 +01:00
1F616EMO fe3e80bc0e lightning 2022-02-23 23:58:05 +01:00
1F616EMO 59fe078fd7 mcl_playerplus 2022-02-23 23:58:05 +01:00
1F616EMO dba08ddc1f mcl_torches 2022-02-23 23:58:05 +01:00
1F616EMO 551bf917e2 mcl_void_damage 2022-02-23 23:58:05 +01:00
1F616EMO 26dadb1846 mcl_falling_nodes 2022-02-23 23:58:05 +01:00
1F616EMO 33a353e20d mcl_privs 2022-02-23 23:58:05 +01:00
1F616EMO f02f3c9f40 screwdriver 2022-02-23 23:58:05 +01:00
1F616EMO 410c1ecd1f mcl_hbarmor 2022-02-23 23:58:05 +01:00
1F616EMO ba172f0847 mcl_explosions 2022-02-23 23:58:05 +01:00
1F616EMO ad42c3588b mcl_farming 2022-02-23 23:58:05 +01:00
1F616EMO 9734c74c56 (WIP) mcl_farming 2022-02-23 23:58:05 +01:00
1F616EMO c3dd5e6c2c MORE MESS SORRY XD 2022-02-23 23:58:05 +01:00
1F616EMO 21808390f9 Revert "add translates for `mcl_boats`"
This reverts commit 2ee84f2ad3bd1f067a43c9382d7fc70f30fab9f0.
2022-02-23 23:58:05 +01:00
1F616EMO cc87791327 add translates for `mcl_boats`
Co-authored-by: Emojigit <emojigit@noreply.git.minetest.land>
2022-02-23 23:58:04 +01:00
1F616EMO f8cd01a15e add translate of README.md 2022-02-23 23:58:04 +01:00
1F616EMO a8aabb2329 add translate for `doc_identifier` 2022-02-23 23:58:04 +01:00
1F616EMO 4f00b62a18 add zh_TW translate to `mcl_beds` and `mcl_core` 2022-02-23 23:58:04 +01:00
cora 97412b139a Merge pull request 'Add @epCode logo (fix #1955)' (#2021) from AFCMS/MineClone2:epCode-logo into master
Reviewed-on: MineClone2/MineClone2#2021
2022-02-23 17:55:50 +00:00
AFCMS ceb27b6929
obtimize icons again
`optipng -strip all -o9`
2022-02-23 16:30:08 +01:00
AFCMS b2614f8d78
make menu icon smaller (128x) 2022-02-23 16:30:07 +01:00
AFCMS 84596b2ebb
add @epCode logo 2022-02-23 16:30:07 +01:00
cora 6bb6966752 Merge pull request 'Add Barrel' (#1977) from AFCMS/MineClone2:barrels into master
Reviewed-on: MineClone2/MineClone2#1977
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-22 19:38:04 +00:00
AFCMS 360a1604ba
Revert "move barrels to mcl_chests"
This reverts commit a272322cb5.
2022-02-22 20:20:21 +01:00
AFCMS 61f4c5b885
apply @kay27 fix to `mcl_util.drop_items_from_meta_container` 2022-02-22 18:08:26 +01:00
AFCMS a272322cb5
move barrels to mcl_chests 2022-02-22 18:08:25 +01:00
AFCMS 9112915ddd
fix barrel top texture rotation 2022-02-22 18:08:25 +01:00
AFCMS 397c243e89
cleanup barrel TODO list 2022-02-22 18:08:25 +01:00
AFCMS c64d0e4558
simplify random dropping position code 2022-02-22 18:08:24 +01:00
AFCMS 61e54ed617
rename `mcl_util.drop_items_container_get` to `drop_items_from_meta_container` 2022-02-22 18:08:24 +01:00
AFCMS 0988637ea1
add barrel tooltip help text 2022-02-22 18:08:24 +01:00
AFCMS b88060dbfb
add doc description to barrels 2022-02-22 18:08:23 +01:00
AFCMS e3e06b4a4b
fix broken tree placement 2022-02-22 18:08:23 +01:00
AFCMS 34b445b04a
fixes 2022-02-22 18:08:22 +01:00
AFCMS d41a836514
add craft 2022-02-22 18:08:22 +01:00
AFCMS 80fb59f9ac
add barrel 2022-02-22 18:08:22 +01:00
cora dae7c22dd9 Merge pull request 'PLAYER/mcl_playerplus: Do not send redundant bone position and properties' (#1990) from fix-playerplus-packetspam into master
Reviewed-on: MineClone2/MineClone2#1990
2022-02-22 17:00:29 +00:00
cora a9357f7380 Do not send redundant bone position and properties 2022-02-22 11:15:56 +00:00
cora dcfbfd67b8 Merge pull request 'Quick fix: Reinstate nil check in on_place_bucket.' (#2018) from kabou/MineClone2:fix-buckets-cauldrons into master
Reviewed-on: MineClone2/MineClone2#2018
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-21 19:54:35 +00:00
kabou af132cc523 Reinstate nil check in on_place_bucket.
* Oops, nil checks on registered_node[name] were erroneously optimized
  away, risking crashes.  Reinstate those checks.
2022-02-21 18:00:56 +01:00
cora a0b5e4dd0b Merge pull request 'fix filling cauldrons with water buckets and some minor refactoring.' (#2011) from kabou/MineClone2:fix-buckets-cauldrons into master
Reviewed-on: MineClone2/MineClone2#2011
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-21 15:18:02 +00:00
kabou e54502edd6 Add more local aliases for minetest.* namespace functions
* Add locals for
  - minetest.is_creative_enabled
  - minetest.is_protected
  - minetest.record_protection_violation
2022-02-20 20:24:55 +01:00
kabou 639bf936c5 Use alias for minetest.* namespace function call.
* Fix one missed minetest.get_node use in earlier commit.
2022-02-20 19:52:05 +01:00
kabou d2261426c3 Remove redundant variables in on_place_bucket.
The function on_place_bucket defined a couple of variables that were
used only once or in a redundant check.  After removal of the redundant
check in a previous commit, all use-once variables can now be substituted
with their assignment expressions.
2022-02-20 18:46:23 +01:00
kabou 88ce1e3662 Remove redundant logic.
The function on_place_bucket contains the following logic:
  if not a and not b then return x end
  if a then
    foo(a)
  elseif b then
    foo(b)
  else
    return x
  end

The "if not a and not b then .." is removed because the case is handled
by the else case later on.  This will allow some further simplifications.
2022-02-20 18:46:23 +01:00
kabou b3aed9d6b8 Use proper get_item_group accessor.
Instead of directly accessing the group table in node definitions, use
the proper minetest.get_item_group accessor to test for "cauldron"
group.
Also adds local alias get_item_group for the global minetest call.
2022-02-20 18:46:23 +01:00
kabou 13baa68b67 Fixed missed alias uses and added set_node alias.
Two instances of add_node and add_item still used the full minetest
call, substitute the alias.
Added a set_node alias for several minetest.set_node calls.
2022-02-20 18:46:23 +01:00
kabou 315f251584 Add local to speedup global function access.
The minetest.registered_nodes function is called from multiple places.
Define a local alias registered_nodes and substitute it in all calls.
2022-02-20 18:46:23 +01:00
kabou 584a75df76 Fix filling cauldrons with water.
When using a bucket of water on a cauldron, this would not fill the
cauldron as expected, but deposit a water source block on top of the
cauldron instead.

Applied patch from mineclone5 #38 (commit #
698c29733f06a7fcb7e755bf26ee46b33b00699b) from mineclone5 that fixes
this problem.
2022-02-20 18:46:23 +01:00
cora c392fd0269 Merge pull request 'mcl_composters initial commit' (#2005) from kabou/MineClone2:composters into master
Reviewed-on: MineClone2/MineClone2#2005
Reviewed-by: cora <cora@noreply.git.minetest.land>
Reviewed-by: NO11 <no11@noreply.git.minetest.land>
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
2022-02-19 23:42:45 +00:00
kabou 8d18ab8a7a Optimize texture files.
* Texture files were optimized with 'optipng  -o7 -zm9 -strip all' .
2022-02-19 21:18:01 +01:00
kabou f81980da51 Fix hardness and blast resistance.
* Use correct MC values for hardness and blast resistance.
2022-02-19 21:18:01 +01:00
kabou 55009c257e Use new vectors
* Use vector.new instead of xyz table.
2022-02-19 21:18:01 +01:00
kabou 51ca60c097 Change custom node attribute name.
* Rename _compost_level to _mcl_compost_level
2022-02-19 21:18:01 +01:00
kabou f22baafaa6 Add player object check.
* Add one more check if player object is an actual player.
2022-02-19 21:18:01 +01:00
kabou ffc2c94096 Add help alias
* Add help alias for the ready type composter
2022-02-19 21:18:01 +01:00
kabou cea821b2fa Comment fixes.
* Improve comments, some typo fixes.
2022-02-19 21:18:01 +01:00
kabou 64608f50f8 Update mod description and fix comment.
* Make mod description more descriptive.
* Minor comment tweak.
2022-02-19 21:18:01 +01:00
kabou 3257014e00 Add missing melon block.
* Add melon block to the compostabiles list.
2022-02-19 21:18:01 +01:00
kabou 06274518bf Add player object check.
* Handle the case where a mob somehow "clicks" on a composter and we get
  an invalid player object passed.
2022-02-19 21:18:01 +01:00
kabou 8d79d16531 Update mod deps.
* Add dpendency on mcl_dye for the bone meal particle spawner
2022-02-19 21:18:01 +01:00
kabou 1f7697b6f5 Typo fix.
* it's a spruceSapling (thanks NO11)
2022-02-19 21:18:01 +01:00
kabou 64203c38a6 Update documentation.
* Make a mention of the one second delay before composter readies.
2022-02-19 21:18:01 +01:00
kabou 4cf88abe4c Fix composter item image.
* Less is more (thanks AFCMS)
2022-02-19 21:18:01 +01:00
kabou df8576e77c mcl_composters initial commit
Implements a composter block with crafting recipe, and some more
uncraftable blocks representing various stages of filling.

Adds a list of items that can be used with the composter and the chances
of these items adding a layer to the composter.

Implements methods to add compostable items to the composter, to update
the composter to various levels of compost and to harvest an item of
bone meal when the composter is ready.

Textures were taken from XSSheep/Nova_Wostra Pixel Perfection texture
pack.
2022-02-19 21:18:01 +01:00
cora 6493f2885b Merge pull request 'Correct bucket behavior' (#2007) from NO11/MineClone2:buckets+ into master
Reviewed-on: MineClone2/MineClone2#2007
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-18 00:17:50 +00:00
NO11 c40c05f594 Exact MC behavior 2022-02-17 15:32:58 +00:00
NO11 8db28c1337 Update get_pointed_thing function 2022-02-17 15:30:41 +00:00
NO11 d46a96c43a Merge branch 'master' into buckets+ 2022-02-17 14:48:07 +00:00
NO11 3cfcd1355f Add missing dependency 2022-02-17 14:42:01 +00:00
NO11 4707cd4526 Correct bucket behavior 2022-02-17 14:36:48 +00:00
NO11 ad99746d99 Add get_pointed_thing function 2022-02-17 14:35:51 +00:00
cora cabf6e8cd1 Merge pull request 'Fix mob-in-boat crash in Minetest 5.5-dev' (#2000) from fix-boat-crash-2 into master
Reviewed-on: MineClone2/MineClone2#2000
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-02-15 12:00:03 +00:00
Nils Dagsson Moskopp adf738854a
Fix mob-in-boat crash in Minetest 5.5-dev
In Minetest 5.4.1, calling get_player_control() on a mob returned the
empty string. Minetest commit 5eb45e1ea03c6104f007efec6dd9c351f310193d
changed this, so now calling get_player_control() on a mob returns nil.

As mcl_boats defines boats that can have a player or a mob as a driver,
code like the following crashes with a changed get_player_control() API:

local ctrl = driver:get_player_control()
if ctrl.sneak then
    detach_object(driver, true)
end

Furthermore, once a world has crashed, joining it near a mob that is the
driver of a boat with such control code immediately crashes again.

When I reported this bug to Minetest, several Minetest core developers
stated that they disliked the old API and proposed other return values
for calling a mob's get_player_control() function – all different from
the empty string. Since I have some doubts that this bug will be fixed
in Minetest 5.5.0, boat code must take into account a nil return value.

Minetest issue: https://github.com/minetest/minetest/issues/11989
2022-02-15 11:17:01 +01:00
cora 87427cb8af Merge pull request '`mcl_armor` documentation' (#1917) from AFCMS/MineClone2:armor-doc into master
Reviewed-on: MineClone2/MineClone2#1917
2022-02-13 20:49:37 +00:00
AFCMS da4952a125
wip mcl_damage documentation 2022-02-13 21:31:04 +01:00
AFCMS c59bea211d
fix some typos 2022-02-13 21:31:03 +01:00
AFCMS 5aa18d573e
document mcl_armor function (WIP) 2022-02-13 21:31:03 +01:00
AFCMS 13f8fd457c
document manual armor creation 2022-02-13 21:31:03 +01:00
AFCMS 2b820d7756
`mcl_armor.register_set()` documentation 2022-02-13 21:31:02 +01:00
cora f803a25aea Merge pull request 'Fix bug when applying another enchantment to a renamed item' (#1989) from fix-1922 into master
Reviewed-on: MineClone2/MineClone2#1989
2022-02-12 20:37:48 +00:00
Elias Åström 4ca89cfcae Update groupcaps_hash function to minetest.sha1 2022-02-12 20:08:03 +01:00
Elias Åström a6c5c8a72a Call update_groupcaps from load_enchantments
This avoids the need to call the function from on_enchant for unbreaking
and efficiency.
2022-02-12 19:43:01 +01:00
Elias Åström d898b02c8b Fix #1922 2022-02-12 19:43:01 +01:00
NO11 f3c814bf8f Merge pull request 'Add lanterns and chains' (#1983) from AFCMS/MineClone2:lanterns into master
Reviewed-on: MineClone2/MineClone2#1983
2022-02-11 13:28:55 +00:00
AFCMS 2690094a95 allow placement of lanterns on chains 2022-02-10 11:45:08 +01:00
AFCMS 23873f31f1 add french translation of `mcl_lanterns` 2022-02-09 22:19:24 +01:00
AFCMS 749d4f1a4b add lanterns translation template 2022-02-09 22:15:44 +01:00
AFCMS 8817d51d64 minecraft like lanterns placement limitations 2022-02-09 22:11:50 +01:00
AFCMS 9b375aa9e8 attemp to fix lanterns placement 2022-02-09 18:19:46 +01:00
AFCMS 6b9d4d445f Merge branch 'lanterns' of ssh://git.minetest.land:29418/AFCMS/MineClone2 into lanterns 2022-02-09 12:21:39 +01:00
AFCMS 7fbdd71081 obtimize glass detail images 2022-02-09 12:21:28 +01:00
AFCMS e138d998ef `walkover` fixes 2022-02-09 12:21:28 +01:00
AFCMS 8ca3d311fd nothing 2022-02-09 12:20:54 +01:00
AFCMS e8c3de80f4 Merge branch 'master' into lanterns 2022-02-09 11:19:45 +00:00
AFCMS 9cc088c940 fix lantern light value to fit minetest limit 2022-02-08 23:00:45 +01:00
AFCMS 6572a8c908 add lanterns, crafts, placement mechanism, doc entries 2022-02-08 22:56:20 +01:00
AFCMS ffa9d2d0fd add basic chains and lantern model and API 2022-02-08 10:58:25 +01:00
AFCMS e4f2618a69 Merge pull request 'fixes to `walkover` mod' (#1979) from AFCMS/MineClone2:walkover_fixes into master
Reviewed-on: MineClone2/MineClone2#1979
2022-01-21 09:56:59 +00:00
AFCMS 5f279e68e1 Merge branch 'walkover_fixes' of ssh://git.minetest.land:29418/AFCMS/MineClone2 into walkover_fixes 2022-01-21 09:05:09 +01:00
AFCMS 90f9f2d98d nothing, but gitea is bad 2022-01-21 09:05:01 +01:00
AFCMS a301ecf7a0 Merge branch 'master' into walkover_fixes 2022-01-21 08:04:19 +00:00
AFCMS 5bedae49d6 `walkover` fixes 2022-01-20 22:55:36 +01:00
kay27 7328549d94 Merge pull request 'Obtimize connected glass detail images' (#1978) from AFCMS/MineClone2:glass_opt into master
Reviewed-on: MineClone2/MineClone2#1978

*optimize
2022-01-20 09:31:59 +00:00
AFCMS d2fa69d4ed obtimize glass detail images 2022-01-20 10:01:59 +01:00
NO11 6f44278414 Merge pull request 'Remove lines about looking at Minecraft source code in CONTRIBUTING.md' (#1973) from GuyLiner/MineClone2:clean_room into master
Reviewed-on: MineClone2/MineClone2#1973
2022-01-19 15:58:54 +00:00
Guy Liner 9792cb5391 The project's name is Minestom, not Minestorm 2022-01-18 23:33:27 -05:00
Guy Liner 4ae323f8f8 Added back line about Minestorm 2022-01-16 21:19:03 -05:00
GuyLiner 92efe78c6f Merge branch 'master' into clean_room 2022-01-16 19:49:02 +00:00
Guy Liner 1995055d0f Removed lines about looking at Minecraft source code 2022-01-16 14:45:20 -05:00
epCode 9b881df465 Temporarily remove glitchy Elytra crash-damage
If you fly in certain directions with this damage system, you will die. also if you speed up too fast.
2022-01-06 21:55:01 +00:00
NO11 4dce90543d Merge pull request 'master' (#13) from MineClone2/MineClone2:master into master
Reviewed-on: #13
2022-01-06 16:06:36 +00:00
Lizzy Fleckenstein a8b974266c Merge pull request 'Add 1024x1024 logo (basic and small versions)' (#1947) from AFCMS/MineClone2:new_logo into master
Reviewed-on: MineClone2/MineClone2#1947
2022-01-03 17:49:54 +00:00
AFCMS 11f3ad15ba add logo 2022-01-02 18:50:15 +01:00
NO11 627c37cd97 Fix pumpkin hud 2022-01-02 12:37:20 +00:00
NO11 7cc7fb1331 Make removing of arrow entities also work with mobs, remove arrows on respawn 2022-01-02 11:06:29 +00:00
NO11 7b46225176 Remove arrow entities when the player joins to prevent killing on startup (working fix) 2022-01-01 22:59:21 +00:00
NO411 7b47a15e34 Remove arrow entities when the player leaves to prevent killing on startup 2021-12-30 14:04:53 +01:00
AFCMS e3129b057f Merge pull request 'Optional connected glass support' (#1939) from AFCMS/MineClone2:connected_glass into master
Reviewed-on: MineClone2/MineClone2#1939
2021-12-23 20:18:19 +00:00
AFCMS a7e471de62 framed stained glass 2021-12-23 18:02:43 +01:00
AFCMS 12830781f8 Merge branch 'master' into connected_glass 2021-12-23 17:29:53 +01:00
Lizzy Fleckenstein bfd1fd69d1
Fix potential crash when falling onto unknown node 2021-12-19 18:59:09 +01:00
Lizzy Fleckenstein e2360204a7
Revert "fixed daylightsensor's register_abms"
This reverts commit 5a4abcbcb7.
2021-12-12 15:55:52 +01:00
Lizzy Fleckenstein 14295cc4d7 Merge pull request 'Fixed daylightsensors' (#1928) from chmodsayshello/MineClone2:daylightsensorfix into master
Reviewed-on: MineClone2/MineClone2#1928
2021-12-10 18:31:38 +00:00
chmodsayshello 5a4abcbcb7 fixed daylightsensor's register_abms
By changing the check if a normal/inverted daylightsensor should update by turning on and off, I made them workling again
2021-12-10 13:59:31 +00:00
kay27 0c8e5dc7a4 Disable Nether portal node rotation by screwdriver 2021-12-10 03:52:14 +04:00
Lizzy Fleckenstein e4feb233e0
Fix hopper dupe 2021-12-09 18:20:24 +01:00
Lizzy Fleckenstein b945975427
Slime splitting: nil check child to prevent crash (that happened on oysterity-mcl2) 2021-12-09 18:11:05 +01:00
Lizzy Fleckenstein 0e9a56fa35
Add stacks to enchant_uniform_randomly 2021-12-07 18:19:41 +01:00
Lizzy Fleckenstein ec7e245b9d
Various fixes to the enchanting and loot system
- enchanted loot generated by mapgen now uses PseudoRandom for randomness
- prevent fishing loot from generating loot 32767 times (!!!) when only 1 is needed
- bows and fishing rods obtained from the treasure section of fishing loot are now enchanted
- there is now a function to uniform enchant items other than books
2021-12-07 17:57:18 +01:00
Lizzy Fleckenstein b3958a956d
Refactor random enchantment selection code 2021-12-07 16:16:07 +01:00
Lizzy Fleckenstein 882db9f873
Remove unused and completely unlogical enchantment_level paramenter from get_possible_enchantments 2021-12-07 15:49:12 +01:00
Lizzy Fleckenstein 261faafb7c
Fix get_possible_enchantments to not return incompatible enchantments, even if treasure enchantments are allowed 2021-12-07 15:47:23 +01:00
Lizzy Fleckenstein 92686e5412
Fix broken mcl_util.calculate_durability 2021-12-02 17:28:19 +01:00
Lizzy Fleckenstein e6b200aaf3
Fix access to ender inventory without an ender chest 2021-12-02 16:19:59 +01:00
Lizzy Fleckenstein d3015edeb9
Fix reference dupes for droppers and dispensers 2021-11-29 19:12:49 +01:00
NO11 2127bb3ef1 Merge pull request 'Fix mobs spawner count' (#1915) from TioBlocos/MineClone2:fix-mobs-spawn into master
Reviewed-on: MineClone2/MineClone2#1915
2021-11-22 12:06:12 +00:00
Glaucos Ginez 9edf277905 Fix mobs spawn count 2021-11-21 22:13:24 -03:00
Nils Dagsson Moskopp 46394e7e1f
Add obsidian boat that always sinks 2021-11-20 09:06:48 +01:00
Lizzy Fleckenstein b0aceae73d
Fix reference dupe glitches 2021-11-19 15:22:40 +01:00
NO11 9200c3fe44 Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2 2021-11-18 17:42:19 +01:00
NO11 903d1777be Use set_count instead of creating a new item and checking for enchanted books 2021-11-18 17:40:32 +01:00
Lizzy Fleckenstein 6ca5799565
Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2 2021-11-17 18:25:19 +01:00
Lizzy Fleckenstein 30528b0a2c
Fix crash when opening a chest with an unknown node on top 2021-11-17 18:25:12 +01:00
NO11 9919011aca Fix enchanted books losing their enchantments in creative inventory 2021-11-17 16:43:48 +01:00
NO11 c757e98b4f Fix #1911, error in lightning callback 2021-11-17 00:37:11 +01:00
NO11 e2b22a62ce Merge pull request 'Make dripping particles MC-like (rework drippingwater)' (#1898) from NO11/MineClone2:dripping into master
Reviewed-on: MineClone2/MineClone2#1898
2021-11-15 20:55:47 +00:00
NO11 a9804879e2 Rename drippingwater to mcl_dripping in mod.conf and readme.txt 2021-11-15 21:54:16 +01:00
NO11 d2a03ec0b9 Rename entity ids 2021-11-15 21:44:23 +01:00
NO11 7ef6613f09 Rename drippingwater mod to mcl_dripping 2021-11-15 21:39:43 +01:00
NO11 d27109d807 Merge branch 'master' into dripping 2021-11-13 19:15:49 +00:00
iliekprogrammar 79e1e2fa8f Merge pull request 'Add 64 items to inventory when creative is on' (#1899) from NO11/MineClone2:inventory into master
Reviewed-on: MineClone2/MineClone2#1899
2021-11-13 19:12:26 +00:00
NO11 fdaaf0ec49 Use on_joinplayer instead of on_newplayer 2021-11-13 18:56:52 +00:00
NO11 add97d39a6 delete overlay texture 2021-11-13 17:28:13 +00:00
NO11 bcb6251d20 Use label instead of extra texture 2021-11-13 17:26:17 +00:00
NO11 1483c45cc9 Merge branch 'master' into inventory 2021-11-13 15:28:13 +00:00
NO11 642b9db035 localize wielditem in crossbow.lua (Fix #1901) 2021-11-13 15:19:34 +00:00
NO11 d7e59f6a35 Add switch stack size overlay texture 2021-11-13 12:26:01 +00:00
NO11 d4da855570 Add button to switch between max stack size and just one item 2021-11-13 12:25:10 +00:00
NO11 30dd505985 Merge branch 'master' into inventory 2021-11-13 11:18:47 +00:00
NO11 ae8068cca6 Use stack_max instead of 64 for all items 2021-11-13 11:17:46 +00:00
iliekprogrammar bd14918543
Reduce defuse reach for charged creeper
5.2 is actually half of the estimated MC creeper defuse range, which is 10.4.
The reason for this change is to balance the creeper in MCL2 where it fuses
whilst moving making it more difficult than MC. In MC, the creeper does not move
while fusing.
2021-11-13 12:12:20 +08:00
iliekprogrammar 66c1b4a95f Merge pull request 'fix_creeper' (#1896) from Dieter44/MineClone2:fix_creeper into master
Reviewed-on: MineClone2/MineClone2#1896
2021-11-13 04:06:55 +00:00
iliekprogrammar 96c4fb60d8
Fix crash on startup during immediate runtime by mcl_burning
The crash occurs if mcl_burning:data is deserialized to nil. The cause of
mcl_burning being set to "return nil" is unknown. Therefore, when it occurs, it
will be logged as warning.
2021-11-13 10:55:24 +08:00
NO11 5515e2baa1 Add 64 items to inventory when creative is on 2021-11-12 21:49:47 +00:00
NO11 be2e4614d0 Merge pull request 'master' (#12) from MineClone2/MineClone2:master into master
Reviewed-on: #12
2021-11-12 21:46:31 +00:00
NO11 7ed964756e local luaentity 2021-11-12 18:00:04 +00:00
NO11 0e5ad8637d Merge branch 'master' into dripping 2021-11-12 17:54:30 +00:00
NO11 0cc0a7e01d Make dripping particles MC-like 2021-11-12 17:49:27 +00:00
NO11 490e40d042 Bone meal particles: add some velocity, correct glow 2021-11-12 15:41:09 +00:00
NO11 f233fb5d30 Merge pull request 'Several fixes for applying bone meal to grass (Fix #900)' (#1894) from NO11/MineClone2:bone_meal into master
Reviewed-on: MineClone2/MineClone2#1894
2021-11-12 15:02:30 +00:00
NO11 9e4e7f0695 Merge branch 'master' into bone_meal 2021-11-12 15:02:13 +00:00
NO11 2a08f31435 Use particlespawners for better performance (sponge particles) 2021-11-12 14:09:59 +00:00
iliekprogrammar 740f7583ef
Add Dieter44 to CREDITS.md 2021-11-12 02:49:18 +08:00
iliekprogrammar 0564121183
Code style for #1890 2021-11-12 02:36:17 +08:00
iliekprogrammar bca5033fb2 Merge pull request 'Implement health regeneration correctly' (#1890) from Dieter44/MineClone2:fixHealthRegen into master
Reviewed-on: MineClone2/MineClone2#1890
2021-11-11 18:33:57 +00:00
Dieter44 03d22852ee Replace mobs:boom with equivalent mcl_explosions.exlode() to fix game crash when creeper is right-clicked with flint and steel. Issue #1753 2021-11-11 16:56:44 +01:00
Dieter44 10a5f8c4bf Adding attribute hostile=true to charged creeper to fix that the charged creeper has no behavior: Issue #1756 2021-11-11 16:50:29 +01:00
Dieter44 68810a2a74 Change creeper fuse range and defuse range according to minecraft wiki: https://minecraft.fandom.com/wiki/Creeper and: https://minecraft.fandom.com/wiki/Explosion. Fix of #1689 2021-11-11 16:47:32 +01:00
Dieter44 0b6467d679 Reduce creeper run_velocity to 2.1, to fix #1691 2021-11-11 16:03:04 +01:00
NO11 8979230c42 Several fixes for applying bone meal to grass 2021-11-10 17:15:27 +00:00
NO11 fafa47d643 Merge pull request 'master' (#11) from MineClone2/MineClone2:master into bone_meal
Reviewed-on: #11
2021-11-10 17:13:54 +00:00
iliekprogrammar f61143758e
Fix small typo in API.md 2021-11-10 12:54:28 +08:00
iliekprogrammar fa22ec4dd0
Add helper functions to update/merge tables. 2021-11-10 02:50:49 +08:00
Dieter44 017bf705e9 Fixing that player can regenerate health in death screen and then respawn without HP being set to maximum 2021-11-09 19:35:32 +01:00
Lizzy Fleckenstein a7bc460fae
Fix boat and enchanting book texture glitches / warnings 2021-11-09 17:39:39 +01:00
Dieter44 e82d21040c minor changes, ipairs() replaced with pairs() 2021-11-08 19:15:56 +01:00
iliekprogrammar 0491b814dd Merge pull request 'Simple bone meal API (Fix #1862)' (#1892) from NO11/MineClone2:bone_meal into master
Reviewed-on: MineClone2/MineClone2#1892
2021-11-08 16:53:01 +00:00
Dieter44 2f05388541 Add one food_tick_timer per player instead of using one for all players. 2021-11-08 15:49:05 +01:00
Dieter44 976f522b9d Combine slowFoodTickTimer and fastFoodTickTimer to a single food_tick_timer 2021-11-08 15:33:53 +01:00
NO11 51dffc6c53 Merge branch 'master' into bone_meal 2021-11-08 13:16:39 +00:00
NO11 30ce6f8a77 Fix typo min -> max 2021-11-08 13:16:20 +00:00
Lizzy Fleckenstein a34ae040c8
Add ContentDB links 2021-11-08 14:02:22 +01:00
Lizzy Fleckenstein a410a7fabe Merge pull request 'Add OpenCollective link and credits' (#1893) from EliasFleckenstein03/MineClone2:opencollective into master
Reviewed-on: MineClone2/MineClone2#1893
2021-11-08 11:48:10 +00:00
Lizzy Fleckenstein ea46c8741b
Add OpenCollective link and credits 2021-11-07 20:29:11 +01:00
NO11 5b52deaa8a Merge branch 'master' into bone_meal 2021-11-06 13:38:20 +00:00
NO11 7bbc1e9951 Add API.md for bone meal API 2021-11-06 13:34:22 +00:00
Lizzy Fleckenstein 0dd780ee2a Merge pull request 'Implement grass palette conversion, Add sugar cane colorisation' (#1889) from EliasFleckenstein03/MineClone2:tint into master
Reviewed-on: MineClone2/MineClone2#1889
2021-11-06 13:29:39 +00:00
NO11 1b259f928b Add simple bone meal API
- callback api
- particle api
2021-11-06 13:12:03 +00:00
Dieter44 d0d60804a3 Implemented health regeneration mechanics as described in minecraft wiki. Saturation values and different regeneration speeds now used. 2021-11-04 21:01:28 +01:00
Dieter44 d1d11f9740 Fixed debug hudbars for player saturation and exhaustion when mcl_hunger_debug=true is set in .config file 2021-11-04 20:58:54 +01:00
Nils Dagsson Moskopp 4926c0560d
Speed up TGA encoding by creating fewer strings 2021-11-04 15:38:56 +01:00
Nils Dagsson Moskopp 23ca11c8e1
Use RLE compression in tga_encoder 2021-11-04 15:38:26 +01:00
Elias Fleckenstein 88e084cbca Merge pull request 'Rework XP API' (#1888) from EliasFleckenstein03/MineClone2:xp into master
Reviewed-on: MineClone2/MineClone2#1888
2021-11-04 13:36:13 +00:00
Lizzy Fleckenstein be86b603f8
Update README.md to reflect new contribution guidelines 2021-11-04 13:14:35 +01:00
iliekprogrammar f4803a35c4 Merge pull request 'Update contribution guidelines' (#1881) from EliasFleckenstein03/MineClone2:guidelines into master
Reviewed-on: MineClone2/MineClone2#1881
2021-11-04 12:06:32 +00:00
Lizzy Fleckenstein ce4c0ed4c1
free -> free/libre 2021-11-04 12:56:34 +01:00
Lizzy Fleckenstein 4a3a8841cd
Add ingame credits script to release process 2021-11-04 12:31:13 +01:00
Lizzy Fleckenstein 649f481b51
provide example for non-descriptive title 2021-11-04 12:28:36 +01:00
Lizzy Fleckenstein b937b38b1c
Separate translations and assets 2021-11-04 12:26:14 +01:00
Lizzy Fleckenstein f9e7f58492
Reword necessary PR feedback section 2021-11-04 12:21:06 +01:00
Lizzy Fleckenstein a77e79d985
where the real troublespots are -> places to investigate optimization issues 2021-11-03 21:15:20 +01:00
Lizzy Fleckenstein 24ca8252a9
community wants -> community feedback 2021-11-03 21:14:22 +01:00
Lizzy Fleckenstein c6e9d763d6
repo -> repository (in release process documentation) 2021-11-03 21:09:57 +01:00
Lizzy Fleckenstein 61d0dc8182
intrested -> interested 2021-11-03 21:09:13 +01:00
Lizzy Fleckenstein 46d1dd42d4
recieved -> received 2021-11-03 21:08:47 +01:00
Lizzy Fleckenstein 39f66eb4a0
repo -> repository 2021-11-03 21:08:11 +01:00
Lizzy Fleckenstein 18dd1cabd0
everytime -> every time 2021-11-03 21:07:28 +01:00
Lizzy Fleckenstein e70161501f
alreay -> already 2021-11-03 21:06:58 +01:00
Lizzy Fleckenstein bb6fe65aa5
inadequeate -> inadequate 2021-11-03 21:06:35 +01:00
Lizzy Fleckenstein cdf6533e0a
regulary -> regularly 2021-11-03 21:06:08 +01:00
Lizzy Fleckenstein d690797011
commited -> committed 2021-11-03 21:05:38 +01:00
Lizzy Fleckenstein 6000c29171
ressource -> resource 2021-11-03 21:04:52 +01:00
Lizzy Fleckenstein faff9316e0
minecraft -> Minecraft 2021-11-03 21:03:58 +01:00
Lizzy Fleckenstein 7c1777c53a
minetest -> Minetest 2021-11-03 21:03:17 +01:00
Lizzy Fleckenstein c2f0f0297b
Optifine -> OptiFine 2021-11-03 21:02:15 +01:00
Lizzy Fleckenstein 6473494cbc
prioritised -> prioritized 2021-11-03 21:01:43 +01:00
Lizzy Fleckenstein 4d93e13f80
Reword developer presence in public discussion rooms rule 2021-11-03 20:59:27 +01:00
Lizzy Fleckenstein 47340386e2
Turn parethesized sentence about voluntary work into normal one 2021-11-03 20:55:33 +01:00
Lizzy Fleckenstein 25f467c8ab
Merge branch 'master' into xp 2021-11-03 20:18:49 +01:00
Elias Fleckenstein c17fc81d1f Merge pull request 'Break minecart if it's near a cactus' (#1886) from NO11/MineClone2:minecart into master
Reviewed-on: MineClone2/MineClone2#1886
2021-11-03 19:18:01 +00:00
Lizzy Fleckenstein 8f9f5cc936
Merge branch 'master' into xp 2021-11-03 20:14:08 +01:00
Elias Fleckenstein 4af5d8e5e8 Merge pull request '[cherry pick from MCL5] Add missing call for on_die function' (#1887) from iliekprogrammar/MineClone2:quickfix_slime into master
Reviewed-on: MineClone2/MineClone2#1887
2021-11-03 19:11:53 +00:00
Lizzy Fleckenstein 643ded06da
Merge branch 'master' into guidelines 2021-11-03 20:04:08 +01:00
Lizzy Fleckenstein 970988cb39
Add sugar cane colorisation 2021-11-03 19:58:50 +01:00
Lizzy Fleckenstein 34f329a9d5
TextureConverter: Implement grass palette conversion
Source: https://minecraft.fandom.com/wiki/Tint
Since the MineClone2 biomes do not entirely match with the Minecraft ones I picked the Minecraft biomes that seem to match them best.
This also changes the palette index of the nether to match the desert instead of the mesa biome
and changes the color of grass blocks in item form to the default minecraft one.
2021-11-03 19:57:21 +01:00
Lizzy Fleckenstein a4e73886d5
Rework XP API 2021-11-03 19:36:57 +01:00
Lizzy Fleckenstein 148575a05b
Remove unused hud_manager.hud_exists function 2021-11-03 16:28:13 +01:00
iliekprogrammar 0baffeced3 Merge branch 'master' into quickfix_slime 2021-11-03 07:01:37 +00:00
Nils Dagsson Moskopp 2607d40f1f
Add script to show packets count from debug logs
Mineclonia has inherited mods from MineClone 2 that send a lot of network
packets. This behaviour wastes bandwith and is most likely a major reason
for the unusually high amount of lag that MineClone2 and Mineclonia have.

Many network packets that are sent by Mineclonia are entirely useless.
Analyzing minetest log files to figure out what kind of packets are
sent and how often is a first step in getting rid of useless traffic.
2021-11-03 14:57:18 +08:00
Artem Arbatsky db696d0e2b
Add missing call for on_die function 2021-11-03 10:11:06 +08:00
NO11 f09923ded9 Merge branch 'master' into minecart 2021-11-02 22:01:54 +00:00
NO11 0b9cbdb20a Merge branch 'minecart' of https://git.minetest.land/NO11/MineClone2 into minecart 2021-11-02 22:58:34 +01:00
NO11 c52fda154b Break minecart if it's near a cactus (Fix #924) 2021-11-02 22:58:03 +01:00
NO11 28b7304211 Break minecart it's near a cactus (Fix #924) 2021-11-02 22:55:49 +01:00
NO11 1518eb81cb Merge pull request 'Remove small gray border of buttons in creative inventory pages' (#1883) from NO11/MineClone2:inventory into master
Reviewed-on: MineClone2/MineClone2#1883
2021-10-30 12:22:45 +00:00
NO11 4e0bb0d120 Merge branch 'master' into inventory 2021-10-28 09:47:39 +00:00
NO11 5b37f56005 Remove small gray border of buttons in creative inventory pages 2021-10-28 09:43:14 +00:00
NO11 aaee3b6de7 Merge pull request 'Totem particles (Fix #1745)' (#1768) from totem_particles into master
Reviewed-on: MineClone2/MineClone2#1768
2021-10-28 09:08:17 +00:00
NO11 6025a3d7d4 Merge branch 'master' into totem_particles 2021-10-28 09:06:09 +00:00
Lizzy Fleckenstein bbdd8f55eb
Reword 'reporting issues' part in 'testing pull requests' section 2021-10-28 09:34:39 +02:00
Lizzy Fleckenstein 6fd8ff8865
testing -> test 2021-10-27 18:54:39 +02:00
Lizzy Fleckenstein 11e364b3ec
Give development target it's own headline 2021-10-27 18:52:26 +02:00
Lizzy Fleckenstein 4db9952a84
if -> only when 2021-10-27 18:48:38 +02:00
Lizzy Fleckenstein fb2a501a9c
Keep our guidelines -> Stick to our guidelines 2021-10-27 18:47:38 +02:00
Lizzy Fleckenstein 938911e7e3
even help using -> assist you use 2021-10-27 18:46:58 +02:00
Lizzy Fleckenstein c1934c4f3a
Reword feature request alignment with development goals guideline 2021-10-27 18:45:37 +02:00
Lizzy Fleckenstein 61dccfb9e5
Reword up to date guideline for feature requests 2021-10-27 18:44:10 +02:00
Lizzy Fleckenstein 90796ec7b4
can unfortunately not -> unfortunately cannot 2021-10-27 18:42:11 +02:00
Lizzy Fleckenstein d30e014233
Mineclone2 -> MineClone2 2021-10-27 18:40:45 +02:00
NO11 19689dd857 Use enchanted golden apple for thing banner 2021-10-26 16:50:10 +00:00
NO11 b78e7b3e4d Merge branch 'master' into totem_particles 2021-10-26 14:48:07 +00:00
Lizzy Fleckenstein 835076ea4b
Document asset contributions 2021-10-26 14:28:40 +02:00
Lizzy Fleckenstein 797da20fa7
Add script to automatically generate ingame credits from CREDITS.md 2021-10-26 13:08:07 +02:00
Lizzy Fleckenstein c315d155e1
Update CREDITS.md 2021-10-26 12:35:19 +02:00
Lizzy Fleckenstein 0c567c7921
Update maintainer section in CREDITS.md (leave kay27 in, but remove jordan since he never did any maintainance work) 2021-10-26 12:22:21 +02:00
Lizzy Fleckenstein 64ebdd0f18
Update line length in licensing section 2021-10-26 12:16:00 +02:00
Lizzy Fleckenstein 1bd972bff7
Split maintainer responsibilities into list 2021-10-26 12:11:18 +02:00
Lizzy Fleckenstein ea0f52763c
Split developer responsibilities into a list 2021-10-26 12:04:16 +02:00
Lizzy Fleckenstein 70425e9f30
Split profiling section 2021-10-26 11:59:32 +02:00
Lizzy Fleckenstein a0789e72f0
Move licensing down, just before crediting 2021-10-26 11:57:17 +02:00
Lizzy Fleckenstein e341b2a6fe
Split code contributor section 2021-10-26 11:55:08 +02:00
Lizzy Fleckenstein 4e8e6fbb51
Update development target section 2021-10-26 11:42:33 +02:00
Lizzy Fleckenstein efbe3c93b4
Merge branch 'master' into guidelines 2021-10-26 11:37:45 +02:00
Lizzy Fleckenstein 0369465630
Add todoporlalibertad to translation credits 2021-10-25 22:59:21 +02:00
Lizzy Fleckenstein 30f7c638f3
mcl_enchanting: Add spanish translations and update template
Credit to: todoporlalibertad <todoporlalibertad@riseup.net>
Reviewed by j45
2021-10-25 22:55:48 +02:00
NO11 eccba76732 Use math.floor instead of math.round 2021-10-25 20:25:34 +00:00
Lizzy Fleckenstein f3d16d264c
Add notice about Minetest not supporting capital letters in modnames 2021-10-25 20:41:09 +02:00
Lizzy Fleckenstein da5e703675
Clarify that 'make atomic commits' is just an advise 2021-10-25 20:36:29 +02:00
Lizzy Fleckenstein 6466061796
Add back function declaration guideline, provide examples for code style guidelines 2021-10-25 20:33:45 +02:00
Lizzy Fleckenstein a80438d58e
Advice about atomic commits 2021-10-25 20:21:45 +02:00
Lizzy Fleckenstein 47fbb0c176
Mod naming convention, snake case convention 2021-10-25 20:18:03 +02:00
Lizzy Fleckenstein fba30eccd6
Add rule about double quotes for strings 2021-10-25 20:04:51 +02:00
Lizzy Fleckenstein 6e7827902c
Use the wording 'reproduce a problem' in the reporting bugs section 2021-10-25 20:04:08 +02:00
Lizzy Fleckenstein a877c615a5
Clarify tabs usage: Use spaces for alignment 2021-10-25 20:01:12 +02:00
Lizzy Fleckenstein 7f43ba6e36
Clarify rule about merging upstream 2021-10-25 19:56:03 +02:00
Lizzy Fleckenstein 5edf27ac88
Reword 'bug responsibility' section 2021-10-25 19:54:10 +02:00
Lizzy Fleckenstein c998788435
Reword 'help for junior devs' section 2021-10-25 19:48:14 +02:00
Lizzy Fleckenstein 7707c3132c
Fix duplicate and forgotten word in 'helping as a programmer' section 2021-10-25 19:46:13 +02:00
Lizzy Fleckenstein 756d28e2c6
Use iliekprogrammar's wording in the begging rule 2021-10-25 19:31:07 +02:00
Lizzy Fleckenstein 3a422e3afc
Reword 'understandable English' rule 2021-10-25 19:25:48 +02:00
Lizzy Fleckenstein 362de4c920
Add minecraft wiki link 2021-10-25 19:16:24 +02:00
Lizzy Fleckenstein 6580bcab5a
Add info about Minestorm and add links for MCP and Minestorm 2021-10-25 19:15:26 +02:00
Lizzy Fleckenstein a6def5e9bb
Remove guideline about localizing variables 2021-10-25 19:14:53 +02:00
NO11 6d22262c53 Merge branch 'master' into totem_particles 2021-10-25 17:09:24 +00:00
NO11 7489010152 Use particlespawners instead of single particles 2021-10-25 17:08:38 +00:00
Lizzy Fleckenstein d224236388
Consistency about line length (not a convention, just something applied to this file) 2021-10-25 18:58:30 +02:00
Lizzy Fleckenstein 27f35fe422
Add info about discord server in 'Let us know your opinion' section 2021-10-25 18:48:11 +02:00
Lizzy Fleckenstein 4b1606eaee
Update 'git for non-programmers' section 2021-10-25 18:26:31 +02:00
Lizzy Fleckenstein 4776487f83
Merge branch 'guidelines' of https://git.minetest.land/EliasFleckenstein03/MineClone2 into guidelines 2021-10-25 17:21:09 +02:00
Lizzy Fleckenstein 664244d25c
Make sure PRs are tested at least twice before being merged 2021-10-25 17:20:58 +02:00
Lizzy Fleckenstein b9999195ec
Add publishing releases to my responsibility field 2021-10-25 16:52:56 +02:00
Elias Fleckenstein b18e077ba3 Markdown fix to development target info
Signed-off-by: Elias Fleckenstein <eliasfleckenstein03@noreply.git.minetest.land>
2021-10-25 08:47:56 +00:00
Elias Fleckenstein f3693138c8 Use proper English
Signed-off-by: Elias Fleckenstein <eliasfleckenstein03@noreply.git.minetest.land>
2021-10-25 08:46:33 +00:00
Elias Fleckenstein 6e94550a12 Clarification about tab indent
Signed-off-by: Elias Fleckenstein <eliasfleckenstein03@noreply.git.minetest.land>
2021-10-25 08:44:12 +00:00
NO11 d85f143fde Merge pull request 'Add crossbows' (#10) from MineClone2/MineClone2:master into master
Reviewed-on: #10
2021-10-24 19:36:45 +00:00
NO11 dafe860e56 simple totem particles 2021-10-24 19:31:51 +00:00
Lizzy Fleckenstein 832e634e3b
Use tabs instead of spaces, spaces are braindead 2021-10-24 20:44:37 +02:00
Lizzy Fleckenstein 5c55ddff1e
Delete merge artifact 2021-10-24 20:21:54 +02:00
Lizzy Fleckenstein a28bfebb9b
Merge branch 'master' into guidelines 2021-10-24 20:19:04 +02:00
Lizzy Fleckenstein e5c5a78553
Update contribution guidelines 2021-10-24 20:13:34 +02:00
epCode 1c458a2e72 Add crossbows 2021-10-15 12:00:37 -07:00
NO11 94e1d82b45 Merge pull request 'master' (#9) from MineClone2/MineClone2:master into master
Reviewed-on: #9
2021-10-09 21:19:43 +00:00
NO11 9ccf8de606 Fix crash on startup if mcl_playersSleepingPercentage is not defined (#1874) 2021-10-09 14:41:56 +00:00
NO11 19b5a5aac7 Merge pull request 'Add playersSleepingPercentage server setting (Fix #920)' (#1861) from NO11/MineClone2:beds into master
Reviewed-on: MineClone2/MineClone2#1861
2021-10-07 15:14:03 +00:00
NO11 6803d22dbd Merge pull request 'Give players fly priv when creative is enabled' (#1865) from NO11/MineClone2:privs into master
Reviewed-on: MineClone2/MineClone2#1865
2021-10-07 15:13:04 +00:00
NO11 0584d16569 add lightning API support for mobs 2021-10-05 04:15:48 +00:00
NO11 03829dd518 fix typo 2021-10-05 04:15:48 +00:00
NO11 72ea9069bd correct lightning API.md a bit 2021-10-05 04:15:48 +00:00
NO11 9188467a6a add API.md for lightning mod 2021-10-05 04:15:48 +00:00
NO11 fe91d7f3e0 use mcl_util.replace_mob function to simplify dispenser code 2021-10-05 04:15:48 +00:00
NO11 463fe2af5f use mcl_util.replace_mob function to simplify lightning code 2021-10-05 04:15:48 +00:00
NO11 e4af02ea52 Add function to replace mobs 2021-10-05 04:15:48 +00:00
NO11 8e3f9d2169 add basic lightning API 2021-10-05 04:15:48 +00:00
NO11 a410d17306 Fix that all of new players' default_privs are removed 2021-09-30 20:14:13 +00:00
AFCMS e9437e9e1e fix crash then using function in `_mcl_armor_[texture, preview]` tool field 2021-09-29 21:06:51 +02:00
AFCMS e40ed91674 Merge branch 'master' of ssh://git.minetest.land:29418/MineClone2/MineClone2 2021-09-29 19:59:33 +02:00
NO11 16c73c1cb6 Add forgotten `=` 2021-09-28 13:16:19 +00:00
NO11 03be736566 Dont skip night if no players are in bed 2021-09-27 20:13:12 +00:00
NO11 8697b38d60 Remove on_newplayer ... 2021-09-27 20:00:11 +00:00
NO11 e83438e42c Update mcl_bed README.txt 2021-09-21 18:19:07 +00:00
NO11 71f448537c Remove unused setting from settingtypes.txt 2021-09-21 18:14:24 +00:00
NO11 df1d8077e6 Some fixes for mcl_beds
- remove enable_bed_night_skip setting (mcl_playersSleepingPercentage setting can be used to enable disable night skip)
- make it possible to change mcl_playersSleepingPercentage ingame
- fix weird bug which allowed only numbers <= 0
2021-09-21 18:07:36 +00:00
NO11 89e90b13eb Use on_newplayer 2021-09-20 14:16:59 +00:00
AFCMS b0cf07a020 Mise à jour de 'mods/ITEMS/mcl_core/locale/mcl_core.ru.tr' 2021-09-20 07:59:00 +00:00
AFCMS e36a8c5acf Mise à jour de 'mods/ITEMS/mcl_core/locale/mcl_core.pl.tr' 2021-09-20 07:58:25 +00:00
AFCMS b2af00db22 Mise à jour de 'mods/ITEMS/mcl_core/locale/mcl_core.es.tr' 2021-09-20 07:57:04 +00:00
AFCMS e8134345d4 Mise à jour de 'mods/ITEMS/mcl_core/locale/mcl_core.de.tr' 2021-09-20 07:56:25 +00:00
AFCMS e0c7e938de Mise à jour de 'mods/ITEMS/mcl_core/locale/mcl_core.fr.tr' 2021-09-20 07:55:51 +00:00
AFCMS 3e54acce9d fix emerald help text translation 2021-09-20 09:51:37 +02:00
AFCMS 47fff66a41 Merge pull request 'Update description of emerald' (#1866) from ztianyang/MineClone2:emerald-desc into master
Reviewed-on: MineClone2/MineClone2#1866
2021-09-20 07:36:36 +00:00
ztianyang ac8383dd4b Merge branch 'master' into emerald-desc 2021-09-20 01:54:00 +00:00
NO11 c6003398b5 Remove chain armor recipes, because villagers spawn now 2021-09-19 13:14:36 +00:00
NO11 f10d579d9c Only change fly priv on join if it wasn't revoked or granted 2021-09-19 12:07:21 +00:00
NO11 fed43586f2 fix typo 2021-09-19 11:28:07 +00:00
NO11 18a83fa5d7 Fix typo 2021-09-19 11:18:09 +00:00
NO11 0e15accada Enable fly in creative mode 2021-09-19 11:15:19 +00:00
NO11 4194a76db0 Merge pull request 'master' (#8) from MineClone2/MineClone2:master into master
Reviewed-on: #8
2021-09-19 09:15:43 +00:00
Lizzy Fleckenstein 27e4bd6d09 Fix burning entity packet spam
- Use upright_sprite for 3rd person flame display, which is both closer to minecraft and allows for client side texture animation
- Take care of flame HUD in the MineClone2Client
2021-09-18 22:28:20 +02:00
Nils Dagsson Moskopp 256de2bc36 Log warning for non-serializable item entity fix 2021-09-15 18:10:40 +02:00
sfan5 693a5317ef Fix non-serializable item entity unload crash
Some items, like shulkers or books, can have so much metadata that the
corresponding item entity can not be serialized by the Minetest engine.

Without this patch, dropping such an item and then moving away crashes
Minetest, as it can not serialize the entity with serializeString16()
when unloading a map block.

The patch resets the overlong metadata of non-serializable item entities.
This avoids a crash and makes it possible to retrieve a “sanitized” item
without metadata when the mapblock containing the item entity is reloaded.

Originally sfan5 guessed the maximum possible item entity serialization size
that would not lead to a crash as 65530 bytes, but anon5 calculated it to be
actually 65487 bytes. This has been experimentally verified by erlehmann.
2021-09-15 18:10:32 +02:00
Nils Dagsson Moskopp 95c4d6472b Send FOV packets only when necessary
Before this change, about 10 to 30 FOV packets were sent from the server
to each connected client each second. This patch only sends FOV packets
when the FOV actually needs to be changed, i.e. when the player starts
or stops sprinting.
2021-09-15 18:08:58 +02:00
Wuzzy 1c192f4fbb Do not send useless HUDCHANGE packets
Several mods set or unset the visibility of a HUD bar way too often (e.g.
in a globalstep handler), causing the server to send a lot of superfluous
HUDCHANGE packets to each client. Returning from hb.hide_hudbar() early
if HUD bar visibility would not change prevents sending these packets.
2021-09-15 17:47:35 +02:00
NO11 c22c2063ad Merge branch 'master' into beds 2021-09-12 12:53:01 +00:00
NO11 410b7c7844 Update german translation for mcl_beds 2021-09-12 12:52:26 +00:00
NO11 9f9799d96e Update template.txt in mcl_beds 2021-09-12 12:50:54 +00:00
NO11 cd84c472dc Add translation support. 2021-09-12 12:49:39 +00:00
NO11 0bc9ab9233 Add playersSleepingPercentage setting to settingtypes.txt 2021-09-12 12:23:28 +00:00
NO11 89ff666a6a Add playersSleepingPercentage server setting (Fix #920) 2021-09-12 12:21:18 +00:00
NO11 1a5339e907 Only use the shears once in dispenser if there are more mobs in front of the dispenser 2021-09-08 14:22:53 +00:00
NO11 aa930dc2b8 Merge pull request 'Fix strange behaviour when filling end portal with bedrock inside (#1749)' (#1853) from NO11/MineClone2:end_portal into master
Reviewed-on: MineClone2/MineClone2#1853
2021-09-07 18:04:05 +00:00
NO11 79463738f6 Merge pull request 'Make it possible to use shears in the dispenser for mobs (Fix #1233)' (#1854) from NO11/MineClone2:dispenser into master
Reviewed-on: MineClone2/MineClone2#1854
2021-09-07 18:03:19 +00:00
NO11 79d8593d34 Merge pull request 'Destroy objects near cactus faster (make it possible to throw items at a cactus)' (#1856) from NO11/MineClone2:cactus into master
Reviewed-on: MineClone2/MineClone2#1856
2021-09-07 18:00:53 +00:00
NO11 dc8436fdf9 Destroy objects near cactus faster (make it possible to throw items at a cactus) 2021-09-06 14:34:25 +00:00
NO11 f41cea71fd Make it possible to use shears in the dispenser for mobs (Fix #1233) 2021-09-06 13:30:08 +00:00
NO11 5fedd914fb Fix strange behaviour when filling end portal with bedrock inside (#1749) 2021-09-04 19:14:08 +00:00
Elias Fleckenstein a8d09338a9 Merge pull request 'Added spawn egg for killer rabbit' (#1704) from talamh/MineClone2:master into master
Reviewed-on: MineClone2/MineClone2#1704
2021-09-04 10:21:18 +00:00
NO11 872e3e74d3 Merge pull request 'Make cactus mechanisms more MC like (Fix #1741)' (#1851) from NO11/MineClone2:cactus into master
Reviewed-on: MineClone2/MineClone2#1851
2021-09-03 16:20:14 +00:00
NO11 bf62eb33fa Change label of cactus abm 2021-09-03 14:06:21 +00:00
NO11 0da7b3fbda Make cactus mechanisms more MC like (Fix #1741) 2021-09-02 20:38:01 +00:00
Elias Fleckenstein 3669321828 Merge pull request 'Support tables for `_repair_material`' (#1850) from NO11/MineClone2:anvils into master
Reviewed-on: MineClone2/MineClone2#1850
2021-09-01 11:04:46 +00:00
NO11 ca086109bf support tables for `_repair_material` 2021-08-31 21:04:57 +00:00
NO11 6c6d40eb9d Merge pull request 'master' (#7) from MineClone2/MineClone2:master into master
Reviewed-on: #7
2021-08-31 21:02:39 +00:00
NO11 2b322a451f remove space 2021-08-26 10:17:15 +00:00
NO11 f0af15fcd8 Make anvil selection/collision box more MC like 2021-08-26 10:14:57 +00:00
AFCMS af8e88f44c fix error in `mcl_title` documentation 2021-08-24 08:25:42 +02:00
AFCMS 2d1a43396f Merge pull request 'Title HUD API' (#1778) from title-API into master
Reviewed-on: MineClone2/MineClone2#1778
2021-08-20 12:31:54 +00:00
AFCMS df4b8e64cc finish `mcl_title` API + doc 2021-08-19 19:21:33 +02:00
AFCMS 40898d3e9d WIP bold and italic support 2021-08-16 14:19:50 +02:00
AFCMS 58a292a4f3 fix inconsistency 2021-08-16 13:48:08 +02:00
AFCMS fe62189019 Update French translation (part 1) 2021-08-13 11:35:18 +02:00
NO11 4802b610c3 Merge pull request 'Add MC like nodebox for anvils' (#1848) from NO11/MineClone2:anvil_nodebox into master
Reviewed-on: MineClone2/MineClone2#1848
2021-08-11 15:46:57 +00:00
NO11 cb55c36863 Correct the texture of anvils
Because of the new node_nox, the textures have to be a little bit bigger.
2021-08-11 15:44:43 +00:00
NO11 f8dcf05670 Add MC like nodebox for anvils 2021-08-11 15:41:45 +00:00
NO11 7e0bb036f4 Merge pull request 'master' (#5) from MineClone2/MineClone2:master into master
Reviewed-on: #5
2021-08-11 15:38:44 +00:00
NO11 664c238137 Add german translation for the bow/fishing rod desc 2021-08-06 10:52:55 +00:00
Elias Fleckenstein efab5a1cf5 Merge pull request 'Fix warning in `mcl_end`' (#1834) from Emojigit/MineClone2:fork-20210710-fixwarn into master
Reviewed-on: MineClone2/MineClone2#1834
2021-08-06 10:45:33 +00:00
NO11 d76a7daf2d Merge pull request 'Make bows and fishing rods show their durability in description (Fixes issue #1773)' (#1847) from Emily2255/MineClone2:fishingroddurability into master
Reviewed-on: MineClone2/MineClone2#1847
2021-08-06 10:41:34 +00:00
Emily 5bb57a81ad Add durability tooltip to translation template 2021-08-06 11:55:27 +02:00
Emily df0c1f1dd1 Make bows and fishing rods show their durability in description (Fixes issue #1773) 2021-08-06 11:14:17 +02:00
NO11 5c563d6ffd Make eating particles much more MC like! 2021-08-02 12:24:34 +00:00
NO11 4aabd7d9e7 Make size/position of potion HUD more MC like 2021-08-01 12:10:00 +00:00
Elias Fleckenstein 88f253bf66 Merge pull request 'raycast based buckets' (#1811) from buckets into master
Reviewed-on: MineClone2/MineClone2#1811
2021-07-26 16:59:15 +00:00
NO11 289ba826ba Merge pull request 'Fix #1842 (several fixes for `mcl_item_id`)' (#1843) from NO11/MineClone2:item_id_fixes into master
Reviewed-on: MineClone2/MineClone2#1843
2021-07-24 19:15:53 +00:00
NO11 4846076c8f `mcl_item_id` simplify code 2021-07-24 19:07:44 +00:00
NO11 5c5c405ccf Add missing check 2021-07-24 15:19:10 +00:00
NO11 65d33b935a Add API-md for `mcl_item_id` 2021-07-24 14:45:55 +00:00
NO11 c05e57efb1 Fix some crashes with set_mod_namespace and bugs 2021-07-24 14:09:47 +00:00
NO11 e44e9eaf62 Fix typo 2021-07-23 21:35:10 +00:00
NO11 09a68443cd Better fix for #1842 (make other mods not using "mineclone" name space for item ids) 2021-07-23 16:12:43 +00:00
NO11 75b425ffd7 Fix #1842 make other mods not using "mineclone" name space for item ids 2021-07-23 12:23:30 +00:00
NO11 0a9ea7e46a Merge pull request 'master' (#4) from MineClone2/MineClone2:master into master
Reviewed-on: #4
2021-07-23 12:18:22 +00:00
NO11 a44d9643ae Fix several problems in `mcl_item_id` 2021-07-22 19:23:48 +00:00
AFCMS a47630035d Merge branch 'master' of ssh://git.minetest.land:29418/MineClone2/MineClone2 2021-07-22 13:44:14 +02:00
AFCMS 667ef5cad5 cache doc modpath 2021-07-22 00:46:43 +02:00
AFCMS fef23d0b6f fix missing depend to `mcl_credits` of `mcl_portals` 2021-07-22 00:39:05 +02:00
NO11 a0d52010bf Fix that aliases attemp to register mineclone:book_enchanted again and again 2021-07-21 22:16:37 +00:00
AFCMS 44063bca93 Merge branch 'master' into buckets 2021-07-21 18:21:27 +02:00
AFCMS e58bb6d859 Merge branch 'master' into title-API 2021-07-21 18:21:16 +02:00
NO11 31d3ea8a87 Fix #1801 (add better texture for golden boots) 2021-07-20 20:09:43 +00:00
AFCMS 13536baed8 Merge branch 'master' into title-API 2021-07-20 20:47:08 +02:00
AFCMS 6069bb4a38 Merge branch 'master' of ssh://git.minetest.land:29418/MineClone2/MineClone2 2021-07-20 19:26:04 +02:00
AFCMS c31c852a6e add documentation 2021-07-20 16:14:34 +02:00
AFCMS b5f7ae5458 working implementation + support of other mods 2021-07-20 15:47:26 +02:00
AFCMS 9254bab971 Merge branch 'master' into title-API 2021-07-20 15:23:15 +02:00
AFCMS 999b82c94a small documentation graphical improvement 2021-07-20 15:21:07 +02:00
NO11 a83dd8548f Merge pull request 'Add item IDs to the description of items' (#1841) from NO11/MineClone2:item_id into master
Reviewed-on: MineClone2/MineClone2#1841
2021-07-20 11:57:33 +00:00
Tianyang Zhang 559cf85c94 Improve description of emerald 2021-07-19 09:12:39 -07:00
NO11 96e8e6a86f Use mineclone: instead of mineclone2: for item IDs 2021-07-19 12:21:30 +00:00
NO11 801d9a2571 Remove some spaces 2021-07-18 18:01:55 +00:00
NO11 f2a4d6bd56 Add item id setting 2021-07-18 17:23:12 +00:00
NO11 48166625d4 Add mcl_item_id mod 2021-07-18 17:21:53 +00:00
NO11 a2e0cf83bc Merge pull request 'master' (#2) from MineClone2/MineClone2:master into master
Reviewed-on: #2
2021-07-18 17:19:54 +00:00
AFCMS b364faa7c7 make bucket use 5 lenght raycast 2021-07-17 16:22:46 +02:00
Tianyang Zhang 60fcafeee4 Update description of emerald 2021-07-15 19:25:32 -07:00
SmallJoker 9d9e213012 Fix some implicit hard and soft-dependencies
These issues were found while testing minetest#8603 and are caused by relying on the undefined mod loading order
2021-07-16 06:18:54 +04:00
AFCMS 49bde37a5e rewrite README to markdown 2021-07-15 01:03:50 +02:00
AFCMS dc17cc91a3 make raycast start from player head 2021-07-15 00:01:56 +02:00
AFCMS 873a1e73dc fix documentation 2021-07-14 15:22:27 +02:00
AFCMS 8fff20eec9 fix misleading API 2021-07-14 15:18:12 +02:00
AFCMS ec6086d8e6 cleanup 2021-07-14 15:14:23 +02:00
AFCMS 6d7aafe0d4 Revert "more mt like API (improved readability)"
This reverts commit 88e59d3592.
2021-07-14 15:13:40 +02:00
AFCMS 91adfcbb1d Merge branch 'master' into buckets 2021-07-14 15:13:20 +02:00
AFCMS 8958aa7b12 Merge branch 'master' into buckets 2021-07-14 15:12:53 +02:00
AFCMS cf5703d528 fix luacheck warnings 2021-07-14 11:53:37 +02:00
AFCMS 88e59d3592 more mt like API (improved readability) 2021-07-14 11:52:27 +02:00
AFCMS cd08df175c add better documentation 2021-07-14 11:41:09 +02:00
AFCMS ca277b6769 mcl_bucket code refactoring + fix extra_check noot working 2021-07-14 11:29:15 +02:00
AFCMS b0127fc1c3 fix bucket dispense function 2021-07-14 09:18:15 +02:00
AFCMS d26b1b1402 use mcl_util.call_on_rightclick insteed of current implementation 2021-07-14 09:10:01 +02:00
NO11 549bdeb6e9 Remove object:is_player 2021-07-12 21:41:57 +00:00
NO11 ecfb615c89 Merge branch 'master' into totem_particles 2021-07-12 19:02:02 +00:00
epCode 960b653979 fix #1299 2021-07-12 11:50:37 -07:00
NO11 5ceb48fcb1 Faster rgb to hex 2021-07-12 18:05:52 +00:00
NO11 f894153b8a Merge pull request 'Fix #1808 (Make end credits speed up when pressing jump)' (#1835) from NO11/MineClone2:credits into master
Reviewed-on: MineClone2/MineClone2#1835
2021-07-12 13:27:24 +00:00
NO11 848f1489e8 Add german translation 2021-07-11 11:44:00 +00:00
NO11 a0d3f51745 Add template for translations 2021-07-11 11:43:28 +00:00
NO11 46d48ccf2f Add support for translation 2021-07-11 11:42:12 +00:00
NO11 f46c4ebad7 Simplify code 2021-07-11 11:11:22 +00:00
NO11 b7e6db537b Support new credits background 2021-07-10 17:32:01 +00:00
NO11 357474e32f Add better credits background 2021-07-10 17:28:24 +00:00
NO11 b6eb0ab66c Fix #1808 (Make end credits speed up when pressing jump) 2021-07-10 15:12:41 +00:00
1F616EMO d2f7d31360
Fix warning in `mcl_end`
This fixes:
```
2021-07-10 10:00:58: WARNING[Main]: get_mapgen_params is deprecated; use get_mapgen_setting instead (at .../../games/MineClone2/mods/ITEMS/mcl_end/chorus_plant.lua:456)
```
2021-07-10 10:16:55 +08:00
AFCMS 8e931e92f5 refactor mcl_title to be more efficient 2021-07-09 11:34:23 +02:00
AFCMS cbfec5c5c8 Merge branch 'master' into title-API 2021-07-08 22:36:56 +02:00
NO11 509568b4b0 Use real Minecraft colors for totem particles! 2021-07-08 16:49:19 +00:00
Lizzy Fleckenstein 6e1758400e Remove feature freeze notice from README 2021-07-08 15:39:08 +02:00
cora c558e30ea5 Fix server crash when players dig unknown nodes
Digging unknown nodes crashes the Clamity Minetest server, which
runs modified Minetest: https://github.com/ClamityAnarchy/minetest
Crashes did occur with commit d5434bf008 of that Minetest version.

This commit makes unknown nodes explicitly not harvestable.
2021-07-08 15:33:24 +02:00
Lizzy Fleckenstein fb01e61946 Fix server crash when dispensing an unknown item
This works similar to 2aafb2f2d01a6ece9ed4642a7081c53dbf22f773, however it is a cleaner way to do it.
2021-07-08 15:31:27 +02:00
Lizzy Fleckenstein 8445a9ddec Merge branch 'master' of https://git.minetest.land/MineClone2/MineClone2 2021-07-08 15:20:44 +02:00
cora 3b2a25a6cb Merge pull request 'mcl_inventory: Remove _mcl_autogroup dependency from mcl_inventory' (#76) from fix_inventory_depends into master
Reviewed-on: Mineclonia/Mineclonia#76
Reviewed-by: cora <cora@noreply.git.minetest.land>
2021-07-08 15:20:36 +02:00
Lizzy Fleckenstein 8f584be235 Fix #1814 - Don't open crafting table formspec if player is sneaking 2021-07-08 15:03:06 +02:00
Elias Fleckenstein 94cbb2b802 Merge pull request 'Update links in README.md' (#1831) from links into master
Reviewed-on: MineClone2/MineClone2#1831
2021-07-08 12:14:20 +00:00
NO11 1471521709 Merge branch 'master' into totem_particles 2021-07-07 09:49:33 +00:00
My favourite Minetest cheat clients are Dragonfire and Waspsaliva. 2f22ce79cc Merge pull request 'ITEMS/mcl_banners: Allow more layers for banners with gradients' (#74) from e/Mineclonia:banner-gradient-limits into master
Reviewed-on: Mineclonia/Mineclonia#74
Reviewed-by: Elias Åström <ryvnf@riseup.net>
Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
2021-07-06 11:20:42 +02:00
My favourite Minetest cheat clients are Dragonfire and Waspsaliva. ae2c5ede30 Merge pull request 'Remove wrong preview banner crafting recipes' (#55) from banner-crafting-fix into master
Reviewed-on: Mineclonia/Mineclonia#55
Reviewed-by: E <e@noreply.git.minetest.land>
2021-07-06 11:20:16 +02:00
Elias Fleckenstein f4a30959ce Update 'README.md' 2021-07-06 09:01:36 +00:00
Lizzy Fleckenstein b22e4ae99d Update links in README.md 2021-07-06 11:02:59 +02:00
Elias Fleckenstein 27f4c210c7 Merge pull request 'Fix #1746 (make anvils destroy items when falling)' (#1830) from anvils into master
Reviewed-on: MineClone2/MineClone2#1830
2021-07-06 07:56:42 +00:00
NO11 091622f855 Merge branch 'master' into anvils 2021-07-05 17:05:14 +00:00
NO11 5cc4fe955f Remove old code of making anvils destroy items when falling 2021-07-05 12:30:01 +00:00
NO11 4afdea56db Move code of making anvils destroy items when falling 2021-07-05 12:28:14 +00:00
Nils Dagsson Moskopp 0a474ee578 Reduce snow layer silk touch drop amount
It was possible to duplicate snow layers by placing them and then mining
them using a tool enchanted with silk touch. This commit fixes the “snow
dupe” by reducing the amount of snow layers dropped in this case by one.
2021-07-05 11:47:14 +02:00
NO11 d45e1c07bd Remove unnecessary code 2021-07-03 12:19:49 +00:00
NO11 21992dc265 Fix #1746 (make anvils destroy items when falling) 2021-07-03 12:10:32 +00:00
AFCMS a9ceeabc4b fix typo in mcl_craftguide 2021-06-28 13:46:18 +02:00
AFCMS 16d79c38ce fix typo in mcl_enchanting french translation 2021-06-26 23:48:59 +02:00
AFCMS 6bef350be4 baisc glass support 2021-06-19 00:58:05 +02:00
AFCMS 2624343c30 Merge branch 'master' into buckets 2021-06-14 14:36:41 +02:00
AFCMS 30e2e0d70a test values 2021-06-14 14:36:17 +02:00
AFCMS 40f4287ff2 new buckets fixes 2021-06-12 12:21:01 +02:00
AFCMS f70dbb8cfa Merge branch 'master' into buckets 2021-06-12 10:12:51 +02:00
NO11 ee2fa60cae local totem particle position 2021-06-09 14:47:42 +00:00
NO11 0795862c5c Merge branch 'master' into totem_particles 2021-06-08 19:00:43 +00:00
NO11 99ccd9ea4c Fix possible crash 2021-06-08 15:13:00 +00:00
AFCMS 2603c4768b mcl_title: basic mc like layout (collide with other mods) 2021-06-07 22:32:05 +02:00
AFCMS c642f9e2f7 Merge branch 'master' into title-API 2021-06-07 20:09:11 +02:00
NO11 1e0ffed26b Merge branch 'master' into totem_particles 2021-06-07 17:16:41 +00:00
NO11 ee21a24fb6 Don't register a separate entity for every particle 2021-06-07 17:13:50 +00:00
AFCMS 881f0b0a71 Merge branch 'master' into title-API 2021-06-04 19:10:52 +02:00
AFCMS a21b14e707 Merge branch 'master' into title-API 2021-06-02 17:59:05 +02:00
AFCMS b9fd1ac227 credit digminecraft for the tutorial 2021-06-02 11:12:15 +02:00
AFCMS 7e64470f70 fix future API usage of bold+italic pr 2021-06-02 11:07:31 +02:00
AFCMS c8102838cb add missing TODO entry (bold+italic) 2021-06-02 00:26:10 +02:00
AFCMS 6b53dda79b add todo list 2021-06-02 00:25:15 +02:00
AFCMS 640b0dc485 basic title API working (testing needed) 2021-06-02 00:23:11 +02:00
NO11 75e263debc Add code for totem partciles 2021-05-29 19:24:16 +00:00
NO11 a65db15b5c Totem particle textures 2021-05-29 19:21:15 +00:00
AFCMS 0119793d7a Merge branch 'master' into buckets 2021-05-27 09:10:35 +02:00
AFCMS 91ac70cf28 Merge branch 'master' into buckets 2021-05-23 16:22:53 +02:00
AFCMS 17202115fa cache general functions 2021-05-22 18:58:58 +02:00
AFCMS 5d65c8a3aa Working empty bucket 2021-05-22 18:57:51 +02:00
AFCMS e9f38c6b90 WIP raycast base buckets 2021-05-22 10:47:28 +02:00
talamh 2c434495c1 Merge branch 'master' into master 2021-05-03 23:46:44 +00:00
talamh e6b61a1551 Update 'mods/ENTITIES/mobs_mc/rabbit.lua' 2021-05-02 02:00:21 +00:00
talamh f1229c5401 Added spawn egg for killer rabbitt 2021-05-02 01:58:40 +00:00
606 changed files with 13636 additions and 17441 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
# Text Editor TMP Files
*.swp
*.blend1
*.blend2
*.blend3

128
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
eliasfleckenstein@web.de.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@ -1,105 +1,410 @@
# Contributing to MineClone 2
So you want to contribute to MineClone 2?
# Contributing to MineClone2
So you want to contribute to MineClone2?
Wow, thank you! :-)
But first, some things to note:
MineClone2 is maintained by Nicu and Fleckenstein. If you have any
problems or questions, contact us (See Links section below).
MineClone 2's development target is to make a free software clone of Minecraft,
***version 1.12***, ***PC edition***, *** + Optifine features supported by the Minetest Engine ***.
You can help with MineClone2's development in many different ways,
whether you're a programmer or not.
MineClone 2 is maintained by three persons. Namely, kay27, EliasFleckenstein and jordan4ibanez. You can find us
in the Minetest forums (forums.minetest.net), in IRC in the #mineclone2
channel on irc.freenode.net. And finally, you can send e-mails to
<eliasfleckenstein@web.de> or <kay27@bk.ru>.
## MineClone2's development target is to...
- Crucially, create a stable, moddable, free/libre clone of Minecraft
based on the Minetest engine with polished features, usable in both
singleplayer and multiplayer. Currently, most of **Minecraft Java
Edition 1.12.2** features are already implemented and polishing existing
features are prioritized over new feature requests.
- With lessened priority yet strictly, implement features targetting
**Minecraft version 1.17 + OptiFine** (OptiFine only as far as supported
by the Minetest Engine). This means features in parity with the listed
Minecraft experiences are prioritized over those that don't fulfill this
scope.
- Optionally, create a performant experience that will run relatively
well on really low spec computers. Unfortunately, due to Minecraft's
mechanisms and Minetest engine's limitations along with a very small
playerbase on low spec computers, optimizations are hard to investigate.
By sending us patches or asking us to include your changes in this game,
you agree that they fall under the terms of the LGPLv2.1, which basically
means they will become part of a free software.
## Links
* [Mesehub](https://git.minetest.land/MineClone2/MineClone2)
* [Discord](https://discord.gg/xE4z8EEpDC)
* [YouTube](https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A)
* [IRC](https://web.libera.chat/#mineclone2)
* [Matrix](https://app.element.io/#/room/#mc2:matrix.org)
* [Reddit](https://www.reddit.com/r/MineClone2/)
* [Minetest forums](https://forum.minetest.net/viewtopic.php?f=50&t=16407)
* [ContentDB](https://content.minetest.net/packages/wuzzy/mineclone2/)
* [OpenCollective](https://opencollective.com/mineclone2)
## The suggested workflow
We don't **dictate** your workflow, but in order to work with us in an efficient
way, you can follow these suggestions:
## Using git
MineClone2 is developed using the version control system
[git](https://git-scm.com/). If you want to contribute code to the
project, it is **highly recommended** that you learn the git basics.
For non-programmers and people who do not plan to contribute code to
MineClone2, git is not required. However, git is a tool that will be
referenced frequently because of its usefulness. As such, it is valuable
in learning how git works and its terminology. It can also help you
keeping your game updated, and easily test pull requests.
For small and medium changes:
## How you can help as a non-programmer
* Fork the repository
As someone who does not know how to write programs in Lua or does not
know how to use the Minetest API, you can still help us out a lot. For
example, by opening an issue in the
[Issue tracker](https://git.minetest.land/MineClone2/MineClone2/issues),
you can report a bug or request a feature.
### Rules about both bugs and feature requests
* Stay polite towards the developers and anyone else involved in the
discussion.
* Choose a descriptive title (e.g. not just "crash", "bug" or "question"
).
* Please write in plain, understandable English. It will be easier to
communicate.
* Please start the issue title with a capital letter.
* Always check the currently opened issues before creating a new one.
Don't report bugs that have already been reported or request features
that already have been requested.
* If you know about Minetest's inner workings, please think about
whether the bug / the feature that you are reporting / requesting is
actually an issue with Minetest itself, and if it is, head to the
[Minetest issue tracker](https://github.com/minetest/minetest/issues)
instead.
* If you need any help regarding creating a Mesehub account or opening
an issue, feel free to ask on the Discord / Matrix server or the IRC
channel.
### Reporting bugs
* A bug is an unintended behavior or, in the worst case, a crash.
However, it is not a bug if you believe something is missing in the
game. In this case, please read "Requesting features"
* If you report a crash, always include the error message. If you play
in singleplayer, post a screenshot of the message that Minetest showed
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
server.
* Tell us which MineClone2 and Minetest versions you are using.
* 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
behavior.
### Requesting features
* Ensure the requested feature fulfills our development targets and
goals.
* Begging or excessive attention seeking does not help us in the
slightest, and may very well disrupt MineClone2 development. It's better
to put that energy into helping or researching the feature in question.
After all, we're just volunteers working on our spare time.
* Ensure the requested feature has not been implemented in MineClone2
latest or development versions.
### Testing code
If you want to help us with speeding up MineClone2 development and
making the game more stable, a great way to do that is by testing out
new features from contributors. For most new things that get into the
game, a pull request is created. A pull request is essentially a
programmer saying "Look, I modified the game, please apply my changes
to the upstream version of the game". However, every programmer makes
mistakes sometimes, some of which are hard to spot. You can help by
downloading this modified version of the game and trying it out - then
tell us if the code works as expected without any issues. Ideally, you
would report issues will pull requests similar to when you were
reporting bugs that are the mainline (See Reporting bugs section). You
can find currently open pull requests here:
<https://git.minetest.land/MineClone2/MineClone2/pulls>. Note that pull
requests that start with a `WIP:` are not done yet, and therefore might
not work, so it's not very useful to try them out yet.
### Contributing assets
Due to license problems, MineClone2 unfortunately cannot use
Minecraft's assets, therefore we are always looking for asset
contributions. To contribute assets, it can be useful to learn git
basics and read the section for Programmers of this document, however
this is not required. It's also a good idea to join the Discord server
(or alternatively IRC or Matrix).
#### Textures
For textures we use the Pixel Perfection texture pack. This is mostly
enough; however in some cases - e.g. for newer Minecraft features, it's
useful to have texture artists around. If you want to make such
contributions, join our Discord server. Demands for textures will be
communicated there.
#### Sounds
MineClone2 currently does not have a consistent way to handle sounds.
The sounds in the game come from different sources, like the SnowZone
resource pack or minetest_game. Unfortunately, MineClone2 does not play
a sound in every situation you would get one in Minecraft. Any help with
sounds is greatly appreciated, however if you add new sounds you should
probably work together with a programmer, to write the code to actually
play these sounds in game.
#### 3D Models
Most of the 3D Models in MineClone2 come from
[22i's repository](https://github.com/22i/minecraft-voxel-blender-models).
Similar to the textures, we need people that can make 3D Models with
Blender on demand. Many of the models have to be patched, some new
animations have to be added etc.
#### Crediting
Asset contributions will be credited in their own respective sections in
CREDITS.md. If you have commited the results yourself, you will also be
credited in the Contributors section.
### Contributing Translations
#### Workflow
To add/update support for your language to MineClone2, you should take
the steps documented in the section for Programmers, add/update the
translation files of the mods that you want to update. You can add
support for all mods, just some of them or only one mod; you can update
the translation file entirely or only partly; basically any effort is
valued. If your changes are small, you can also send them to developers
via E-Mail, Discord, IRC or Matrix - they will credit you appropriately.
#### Things to note
You can use the script at `tools/check_translate_files.py` to compare
the translation files for the language you are working on with the
template files, to see what is missing and what is out of date with
the template file. However, template files are often incomplete and/or
out of date, sometimes they don't match the code. You can update the
translation files if that is required, you can also modify the code in
your translation PR if it's related to translation. You can also work on
multiple languages at the same time in one PR.
#### Crediting
Translation contributions will be credited in their own in CREDITS.md.
If you have commited the results yourself, you will also be credited in
the Contributors section.
### Profiling
If you own a server, a great way to help us improve MineClone2's code
is by giving us profiler results. Profiler results give us detailed
information about the game's performance and let us know places to
investigate optimization issues. This way we can make the game faster.
#### Using Minetest's profiler
Minetest has a built in profiler. Simply set `profiler.load = true` in
your configuration file and restart the server. After running the server
for some time, just run `/profiler save` in chat - then you will find a
file in the world directory containing the results. Open a new issue and
upload the file. You can name the issue "<Server name> profiler
results".
### Let us know your opinion
It is always encouraged to actively contribute to issue discussions on
MeseHub, let us know what you think about a topic and help us make
decisions. Also, note that a lot of discussion takes place on the
Discord server, so it's definitely worth checking it out.
### Funding
You can help pay for our infrastructure (Mesehub) by donating to our
OpenCollective link (See Links section).
### Crediting
If you opened or have contributed to an issue, you receive the
`Community` role on our Discord (after asking for it).
OpenCollective Funders are credited in their own section in
`CREDITS.md` and receive a special role "Funder" on our discord (unless
they have made their donation Incognito).
## How you can help as a programmer
(Almost) all the MineClone2 development is done using pull requests.
### Recommended workflow
* Fork the repository (in case you have not already)
* Do your change in a new branch
* Create a pull request to get your changes merged into master
* Keep your pull request up to date by regularly merging upstream. It is
imperative that conflicts are resolved prior to merging the pull
request.
* After the pull request got merged, you can delete the branch
For small changes, sending us a patch is also good.
### Discuss first
If you feel like a problem needs to fixed or you want to make a new
feature, you could start writing the code right away and notifying us
when you're done, but it never hurts to discuss things first. If there
is no issue on the topic, open one. If there is an issue, tell us that
you'd like to take care of it, to avoid duplicate work.
For big changes: Same as above, but consider notifying us first to avoid
duplicate work and possible tears of rejection. ;-)
### Don't hesitate to ask for help
We appreciate any contributing effort to MineClone2. If you are a
relatively new programmer, you can reach us on Discord, Matrix or IRC
for questions about git, Lua, Minetest API, MineClone2 codebase or
anything related to MineClone2. We can help you avoid writing code that
would be deemed inadequate, or help you become familiar with MineClone2
better, or assist you use development tools.
For trusted people, we might give them direct commit access to this
repository. In this case, you obviously don't need to fork, but you still
need to show your contributions align with the project goals. We still
reserve the right to revert everything that we don't like.
For bigger changes, we strongly recommend to use feature branches and
discuss with me first.
### Maintain your own code, even if already got merged
Sometimes, your code may cause crashes or bugs - we try to avoid such
scenarios by testing every time before merging it, but if your merged
work causes problems, we ask you fix the issues as soon as possible.
If your code causes bugs and crashes, it is your responsibility to fix them as soon as possible.
### Changing Gameplay
Pull Requests that change gameplay have to be properly researched and
need to state their sources. These PRs also need Fleckenstein's approval
before they are merged.
You can use these sources:
We mostly use plain merging rather than rebasing or squash merging.
* Testing things inside of Minecraft (Attach screenshots / video footage
of the results)
* Looking at [Minestom](https://github.com/Minestom/Minestom) code. An open source Minecraft Server implementation
* [Official Minecraft Wiki](https://minecraft.fandom.com/wiki/Minecraft_Wiki)
(Include a link to the specific page you used)
Your commit names should be relatively descriptive, e.g. when saying "Fix #issueid", the commit message should also contain the title of the issue.
### Stick to our guidelines
Contributors will be credited in `CREDITS.md`.
#### Git Guidelines
* We use merge rather than rebase or squash merge
* We don't use git submodules.
* Your commit names should be relatively descriptive, e.g. when saying
"Fix #issueid", the commit message should also contain the title of the
issue.
* Try to keep your commits as atomic as possible (advise, but completely
optional)
## Code Style
#### Code Guidelines
* Each mod must provide `mod.conf`.
* Mod names are snake case, and newly added mods start with `mcl_`, e.g.
`mcl_core`, `mcl_farming`, `mcl_monster_eggs`. Keep in mind Minetest
does not support capital letters in mod names.
* To export functions, store them inside a global table named like the
mod, e.g.
Each mod must provide `mod.conf`.
Each mod which add API functions should store functions inside a global table named like the mod.
Public functions should not use self references but rather just access the table directly.
Functions should be defined in this way:
```
function mcl_xyz.stuff(param) end
```
Insteed of this way:
```
mcl_xyz.stuff = function(param) end
```
Indentation must be unified, more likely with tabs.
```lua
mcl_example = {}
function mcl_example.do_something()
-- ...
end
Time sensitive mods should make a local copy of most used API functions to improve performances.
```
local vector = vector
local get_node = minetest.get_node
```
* Public functions should not use self references but rather just access
the table directly, e.g.
## Features > 1.12
```lua
-- bad
function mcl_example:do_something()
end
If you want to make a feature that was added in a Minecraft version later than 1.12, you should fork MineClone5 (mineclone5 branch in the repository) and add your changes to this.
-- good
function mcl_example.do_something()
end
```
## What we accept
* Use modern Minetest API, e.g. no usage of `minetest.env`
* Tabs should be used for indent, spaces for alignment, e.g.
* Every MC features up to version 1.12 JE.
* Every already finished and working good features from versions above (only when making a MineClone5 PR / Contribution).
* Except features which couldn't be done easily and bugfree because of Minetest engine limitations. Eg. we CAN extend world boundaries by playing with map chunks, just teleporting player onto next layer after 31000 , but it would cost too much (time, code, bugs, performance, stability, etc).
* Some features, approved by the rest of the community, I mean maybe some voting and really missing any negative feedback.
```lua
## What we reject
-- use tabs for indent
* Any features which cause critical bugs, sending them to rework/fix or trying to fix immediately.
* Some small portions of big entirely missing features which just definitely break gamplay balance give nothing useful
* Controversial features, which some people support while others do not should be discussed well, with publishing forum announcements, at least during the week. In case if there are still doubts - send them into the mod.
for i = 1, 10 do
if i % 3 == 0 then
print(i)
end
end
## Reporting bugs
Report all bugs and missing Minecraft features here:
-- use tabs for indent and spaces to align things
<https://git.minetest.land/MineClone2/MineClone2/issues>
some_table = {
{"a string", 5},
{"a very much longer string", 10},
}
```
## Direct discussion
We have an IRC channel! Join us on #mineclone2 in freenode.net.
* Use double quotes for strings, e.g. `"asdf"` rather than `'asdf'`
* Use snake_case rather than CamelCase, e.g. `my_function` rather than
`MyFunction`
* Don't declare functions as an assignment, e.g.
<ircs://irc.freenode.net:6697/#mineclone2>
```lua
-- bad
local some_local_func = function()
-- ...
end
## Creating releases
my_mod.some_func = function()
-- ...
end
-- good
local function some_local_func()
-- ...
end
function my_mod.some_func()
-- ...
end
```
### Developer status
Active and trusted contributors are often granted write access to the
MineClone2 repository.
#### Developer responsibilities
- You should not push things directly to
MineClone2 master - rather, do your work on a branch on your private
repository, then create a pull request. This way other people can review
your changes and make sure they work before they get merged.
- Merge PRs only when they have recieved the necessary feedback and have
been tested by at least two different people (including the author of
the pull request), to avoid crashes or the introduction of new bugs.
- You may also be assigned to issues or pull
requests as a developer. In this case it is your responsibility to fix
the issue / review and merge the pull request when it is ready. You can
also unassign yourself from the issue / PR if you have no time or don't
want to take care of it for some other reason. After all, everyone is a
volunteer and we can't expect you to do work that you are not interested
in. **The important thing is that you make sure to inform us if you
won't take care of something that has been assigned to you.**
- Please assign yourself to something that you want to work on to avoid
duplicate work.
- As a developer, it should be easy to reach you about your work. You
should be in at least one of the public MineClone2 discussion rooms -
preferrably Discord, but if you really don't like Discord, Matrix
or IRC are fine too.
### Maintainer status
Maintainers carry the main responsibility for the project.
#### Maintainer responsibilities
- Making sure issues are addressed and pull requests are reviewed and
merged, by assigning either themselves or Developers to issues / PRs
- Making releases
- Making sure guidelines are kept
- Making project decisions based on community feedback
- Granting/revoking developer access
- Enforcing the code of conduct (See CODE_OF_CONDUCT.md)
- Moderating official community spaces (See Links section)
- Resolving conflicts and problems within the community
#### Current maintainers
* Fleckenstein - responsible for gameplay review, publishing releases,
technical guidelines and issue/PR delegation
* Nicu - responsible for community related issues
#### Release process
* Run `tools/generate_ingame_credits.lua` to update the ingame credits
from `CREDITS.md` and commit the result (if anything changed)
* Launch MineClone2 to make sure it still runs
* Update the version number in README.md
* Use `git tag <version number>` to tag the latest commit with the version number
* Push to repo (don't forget `--tags`!)
* Update ContentDB (https://content.minetest.net/packages/Wuzzy/mineclone2/)
* Update first post in forum thread (https://forum.minetest.net/viewtopic.php?f=50&t=16407)
* Use `git tag <version number>` to tag the latest commit with the
version number
* Push to repository (don't forget `--tags`!)
* Update ContentDB
(https://content.minetest.net/packages/Wuzzy/mineclone2/)
* Update first post in forum thread
(https://forum.minetest.net/viewtopic.php?f=50&t=16407)
* Post release announcement and changelog in forums
### Licensing
By asking us to include your changes in this game, you agree that they
fall under the terms of the GPLv3, which basically means they will
become part of a free/libre software.
### Crediting
Contributors, Developers and Maintainers will be credited in
`CREDITS.md`. If you make your first time contribution, please add
yourself to this file. There are also Discord roles for Contributors,
Developers and Maintainers.

View File

@ -6,9 +6,13 @@
## Creator of MineClone2
* Wuzzy
## Maintainers
* Nicu
* cora
## Previous Maintainers
* Fleckenstein
* kay27
* jordan4ibanez
## Developers
@ -19,10 +23,10 @@
* iliekprogrammar
* MysticTempest
* Rootyjr
* Nicu
* aligator
* Code-Sploit
* NO11
* kabou
## Contributors
* Laurent Rocher
@ -48,8 +52,25 @@
* dBeans
* nickolas360
* yutyo
* ztianyang
* Tianyang Zhang
* j45
* Marcin Serwin
* erlehmann
* E
* Benjamin Schötz
* Doloment
* Sydney Gems
* talamh
* Emily2255
* Emojigit
* FinishedFragment
* sfan5
* Blue Blancmange
* Jared Moody
* SmallJoker
* Sven792
* aldum
* Dieter44
## MineClone5
* kay27
@ -57,6 +78,16 @@
* epCode
* NO11
* j45
* 3raven
* PrarieWind
* Gustavo1
* CableGuy67
## Mineclonia
* erlehmann
* Li0n
* E
* n_to
## Original Mod Authors
* Wuzzy
@ -74,7 +105,6 @@
* Rochambeau
* rubenwardy
* stu
* jordan4ibanez
* 4aiman
* Kahrl
* Krock
@ -103,6 +133,7 @@
* xMrVizzy
* yutyo
* NO11
* kay27
## Translations
* Wuzzy
@ -110,6 +141,11 @@
* wuniversales
* kay27
* pitchum
* todoporlalibertad
* Marcin Serwin
## Funders
* 40W
## Special thanks
* celeron55 for creating Minetest

View File

@ -1,10 +1,8 @@
# (Currently in feature freeze)
# MineClone 2
# MineClone2
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils.
Developed by many people. Not developed or endorsed by Mojang AB.
Version: 0.72.0 (in development)
Version: 0.72.0
### Gameplay
You start in a randomly-generated world made entirely of cubes. You can explore
@ -71,36 +69,40 @@ an explanation.
This game requires [Minetest](http://minetest.net) to run (version 5.3.0 or
later). So you need to install Minetest first. Only stable versions of Minetest
are officially supported.
There is no support for running MineClone 2 in development versions of Minetest.
There is no support for running MineClone2 in development versions of Minetest.
To install MineClone 2 (if you haven't already), move this directory into the
To install MineClone2 (if you haven't already), move this directory into the
“games” directory of your Minetest data directory. Consult the help of
Minetest to learn more.
## Reporting bugs
Please report all bugs and missing Minecraft features here:
## Useful links
The MineClone2 repository is hosted at Mesehub. To contribute or report issues, head there.
<https://git.minetest.land/MineClone2/MineClone2/issues>
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
* Discord: <https://discord.gg/xE4z8EEpDC>
* YouTube <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
* IRC: <https://web.libera.chat/#mineclone2>
* Matrix: <https://app.element.io/#/room/#mc2:matrix.org>
* Reddit: <https://www.reddit.com/r/MineClone2/>
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
* ContentDB: <https://content.minetest.net/packages/wuzzy/mineclone2/>
* OpenCollective: <https://opencollective.com/mineclone2>
## Chatting with the community
Join our discord server at:
<https://discord.gg/xE4z8EEpDC>
## Project description
The main goal of **MineClone 2** 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”)
* MineClone2 also includes Optifine features supported by the Minetest
* In general, Minecraft is aimed to be cloned as good as possible
* Cloning the gameplay has highest priority
* MineClone 2 will use different assets, but with a similar style
* Limitations found in Minetest will be documented in the course of development
* Features of later Minecraft versions are collected in the mineclone5 branch
## Using features from newer versions of Minecraft
For > 1.12 features, checkout MineClone5. It includes features from newer Minecraft versions.
Download it here: https://git.minetest.land/MineClone2/MineClone2/src/branch/mineclone5
## Target
- Crucially, create a stable, moddable, free/libre clone of Minecraft
based on the Minetest engine with polished features, usable in both
singleplayer and multiplayer. Currently, most of **Minecraft Java
Edition 1.12.2** features are already implemented and polishing existing
features are prioritized over new feature requests.
- With lessened priority yet strictly, implement features targetting
**Minecraft version 1.17 + OptiFine** (OptiFine only as far as supported
by the Minetest Engine). This means features in parity with the listed
Minecraft experiences are prioritized over those that don't fulfill this
scope.
- Optionally, create a performant experience that will run relatively
well on really low spec computers. Unfortunately, due to Minecraft's
mechanisms and Minetest engine's limitations along with a very small
playerbase on low spec computers, optimizations are hard to investigate.
## Completion status
This game is currently in **beta** stage.
@ -187,7 +189,7 @@ Technical differences from Minecraft:
* Different engine (Minetest)
* Different easter eggs
… and finally, MineClone 2 is free software (“free” as in “freedom”)!
… and finally, MineClone2 is free software (“free” as in “freedom”)!
## Other readme files

View File

@ -0,0 +1,324 @@
# MineClone 2
一個非官方的Minetest遊戲遊玩方式和Minecraft類似。由davedevils從MineClone分拆。
由許多人開發。並非由Mojang Studios開發。<!-- "Mojang AB"'s Name changed at 2020/05, main README should change too -->
版本0.71.0
### 遊玩
你開始在一個完全由方塊隨機生成的世界裡。你可以探索這個世界,挖掘和建造世界上幾乎所有的方塊,以創造新的結構。你可以選擇在「生存模式」中進行遊戲,在這個模式中,你必須與怪物戰鬥,飢餓求生,並在遊戲的其他各個環節中慢慢進步,如採礦、養殖、建造機器等等。
或者你也可以在「創造模式」中玩,在這個模式中,你可以瞬間建造大部分東西。
#### Gameplay summary
* 沙盒式遊戲,沒有明確目標
* 生存:與怪物和飢餓搏鬥
* 挖礦來獲得礦物和寶物
* 附魔:獲得經驗值並以附魔強化你的工具
* 使用收集的方塊來創造偉大的建築
* 收集鮮花(和其他染料來源),令世界多姿多彩
* 找些種子並開始耕種
* 尋找或合成數百個物品之一
* 建立一個鐵路系統,並從礦車中得到樂趣
* 用紅石電路建造複雜的機器
* 在創造模式下,你幾乎可以免費建造任何東西,而且沒有限制。
## 如何開始
### 開始生存
* **挖樹幹**直到其破裂並收集木材
* 將木頭**放入2×2的格子中**你的物品欄中的「合成格子」然後製作4塊木材。
* 將4塊木材按2×2的形狀擺放在合成格子裡製作成合成臺。
* **右鍵單擊製作臺**以獲得3×3製作網格製作更複雜的東西
* 使用**合成指南**(書形圖標)了解所有可能的合成方式
* **製作一個木鎬**,這樣你就可以挖石頭了。
* 不同的工具可以打破不同種類的方塊。試試吧!
* 繼續玩你想玩的。盡情享受吧!
### 耕種
* 找到種子
* 合成鋤頭
* 用鋤頭右鍵點擊泥土或類似的方塊,創建農田
* 將種子放在農田上,看著它們長出來
* Collect plant when fully grown
* If near water, farmland becomes wet and speeds up growth
### Furnace
* Craft furnace
* Furnace allows you to obtain more items
* Upper slot must contain a smeltable item (example: iron ore)
* Lower slot must contain a fuel item (example: coal)
* See tooltips in crafting guide to learn about fuels and smeltable items
### Additional help
More help about the gameplay, blocks items and much more can be found from inside
the game. You can access the help from your inventory menu.
### Special items
The following items are interesting for Creative Mode and for adventure
map builders. They can not be obtained in-game or in the creative inventory.
* Barrier: `mcl_core:barrier`
Use the `/giveme` chat command to obtain them. See the in-game help for
an explanation.
#### Incomplete items
These items do not work yet, but you can get them with `/giveme` for testing:
* Minecart with Chest: `mcl_minecarts:chest_minecart`
* Minecart with Furnace: `mcl_minecarts:furnace_minecart`
* Minecart with Hopper: `mcl_minecarts:hopper_minecart`
* Minecart with Command Block: `mcl_minecarts:command_block_minecart`
## Installation
This game requires [Minetest](http://minetest.net) to run (version 5.0.0 or
later). So you need to install Minetest first. Only stable versions of Minetest
are officially supported.
There is no support for running MineClone 2 in development versions of Minetest.
To install MineClone 2 (if you haven't already), move this directory into the
“games” directory of your Minetest data directory. Consult the help of
Minetest to learn more.
## Project description
The main goal of **MineClone 2** is to be a clone of Minecraft and to be released as free software.
* **開發目標:我的世界, Java版, 版本 1.12**
* MineClone2還包括Minetest支持的Optifine功能。
* 後期Minecraft版本的功能可能會偷偷加入但它們的優先級較低。
* 總的來說Minecraft的目標是在Minetest目前允許的情況下進行克隆。
* 克隆Minecraft是最優先的。
* MineClone2將使用不同的圖形和聲音但風格相似。
* 克隆界面沒有優先權。只會被粗略地模仿。
* 在Minetest中發現的局限性將在開發過程中被記錄和報告。
## 完成程度
該遊戲目前處於**alpha**階段。
它是可玩的,但尚未完成,預計會出現許多錯誤。
向後兼容性是**不能保證的**更新你的世界可能會造成大大小小的bug比如「缺少節點」的錯誤甚至崩潰
已經實現以下功能:
* 工具,武器
* 盔甲
* 合成和熔煉系統2×2 合成格, 合成臺 (3×3 合成格), 熔爐, 合成教學
* 儲物箱,大型儲物箱,終界箱和界伏盒
* 熔爐, 漏斗
* 飢餓和飽食
* 大多數怪物和動物
* Minecraft 1.12中的所有礦物<!-- Minecraft 1.17 added copper, so here must mark the version is 1.12, then main README should also add this -->
* 主世界的大部分方塊
* 水和岩漿
* 天氣
* 28個生態域
* 地獄,熾熱的維度
* 紅石電路(部分)
* 礦車(部分)
* 狀態效果(部分)
* 經驗系統
* 附魔
* 釀造,藥水,藥水箭(部分)
* 船
* 火
* 建築方塊:樓梯、半磚、門、地板門、柵欄、柵欄門、牆。
* 時鐘
* 指南針
* 海綿
* 史萊姆方塊(不與紅石互動)
* 小植物和樹苗
* 染料
* 旗幟
* 裝飾方塊:玻璃、染色玻璃、玻璃片、鐵柵欄、陶土(和染色版本)、頭顱等
* 物品展示框
* 唱片機
* 床
* 物品欄
* 創造模式物品欄
* 生產
* 書和羽毛筆
* 一些服務器命令
* 還有更多!
以下是不完整的特性:
* 生成結構(特別是村莊)
* 一些怪物和動物
* 紅石系統
* 終界
* 特殊的礦車
* 一些不簡單的方塊和物品。
額外功能在Minecraft 1.11中沒有)。
* 內置合成指南,向你展示製作和熔煉的配方
* 遊戲中的幫助系統包含了大量關於遊戲基礎知識、方塊、物品等方面的幫助。
* 臨時製作配方。它們的存在只是為了在你不在創造模式下時,提供一些其他無法獲得的物品。這些配方將隨著開發的進行和更多功能的出現而被移除。
* v6地圖生成器中箱子裡的樹苗。
* 完全可修改得益於Minetest強大的Lua API
* 新的方塊和物品:
* 查找工具,顯示觸及事物的幫助
* 更多的半磚和樓梯
* 地獄磚柵欄門
* 紅地獄磚柵欄
* 紅地獄磚柵欄門
與Minecraft的技性術差異
* 高度限制為31000格(遠高於Minecraft)
* 水平世界大小約為62000×62000格比Minecraft中的小得多但仍然非常大
* 仍然非常不完整和有問題
* 塊、物品、敵人和其他功能缺失。
* 一些項目的名稱略有不同,以便於區分。
* 唱片機的音樂不同
* 不同的材質(像素完美)
* 不同的聲音(各種來源)
* 不同的引擎Minetest
...最後MineClone2是自由軟件
## 錯誤報告
請在此處報告所有錯誤和缺少的功能:
<https://git.minetest.land/MineClone2/MineClone2/issues>
## Chating with the community
我們有Discord交流羣
<https://discord.gg/84GKcxczG3>
## Other readme files
* `LICENSE.txt`GPLv3許可文本
* `CONTRIBUTING.md`: 為那些想參與貢獻的人提供資訊
* `MISSING_ENGINE_FEATURES.md`: MineClone2需要改进Minetest中缺失的功能列表。
* `API.md`: 關於MineClone2的API
## 參與者
有這麼多人要列出抱歉。詳情請查看各mod目錄。本節只是粗略地介紹了本遊戲的核心作者。
### 程式碼
* [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082)大多數mod的主要程序員已退休
* davedevilsMineClone 2的原型——「MineClone」的創造者
* [ex-bart](https://github.com/ex-bart):紅石比較器
* [Rootyjr](https://github.com/Rootyjr):釣竿和錯誤修復
* [aligator](https://github.com/aligator):改進門
* [ryvnf](https://github.com/ryvnf):爆炸物理
* MysticTempest錯誤修復
* [bzoss](https://github.com/bzoss):狀態效果,釀造,藥水
* kay27 <kay27@bk.ru>:經驗系統,錯誤修復和優化(當前維護者)
* [EliasFleckenstein03](https://github.com/EliasFleckenstein03):終界水晶,附魔,燃燒的怪物/玩家,箱子的動畫和錯誤修復(當前維護者)
* epCode更好的玩家動畫新徽標
* 2mac修復動力鐵軌的錯誤
* 更多:待篇寫 (請查看各mod目錄)
#### Mod概括
* `controls`: Arcelmi
* `flowlib`: Qwertymine13
* `walkover`: lordfingle
* `drippingwater`: kddekadenz
* `mobs_mc`: maikerumine, 22i and others
* `awards`: rubenwardy
* `screwdriver`: RealBadAngel, Maciej Kastakin, Minetest contributors
* `xpanes`: Minetest contributors
* `mesecons` mods: Jeija and contributors
* `wieldview`: Stuart Jones
* `mcl_meshhand`: Based on `newhand` by jordan4ibanez
* `mcl_mobs`: Based on Mobs Redo [`mobs`] by TenPlus1 and contributors
* 大多其他的Mod: Wuzzy
每个mod的详细參與者可以在各个mod目录中找到。
### 圖形
* [XSSheep](http://www.minecraftforum.net/members/XSSheep)主要作者Minecraft 1.11的Pixel Perfection资源包的制作者
* [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082):主菜單圖像和各種編輯和添加的材質包
* [kingoscargames](https://github.com/kingoscargames):現有材質的各種編輯和添加
* [leorockway](https://github.com/leorockway):怪物紋理的一些編輯
* [xMrVizzy](https://minecraft.curseforge.com/members/xMrVizzy):釉陶(材質以後會被替換)
* yutyo <tanakinci2002@gmail.com>MineClone2標志
* 其他GUI圖片
### 翻譯
* Wuzzy德語
* Rocher Laurent <rocherl@club-internet.fr>:法語
* wuniversales西班牙語
* kay27 <kay27@bk.ru>:俄語
* [Emoji](https://toyshost2.ddns.net):繁體中文<!-- Hi, after the translate finish, this name should add to the main README too! -->
### 模型
* [22i](https://github.com/22i):所有模型的作者
* [tobyplowy](https://github.com/tobyplowy)對上述模型進行UV映射修復
### 聲音和音樂
多種來源。 有關詳細信息請參見相應的mod目錄。
### 特殊感謝
* Wuzzy感謝他啟動和維護MineClone2多年。
* celeron55創建Minetest。
* Minetest的社區提供了大量的mods選擇其中一些最終被納入MineClone 2。
* Jordach為《Big Freaking Dig》的唱片機音樂合輯而來
* 花了太多時間為Minecraft Wiki寫作的工作狂。它是創建這個遊戲的寶貴資源。
* Notch和Jeb是Minecraft背后的主要力量
* XSSheep用於創建Pixel Perfection資源包。
* [22i](https://github.com/22i) 提供出色的模型和支持
* [maikerumine](http://github.com/maikerumine) 揭開生物和生物群落的序幕
## 給程序員的信息
你可以在「API.md」中找到有趣和有用的信息。
## 法律信息
這是一款粉絲開發的遊戲並非由Mojang AB開發或認可。
複製是一種愛的行為。請複制和分享! <3
下面是詳細的法律條文,有需要的朋友可以參考。
### License of source code
```
MineClone 2 (by kay27, EliasFleckenstein, Wuzzy, davedevils and countless others)
is an imitation of Minecraft.
MineClone 2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License (in the LICENSE.txt file) for more
details.
In the mods you might find in the read-me or license
text files a different license. This counts as dual-licensing.
You can choose which license applies to you: Either the
license of MineClone 2 (GNU GPLv3) or the mod's license.
MineClone 2 is a direct continuation of the discontinued MineClone
project by davedevils.
Mod credits:
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
of MineClone 2 and the author is Wuzzy.
```
### License of media (textures and sounds)
```
No non-free licenses are used anywhere.
The textures, unless otherwise noted, are based on the Pixel Perfection resource pack for Minecraft 1.11,
authored by XSSheep. Most textures are verbatim copies, while some textures have been changed or redone
from scratch.
The glazed terracotta textures have been created by (MysticTempest)[https://github.com/MysticTempest].
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
The main menu images are release under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
All other files, unless mentioned otherwise, fall under:
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
See README.txt in each mod directory for detailed information about other authors.
```

BIN
menu/Logo.blend Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 51 KiB

BIN
menu/icon_big.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
menu/icon_small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 KiB

View File

@ -207,6 +207,10 @@ end
function mcl_autogroup.can_harvest(nodename, toolname)
local ndef = minetest.registered_nodes[nodename]
if not ndef then
return false
end
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
return true
end

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,3 +0,0 @@
# mcl_bubble_column
bubble_column mod for mineclone2
put in /mtdir/games/mineclone2/mods/CORE/

View File

@ -1,369 +0,0 @@
local S = minetest.get_translator("mcl_bubble_column")
local WATER_ALPHA = 179
local WATER_VISC = 1
local LAVA_VISC = 7
local LIGHT_LAVA = minetest.LIGHT_MAX
local USE_TEXTURE_ALPHA
if minetest.features.use_texture_alpha_string_modes then
USE_TEXTURE_ALPHA = "blend"
WATER_ALPHA = nil
end
minetest.register_node("mcl_bubble_column:water_flowing_up", {
description = S("Bubble Column Flowing Water (up)"),
_doc_items_create_entry = false,
wield_image = "default_water_flowing_animated.png^[verticalframe:64:0",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[verticalframe:64:0"},
special_tiles = {
{
image="default_water_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
},
{
image="default_water_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
},
},
sounds = mcl_sounds.node_sound_water_defaults(),
is_ground_content = false,
alpha = WATER_ALPHA,
use_texture_alpha = USE_TEXTURE_ALPHA,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 4,
liquidtype = "flowing",
liquid_alternative_flowing = "mcl_bubble_column:water_flowing_up",
liquid_alternative_source = "mcl_bubble_column:water_source_up",
liquid_viscosity = WATER_VISC,
liquid_range = 7,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1},
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
minetest.register_node("mcl_bubble_column:water_source_up", {
description = S("Bubble Column Water Source"),
_doc_items_entry_name = S("Water"),
_doc_items_longdesc = S("Boosts you up"),
_doc_items_hidden = false,
drawtype = "liquid",
tiles = {
{name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0}}
},
special_tiles = {
-- New-style water source material (mostly unused)
{
name="default_water_source_animated.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0},
backface_culling = false,
}
},
sounds = mcl_sounds.node_sound_water_defaults(),
is_ground_content = false,
alpha = WATER_ALPHA,
use_texture_alpha = USE_TEXTURE_ALPHA,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 4,
liquidtype = "source",
liquid_alternative_flowing = "mcl_bubble_column:water_flowing_up",
liquid_alternative_source = "mcl_bubble_column:water_source_up",
liquid_viscosity = WATER_VISC,
liquid_range = 7,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
stack_max = 64,
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, dig_by_piston=1},
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
minetest.register_globalstep(function()
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local pos = player:get_pos()
local node = minetest.get_node(pos)
if node.name == "mcl_bubble_column:water_source_up" then
local velocity = player:get_player_velocity()
local velocityadd = {x = 0, y = 3, z = 0}
player:add_player_velocity(velocityadd)
end
end
end)
minetest.register_abm{
label = "entities go up",
nodenames = {"mcl_bubble_column:water_source_up"},
interval = 0.05,
chance = 1,
action = function(pos)
for _,entity in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
local pos = entity:get_pos()
local velocity = entity:get_velocity()
local velocityadd = {x = 0, y = 2, z = 0}
entity:add_velocity(velocityadd)
end
end,
}
minetest.register_abm{
label = "bubbles go up",
nodenames = {"mcl_bubble_column:water_source_up"},
interval = 1,
chance = 1,
action = function(pos)
local uppos = vector.add(pos, {x = 0, y = 1, z = 0})
local upposnode = minetest.get_node(uppos)
if upposnode.name == "mcl_core:water_source" then
minetest.set_node(uppos, {name = "mcl_bubble_column:water_source_up"})
end
end,
}
minetest.register_abm{
label = "start bubble column",
nodenames = {"mcl_nether:soul_sand"},
interval = 1,
chance = 1,
action = function(pos)
local downpos = vector.add(pos, {x = 0, y = 1, z = 0})
local downposnode = minetest.get_node(downpos)
if downposnode.name == "mcl_core:water_source" then
minetest.set_node(downpos, {name = "mcl_bubble_column:water_source_up"})
end
end,
}
minetest.register_abm{
label = "stop bubble column",
nodenames = {"mcl_bubble_column:water_source_up"},
interval = 1,
chance = 1,
action = function(pos)
local downpos = vector.add(pos, {x = 0, y = -1, z = 0})
local downposnode = minetest.get_node(downpos)
if downposnode.name == "mcl_core:water_source" then
minetest.set_node(pos, {name = "mcl_core:water_source"})
end
end,
}
minetest.register_abm{
label = "bubbles up",
nodenames = {"mcl_bubble_column:water_source_up"},
interval = 1,
chance = 1,
action = function(pos)
minetest.add_particlespawner({
amount = 10,
time = 0.15,
minpos = vector.add(pos, { x = -0.25, y = 0, z = -0.25 }),
maxpos = vector.add(pos, { x = 0.25, y = 0, z = 0.75 }),
attached = player,
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.5, y = 0, z = 0.5},
minacc = {x = -0.4, y = 4, z = -0.4},
maxacc = {x = 0.5, y = 1, z = 0.5},
minexptime = 0.3,
maxexptime = 0.8,
minsize = 0.7,
maxsize = 2.4,
texture = "mcl_particles_bubble.png"
})
end,
}
--whirlpools(take you down)
minetest.register_node("mcl_bubble_column:water_flowing_down", {
description = S("Bubble Column Flowing Water(down)"),
_doc_items_create_entry = false,
wield_image = "default_water_flowing_animated.png^[verticalframe:64:0",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[verticalframe:64:0"},
special_tiles = {
{
image="default_water_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
},
{
image="default_water_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=4.0}
},
},
sounds = mcl_sounds.node_sound_water_defaults(),
is_ground_content = false,
alpha = WATER_ALPHA,
use_texture_alpha = USE_TEXTURE_ALPHA,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 4,
liquidtype = "flowing",
liquid_alternative_flowing = "mcl_bubble_column:water_flowing_down",
liquid_alternative_source = "mcl_bubble_column:water_source_down",
liquid_viscosity = WATER_VISC,
liquid_range = 7,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1},
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
minetest.register_node("mcl_bubble_column:water_source_down", {
description = S("Whirlpool Water Source"),
_doc_items_entry_name = S("Water"),
_doc_items_longdesc = S("Takes you down!"),
_doc_items_hidden = false,
drawtype = "liquid",
tiles = {
{name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0}}
},
special_tiles = {
-- New-style water source material (mostly unused)
{
name="default_water_source_animated.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=5.0},
backface_culling = false,
}
},
sounds = mcl_sounds.node_sound_water_defaults(),
is_ground_content = false,
alpha = WATER_ALPHA,
use_texture_alpha = USE_TEXTURE_ALPHA,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 4,
liquidtype = "source",
liquid_alternative_flowing = "mcl_bubble_column:water_flowing_down",
liquid_alternative_source = "mcl_bubble_column:water_source_down",
liquid_viscosity = WATER_VISC,
liquid_range = 7,
post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C},
stack_max = 64,
groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, dig_by_piston=1},
_mcl_blast_resistance = 100,
-- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
_mcl_hardness = -1,
})
minetest.register_globalstep(function()
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local pos = player:get_pos()
local node = minetest.get_node(pos)
if node.name == "mcl_bubble_column:water_source_down" then
local velocity = player:get_player_velocity()
local velocityadd = {x = 0, y = -0.5, z = 0}
player:add_player_velocity(velocityadd)
end
end
end)
minetest.register_abm{
label = "entities go down",
nodenames = {"mcl_bubble_column:water_source_down"},
interval = 0.05,
chance = 1,
action = function(pos)
for _,entity in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
local pos = entity:get_pos()
local velocity = entity:get_velocity()
local velocityadd = {x = 0, y = -3, z = 0}
entity:add_velocity(velocityadd)
end
end,
}
minetest.register_abm{
label = "whirlpools go up",
nodenames = {"mcl_bubble_column:water_source_down"},
interval = 1,
chance = 1,
action = function(pos)
local uppos = vector.add(pos, {x = 0, y = 1, z = 0})
local upposnode = minetest.get_node(uppos)
if upposnode.name == "mcl_core:water_source" then
minetest.set_node(uppos, {name = "mcl_bubble_column:water_source_down"})
end
end,
}
minetest.register_abm{
label = "start whirlpool",
nodenames = {"mcl_nether:magma"},
interval = 1,
chance = 1,
action = function(pos)
local downpos = vector.add(pos, {x = 0, y = 1, z = 0})
local downposnode = minetest.get_node(downpos)
if downposnode.name == "mcl_core:water_source" then
minetest.set_node(downpos, {name = "mcl_bubble_column:water_source_down"})
end
end,
}
minetest.register_abm{
label = "stop whirlpool",
nodenames = {"mcl_bubble_column:water_source_down"},
interval = 1,
chance = 1,
action = function(pos)
local downpos = vector.add(pos, {x = 0, y = -1, z = 0})
local downposnode = minetest.get_node(downpos)
if downposnode.name == "mcl_core:water_source" then
minetest.set_node(pos, {name = "mcl_core:water_source"})
end
end,
}
minetest.register_abm{
label = "bubbles down",
nodenames = {"mcl_bubble_column:water_source_down"},
interval = 1,
chance = 1,
action = function(pos)
minetest.add_particlespawner({
amount = 10,
time = 0.15,
minpos = vector.add(pos, { x = -0.25, y = 0, z = -0.25 }),
maxpos = vector.add(pos, { x = 0.25, y = 0, z = 0.75 }),
attached = player,
minvel = {x = -0.2, y = 0, z = -0.2},
maxvel = {x = 0.5, y = 0, z = 0.5},
minacc = {x = -0.4, y = -4, z = -0.4},
maxacc = {x = 0.5, y = -1, z = 0.5},
minexptime = 0.3,
maxexptime = 0.8,
minsize = 0.7,
maxsize = 2.4,
texture = "mcl_particles_bubble.png"
})
end,
}

View File

@ -0,0 +1,15 @@
# mcl_damage
This mod is intended to overall minetest's native damage system, to provide a better integration between features that deals with entities' health.
WARNING: Not using it inside your mods may cause strange bugs (using the native damage system may cause conflicts with this system).
## Callbacks
To modify the amount of damage made by something:
```lua
--obj: an ObjectRef
mcl_damage.register_modifier(function(obj, damage, reason)
end, 0)
```

View File

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=@1 被炸飛了

View File

@ -58,26 +58,27 @@ function mcl_loot.get_loot(loot_definitions, pr)
end
if item then
local itemstring = item.itemstring
local itemstack = item.itemstack
if itemstring then
local stack = ItemStack(itemstring)
if item.amount_min and item.amount_max then
itemstring = itemstring .. " " .. pr:next(item.amount_min, item.amount_max)
stack:set_count(pr:next(item.amount_min, item.amount_max))
end
if item.wear_min and item.wear_max then
-- Sadly, PseudoRandom only allows very narrow ranges, so we set wear in steps of 10
local wear_min = math.floor(item.wear_min / 10)
local wear_max = math.floor(item.wear_max / 10)
local wear = pr:next(wear_min, wear_max) * 10
if not item.amount_min and not item.amount_max then
itemstring = itemstring .. " 1"
end
itemstring = itemstring .. " " .. tostring(wear)
stack:set_wear(pr:next(wear_min, wear_max) * 10)
end
table.insert(items, itemstring)
elseif itemstack then
table.insert(items, itemstack)
if item.func then
item.func(stack, pr)
end
table.insert(items, stack)
else
minetest.log("error", "[mcl_loot] INTERNAL ERROR! Failed to select random loot item!")
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

View File

@ -1,5 +1,27 @@
mcl_util = {}
-- Updates all values in t using values from to*.
function table.update(t, ...)
for _, to in ipairs{...} do
for k,v in pairs(to) do
t[k] = v
end
end
return t
end
-- Updates nil values in t using values from to*.
function table.update_nil(t, ...)
for _, to in ipairs{...} do
for k,v in pairs(to) do
if t[k] == nil then
t[k] = v
end
end
end
return t
end
-- Based on minetest.rotate_and_place
--[[
@ -335,6 +357,32 @@ function mcl_util.get_first_occupied_inventory_slot(inventory, listname)
return mcl_util.get_eligible_transfer_item_slot(inventory, listname)
end
local function drop_item_stack(pos, stack)
if not stack or stack:is_empty() then return end
local drop_offset = vector.new(math.random() - 0.5, 0, math.random() - 0.5)
minetest.add_item(vector.add(pos, drop_offset), stack)
end
function mcl_util.drop_items_from_meta_container(listname)
return function(pos, oldnode, oldmetadata)
if oldmetadata and oldmetadata.inventory then
-- process in after_dig_node callback
local main = oldmetadata.inventory.main
if not main then return end
for _, stack in pairs(main) do
drop_item_stack(pos, stack)
end
else
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
for i = 1, inv:get_size("main") do
drop_item_stack(pos, inv:get_stack("main", i))
end
meta:from_table()
end
end
end
-- Returns true if item (itemstring or ItemStack) can be used as a furnace fuel.
-- Returns false otherwise
function mcl_util.is_fuel(item)
@ -456,7 +504,9 @@ function mcl_util.calculate_durability(itemstack)
end
end
end
uses = uses or (next(itemstack:get_tool_capabilities().groupcaps) or {}).uses
local _, groupcap = next(itemstack:get_tool_capabilities().groupcaps)
uses = uses or (groupcap or {}).uses
end
return uses or 0
@ -538,3 +588,25 @@ function mcl_util.get_object_name(object)
return luaentity.nametag and luaentity.nametag ~= "" and luaentity.nametag or luaentity.description or luaentity.name
end
end
function mcl_util.replace_mob(obj, mob)
local rot = obj:get_yaw()
local pos = obj:get_pos()
obj:remove()
obj = minetest.add_entity(pos, mob)
obj:set_yaw(rot)
return obj
end
function mcl_util.get_pointed_thing(player, liquid)
local pos = vector.offset(player:get_pos(), 0, player:get_properties().eye_height, 0)
local look_dir = vector.multiply(player:get_look_dir(), 5)
local pos2 = vector.add(pos, look_dir)
local ray = minetest.raycast(pos, pos2, false, liquid)
if ray then
for pointed_thing in ray do
return pointed_thing
end
end
end

View File

@ -12,7 +12,7 @@ Params:
* pos: position
## mcl_worlds.y_to_layer(y)
## mcl_worlds.y_to_layer(y)
This function is used to calculate the minetest y layer and dimension of the given <y> minecraft layer.
Mainly used for ore generation.
Takes an Y coordinate as input and returns:
@ -78,4 +78,4 @@ Table containing all function registered with mcl_worlds.register_on_dimension_c
Notify this mod of a dimension change of <player> to <dimension>
* player: player, player who changed the dimension
* dimension: string, new dimension ("overworld", "nether", "end", "void")
* dimension: string, new dimension ("overworld", "nether", "end", "void")

View File

@ -38,18 +38,32 @@ function image:encode_header()
self.data = self.data
.. string.char(0) -- image id
.. string.char(0) -- color map type
.. string.char(2) -- image type (uncompressed true-color image = 2)
.. string.char(10) -- image type (RLE RGB = 10)
self:encode_colormap_spec() -- color map specification
self:encode_image_spec() -- image specification
end
function image:encode_data()
local current_pixel = ''
local previous_pixel = ''
local count = 1
local packets = {}
local rle_packet = ''
for _, row in ipairs(self.pixels) do
for _, pixel in ipairs(row) do
self.data = self.data
.. string.char(pixel[3], pixel[2], pixel[1])
current_pixel = string.char(pixel[3], pixel[2], pixel[1])
if current_pixel ~= previous_pixel or count == 128 then
packets[#packets +1] = rle_packet
count = 1
previous_pixel = current_pixel
else
count = count + 1
end
rle_packet = string.char(128 + count - 1) .. current_pixel
end
end
packets[#packets +1] = rle_packet
self.data = self.data .. table.concat(packets)
end
function image:encode_footer()
@ -70,7 +84,7 @@ function image:encode()
end
function image:save(filename)
local f = assert(io.open(filename, "w"))
local f = assert(io.open(filename, "wb"))
f:write(self.data)
f:close()
end

View File

@ -2,47 +2,45 @@
local get_connected_players = minetest.get_connected_players
local get_node = minetest.get_node
local vector_add = vector.add
local vector = vector
local ceil = math.ceil
local pairs = pairs
walkover = {}
walkover.registered_globals = {}
function walkover.register_global(func)
table.insert(walkover.registered_globals, func)
end
local on_walk = {}
local registered_globals = {}
walkover.registered_globals = registered_globals
function walkover.register_global(func)
table.insert(registered_globals, func)
end
minetest.register_on_mods_loaded(function()
for name,def in pairs(minetest.registered_nodes) do
if def.on_walk_over then
on_walk[name] = def.on_walk_over
end
end
for _,func in ipairs(walkover.registered_globals) do --cache registered globals
table.insert(registered_globals, func)
end
end)
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer + dtime;
timer = timer + dtime
if timer >= 0.3 then
for _,player in pairs(get_connected_players()) do
local pp = player:get_pos()
pp.y = ceil(pp.y)
local loc = vector_add(pp, {x=0,y=-1,z=0})
if loc then
local nodeiamon = get_node(loc)
if nodeiamon then
if on_walk[nodeiamon.name] then
on_walk[nodeiamon.name](loc, nodeiamon, player)
for _, player in pairs(get_connected_players()) do
local ppos = player:get_pos()
ppos.y = ceil(ppos.y)
local npos = vector.add(ppos, vector.new(0, -1, 0))
if npos then
local node = get_node(npos)
if node then
if on_walk[node.name] then
on_walk[node.name](npos, node, player)
end
for i = 1, #registered_globals do
registered_globals[i](loc, nodeiamon, player)
registered_globals[i](npos, node, player)
end
end
end

View File

@ -1,114 +0,0 @@
--Dripping Water Mod
--by kddekadenz
local math = math
-- License of code, textures & sounds: CC0
--Drop entities
--water
local water_tex = "default_water_source_animated.png^[verticalframe:16:0"
minetest.register_entity("drippingwater:drop_water", {
hp_max = 1,
physical = true,
collide_with_objects = false,
collisionbox = {-0.025,-0.05,-0.025,0.025,-0.01,0.025},
pointable = false,
visual = "cube",
visual_size = {x=0.05, y=0.1},
textures = {water_tex, water_tex, water_tex, water_tex, water_tex, water_tex},
spritediv = {x=1, y=1},
initial_sprite_basepos = {x=0, y=0},
static_save = false,
on_activate = function(self, staticdata)
self.object:set_sprite({x=0,y=0}, 1, 1, true)
end,
on_step = function(self, dtime)
local k = math.random(1,222)
local ownpos = self.object:get_pos()
if k==1 then
self.object:set_acceleration({x=0, y=-5, z=0})
end
if minetest.get_node({x=ownpos.x, y=ownpos.y +0.5, z=ownpos.z}).name == "air" then
self.object:set_acceleration({x=0, y=-5, z=0})
end
if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then
self.object:remove()
minetest.sound_play({name="drippingwater_drip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}, true)
end
end,
})
--lava
local lava_tex = "default_lava_source_animated.png^[verticalframe:16:0"
minetest.register_entity("drippingwater:drop_lava", {
hp_max = 1,
physical = true,
collide_with_objects = false,
collisionbox = {-0.025,-0.05,-0.025,0.025,-0.01,0.025},
glow = math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3),
pointable = false,
visual = "cube",
visual_size = {x=0.05, y=0.1},
textures = {lava_tex, lava_tex, lava_tex, lava_tex, lava_tex, lava_tex},
spritediv = {x=1, y=1},
initial_sprite_basepos = {x=0, y=0},
static_save = false,
on_activate = function(self, staticdata)
self.object:set_sprite({x=0,y=0}, 1, 0, true)
end,
on_step = function(self, dtime)
local k = math.random(1,222)
local ownpos = self.object:get_pos()
if k == 1 then
self.object:set_acceleration({x=0, y=-5, z=0})
end
if minetest.get_node({x=ownpos.x, y=ownpos.y +0.5, z=ownpos.z}).name == "air" then
self.object:set_acceleration({x=0, y=-5, z=0})
end
if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then
self.object:remove()
minetest.sound_play({name="drippingwater_lavadrip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}, true)
end
end,
})
--Create drop
minetest.register_abm({
label = "Create water drops",
nodenames = {"group:opaque", "group:leaves"},
neighbors = {"group:water"},
interval = 2,
chance = 22,
action = function(pos)
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name, "water") ~= 0
and minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then
local i = math.random(-45,45) / 100
minetest.add_entity({x=pos.x + i, y=pos.y - 0.501, z=pos.z + i}, "drippingwater:drop_water")
end
end,
})
--Create lava drop
minetest.register_abm({
label = "Create lava drops",
nodenames = {"group:opaque"},
neighbors = {"group:lava"},
interval = 2,
chance = 22,
action = function(pos)
if minetest.get_item_group(minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name, "lava") ~= 0
and minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "air" then
local i = math.random(-45,45) / 100
minetest.add_entity({x=pos.x + i, y=pos.y - 0.501, z=pos.z + i}, "drippingwater:drop_lava")
end
end,
})

View File

@ -1,625 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and
other kinds of works.
The licenses for most software and other practical works are designed to take
away your freedom to share and change the works. By contrast, the GNU General
Public License is intended to guarantee your freedom to share and change all
versions of a program--to make sure it remains free software for all its users.
We, the Free Software Foundation, use the GNU General Public License for most
of our software; it applies also to any other work released this way by its
authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for them if you wish), that
you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs, and that you know you
can do these things.
To protect your rights, we need to prevent others from denying you these rights
or asking you to surrender the rights. Therefore, you have certain responsibilities
if you distribute copies of the software, or if you modify it: responsibilities
to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or
for a fee, you must pass on to the recipients the same freedoms that you received.
You must make sure that they, too, receive or can get the source code. And
you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert
copyright on the software, and (2) offer you this License giving you legal
permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that
there is no warranty for this free software. For both users' and authors'
sake, the GPL requires that modified versions be marked as changed, so that
their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified
versions of the software inside them, although the manufacturer can do so.
This is fundamentally incompatible with the aim of protecting users' freedom
to change the software. The systematic pattern of such abuse occurs in the
area of products for individuals to use, which is precisely where it is most
unacceptable. Therefore, we have designed this version of the GPL to prohibit
the practice for those products. If such problems arise substantially in other
domains, we stand ready to extend this provision to those domains in future
versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States
should not allow patents to restrict development and use of software on general-purpose
computers, but in those that do, we wish to avoid the special danger that
patents applied to a free program could make it effectively proprietary. To
prevent this, the GPL assures that patents cannot be used to render the program
non-free.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of works,
such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this License.
Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals
or organizations.
To "modify" a work means to copy from or adapt all or part of the work in
a fashion requiring copyright permission, other than the making of an exact
copy. The resulting work is called a "modified version" of the earlier work
or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based on the
Program.
To "propagate" a work means to do anything with it that, without permission,
would make you directly or secondarily liable for infringement under applicable
copyright law, except executing it on a computer or modifying a private copy.
Propagation includes copying, distribution (with or without modification),
making available to the public, and in some countries other activities as
well.
To "convey" a work means any kind of propagation that enables other parties
to make or receive copies. Mere interaction with a user through a computer
network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices" to the
extent that it includes a convenient and prominently visible feature that
(1) displays an appropriate copyright notice, and (2) tells the user that
there is no warranty for the work (except to the extent that warranties are
provided), that licensees may convey the work under this License, and how
to view a copy of this License. If the interface presents a list of user commands
or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work for making
modifications to it. "Object code" means any non-source form of a work.
A "Standard Interface" means an interface that either is an official standard
defined by a recognized standards body, or, in the case of interfaces specified
for a particular programming language, one that is widely used among developers
working in that language.
The "System Libraries" of an executable work include anything, other than
the work as a whole, that (a) is included in the normal form of packaging
a Major Component, but which is not part of that Major Component, and (b)
serves only to enable use of the work with that Major Component, or to implement
a Standard Interface for which an implementation is available to the public
in source code form. A "Major Component", in this context, means a major essential
component (kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to produce
the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all the source
code needed to generate, install, and (for an executable work) run the object
code and to modify the work, including scripts to control those activities.
However, it does not include the work's System Libraries, or general-purpose
tools or generally available free programs which are used unmodified in performing
those activities but which are not part of the work. For example, Corresponding
Source includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically linked
subprograms that the work is specifically designed to require, such as by
intimate data communication or control flow between those subprograms and
other parts of the work.
The Corresponding Source need not include anything that users can regenerate
automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright
on the Program, and are irrevocable provided the stated conditions are met.
This License explicitly affirms your unlimited permission to run the unmodified
Program. The output from running a covered work is covered by this License
only if the output, given its content, constitutes a covered work. This License
acknowledges your rights of fair use or other equivalent, as provided by copyright
law.
You may make, run and propagate covered works that you do not convey, without
conditions so long as your license otherwise remains in force. You may convey
covered works to others for the sole purpose of having them make modifications
exclusively for you, or provide you with facilities for running those works,
provided that you comply with the terms of this License in conveying all material
for which you do not control copyright. Those thus making or running the covered
works for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of your copyrighted
material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure
under any applicable law fulfilling obligations under article 11 of the WIPO
copyright treaty adopted on 20 December 1996, or similar laws prohibiting
or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention
of technological measures to the extent such circumvention is effected by
exercising rights under this License with respect to the covered work, and
you disclaim any intention to limit operation or modification of the work
as a means of enforcing, against the work's users, your or third parties'
legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive
it, in any medium, provided that you conspicuously and appropriately publish
on each copy an appropriate copyright notice; keep intact all notices stating
that this License and any non-permissive terms added in accord with section
7 apply to the code; keep intact all notices of the absence of any warranty;
and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you
may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce
it from the Program, in the form of source code under the terms of section
4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and
giving a relevant date.
b) The work must carry prominent notices stating that it is released under
this License and any conditions added under section 7. This requirement modifies
the requirement in section 4 to "keep intact all notices".
c) You must license the entire work, as a whole, under this License to anyone
who comes into possession of a copy. This License will therefore apply, along
with any applicable section 7 additional terms, to the whole of the work,
and all its parts, regardless of how they are packaged. This License gives
no permission to license the work in any other way, but it does not invalidate
such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate
Legal Notices; however, if the Program has interactive interfaces that do
not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works,
which are not by their nature extensions of the covered work, and which are
not combined with it such as to form a larger program, in or on a volume of
a storage or distribution medium, is called an "aggregate" if the compilation
and its resulting copyright are not used to limit the access or legal rights
of the compilation's users beyond what the individual works permit. Inclusion
of a covered work in an aggregate does not cause this License to apply to
the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections
4 and 5, provided that you also convey the machine-readable Corresponding
Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including
a physical distribution medium), accompanied by the Corresponding Source fixed
on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including
a physical distribution medium), accompanied by a written offer, valid for
at least three years and valid for as long as you offer spare parts or customer
support for that product model, to give anyone who possesses the object code
either (1) a copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical medium customarily
used for software interchange, for a price no more than your reasonable cost
of physically performing this conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written
offer to provide the Corresponding Source. This alternative is allowed only
occasionally and noncommercially, and only if you received the object code
with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis
or for a charge), and offer equivalent access to the Corresponding Source
in the same way through the same place at no further charge. You need not
require recipients to copy the Corresponding Source along with the object
code. If the place to copy the object code is a network server, the Corresponding
Source may be on a different server (operated by you or a third party) that
supports equivalent copying facilities, provided you maintain clear directions
next to the object code saying where to find the Corresponding Source. Regardless
of what server hosts the Corresponding Source, you remain obligated to ensure
that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform
other peers where the object code and Corresponding Source of the work are
being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from
the Corresponding Source as a System Library, need not be included in conveying
the object code work.
A "User Product" is either (1) a "consumer product", which means any tangible
personal property which is normally used for personal, family, or household
purposes, or (2) anything designed or sold for incorporation into a dwelling.
In determining whether a product is a consumer product, doubtful cases shall
be resolved in favor of coverage. For a particular product received by a particular
user, "normally used" refers to a typical or common use of that class of product,
regardless of the status of the particular user or of the way in which the
particular user actually uses, or expects or is expected to use, the product.
A product is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent the
only significant mode of use of the product.
"Installation Information" for a User Product means any methods, procedures,
authorization keys, or other information required to install and execute modified
versions of a covered work in that User Product from a modified version of
its Corresponding Source. The information must suffice to ensure that the
continued functioning of the modified object code is in no case prevented
or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically
for use in, a User Product, and the conveying occurs as part of a transaction
in which the right of possession and use of the User Product is transferred
to the recipient in perpetuity or for a fixed term (regardless of how the
transaction is characterized), the Corresponding Source conveyed under this
section must be accompanied by the Installation Information. But this requirement
does not apply if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has been installed
in ROM).
The requirement to provide Installation Information does not include a requirement
to continue to provide support service, warranty, or updates for a work that
has been modified or installed by the recipient, or for the User Product in
which it has been modified or installed. Access to a network may be denied
when the modification itself materially and adversely affects the operation
of the network or violates the rules and protocols for communication across
the network.
Corresponding Source conveyed, and Installation Information provided, in accord
with this section must be in a format that is publicly documented (and with
an implementation available to the public in source code form), and must require
no special password or key for unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this License
by making exceptions from one or more of its conditions. Additional permissions
that are applicable to the entire Program shall be treated as though they
were included in this License, to the extent that they are valid under applicable
law. If additional permissions apply only to part of the Program, that part
may be used separately under those permissions, but the entire Program remains
governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any
additional permissions from that copy, or from any part of it. (Additional
permissions may be written to require their own removal in certain cases when
you modify the work.) You may place additional permissions on material, added
by you to a covered work, for which you have or can give appropriate copyright
permission.
Notwithstanding any other provision of this License, for material you add
to a covered work, you may (if authorized by the copyright holders of that
material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of
sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author
attributions in that material or in the Appropriate Legal Notices displayed
by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring
that modified versions of such material be marked in reasonable ways as different
from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors
of the material; or
e) Declining to grant rights under trademark law for use of some trade names,
trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by
anyone who conveys the material (or modified versions of it) with contractual
assumptions of liability to the recipient, for any liability that these contractual
assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered "further restrictions"
within the meaning of section 10. If the Program as you received it, or any
part of it, contains a notice stating that it is governed by this License
along with a term that is a further restriction, you may remove that term.
If a license document contains a further restriction but permits relicensing
or conveying under this License, you may add to a covered work material governed
by the terms of that license document, provided that the further restriction
does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place,
in the relevant source files, a statement of the additional terms that apply
to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form
of a separately written license, or stated as exceptions; the above requirements
apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided
under this License. Any attempt otherwise to propagate or modify it is void,
and will automatically terminate your rights under this License (including
any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from
a particular copyright holder is reinstated (a) provisionally, unless and
until the copyright holder explicitly and finally terminates your license,
and (b) permanently, if the copyright holder fails to notify you of the violation
by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently
if the copyright holder notifies you of the violation by some reasonable means,
this is the first time you have received notice of violation of this License
(for any work) from that copyright holder, and you cure the violation prior
to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses
of parties who have received copies or rights from you under this License.
If your rights have been terminated and not permanently reinstated, you do
not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy
of the Program. Ancillary propagation of a covered work occurring solely as
a consequence of using peer-to-peer transmission to receive a copy likewise
does not require acceptance. However, nothing other than this License grants
you permission to propagate or modify any covered work. These actions infringe
copyright if you do not accept this License. Therefore, by modifying or propagating
a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives
a license from the original licensors, to run, modify and propagate that work,
subject to this License. You are not responsible for enforcing compliance
by third parties with this License.
An "entity transaction" is a transaction transferring control of an organization,
or substantially all assets of one, or subdividing an organization, or merging
organizations. If propagation of a covered work results from an entity transaction,
each party to that transaction who receives a copy of the work also receives
whatever licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the Corresponding
Source of the work from the predecessor in interest, if the predecessor has
it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights
granted or affirmed under this License. For example, you may not impose a
license fee, royalty, or other charge for exercise of rights granted under
this License, and you may not initiate litigation (including a cross-claim
or counterclaim in a lawsuit) alleging that any patent claim is infringed
by making, using, selling, offering for sale, or importing the Program or
any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this License
of the Program or a work on which the Program is based. The work thus licensed
is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims owned or controlled
by the contributor, whether already acquired or hereafter acquired, that would
be infringed by some manner, permitted by this License, of making, using,
or selling its contributor version, but do not include claims that would be
infringed only as a consequence of further modification of the contributor
version. For purposes of this definition, "control" includes the right to
grant patent sublicenses in a manner consistent with the requirements of this
License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent
license under the contributor's essential patent claims, to make, use, sell,
offer for sale, import and otherwise run, modify and propagate the contents
of its contributor version.
In the following three paragraphs, a "patent license" is any express agreement
or commitment, however denominated, not to enforce a patent (such as an express
permission to practice a patent or covenant not to sue for patent infringement).
To "grant" such a patent license to a party means to make such an agreement
or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the
Corresponding Source of the work is not available for anyone to copy, free
of charge and under the terms of this License, through a publicly available
network server or other readily accessible means, then you must either (1)
cause the Corresponding Source to be so available, or (2) arrange to deprive
yourself of the benefit of the patent license for this particular work, or
(3) arrange, in a manner consistent with the requirements of this License,
to extend the patent license to downstream recipients. "Knowingly relying"
means you have actual knowledge that, but for the patent license, your conveying
the covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that country
that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement,
you convey, or propagate by procuring conveyance of, a covered work, and grant
a patent license to some of the parties receiving the covered work authorizing
them to use, propagate, modify or convey a specific copy of the covered work,
then the patent license you grant is automatically extended to all recipients
of the covered work and works based on it.
A patent license is "discriminatory" if it does not include within the scope
of its coverage, prohibits the exercise of, or is conditioned on the non-exercise
of one or more of the rights that are specifically granted under this License.
You may not convey a covered work if you are a party to an arrangement with
a third party that is in the business of distributing software, under which
you make payment to the third party based on the extent of your activity of
conveying the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory patent
license (a) in connection with copies of the covered work conveyed by you
(or copies made from those copies), or (b) primarily for and in connection
with specific products or compilations that contain the covered work, unless
you entered into that arrangement, or that patent license was granted, prior
to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied
license or other defenses to infringement that may otherwise be available
to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise)
that contradict the conditions of this License, they do not excuse you from
the conditions of this License. If you cannot convey a covered work so as
to satisfy simultaneously your obligations under this License and any other
pertinent obligations, then as a consequence you may not convey it at all.
For example, if you agree to terms that obligate you to collect a royalty
for further conveying from those to whom you convey the Program, the only
way you could satisfy both those terms and this License would be to refrain
entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to
link or combine any covered work with a work licensed under version 3 of the
GNU Affero General Public License into a single combined work, and to convey
the resulting work. The terms of this License will continue to apply to the
part which is the covered work, but the special requirements of the GNU Affero
General Public License, section 13, concerning interaction through a network
will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the
GNU General Public License from time to time. Such new versions will be similar
in spirit to the present version, but may differ in detail to address new
problems or concerns.
Each version is given a distinguishing version number. If the Program specifies
that a certain numbered version of the GNU General Public License "or any
later version" applies to it, you have the option of following the terms and
conditions either of that numbered version or of any later version published
by the Free Software Foundation. If the Program does not specify a version
number of the GNU General Public License, you may choose any version ever
published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of
the GNU General Public License can be used, that proxy's public statement
of acceptance of a version permanently authorizes you to choose that version
for the Program.
Later license versions may give you additional or different permissions. However,
no additional obligations are imposed on any author or copyright holder as
a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM
AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO
USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE
PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot
be given local legal effect according to their terms, reviewing courts shall
apply local law that most closely approximates an absolute waiver of all civil
liability in connection with the Program, unless a warranty or assumption
of liability accompanies a copy of the Program in return for a fee. END OF
TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively state the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like
this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain
conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands might
be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. For
more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General Public
License instead of this License. But first, please read <https://www.gnu.org/
licenses /why-not-lgpl.html>.

View File

@ -1,3 +0,0 @@
# extra_mobs
A mod that adds aditional mobs to Mineclone 2, namely mobs that were added in updates of Minecraft past 1.12 (Mineclone's goal)

View File

@ -1,39 +0,0 @@
TODO.Mobs:
Mountain Goats
Fish
Dolfins
Fox
Pandas
Zombified Piglins
Pillagers
Ravagers
Phantoms
Hoglins
Zoglins
Drowneds
Glow Squids
Axolotls
Done.Mobs:
Piglins
Strider
Herobrine (optional)
Hoglin/Zoglin

View File

@ -1,262 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local dir_to_pitch = function(dir)
local dir2 = vector.normalize(dir)
local xz = math.abs(dir.x) + math.abs(dir.z)
return -math.atan2(-dir.y, xz)
end
local function degrees(rad)
return rad * 180.0 / math.pi
end
local S = minetest.get_translator("extra_mobs")
--###################
--################### cod
--###################
local cod = {
type = "animal",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 3,
hp_max = 3,
xp_min = 1,
xp_max = 3,
armor = 100,
rotate = 270,
tilt_swim = true,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
visual = "mesh",
mesh = "extra_mobs_cod.b3d",
textures = {
{"extra_mobs_cod.png"}
},
sounds = {
},
animation = {
stand_start = 1,
stand_end = 20,
walk_start = 1,
walk_end = 20,
run_start = 1,
run_end = 20,
},
drops = {
{name = "mcl_fishing:fish_raw",
chance = 1,
min = 1,
max = 1,},
{name = "mcl_dye:white",
chance = 20,
min = 1,
max = 1,},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
swim = true,
breathes_in_water = true,
jump = false,
view_range = 16,
runaway = true,
fear_height = 4,
do_custom = function(self)
self.object:set_bone_position("body", vector.new(0,1,0), vector.new(degrees(dir_to_pitch(self.object:get_velocity())) * -1 + 90,0,0))
if minetest.get_item_group(self.standing_in, "water") ~= 0 then
if self.object:get_velocity().y < 2.5 then
self.object:add_velocity({ x = 0 , y = math.random(-.002, .002) , z = 0 })
end
end
for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 10)) do
local lp = object:get_pos()
local s = self.object:get_pos()
local vec = {
x = lp.x - s.x,
y = lp.y - s.y,
z = lp.z - s.z
}
if object and not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "extra_mobs:cod" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
end
end
end
}
mobs:register_mob("extra_mobs:cod", cod)
--spawning TODO: in schools
local water = mobs_mc.spawn_height.water + 1
mobs:spawn_specific(
"extra_mobs:cod",
"overworld",
"water",
{
"Mesa",
"FlowerForest",
"Swampland",
"Taiga",
"ExtremeHills",
"Jungle",
"Savanna",
"BirchForest",
"MegaSpruceTaiga",
"MegaTaiga",
"ExtremeHills+",
"Forest",
"Plains",
"Desert",
"ColdTaiga",
"MushroomIsland",
"IcePlainsSpikes",
"SunflowerPlains",
"IcePlains",
"RoofedForest",
"ExtremeHills+_snowtop",
"MesaPlateauFM_grasstop",
"JungleEdgeM",
"ExtremeHillsM",
"JungleM",
"BirchForestM",
"MesaPlateauF",
"MesaPlateauFM",
"MesaPlateauF_grasstop",
"MesaBryce",
"JungleEdge",
"SavannaM",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"RoofedForest_ocean",
"JungleEdgeM_ocean",
"BirchForestM_ocean",
"BirchForest_ocean",
"IcePlains_deep_ocean",
"Jungle_deep_ocean",
"Savanna_ocean",
"MesaPlateauF_ocean",
"ExtremeHillsM_deep_ocean",
"Savanna_deep_ocean",
"SunflowerPlains_ocean",
"Swampland_deep_ocean",
"Swampland_ocean",
"MegaSpruceTaiga_deep_ocean",
"ExtremeHillsM_ocean",
"JungleEdgeM_deep_ocean",
"SunflowerPlains_deep_ocean",
"BirchForest_deep_ocean",
"IcePlainsSpikes_ocean",
"Mesa_ocean",
"StoneBeach_ocean",
"Plains_deep_ocean",
"JungleEdge_deep_ocean",
"SavannaM_deep_ocean",
"Desert_deep_ocean",
"Mesa_deep_ocean",
"ColdTaiga_deep_ocean",
"Plains_ocean",
"MesaPlateauFM_ocean",
"Forest_deep_ocean",
"JungleM_deep_ocean",
"FlowerForest_deep_ocean",
"MushroomIsland_ocean",
"MegaTaiga_ocean",
"StoneBeach_deep_ocean",
"IcePlainsSpikes_deep_ocean",
"ColdTaiga_ocean",
"SavannaM_ocean",
"MesaPlateauF_deep_ocean",
"MesaBryce_deep_ocean",
"ExtremeHills+_deep_ocean",
"ExtremeHills_ocean",
"MushroomIsland_deep_ocean",
"Forest_ocean",
"MegaTaiga_deep_ocean",
"JungleEdge_ocean",
"MesaBryce_ocean",
"MegaSpruceTaiga_ocean",
"ExtremeHills+_ocean",
"Jungle_ocean",
"RoofedForest_deep_ocean",
"IcePlains_ocean",
"FlowerForest_ocean",
"ExtremeHills_deep_ocean",
"MesaPlateauFM_deep_ocean",
"Desert_ocean",
"Taiga_ocean",
"BirchForestM_deep_ocean",
"Taiga_deep_ocean",
"JungleM_ocean",
"FlowerForest_underground",
"JungleEdge_underground",
"StoneBeach_underground",
"MesaBryce_underground",
"Mesa_underground",
"RoofedForest_underground",
"Jungle_underground",
"Swampland_underground",
"MushroomIsland_underground",
"BirchForest_underground",
"Plains_underground",
"MesaPlateauF_underground",
"ExtremeHills_underground",
"MegaSpruceTaiga_underground",
"BirchForestM_underground",
"SavannaM_underground",
"MesaPlateauFM_underground",
"Desert_underground",
"Savanna_underground",
"Forest_underground",
"SunflowerPlains_underground",
"ColdTaiga_underground",
"IcePlains_underground",
"IcePlainsSpikes_underground",
"MegaTaiga_underground",
"Taiga_underground",
"ExtremeHills+_underground",
"JungleM_underground",
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
30,
4000,
3,
water-16,
water)
--spawn egg
mobs:register_egg("extra_mobs:cod", S("Cod"), "extra_mobs_spawn_icon_cod.png", 0)

View File

@ -1,3 +0,0 @@
Strider textures -- [NO11]
Fox textures -- [NO11]
fungus on a stick ability -- [TechDudie]

View File

@ -1 +0,0 @@
mobs_mc

View File

@ -1,249 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local dir_to_pitch = function(dir)
local dir2 = vector.normalize(dir)
local xz = math.abs(dir.x) + math.abs(dir.z)
return -math.atan2(-dir.y, xz)
end
local function degrees(rad)
return rad * 180.0 / math.pi
end
local S = minetest.get_translator("extra_mobs")
--###################
--################### dolphin
--###################
local dolphin = {
type = "monster",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 3,
armor = 100,
walk_chance = 100,
breath_max = 120,
rotate = 270,
tilt_swim = true,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
visual = "mesh",
mesh = "extra_mobs_dolphin.b3d",
textures = {
{"extra_mobs_dolphin.png"}
},
sounds = {
},
animation = {
stand_start = 20,
stand_end = 20,
walk_start = 0,
walk_end = 15,
run_start = 30,
run_end = 45,
},
drops = {
{name = "mcl_fishing:fish_raw",
chance = 1,
min = 0,
max = 1,},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
swim = true,
breathes_in_water = true,
jump = false,
view_range = 16,
fear_height = 4,
walk_velocity = 3,
run_velocity = 6,
reach = 2,
damage = 2.5,
attack_type = "dogfight",
do_custom = function(self)
self.object:set_bone_position("body", vector.new(0,1,0), vector.new(degrees(dir_to_pitch(self.object:get_velocity())) * -1 + 90,0,0))
if minetest.get_item_group(self.standing_in, "water") ~= 0 then
if self.object:get_velocity().y < 5 then
self.object:add_velocity({ x = 0 , y = math.random(-.007, .007), z = 0 })
end
end
end,
}
mobs:register_mob("extra_mobs:dolphin", dolphin)
--spawning TODO: in schools
local water = mobs_mc.spawn_height.water + 1
mobs:spawn_specific(
"extra_mobs:dolphin",
"overworld",
"water",
{
"Mesa",
"FlowerForest",
"Swampland",
"Taiga",
"ExtremeHills",
"Jungle",
"Savanna",
"BirchForest",
"MegaSpruceTaiga",
"MegaTaiga",
"ExtremeHills+",
"Forest",
"Plains",
"Desert",
"ColdTaiga",
"MushroomIsland",
"IcePlainsSpikes",
"SunflowerPlains",
"IcePlains",
"RoofedForest",
"ExtremeHills+_snowtop",
"MesaPlateauFM_grasstop",
"JungleEdgeM",
"ExtremeHillsM",
"JungleM",
"BirchForestM",
"MesaPlateauF",
"MesaPlateauFM",
"MesaPlateauF_grasstop",
"MesaBryce",
"JungleEdge",
"SavannaM",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"RoofedForest_ocean",
"JungleEdgeM_ocean",
"BirchForestM_ocean",
"BirchForest_ocean",
"IcePlains_deep_ocean",
"Jungle_deep_ocean",
"Savanna_ocean",
"MesaPlateauF_ocean",
"ExtremeHillsM_deep_ocean",
"Savanna_deep_ocean",
"SunflowerPlains_ocean",
"Swampland_deep_ocean",
"Swampland_ocean",
"MegaSpruceTaiga_deep_ocean",
"ExtremeHillsM_ocean",
"JungleEdgeM_deep_ocean",
"SunflowerPlains_deep_ocean",
"BirchForest_deep_ocean",
"IcePlainsSpikes_ocean",
"Mesa_ocean",
"StoneBeach_ocean",
"Plains_deep_ocean",
"JungleEdge_deep_ocean",
"SavannaM_deep_ocean",
"Desert_deep_ocean",
"Mesa_deep_ocean",
"ColdTaiga_deep_ocean",
"Plains_ocean",
"MesaPlateauFM_ocean",
"Forest_deep_ocean",
"JungleM_deep_ocean",
"FlowerForest_deep_ocean",
"MushroomIsland_ocean",
"MegaTaiga_ocean",
"StoneBeach_deep_ocean",
"IcePlainsSpikes_deep_ocean",
"ColdTaiga_ocean",
"SavannaM_ocean",
"MesaPlateauF_deep_ocean",
"MesaBryce_deep_ocean",
"ExtremeHills+_deep_ocean",
"ExtremeHills_ocean",
"MushroomIsland_deep_ocean",
"Forest_ocean",
"MegaTaiga_deep_ocean",
"JungleEdge_ocean",
"MesaBryce_ocean",
"MegaSpruceTaiga_ocean",
"ExtremeHills+_ocean",
"Jungle_ocean",
"RoofedForest_deep_ocean",
"IcePlains_ocean",
"FlowerForest_ocean",
"ExtremeHills_deep_ocean",
"MesaPlateauFM_deep_ocean",
"Desert_ocean",
"Taiga_ocean",
"BirchForestM_deep_ocean",
"Taiga_deep_ocean",
"JungleM_ocean",
"FlowerForest_underground",
"JungleEdge_underground",
"StoneBeach_underground",
"MesaBryce_underground",
"Mesa_underground",
"RoofedForest_underground",
"Jungle_underground",
"Swampland_underground",
"MushroomIsland_underground",
"BirchForest_underground",
"Plains_underground",
"MesaPlateauF_underground",
"ExtremeHills_underground",
"MegaSpruceTaiga_underground",
"BirchForestM_underground",
"SavannaM_underground",
"MesaPlateauFM_underground",
"Desert_underground",
"Savanna_underground",
"Forest_underground",
"SunflowerPlains_underground",
"ColdTaiga_underground",
"IcePlains_underground",
"IcePlainsSpikes_underground",
"MegaTaiga_underground",
"Taiga_underground",
"ExtremeHills+_underground",
"JungleM_underground",
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
30,
4000,
3,
water-16,
water)
--spawn egg
mobs:register_egg("extra_mobs:dolphin", S("dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)

View File

@ -1,177 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local S = minetest.get_translator("extra_mobs")
--###################
--################### fox
--###################
local followitem = ""
if minetest.get_modpath("mc_sweet_berry") then
followitem = "mc_sweet_berry:sweet_berry"
else
followitem = nil
end
local fox = {
type = "monster",
passive = false,
spawn_class = "hostile",
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 2,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 1.5,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
visual = "mesh",
mesh = "extra_mobs_fox.b3d",
textures = { {
"extra_mobs_fox.png",
"extra_mobs_trans.png",
} },
visual_size = {x=3, y=3},
sounds = {
},
jump = true,
makes_footstep_sound = true,
walk_velocity = 3,
run_velocity = 6,
drops = {
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 11,
stand_end = 11,
walk_start = 0,
walk_end = 10,
run_start = 0,
run_end = 10,
pounce_start = 11,
pounce_end = 31,
lay_start = 34,
lay_end = 34,
},
runaway = true,
on_spawn = function(self)
if minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:snow") ~= nil or minetest.find_node_near(self.object:get_pos(), 4, "mcl_core:dirt_with_grass_snow") ~= nil then
self.object:set_properties({textures={"extra_mobs_artic_fox.png", "extra_mobs_trans.png"}})
end
end,
do_custom = function(self)
if self.child == true then
self.object:set_properties({textures={self.base_texture[1], self.base_texture[1]}})
end
if self.state ~= "attack" and math.random(1, 5000) == 1 then
self.state = "lay"
self.object:set_animation({x= 12, y=16})
minetest.after(math.random(10, 500), function()
if self.state == "lay" then
self.state = "stand"
end
end)
end
for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 8)) do
if object and not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "extra_mobs:fox" and self.state ~= "attack" and math.random(1, 500) == 1 then
self.horny = true
end
local lp = object:get_pos()
local s = self.object:get_pos()
local vec = {
x = lp.x - s.x,
y = lp.y - s.y,
z = lp.z - s.z
}
if object and object:is_player() and not object:get_player_control().sneak or not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "mobs_mc:wolf" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
if self.reach > vector.distance(self.object:get_pos(), object:get_pos()) and self.timer > .9 then
self.timer = 0
object:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
end
end
end,
do_punch = function(self)
self.state = "runaway"
end,
follow = followitem,
fear_height = 4,
view_range = 16,
specific_attack = { "mobs_mc:chicken", "extra_mobs:cod", "extra_mobs:salmon" },
}
mobs:register_mob("extra_mobs:fox", fox)
-- spawning
mobs:spawn_specific(
"extra_mobs:fox",
"overworld",
"ground",
{
"FlowerForest",
"Swampland",
"Taiga",
"ExtremeHills",
"BirchForest",
"MegaSpruceTaiga",
"MegaTaiga",
"ExtremeHills+",
"Forest",
"Plains",
"ColdTaiga",
"SunflowerPlains",
"RoofedForest",
"MesaPlateauFM_grasstop",
"ExtremeHillsM",
"BirchForestM",
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.water,
mobs_mc.spawn_height.overworld_max)
--mobs:spawn_specific("extra_mobs:fox", "overworld", "ground", 0, minetest.LIGHT_MAX+1, 30, 6000, 3, 0, 500)
--[[
mobs:spawn_specific(
"extra_mobs:artic_fox",
"overworld",
"ground",
{
"ColdTaiga",
"IcePlainsSpikes",
"IcePlains",
"ExtremeHills+_snowtop",
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.water,
mobs_mc.spawn_height.overworld_max)
]]--
-- spawn eggs
mobs:register_egg("extra_mobs:fox", S("Fox"), "extra_mobs_spawn_icon_fox.png", 0)

View File

@ -1,233 +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("extra_mobs")
mobs:register_mob("extra_mobs:glow_squid",{
type = "animal",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 3,
armor = 100,
rotate = 270,
tilt_swim = true,
-- FIXME: If the qlow squid is near the floor, it turns black
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9, 0.4},
visual = "mesh",
mesh = "extra_mobs_glow_squid.b3d",
textures = {
{"extra_mobs_glow_squid.png"}
},
sounds = {
damage = {name="mobs_mc_squid_hurt", gain=0.3},
death = {name="mobs_mc_squid_death", gain=0.4},
flop = "mobs_mc_squid_flop",
distance = 16,
},
animation = {
stand_start = 1,
stand_end = 60,
walk_start = 1,
walk_end = 60,
run_start = 1,
run_end = 60,
},
drops = {
{name = "extra_mobs:glow_ink_sac",
chance = 1,
min = 1,
max = 3,
looting = "common",},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
swim = true,
breathes_in_water = true,
jump = false,
view_range = 16,
runaway = true,
fear_height = 4,
glow = minetest.LIGHT_MAX,
do_custom = function(self, dtime)
local glowSquidPos = self.object:get_pos()
local chanceOfParticle = math.random(0, 2)
if chanceOfParticle >= 1 then
minetest.add_particle({
pos = {x=glowSquidPos.x+math.random(-2,2)*math.random()/2,y=glowSquidPos.y+math.random(-1,2),z=glowSquidPos.z+math.random(-2,2)*math.random()/2},
velocity = {x=math.random(-0.25,0.25), y=math.random(-0.25,0.25), z=math.random(-0.25,0.25)},
acceleration = {x=math.random(-0.5,0.5), y=math.random(-0.5,0.5), z=math.random(-0.5,0.5)},
expirationtime = math.random(),
size = 1.5 + math.random(),
collisiondetection = true,
vertical = false,
texture = "glint"..math.random(1, 4)..".png",
glow = minetest.LIGHT_MAX,
})
end
end
})
-- spawning
local water = mobs_mc.spawn_height.water + 1
mobs:spawn_specific(
"extra_mobs:glow_squid",
"overworld",
"water",
{
"Mesa",
"FlowerForest",
"Swampland",
"Taiga",
"ExtremeHills",
"Jungle",
"Savanna",
"BirchForest",
"MegaSpruceTaiga",
"MegaTaiga",
"ExtremeHills+",
"Forest",
"Plains",
"Desert",
"ColdTaiga",
"MushroomIsland",
"IcePlainsSpikes",
"SunflowerPlains",
"IcePlains",
"RoofedForest",
"ExtremeHills+_snowtop",
"MesaPlateauFM_grasstop",
"JungleEdgeM",
"ExtremeHillsM",
"JungleM",
"BirchForestM",
"MesaPlateauF",
"MesaPlateauFM",
"MesaPlateauF_grasstop",
"MesaBryce",
"JungleEdge",
"SavannaM",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"RoofedForest_ocean",
"JungleEdgeM_ocean",
"BirchForestM_ocean",
"BirchForest_ocean",
"IcePlains_deep_ocean",
"Jungle_deep_ocean",
"Savanna_ocean",
"MesaPlateauF_ocean",
"ExtremeHillsM_deep_ocean",
"Savanna_deep_ocean",
"SunflowerPlains_ocean",
"Swampland_deep_ocean",
"Swampland_ocean",
"MegaSpruceTaiga_deep_ocean",
"ExtremeHillsM_ocean",
"JungleEdgeM_deep_ocean",
"SunflowerPlains_deep_ocean",
"BirchForest_deep_ocean",
"IcePlainsSpikes_ocean",
"Mesa_ocean",
"StoneBeach_ocean",
"Plains_deep_ocean",
"JungleEdge_deep_ocean",
"SavannaM_deep_ocean",
"Desert_deep_ocean",
"Mesa_deep_ocean",
"ColdTaiga_deep_ocean",
"Plains_ocean",
"MesaPlateauFM_ocean",
"Forest_deep_ocean",
"JungleM_deep_ocean",
"FlowerForest_deep_ocean",
"MushroomIsland_ocean",
"MegaTaiga_ocean",
"StoneBeach_deep_ocean",
"IcePlainsSpikes_deep_ocean",
"ColdTaiga_ocean",
"SavannaM_ocean",
"MesaPlateauF_deep_ocean",
"MesaBryce_deep_ocean",
"ExtremeHills+_deep_ocean",
"ExtremeHills_ocean",
"MushroomIsland_deep_ocean",
"Forest_ocean",
"MegaTaiga_deep_ocean",
"JungleEdge_ocean",
"MesaBryce_ocean",
"MegaSpruceTaiga_ocean",
"ExtremeHills+_ocean",
"Jungle_ocean",
"RoofedForest_deep_ocean",
"IcePlains_ocean",
"FlowerForest_ocean",
"ExtremeHills_deep_ocean",
"MesaPlateauFM_deep_ocean",
"Desert_ocean",
"Taiga_ocean",
"BirchForestM_deep_ocean",
"Taiga_deep_ocean",
"JungleM_ocean",
"FlowerForest_underground",
"JungleEdge_underground",
"StoneBeach_underground",
"MesaBryce_underground",
"Mesa_underground",
"RoofedForest_underground",
"Jungle_underground",
"Swampland_underground",
"MushroomIsland_underground",
"BirchForest_underground",
"Plains_underground",
"MesaPlateauF_underground",
"ExtremeHills_underground",
"MegaSpruceTaiga_underground",
"BirchForestM_underground",
"SavannaM_underground",
"MesaPlateauFM_underground",
"Desert_underground",
"Savanna_underground",
"Forest_underground",
"SunflowerPlains_underground",
"ColdTaiga_underground",
"IcePlains_underground",
"IcePlainsSpikes_underground",
"MegaTaiga_underground",
"Taiga_underground",
"ExtremeHills+_underground",
"JungleM_underground",
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
30,
10000,
3,
water-16,
water)
-- spawn egg
mobs:register_egg("extra_mobs:glow_squid", S("Glow Squid"), "extra_mobs_spawn_icon_glow_squid.png", 0)

View File

@ -1,329 +0,0 @@
local S = minetest.get_translator("extra_mobs")
minetest.register_craftitem("extra_mobs:glow_ink_sac", {
description = S("Glow Ink Sac"),
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
inventory_image = "extra_mobs_glow_ink_sac.png",
groups = { craftitem = 1 },
})
--------------------
--[[This mod is originally by Zeg9, but heavily modified for MineClone 2.
Model created by 22i, licensed under the
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>.
Source: <https://github.com/22i/amc>
]]
local VISUAL_SIZE = 0.3
minetest.register_entity("extra_mobs:glow_item_frame_item",{
hp_max = 1,
visual = "wielditem",
visual_size = {x=VISUAL_SIZE, y=VISUAL_SIZE},
physical = false,
pointable = false,
textures = { "blank.png" },
_texture = "blank.png",
_scale = 1,
glow = minetest.LIGHT_MAX,
on_activate = function(self, staticdata)
if staticdata ~= nil and staticdata ~= "" then
local data = staticdata:split(';')
if data and data[1] and data[2] then
self._nodename = data[1]
self._texture = data[2]
if data[3] then
self._scale = data[3]
else
self._scale = 1
end
end
end
if self._texture ~= nil then
self.object:set_properties({
textures={self._texture},
visual_size={x=VISUAL_SIZE/self._scale, y=VISUAL_SIZE/self._scale},
})
end
end,
get_staticdata = function(self)
if self._nodename ~= nil and self._texture ~= nil then
local ret = self._nodename .. ';' .. self._texture
if self._scale ~= nil then
ret = ret .. ';' .. self._scale
end
return ret
end
return ""
end,
_update_texture = function(self)
if self._texture ~= nil then
self.object:set_properties({
textures={self._texture},
visual_size={x=VISUAL_SIZE/self._scale, y=VISUAL_SIZE/self._scale},
})
end
end,
})
local facedir = {}
facedir[0] = {x=0,y=0,z=1}
facedir[1] = {x=1,y=0,z=0}
facedir[2] = {x=0,y=0,z=-1}
facedir[3] = {x=-1,y=0,z=0}
local remove_item_entity = function(pos, node)
local objs = nil
if node.name == "extra_mobs:glow_item_frame" then
objs = minetest.get_objects_inside_radius(pos, .5)
end
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "extra_mobs:glow_item_frame_item" then
obj:remove()
end
end
end
end
local update_item_entity = function(pos, node, param2)
remove_item_entity(pos, node)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local item = inv:get_stack("main", 1)
if not item:is_empty() then
if not param2 then
param2 = node.param2
end
if node.name == "extra_mobs:glow_item_frame" then
local posad = facedir[param2]
pos.x = pos.x + posad.x*6.5/16
pos.y = pos.y + posad.y*6.5/16
pos.z = pos.z + posad.z*6.5/16
end
local e = minetest.add_entity(pos, "extra_mobs:glow_item_frame_item")
local lua = e:get_luaentity()
lua._nodename = node.name
local itemname = item:get_name()
if itemname == "" or itemname == nil then
lua._texture = "blank.png"
lua._scale = 1
else
lua._texture = itemname
local def = minetest.registered_items[itemname]
if def and def.wield_scale then
lua._scale = def.wield_scale.x
else
lua._scale = 1
end
end
lua:_update_texture()
if node.name == "extra_mobs:glow_item_frame" then
local yaw = math.pi*2 - param2 * math.pi/2
e:set_yaw(yaw)
end
end
end
local drop_item = function(pos, node, meta, clicker)
local cname = ""
if clicker and clicker:is_player() then
cname = clicker:get_player_name()
end
if node.name == "extra_mobs:glow_item_frame" and not minetest.is_creative_enabled(cname) then
local inv = meta:get_inventory()
local item = inv:get_stack("main", 1)
if not item:is_empty() then
minetest.add_item(pos, item)
end
end
meta:set_string("infotext", "")
remove_item_entity(pos, node)
end
minetest.register_node("extra_mobs:glow_item_frame",{
description = S("Glow Item Frame"),
_tt_help = S("Can hold an item and glows"),
_doc_items_longdesc = S("Glow Item frames are decorative blocks in which items can be placed."),
_doc_items_usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item."),
drawtype = "mesh",
is_ground_content = false,
mesh = "extra_mobs_glow_item_frame.obj",
selection_box = { type = "fixed", fixed = {-6/16, -6/16, 7/16, 6/16, 6/16, 0.5} },
collision_box = { type = "fixed", fixed = {-6/16, -6/16, 7/16, 6/16, 6/16, 0.5} },
tiles = {"extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png"},
inventory_image = "extra_mobs_glow_item_frame_item.png",
wield_image = "extra_mobs_glow_item_frame.png",
paramtype = "light",
paramtype2 = "facedir",
--FIXME: should only be glowing, no light source. How is that possible with a node?
light_source = 1,
sunlight_propagates = true,
groups = { dig_immediate=3,deco_block=1,dig_by_piston=1,container=7,attached_node_facedir=1 },
sounds = mcl_sounds.node_sound_defaults(),
node_placement_prediction = "",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
-- Use pointed node's on_rightclick function first, if present
local node = minetest.get_node(pointed_thing.under)
if placer and not placer:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
end
end
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 1)
end,
on_rightclick = function(pos, node, clicker, itemstack)
if not itemstack then
return
end
local pname = clicker:get_player_name()
if minetest.is_protected(pos, pname) then
minetest.record_protection_violation(pos, pname)
return
end
local meta = minetest.get_meta(pos)
drop_item(pos, node, meta, clicker)
local inv = meta:get_inventory()
if itemstack:is_empty() then
remove_item_entity(pos, node)
meta:set_string("infotext", "")
inv:set_stack("main", 1, "")
return itemstack
end
local put_itemstack = ItemStack(itemstack)
put_itemstack:set_count(1)
inv:set_stack("main", 1, put_itemstack)
update_item_entity(pos, node)
-- Add node infotext when item has been named
local imeta = itemstack:get_meta()
local iname = imeta:get_string("name")
if iname then
meta:set_string("infotext", iname)
end
if not minetest.is_creative_enabled(clicker:get_player_name()) then
itemstack:take_item()
end
return itemstack
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return count
end
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
on_destruct = function(pos)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
drop_item(pos, node, meta)
end,
on_rotate = function(pos, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
-- Rotate face
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
local objs = nil
if node.name == "extra_mobs:glow_item_frame" then
objs = minetest.get_objects_inside_radius(pos, .5)
end
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "extra_mobs:glow_item_frame_item" then
update_item_entity(pos, node, (node.param2+1) % 4)
break
end
end
end
return
elseif mode == screwdriver.ROTATE_AXIS then
return false
end
end,
})
minetest.register_craft({
type = "shapeless",
output = 'extra_mobs:glow_item_frame',
recipe = {'mcl_itemframes:item_frame', 'extra_mobs:glow_ink_sac'},
})
minetest.register_lbm({
label = "Update legacy item frames",
name = "extra_mobs:update_legacy_glow_item_frames",
nodenames = {"extra_mobs:glow_frame"},
action = function(pos, node)
-- Swap legacy node, then respawn entity
node.name = "extra_mobs:glow_item_frame"
local meta = minetest.get_meta(pos)
local item = meta:get_string("item")
minetest.swap_node(pos, node)
if item ~= "" then
local itemstack = ItemStack(minetest.deserialize(meta:get_string("itemdata")))
local inv = meta:get_inventory()
inv:set_size("main", 1)
if not itemstack:is_empty() then
inv:set_stack("main", 1, itemstack)
end
end
update_item_entity(pos, node)
end,
})
-- FIXME: Item entities can get destroyed by /clearobjects
minetest.register_lbm({
label = "Respawn item frame item entities",
name = "extra_mobs:respawn_entities",
nodenames = {"extra_mobs:glow_item_frame"},
run_at_every_load = true,
action = function(pos, node)
update_item_entity(pos, node)
end,
})
minetest.register_alias("extra_mobs:glow_frame", "extra_mobs:glow_item_frame")
--------------------

View File

@ -1,85 +0,0 @@
local S = minetest.get_translator("extra_mobs")
local pr = PseudoRandom(os.time()*(-334))
minetest.register_entity("extra_mobs:hb_eye", {
visual = "mesh",
mesh = "mcl_armor_character.b3d",
textures = {"extra_mobs_herobrine_eyes.png", "extra_mobs_trans.png", "extra_mobs_trans.png" },
visual_size = {x=1, y=1},
on_activate = function(self)
for _,hb in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 1)) do
if not hb:is_player() and hb:get_luaentity().name == "extra_mobs:herobrine" then
self.object:set_attach(hb, "Head", {x=0,y=-13.5,z=0}, {x=0,y=0,z=0})
end
end
end,
do_custom = function(self)
if self.object:get_attach() == nil then
self.object:remove()
end
end,
glow = 10
})
mobs:register_mob("extra_mobs:herobrine", {
type = "monster",
spawn_class = "hostile",
hp_min = 20,
hp_max = 20,
xp_min = 1000,
xp_max = 1000,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 2, 0.3},
visual = "mesh",
mesh = "mcl_armor_character.b3d",
textures = {"character.png", "extra_mobs_trans.png", "extra_mobs_trans.png" },
visual_size = {x=1, y=1},
makes_footstep_sound = false,
walk_velocity = 0,
run_velocity = 0,
damage = 10,
reach = 1,
armor = {fleshy = 0},
view_range = 1000,
attack_type = "dogfight",
can_despawn = false,
on_spawn = function(self)
--if self.object:get_children() == nil then
minetest.add_entity(self.object:get_pos(), "extra_mobs:hb_eye")
--end
end,
do_custom = function(self)
for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 30)) do
if object:is_player() then
pos = self.object:get_pos()
local randomCube = vector.new( pos.x + 8*(pr:next(0,16)-8), pos.y + 8*(pr:next(0,16)-8), pos.z + 8*(pr:next(0,16)-8) )
local nodes = minetest.find_nodes_in_area_under_air(vector.subtract(randomCube, 4), vector.add(randomCube, 4), {"group:solid", "group:cracky", "group:crumbly"})
local telepos
if nodes ~= nil then
if #nodes > 0 then
-- Up to 64 attempts to teleport
for n=1, math.min(64, #nodes) do
local r = pr:next(1, #nodes)
local nodepos = nodes[r]
local node_ok = true
-- Selected node needs to have 3 nodes of free space above
for u=1, 3 do
local node = minetest.get_node({x=nodepos.x, y=nodepos.y+u, z=nodepos.z})
if minetest.registered_nodes[node.name].walkable then
node_ok = false
break
end
end
if node_ok then
telepos = {x=nodepos.x, y=nodepos.y+1, z=nodepos.z}
end
end
if telepos then
self.object:set_pos(telepos)
end
end
end
end
end
end,
})

View File

@ -1,134 +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("extra_mobs")
--###################
--################### hoglin
--###################
local hoglin = {
type = "monster",
passive = false,
spawn_class = "hostile",
hp_min = 40,
hp_max = 40,
xp_min = 9,
xp_max = 9,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 4,
reach = 3,
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
visual = "mesh",
mesh = "extra_mobs_hoglin.b3d",
textures = { {
"extra_mobs_hoglin.png",
} },
visual_size = {x=3, y=3},
sounds = {
random = "extra_mobs_hoglin",
damage = "extra_mobs_hoglin_hurt",
distance = 16,
},
jump = true,
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 4,
drops = {
{name = "mcl_mobsitems:leather",
chance = 1,
min = 0,
max = 1,},
},
drops = {
{name = "mcl_mobitems:porkchop",
chance = 1,
min = 2,
max = 4,},
},
animation = {
stand_speed = 7,
walk_speed = 7,
run_speed = 15,
stand_start = 24,
stand_end = 24,
walk_start = 11,
walk_end = 21,
run_start = 1,
run_end = 10,
punch_start = 22,
punch_end = 32,
},
fear_height = 4,
view_range = 32,
floats = 0,
custom_attack = function(self)
if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then
self.attack:add_velocity({x=0,y=13,z=0})
self.attack:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
end
end,
do_custom = function(self)
if self.object:get_pos().y > -100 then
local zog = minetest.add_entity(self.object:get_pos(), "extra_mobs:zoglin")
zog:set_rotation(self.object:get_rotation())
self.object:remove()
end
end,
attack_animals = true,
}
mobs:register_mob("extra_mobs:hoglin", hoglin)
local zoglin = table.copy(hoglin)
zoglin.fire_resistant = 1
zoglin.textures = {"extra_mobs_zoglin.png"}
zoglin.do_custom = function()
return
end
zoglin.attacks_monsters = true
zoglin.lava_damage = 0
zoglin.fire_damage = 0
mobs:register_mob("extra_mobs:zoglin", zoglin)
-- Baby hoglin.
--[[
local baby_hoglin = table.copy(hoglin)
baby_hoglin.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
baby_hoglin.xp_min = 20
baby_hoglin.xp_max = 20
baby_hoglin.visual_size = {x=hoglin.visual_size.x/2, y=hoglin.visual_size.y/2}
textures = { {
"extra_mobs_hoglin.png",
"extra_mobs_trans.png",
} }
baby_hoglin.walk_velocity = 1.2
baby_hoglin.run_velocity = 2.4
baby_hoglin.child = 1
mobs:register_mob("extra_mobs:baby_hoglin", baby_hoglin)]]
-- Regular spawning in the Nether
mobs:spawn_specific(
"extra_mobs:hoglin",
"nether",
"ground",
{
"Nether"
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:hoglin", S("Hoglin"), "extra_mobs_spawn_icon_hoglin.png", 0)

View File

@ -1,28 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local path = minetest.get_modpath("extra_mobs")
if not minetest.get_modpath("mobs_mc_gameconfig") then
mobs_mc = {}
end
--Monsters
dofile(path .. "/herobrine.lua")
dofile(path .. "/hoglin+zoglin.lua")
dofile(path .. "/piglin.lua")
--Animals
dofile(path .. "/strider.lua")
dofile(path .. "/fox.lua")
dofile(path .. "/cod.lua")
dofile(path .. "/salmon.lua")
dofile(path .. "/dolphin.lua")
dofile(path .. "/glow_squid.lua")
--Items
dofile(path .. "/glow_squid_items.lua")

View File

@ -1,3 +0,0 @@
name = extra_mobs
depends = mcl_mobs, mobs_mc
optional_depends = mc_warped_fungus_stick, mc_sweet_berry

View File

@ -1,156 +0,0 @@
# Blender v2.76 (sub 0) OBJ File: 'itemframe1facedir.blend'
# www.blender.org
mtllib itemframe1facedir.mtl
o right.frame_Cube.005
v -0.313413 -0.313413 0.435326
v -0.313413 0.313413 0.435326
v -0.313413 -0.313413 0.498008
v -0.313413 0.313413 0.498008
v -0.376095 -0.313413 0.435326
v -0.376095 0.313413 0.435326
v -0.376095 -0.313413 0.498008
v -0.376095 0.313413 0.498008
vt 0.875000 0.812500
vt 0.812500 0.812500
vt 0.812500 0.187500
vt 0.875000 0.187500
vt 1.000000 0.812500
vt 0.937500 0.812500
vt 0.937500 0.187500
vt 1.000000 0.187500
vt -0.000000 0.937500
vt 0.062500 0.937500
vt 0.062500 1.000000
vt -0.000000 1.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn -0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 2/1/1 4/2/1 3/3/1 1/4/1
f 4/1/2 8/2/2 7/3/2 3/4/2
f 8/5/3 6/6/3 5/7/3 7/8/3
f 6/1/4 2/2/4 1/3/4 5/4/4
f 1/9/5 3/10/5 7/11/5 5/12/5
f 6/9/6 8/10/6 4/11/6 2/12/6
o left.frame_Cube.004
v 0.376095 -0.313413 0.435326
v 0.376095 0.313413 0.435326
v 0.376095 -0.313413 0.498008
v 0.376095 0.313413 0.498008
v 0.313413 -0.313413 0.435326
v 0.313413 0.313413 0.435326
v 0.313413 -0.313413 0.498008
v 0.313413 0.313413 0.498008
vt 0.875000 0.812500
vt 0.812500 0.812500
vt 0.812500 0.187500
vt 0.875000 0.187500
vt 1.000000 0.812500
vt 0.937500 0.812500
vt 0.937500 0.187500
vt 1.000000 0.187500
vt -0.000000 0.937500
vt 0.062500 0.937500
vt 0.062500 1.000000
vt -0.000000 1.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 10/13/7 12/14/7 11/15/7 9/16/7
f 12/13/8 16/14/8 15/15/8 11/16/8
f 16/17/9 14/18/9 13/19/9 15/20/9
f 14/13/10 10/14/10 9/15/10 13/16/10
f 9/21/11 11/22/11 15/23/11 13/24/11
f 14/21/12 16/22/12 12/23/12 10/24/12
o lower.frame_Cube.003
v 0.376095 -0.376095 0.435326
v 0.376095 -0.313413 0.435326
v 0.376095 -0.376095 0.498008
v 0.376095 -0.313413 0.498008
v -0.376095 -0.376095 0.435326
v -0.376095 -0.313413 0.435326
v -0.376095 -0.376095 0.498008
v -0.376095 -0.313413 0.498008
vt 0.187500 0.187500
vt 0.125000 0.187500
vt 0.125000 0.125000
vt 0.187500 0.125000
vt 0.875000 0.187500
vt 0.875000 0.125000
vt 0.812500 0.187500
vt 0.812500 0.125000
vt 0.875000 0.937500
vt 0.875000 1.000000
vt 0.125000 1.000000
vt 0.125000 0.937500
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn -0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 18/25/13 20/26/13 19/27/13 17/28/13
f 20/29/14 24/26/14 23/27/14 19/30/14
f 24/29/15 22/31/15 21/32/15 23/30/15
f 22/29/16 18/26/16 17/27/16 21/30/16
f 17/33/17 19/34/17 23/35/17 21/36/17
f 22/30/18 24/29/18 20/26/18 18/27/18
o upper.frame_Cube.002
v 0.376095 0.313413 0.435326
v 0.376095 0.376095 0.435326
v 0.376095 0.313413 0.498008
v 0.376095 0.376095 0.498008
v -0.376095 0.313413 0.435326
v -0.376095 0.376095 0.435326
v -0.376095 0.313413 0.498008
v -0.376095 0.376095 0.498008
vt 0.187500 0.875000
vt 0.125000 0.875000
vt 0.125000 0.812500
vt 0.187500 0.812500
vt 0.875000 0.875000
vt 0.875000 0.812500
vt 0.812500 0.875000
vt 0.812500 0.812500
vt 0.875000 0.937500
vt 0.875000 1.000000
vt 0.125000 1.000000
vt 0.125000 0.937500
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn -0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 26/37/19 28/38/19 27/39/19 25/40/19
f 28/41/20 32/38/20 31/39/20 27/42/20
f 32/41/21 30/43/21 29/44/21 31/42/21
f 30/41/22 26/38/22 25/39/22 29/42/22
f 25/45/23 27/46/23 31/47/23 29/48/23
f 30/48/24 32/38/24 28/41/24 26/45/24
o background_Plane
v 0.313413 -0.313413 0.466667
v -0.313413 -0.313413 0.466667
v 0.313413 0.313413 0.466667
v -0.313413 0.313413 0.466667
vt 0.187500 0.187500
vt 0.812500 0.187500
vt 0.812500 0.812500
vt 0.187500 0.812500
vn -0.000000 0.000000 -1.000000
usemtl None
s off
f 33/49/25 34/50/25 36/51/25 35/52/25

View File

@ -1,300 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local trading_items = {
{ itemstring = "mcl_core:obsidian", amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_core:gravel", amount_min = 8, amount_max = 16 },
{ itemstring = "mcl_mobitems:leather", amount_min = 4, amount_max = 10 },
{ itemstring = "mcl_nether:soul_sand", amount_min = 4, amount_max = 16 },
{ itemstring = "mcl_nether:nether_brick", amount_min = 4, amount_max = 16 },
{ itemstring = "mcl_mobitems:string", amount_min = 3, amount_max = 9 },
{ itemstring = "mcl_nether:quartz", amount_min = 4, amount_max = 10 },
{ itemstring = "mcl_potions:water", amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_core:iron_nugget", amount_min = 10, amount_max = 36 },
{ itemstring = "mcl_throwing:ender_pearl", amount_min = 2, amount_max = 6 },
{ itemstring = "mcl_potions:fire_resistance", amount_min = 1, amount_max = 1 },
{ itemstring = "mcl_potions:fire_resistance_splash", amount_min = 1, amount_max = 1 },
}
local S = minetest.get_translator("extra_mobs")
local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
--###################
--################### piglin
--###################
local piglin = {
type = "monster",
passive = false,
spawn_class = "hostile",
hp_min = 16,
hp_max = 16,
xp_min = 9,
xp_max = 9,
armor = {fleshy = 90},
damage = 4,
reach = 3,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
visual = "mesh",
mesh = "extra_mobs_piglin.b3d",
textures = { {
"extra_mobs_piglin.png",
"mcl_bows_bow_2.png",
} },
visual_size = {x=1, y=1},
sounds = {
random = "extra_mobs_piglin",
damage = "extra_mobs_piglin_hurt",
distance = 16,
},
jump = true,
makes_footstep_sound = true,
walk_velocity = 4.317,
run_velocity = 5.6121,
drops = {
{name = "mcl_bows:crossbow",
chance = 10,
min = 1,
max = 1,},
},
animation = {
stand_speed = 30,
walk_speed = 30,
run_speed = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 440,
run_end = 459,
},
fear_height = 4,
view_range = 16,
on_spawn = function(self)
self.weapon = self.base_texture[2]
self.gold_items = 0
end,
do_custom = function(self)
if self.object:get_pos().y > -100 then
--local zog = minetest.add_entity(self.object:get_pos(), "extra_mobs:zombified_piglin")
--zog:set_rotation(self.object:get_rotation())
--self.object:remove()
end
if self.trading == true then
self.state = "trading"
self.object:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(20,-20,18))
self.object:set_bone_position("Head", vector.new(0,6.3,0), vector.new(-40,0,0))
self.base_texture[2] = "default_gold_ingot.png"
self.object:set_properties({textures = self.base_texture})
else
self.object:set_bone_position("Wield_Item", vector.new(.5,4.5,-1.6), vector.new(90,0,20))
self.base_texture[2] = self.weapon
self.object:set_properties({textures = self.base_texture})
self.object:set_bone_position("Head", vector.new(0,6.3,0), vector.new(0,0,0))
self.object:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(0,0,0))
end
if self.state ~= "attack" then
self._attacked_by_player = false
end
if self.state == "attack" and self.attack:is_player() then
for i=1, 6 do
local stack = self.attack:get_inventory():get_stack("armor", i)
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 self._attacked_by_player == false then
self.state = "stand"
end
end
end
end
end,
on_rightclick = function(self, clicker)
if clicker:is_player() and clicker:get_wielded_item():get_name() == "mcl_core:gold_ingot" and self.state ~= "attack" and self.gold_items < 3 then
local item_gold = clicker:get_wielded_item()
item_gold:take_item(1)
clicker:set_wielded_item(item_gold)
self.state = "stand"
self.object:set_animation({x=0,y=79})
self.trading = true
self.gold_items = self.gold_items + 1
self.object:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
minetest.after(5, function()
self.gold_items = self.gold_items - 1
if self.gold_items == 0 then
self.trading = false
self.state = "stand"
end
local c_pos = self.object:get_pos()
if c_pos then
self.what_traded = trading_items[math.random(#trading_items)]
for x = 1, math.random(self.what_traded.amount_min, self.what_traded.amount_max) do
minetest.add_item({x=math.random(c_pos.x - 1, c_pos.x + 1), y=math.random(c_pos.y - 1, c_pos.y + 1), z= math.random(c_pos.z - 1, c_pos.z + 1)}, self.what_traded.itemstring)
end
end
end)
end
end,
do_punch = function(self, hitter)
if hitter:is_player() then
self._attacked_by_player = true
end
end,
attack_type = "dogshoot",
arrow = "mcl_bows:arrow_entity",
shoot_arrow = function(self, pos, dir)
if mod_bows then
-- 2-4 damage per arrow
local dmg = math.max(4, math.random(2, 8))
mobs.shoot_projectile_handling("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
end
end,
shoot_interval = 1.2,
shoot_offset = 1.5,
dogshoot_switch = 1,
dogshoot_count_max =1.8,
}
mobs:register_mob("extra_mobs:piglin", piglin)
local sword_piglin = table.copy(piglin)
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
sword_piglin.on_spawn = function(self)
self.gold_items = 0
self.weapon = self.base_texture[2]
self.object:set_bone_position("Wield_Item", vector.new(0,3.9,1.3), vector.new(90,0,0))
end
sword_piglin.drops = {
{name = "mcl_tools:sword_gold",
chance = 10,
min = 1,
max = 1,},
}
sword_piglin.attack_type = "dogfight"
sword_piglin.animation = {
stand_speed = 30,
walk_speed = 30,
punch_speed = 45,
run_speed = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 440,
run_end = 459,
punch_start = 189,
punch_end = 198,
}
mobs:register_mob("extra_mobs:sword_piglin", sword_piglin)
local zombified_piglin = table.copy(piglin)
zombified_piglin.fire_resistant = 1
zombified_piglin.do_custom = function()
return
end
zombified_piglin.on_spawn = function()
return
end
zombified_piglin.on_rightclick = function()
return
end
zombified_piglin.lava_damage = 0
zombified_piglin.fire_damage = 0
zombified_piglin.attack_animals = true
zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d"
zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"}
zombified_piglin.attack_type = "dogfight"
zombified_piglin.animation = {
stand_speed = 30,
walk_speed = 30,
punch_speed = 45,
run_speed = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 440,
run_end = 459,
punch_start = 189,
punch_end = 198,
}
mobs:register_mob("extra_mobs:zombified_piglin", zombified_piglin)
local piglin_brute = table.copy(piglin)
piglin_brute.xp_min = 20
piglin_brute.xp_max = 20
piglin_brute.hp_min = 50
piglin_brute.hp_max = 50
piglin_brute.fire_resistant = 1
piglin_brute.do_custom = function()
return
end
piglin_brute.on_spawn = function()
return
end
piglin_brute.on_rightclick = function()
return
end
piglin_brute.attacks_monsters = true
piglin_brute.lava_damage = 0
piglin_brute.fire_damage = 0
piglin_brute.attack_animals = true
piglin_brute.mesh = "extra_mobs_sword_piglin.b3d"
piglin_brute.textures = {"extra_mobs_piglin_brute.png", "default_tool_goldaxe.png", "extra_mobs_trans.png"}
piglin_brute.attack_type = "dogfight"
piglin_brute.animation = {
stand_speed = 30,
walk_speed = 30,
punch_speed = 45,
run_speed = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 440,
run_end = 459,
punch_start = 189,
punch_end = 198,
}
piglin_brute.can_despawn = false
piglin_brute.group_attack = { "extra_mobs:piglin", "extra_mobs:piglin_brute" }
mobs:register_mob("extra_mobs:piglin_brute", piglin_brute)
-- Regular spawning in the Nether
mobs:spawn_specific(
"extra_mobs:piglin",
"nether",
"ground",
{
"Nether"
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
mobs:spawn_specific(
"extra_mobs:sword_piglin",
"nether",
"ground",
{
"Nether"
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:piglin", S("piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)

View File

@ -1,219 +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("extra_mobs")
--###################
--################### salmon
--###################
local salmon = {
type = "animal",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 3,
hp_max = 3,
xp_min = 1,
xp_max = 3,
armor = 100,
rotate = 270,
tilt_swim = true,
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.79, 0.4},
visual = "mesh",
mesh = "extra_mobs_salmon.b3d",
textures = {
{"extra_mobs_salmon.png"}
},
sounds = {
},
animation = {
stand_start = 1,
stand_end = 20,
walk_start = 1,
walk_end = 20,
run_start = 1,
run_end = 20,
},
drops = {
{name = "mcl_fishing:salmon_raw",
chance = 1,
min = 1,
max = 1,},
{name = "mcl_dye:white",
chance = 20,
min = 1,
max = 1,},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
swim = true,
breathes_in_water = true,
jump = false,
view_range = 16,
runaway = true,
fear_height = 4,
}
mobs:register_mob("extra_mobs:salmon", salmon)
--spawning TODO: in schools
local water = mobs_mc.spawn_height.water + 1
mobs:spawn_specific(
"extra_mobs:salmon",
"overworld",
"water",
{
"Mesa",
"FlowerForest",
"Swampland",
"Taiga",
"ExtremeHills",
"Jungle",
"Savanna",
"BirchForest",
"MegaSpruceTaiga",
"MegaTaiga",
"ExtremeHills+",
"Forest",
"Plains",
"Desert",
"ColdTaiga",
"MushroomIsland",
"IcePlainsSpikes",
"SunflowerPlains",
"IcePlains",
"RoofedForest",
"ExtremeHills+_snowtop",
"MesaPlateauFM_grasstop",
"JungleEdgeM",
"ExtremeHillsM",
"JungleM",
"BirchForestM",
"MesaPlateauF",
"MesaPlateauFM",
"MesaPlateauF_grasstop",
"MesaBryce",
"JungleEdge",
"SavannaM",
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
"ColdTaiga_beach_water",
"Taiga_beach",
"Savanna_beach",
"Plains_beach",
"ExtremeHills_beach",
"ColdTaiga_beach",
"Swampland_shore",
"MushroomIslandShore",
"JungleM_shore",
"Jungle_shore",
"MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel",
"MesaBryce_sandlevel",
"Mesa_sandlevel",
"RoofedForest_ocean",
"JungleEdgeM_ocean",
"BirchForestM_ocean",
"BirchForest_ocean",
"IcePlains_deep_ocean",
"Jungle_deep_ocean",
"Savanna_ocean",
"MesaPlateauF_ocean",
"ExtremeHillsM_deep_ocean",
"Savanna_deep_ocean",
"SunflowerPlains_ocean",
"Swampland_deep_ocean",
"Swampland_ocean",
"MegaSpruceTaiga_deep_ocean",
"ExtremeHillsM_ocean",
"JungleEdgeM_deep_ocean",
"SunflowerPlains_deep_ocean",
"BirchForest_deep_ocean",
"IcePlainsSpikes_ocean",
"Mesa_ocean",
"StoneBeach_ocean",
"Plains_deep_ocean",
"JungleEdge_deep_ocean",
"SavannaM_deep_ocean",
"Desert_deep_ocean",
"Mesa_deep_ocean",
"ColdTaiga_deep_ocean",
"Plains_ocean",
"MesaPlateauFM_ocean",
"Forest_deep_ocean",
"JungleM_deep_ocean",
"FlowerForest_deep_ocean",
"MushroomIsland_ocean",
"MegaTaiga_ocean",
"StoneBeach_deep_ocean",
"IcePlainsSpikes_deep_ocean",
"ColdTaiga_ocean",
"SavannaM_ocean",
"MesaPlateauF_deep_ocean",
"MesaBryce_deep_ocean",
"ExtremeHills+_deep_ocean",
"ExtremeHills_ocean",
"MushroomIsland_deep_ocean",
"Forest_ocean",
"MegaTaiga_deep_ocean",
"JungleEdge_ocean",
"MesaBryce_ocean",
"MegaSpruceTaiga_ocean",
"ExtremeHills+_ocean",
"Jungle_ocean",
"RoofedForest_deep_ocean",
"IcePlains_ocean",
"FlowerForest_ocean",
"ExtremeHills_deep_ocean",
"MesaPlateauFM_deep_ocean",
"Desert_ocean",
"Taiga_ocean",
"BirchForestM_deep_ocean",
"Taiga_deep_ocean",
"JungleM_ocean",
"FlowerForest_underground",
"JungleEdge_underground",
"StoneBeach_underground",
"MesaBryce_underground",
"Mesa_underground",
"RoofedForest_underground",
"Jungle_underground",
"Swampland_underground",
"MushroomIsland_underground",
"BirchForest_underground",
"Plains_underground",
"MesaPlateauF_underground",
"ExtremeHills_underground",
"MegaSpruceTaiga_underground",
"BirchForestM_underground",
"SavannaM_underground",
"MesaPlateauFM_underground",
"Desert_underground",
"Savanna_underground",
"Forest_underground",
"SunflowerPlains_underground",
"ColdTaiga_underground",
"IcePlains_underground",
"IcePlainsSpikes_underground",
"MegaTaiga_underground",
"Taiga_underground",
"ExtremeHills+_underground",
"JungleM_underground",
"ExtremeHillsM_underground",
"JungleEdgeM_underground",
},
0,
minetest.LIGHT_MAX+1,
30,
4000,
3,
water-16,
water)
--spawn egg
mobs:register_egg("extra_mobs:salmon", S("Salmon"), "extra_mobs_spawn_icon_salmon.png", 0)

View File

@ -1,232 +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("extra_mobs")
--###################
--################### STRIDER
--###################
local strider = {
type = "animal",
passive = true,
spawn_class = "passive",
hp_min = 20,
hp_max = 20,
xp_min = 9,
xp_max = 9,
armor = {fleshy = 90},
attack_type = "dogfight",
damage = 2,
reach = 2,
collisionbox = {-.6, -0.01, -.6, .6, 1.94, .6},
visual = "mesh",
mesh = "extra_mobs_strider.b3d",
textures = { {
"extra_mobs_strider.png",
} },
visual_size = {x=3, y=3},
sounds = {
},
jump = true,
makes_footstep_sound = true,
walk_velocity = 2,
run_velocity = 4,
runaway = true,
drops = {
{name = "mcl_mobsitems:string",
chance = 1,
min = 2,
max = 5,},
},
animation = {
stand_speed = 15,
walk_speed = 15,
run_speed = 30,
stand_start = 5,
stand_end = 5,
walk_start = 1,
walk_end = 20,
},
lava_damage = 0,
fire_damage = 0,
light_damage = 0,
water_damage = 5,
fear_height = 4,
view_range = 16,
fire_resistant = true,
floats_on_lava = 1,
floats = 0,
do_custom = function(self, dtime)
if minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_core:lava_flowing") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_source") ~= nil or minetest.find_node_near(self.object:get_pos(), 2, "mcl_nether:nether_lava_flowing") ~= nil then
self.walk_velocity = 2
self.run_velocity = 4
self.base_texture[1] = "extra_mobs_strider.png"
self.shaking = false
else
self.base_texture[1] = "extra_mobs_strider_cold.png"
self.walk_velocity = .5
self.run_velocity = 1
self.shaking = true
end
self.object:set_properties({textures=self.base_texture, shaking=self.shaking, run_velocity=self.run_velocity, walk_velocity=self.walk_velocity})
-- set needed values if not already present
if not self.v2 then
self.v2 = 0
self.max_speed_forward = 8
self.max_speed_reverse = 4
self.accel = 2
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = 5.5, z = -1.75}
self.driver_eye_offset = {x = 0, y = 10, z = 0}
self.driver_scale = {x = 1/self.visual_size.x, y = 1/self.visual_size.y}
end
-- if driver present allow control of horse
if self.driver then
mobs.drive(self, "walk", "stand", false, dtime)
return false -- skip rest of mob functions
end
return true
end,
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- also detach from horse properly
if self.driver then
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end
end,
on_rightclick = function(self, clicker)
if not clicker or not clicker:is_player() then
return
end
local wielditem = clicker:get_wielded_item()
local controlitem = ""
if minetest.get_modpath("mc") then
controlitem = "mc_warped_fungus_stick:warped_fungus_stick"
else
controlitem = mobs_mc.items.carrot_on_a_stick
end
if wielditem:get_name() ~= controlitem then
if mobs:feed_tame(self, clicker, 1, true, true) then return end
end
if self.child then
return
end
local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then
self.base_texture = {
"extra_mobs_strider.png",
"mobs_mc_pig_saddle.png", -- saddle
}
self.object:set_properties({
textures = self.base_texture
})
self.saddle = "yes"
self.tamed = true
self.drops = {
{name = "mcl_mobitems:string",
chance = 1,
min = 1,
max = 3,},
{name = "mcl_mobitems:saddle",
chance = 1,
min = 1,
max = 1,},
}
if not minetest.is_creative_enabled(clicker:get_player_name()) then
local inv = clicker:get_inventory()
local stack = inv:get_stack("main", clicker:get_wield_index())
stack:take_item()
inv:set_stack("main", clicker:get_wield_index(), stack)
end
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}, true)
return
end
-- Mount or detach player
local name = clicker:get_player_name()
if self.driver and clicker == self.driver then
-- Detach if already attached
mobs.detach(clicker, {x=1, y=0, z=0})
return
elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == controlitem then
-- Ride pig if it has a saddle and player uses a carrot on a stick
mobs.attach(self, clicker)
if not minetest.is_creative_enabled(clicker:get_player_name()) then
local inv = self.driver:get_inventory()
-- 26 uses
if wielditem:get_wear() > 63000 then
-- Break carrot on a stick
local def = wielditem:get_definition()
if def.sounds and def.sounds.breaks then
minetest.sound_play(def.sounds.breaks, {pos = clicker:get_pos(), max_hear_distance = 8, gain = 0.5}, true)
end
wielditem = {name = mobs_mc.items.fishing_rod, count = 1}
else
wielditem:add_wear(2521)
end
inv:set_stack("main",self.driver:get_wield_index(), wielditem)
end
return
end
end,
}
mobs:register_mob("extra_mobs:strider", strider)
-- Baby strider.
local baby_strider = table.copy(strider)
baby_strider.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
baby_strider.xp_min = 13
baby_strider.xp_max = 13
baby_strider.visual_size = {x=strider.visual_size.x/2, y=strider.visual_size.y/2}
textures = { {
"extra_mobs_strider.png",
"extra_mobs_trans.png",
} }
baby_strider.walk_velocity = 1.2
baby_strider.run_velocity = 2.4
baby_strider.child = 1
mobs:register_mob("extra_mobs:baby_strider", baby_strider)
-- Regular spawning in the Nether
mobs:spawn_specific(
"extra_mobs:strider",
"nether",
"lava",
{
"Nether"
},
0,
minetest.LIGHT_MAX+1,
30,
6000,
3,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:strider", S("Strider"), "extra_mobs_spawn_icon_strider.png", 0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

View File

@ -84,7 +84,7 @@ local function attach_object(self, obj)
end
end, name)
obj:set_look_horizontal(yaw)
mcl_tmp_message.message(obj, S("Sneak to dismount"))
mcl_title.set(obj, "actionbar", {text=S("Sneak to dismount"), color="white", stay=60})
else
obj:get_luaentity()._old_visual_size = visual_size
end
@ -115,7 +115,7 @@ local boat = {
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
visual = "mesh",
mesh = "mcl_boats_boat.b3d",
textures = {"mcl_boats_texture_oak_boat.png"},
textures = {"mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png", "mcl_boats_texture_oak_boat.png"},
visual_size = boat_visual_size,
hp_max = boat_max_hp,
damage_texture_modifier = "^[colorize:white:0",
@ -148,6 +148,11 @@ function boat.on_activate(self, staticdata, dtime_s)
self._v = data.v
self._last_v = self._v
self._itemstring = data.itemstring
while #data.textures < 5 do
table.insert(data.textures, data.textures[1])
end
self.object:set_properties({textures = data.textures})
end
end
@ -262,7 +267,7 @@ function boat.on_step(self, dtime, moveresult)
return
end
local yaw = self.object:get_yaw()
if ctrl.up then
if ctrl and ctrl.up then
-- Forwards
self._v = self._v + 0.1 * v_factor
@ -271,7 +276,7 @@ function boat.on_step(self, dtime, moveresult)
self.object:set_animation({x=0, y=40}, paddling_speed, 0, true)
self._animation = 1
end
elseif ctrl.down then
elseif ctrl and ctrl.down then
-- Backwards
self._v = self._v - 0.1 * v_factor
@ -337,7 +342,8 @@ function boat.on_step(self, dtime, moveresult)
self.object:get_velocity().y)
else
p.y = p.y + 1
if is_water(p) then
local is_obsidian_boat = self.object:get_luaentity()._itemstring == "mcl_boats:boat_obsidian"
if is_water(p) or is_obsidian_boat then
-- Inside water: Slowly sink
local y = self.object:get_velocity().y
y = y - 0.01
@ -377,13 +383,13 @@ end
-- Register one entity for all boat types
minetest.register_entity("mcl_boats:boat", boat)
local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak" }
local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat") }
local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian" }
local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat") }
local craftstuffs = {}
if minetest.get_modpath("mcl_core") then
craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood" }
craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian" }
end
local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak" }
local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", "obsidian" }
for b=1, #boat_ids do
local itemstring = "mcl_boats:"..boat_ids[b]
@ -434,8 +440,9 @@ for b=1, #boat_ids do
pos = vector.add(pos, vector.multiply(dir, boat_y_offset_ground))
end
local boat = minetest.add_entity(pos, "mcl_boats:boat")
local texture = "mcl_boats_texture_"..images[b].."_boat.png"
boat:get_luaentity()._itemstring = itemstring
boat:set_properties({textures = { "mcl_boats_texture_"..images[b].."_boat.png" }})
boat:set_properties({textures = { texture, texture, texture, texture, texture }})
boat:set_yaw(placer:get_look_horizontal())
if not minetest.is_creative_enabled(placer:get_player_name()) then
itemstack:take_item()

View File

@ -6,6 +6,7 @@ Boats are used to travel on the surface of water.=Les bateaux sont utilisés pou
Dark Oak Boat=Bateau en Chêne Noir
Jungle Boat=Bateau en Acajou
Oak Boat=Bateau en Chêne
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.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Cliquez de nouveau avec le bouton droit sur le bateau pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
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. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Utilisez [Sneak] pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
Spruce Boat=Bateau en Sapin
Water vehicle=Véhicule aquatique
Water vehicle=Véhicule aquatique
Sneak to dismount=

View File

@ -0,0 +1,11 @@
# textdomain: mcl_boats
Acacia Boat=相思木船
Birch Boat=白樺木船
Boat=船
Boats are used to travel on the surface of water.=船是用來在水上行走的交通工具。
Dark Oak Boat=黑橡木船
Jungle Boat=叢林木船
Oak Boat=橡木船
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.=右鍵單擊水源以放置船。右鍵單擊船以搭乘它。使用[左]和[右]進行轉向,[向前]加快速度,[向後]減速或向後移動。再次右鍵單擊船以離開它,打擊船以使其掉落為物品。
Spruce Boat=杉木船
Water vehicle=水上交通工具

View File

@ -1,7 +1,7 @@
name = mcl_boats
author = PilzAdam
description = Adds drivable boats.
depends = mcl_player, flowlib
depends = mcl_player, flowlib, mcl_title
optional_depends = mcl_core, doc_identifier

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

View File

@ -26,20 +26,64 @@ function mcl_burning.get_collisionbox(obj, smaller, storage)
end
end
local find_nodes_in_area = minetest.find_nodes_in_area
function mcl_burning.get_touching_nodes(obj, nodenames, storage)
local pos = obj:get_pos()
local minp, maxp = mcl_burning.get_collisionbox(obj, true, storage)
local nodes = minetest.find_nodes_in_area(vector.add(pos, minp), vector.add(pos, maxp), nodenames)
local nodes = find_nodes_in_area(vector.add(pos, minp), vector.add(pos, maxp), nodenames)
return nodes
end
-- Manages the fire animation on a burning player's HUD
--
-- Parameters:
-- player - a valid player object;
--
-- If the player already has a fire HUD, updates the burning animation.
-- If the fire does not have a fire HUD, initializes the HUD.
--
function mcl_burning.update_hud(player)
local animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8
local hud_flame_animated = "mcl_burning_hud_flame_animated.png^[opacity:180^[verticalframe:" .. animation_frames .. ":"
local storage = mcl_burning.get_storage(player)
if not storage.fire_hud_id then
storage.animation_frame = 1
storage.fire_hud_id = player:hud_add({
hud_elem_type = "image",
position = {x = 0.5, y = 0.5},
scale = {x = -100, y = -100},
text = hud_flame_animated .. storage.animation_frame,
z_index = 1000,
})
else
storage.animation_frame = storage.animation_frame + 1
if storage.animation_frame > animation_frames - 1 then
storage.animation_frame = 0
end
player:hud_change(storage.fire_hud_id, "text", hud_flame_animated .. storage.animation_frame)
end
end
-- Sets and object state as burning and adds a fire animation to the object.
--
-- Parameters:
-- obj - may be a player or a lua_entity;
-- burn_time - sets the object's burn duration;
--
-- If obj is a player, adds a fire animation to the HUD, if obj is a
-- lua_entity, adds an animated fire entity to obj.
-- The effective burn duration is modified by obj's armor protection.
-- If obj was already burning, its burn duration is updated if the current
-- duration is less than burn_time.
-- If obj is dead, fireproof or a creative player, this function does nothing.
--
function mcl_burning.set_on_fire(obj, burn_time)
if obj:get_hp() < 0 then
return
end
local storage = mcl_burning.get_storage(obj)
local luaentity = obj:get_luaentity()
if luaentity and luaentity.fire_resistant then
return
@ -60,49 +104,42 @@ function mcl_burning.set_on_fire(obj, burn_time)
end
end
end
if max_fire_prot_lvl > 0 then
burn_time = burn_time - math.floor(burn_time * max_fire_prot_lvl * 0.15)
end
end
if not storage.burn_time or burn_time >= storage.burn_time then
if obj:is_player() and not storage.fire_hud_id then
storage.fire_hud_id = obj:hud_add({
hud_elem_type = "image",
position = {x = 0.5, y = 0.5},
scale = {x = -100, y = -100},
text = "mcl_burning_entity_flame_animated.png^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. 1,
z_index = 1000,
})
local storage = mcl_burning.get_storage(obj)
if storage.burn_time then
if burn_time > storage.burn_time then
storage.burn_time = burn_time
end
storage.burn_time = burn_time
storage.fire_damage_timer = 0
return
end
storage.burn_time = burn_time
storage.fire_damage_timer = 0
local fire_entity = minetest.add_entity(obj:get_pos(), "mcl_burning:fire")
local minp, maxp = mcl_burning.get_collisionbox(obj, false, storage)
local obj_size = obj:get_properties().visual_size
local minp, maxp = mcl_burning.get_collisionbox(obj, false, storage)
local size = vector.subtract(maxp, minp)
size = vector.multiply(size, vector.new(1.1, 1.2, 1.1))
size = vector.divide(size, obj:get_properties().visual_size)
local vertical_grow_factor = 1.2
local horizontal_grow_factor = 1.1
local grow_vector = vector.new(horizontal_grow_factor, vertical_grow_factor, horizontal_grow_factor)
local fire_entity = minetest.add_entity(obj:get_pos(), "mcl_burning:fire")
fire_entity:set_properties({visual_size = size})
fire_entity:set_attach(obj, "", vector.new(0, size.y * 5, 0), vector.new(0, 0, 0))
local size = vector.subtract(maxp, minp)
size = vector.multiply(size, grow_vector)
size = vector.divide(size, obj_size)
local offset = vector.new(0, size.y * 10 / 2, 0)
if obj:is_player() then
mcl_burning.update_hud(obj)
end
fire_entity:set_properties({visual_size = size})
fire_entity:set_attach(obj, "", offset, {x = 0, y = 0, z = 0})
local fire_luaentity = fire_entity:get_luaentity()
fire_luaentity:update_frame(obj, storage)
for _, other in pairs(minetest.get_objects_inside_radius(fire_entity:get_pos(), 0)) do
local other_luaentity = other:get_luaentity()
if other_luaentity and other_luaentity.name == "mcl_burning:fire" and other_luaentity ~= fire_luaentity then
other:remove()
break
end
-- FIXME: does this code make sense? It removes attached fire luaentities from
-- another object that happen to be at the same position.
local fire_luaentity = fire_entity:get_luaentity()
for _, other in pairs(minetest.get_objects_inside_radius(fire_entity:get_pos(), 0)) do
local other_luaentity = other:get_luaentity()
if other_luaentity and other_luaentity.name == "mcl_burning:fire" and other_luaentity ~= fire_luaentity then
other:remove()
break
end
end
end
@ -143,4 +180,4 @@ function mcl_burning.tick(obj, dtime, storage)
end
end
end
end
end

View File

@ -1,17 +1,27 @@
local modpath = minetest.get_modpath(minetest.get_current_modname())
local pairs = pairs
local get_connected_players = minetest.get_connected_players
local get_item_group = minetest.get_item_group
mcl_burning = {
storage = {},
animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8
-- the storage table holds a list of objects (players,luaentities) and tables
-- associated with these objects. These tables have the following attributes:
-- burn_time:
-- Remaining time that object will burn.
-- fire_damage_timer:
-- Timer for dealing damage every second while burning.
-- fire_hud_id:
-- HUD id of the flames animation on a burning player's HUD.
-- animation_frame:
-- The HUD's current animation frame, used by update_hud().
-- collisionbox_cache:
-- Used by mcl_burning.get_collisionbox() to avoid recalculations.
storage = {}
}
dofile(modpath .. "/api.lua")
local pairs = pairs
local get_connected_players = minetest.get_connected_players
local get_item_group = minetest.get_item_group
minetest.register_globalstep(function(dtime)
for _, player in pairs(get_connected_players()) do
local storage = mcl_burning.storage[player]
@ -44,75 +54,72 @@ minetest.register_on_respawnplayer(function(player)
end)
minetest.register_on_joinplayer(function(player)
local storage
local storage = {}
local burn_data = player:get_meta():get_string("mcl_burning:data")
if burn_data == "" then
storage = {}
else
if burn_data ~= "" then
storage = minetest.deserialize(burn_data)
end
mcl_burning.storage[player] = storage
if storage.burn_time and storage.burn_time > 0 then
mcl_burning.update_hud(player)
end
end)
minetest.register_on_leaveplayer(function(player)
local function on_leaveplayer(player)
local storage = mcl_burning.storage[player]
storage.fire_hud_id = nil
player:get_meta():set_string("mcl_burning:data", minetest.serialize(storage))
mcl_burning.storage[player] = nil
end
minetest.register_on_leaveplayer(function(player)
on_leaveplayer(player)
end)
minetest.register_on_shutdown(function()
for _,player in ipairs(minetest.get_connected_players()) do
on_leaveplayer(player)
end
end)
local animation_frames = tonumber(minetest.settings:get("fire_animation_frames")) or 8
minetest.register_entity("mcl_burning:fire", {
initial_properties = {
physical = false,
collisionbox = {0, 0, 0, 0, 0, 0},
visual = "cube",
visual = "upright_sprite",
textures = {
"mcl_burning_entity_flame_animated.png",
"mcl_burning_entity_flame_animated.png"
},
spritediv = {x = 1, y = animation_frames},
pointable = false,
glow = -1,
backface_culling = false,
},
animation_frame = 0,
animation_timer = 0,
on_activate = function(self)
self.object:set_sprite({x = 0, y = 0}, animation_frames, 1.0 / animation_frames)
end,
on_step = function(self, dtime)
local parent, storage = self:sanity_check()
if parent then
local parent = self.object:get_attach()
if not parent then
self.object:remove()
return
end
local storage = mcl_burning.get_storage(parent)
if not storage or not storage.burn_time then
self.object:remove()
return
end
if parent:is_player() then
self.animation_timer = self.animation_timer + dtime
if self.animation_timer >= 0.1 then
self.animation_timer = 0
self.animation_frame = self.animation_frame + 1
if self.animation_frame > mcl_burning.animation_frames - 1 then
self.animation_frame = 0
end
self:update_frame(parent, storage)
mcl_burning.update_hud(parent)
end
else
self.object:remove()
end
end,
sanity_check = function(self)
local parent = self.object:get_attach()
if not parent then
return
end
local storage = mcl_burning.get_storage(parent)
if not storage or not storage.burn_time then
return
end
return parent, storage
end,
update_frame = function(self, parent, storage)
local frame_overlay = "^[opacity:180^[verticalframe:" .. mcl_burning.animation_frames .. ":" .. self.animation_frame
local fire_texture = "mcl_burning_entity_flame_animated.png" .. frame_overlay
self.object:set_properties({textures = {"blank.png", "blank.png", fire_texture, fire_texture, fire_texture, fire_texture}})
if parent:is_player() then
parent:hud_change(storage.fire_hud_id, "text", "mcl_burning_hud_flame_animated.png" .. frame_overlay)
end
end,
})

View File

@ -0,0 +1,66 @@
-- Dripping Water Mod
-- by kddekadenz
local math = math
-- License of code, textures & sounds: CC0
local function register_drop(liquid, glow, sound, nodes)
minetest.register_entity("mcl_dripping:drop_" .. liquid, {
hp_max = 1,
physical = true,
collide_with_objects = false,
collisionbox = {-0.01, 0.01, -0.01, 0.01, 0.01, 0.01},
glow = glow,
pointable = false,
visual = "sprite",
visual_size = {x = 0.1, y = 0.1},
textures = {""},
spritediv = {x = 1, y = 1},
initial_sprite_basepos = {x = 0, y = 0},
static_save = false,
_dropped = false,
on_activate = function(self)
self.object:set_properties({
textures = {"[combine:2x2:" .. -math.random(1, 16) .. "," .. -math.random(1, 16) .. "=default_" .. liquid .. "_source_animated.png"}
})
end,
on_step = function(self, dtime)
local k = math.random(1, 222)
local ownpos = self.object:get_pos()
if k == 1 then
self.object:set_acceleration(vector.new(0, -5, 0))
end
if minetest.get_node(vector.offset(ownpos, 0, 0.5, 0)).name == "air" then
self.object:set_acceleration(vector.new(0, -5, 0))
end
if minetest.get_node(vector.offset(ownpos, 0, -0.1, 0)).name ~= "air" then
local ent = self.object:get_luaentity()
if not ent._dropped then
ent._dropped = true
minetest.sound_play({name = "drippingwater_" .. sound .. "drip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}, true)
end
if k < 3 then
self.object:remove()
end
end
end,
})
minetest.register_abm({
label = "Create drops",
nodenames = nodes,
neighbors = {"group:" .. liquid},
interval = 2,
chance = 22,
action = function(pos)
if minetest.get_item_group(minetest.get_node(vector.offset(pos, 0, 1, 0)).name, liquid) ~= 0
and minetest.get_node(vector.offset(pos, 0, -1, 0)).name == "air" then
local x, z = math.random(-45, 45) / 100, math.random(-45, 45) / 100
minetest.add_entity(vector.offset(pos, x, -0.520, z), "mcl_dripping:drop_" .. liquid)
end
end,
})
end
register_drop("water", 1, "", {"group:opaque", "group:leaves"})
register_drop("lava", math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3), "lava", {"group:opaque"})

View File

@ -1,4 +1,4 @@
name = drippingwater
name = mcl_dripping
author = kddekadenz
description = Drops are generated rarely under solid nodes
depends = mcl_core

View File

@ -1,12 +1,12 @@
Dripping Water Mod
Dripping Mod
by kddekadenz
modified for MineClone 2 by Wuzzy
modified for MineClone 2 by Wuzzy and NO11
Installing instructions:
1. Copy the drippingwater mod folder into games/gamemode/mods
1. Copy the mcl_dripping mod folder into games/gamemode/mods
2. Start game and enjoy :)

Some files were not shown because too many files have changed in this diff Show More