Commit graph

120 commits

Author SHA1 Message Date
CyberMango
b0d9eed3e1 Removed specific functions and added usage examples.
The specific functions didnt end up adding much simplicity, but did add
some degree of confusion.
2023-01-12 20:04:44 +02:00
CyberMango
685a7ff256 Added a function for a single position and better naming.
Now the functions are named with "position" instead of "node" to better
reflect what they do and what args they expect.

Also added a function for cehcking just a single position since thats
the most common use case, so it saves a small performance overhead.
2023-01-12 20:04:44 +02:00
CyberMango
949a2b787e Added protection violation checker functions.
1 completley generic and 3 more that use it for more specific cases -
  placing a node, modifying a node and planting over a node.
2023-01-12 20:04:44 +02:00
ancientmarinerdev
e5c639c779 Logging improvements 2022-11-12 02:35:00 +01:00
ancientmarinerdev
ff0fea8978 Add default logger to make logging easier 2022-11-12 02:35:00 +01:00
Johannes Fritz
c66e184373 mcl_playerplus fixes 2022-11-11 17:53:13 +00:00
cora
41055d5abe Check object on mob tranformation 2022-11-11 16:43:45 +01:00
cora
6b8236e8f3 Fix crash in villagegen 2022-11-01 04:52:17 +01:00
cora
f47674b9a7 Add mcl_util.file_exists() function 2022-10-13 02:13:02 +02:00
cora
68d04bc4e8 move set_conditionals from mcl_playerplus to mcl_util 2022-10-07 02:45:01 +00:00
Elias Fleckenstein
f6a40ffb78
Run tools/strip_trailing_whitespace.sh 2022-05-26 07:29:28 +02:00
Elias Fleckenstein
e0f70b54ec Remove _cmi_is_mob 2022-05-25 23:13:33 +02:00
AFCMS
61f4c5b885
apply @kay27 fix to mcl_util.drop_items_from_meta_container 2022-02-22 18:08:26 +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
80fb59f9ac
add barrel 2022-02-22 18:08:22 +01:00
NO11
8db28c1337 Update get_pointed_thing function 2022-02-17 15:30:41 +00:00
NO11
ad99746d99 Add get_pointed_thing function 2022-02-17 14:35:51 +00:00
Elias Fleckenstein
92686e5412
Fix broken mcl_util.calculate_durability 2021-12-02 17:28:19 +01:00
iliekprogrammar
fa22ec4dd0
Add helper functions to update/merge tables. 2021-11-10 02:50:49 +08:00
NO11
e4af02ea52 Add function to replace mobs 2021-10-05 04:15:48 +00:00
Elias Fleckenstein
c57ead6985 Use next() instead of one-time loop to fix luacheck warning in mcl_util.calculate_durability 2021-05-26 20:56:00 +02:00
AFCMS
9e074af07f unify code style [1] 2021-05-25 12:52:25 +02:00
AFCMS
00f4cfa5b5 simplify mcl_util code 2021-05-25 01:33:26 +02:00
Elias Fleckenstein
f53ff8418f mcl_damage: HP check guard in non-modifier on_hpchange callback and usage of raw tostring for deactivated objects for death messages 2021-05-05 13:24:23 +02:00
Elias Fleckenstein
be0cf5788d mcl_util.deal_damage: Only deal damage to players / mobs that are not already dead 2021-05-05 09:24:51 +02:00
Elias Fleckenstein
199488cc74 Add nil check for crash prevention 2021-04-29 11:18:22 +02:00
Elias Fleckenstein
302175691a Integrate death messages 2021-04-25 16:42:38 +02:00
Elias Fleckenstein
6aecae6eea Simplify damage pipeline; Add on_death and on_damage callbacks 2021-04-25 13:50:07 +02:00
Elias Fleckenstein
53b0ad7347 Implement magic damage 2021-04-18 20:21:11 +02:00
Elias Fleckenstein
4f0bb444fe Integrate armor stand 2021-04-18 16:03:23 +02:00
Elias Fleckenstein
ce0148d9a8 Rewrite armor; new damage system 2021-04-14 15:46:52 +02:00
Elias Fleckenstein
f350fa6272 Add bossbars 2021-04-06 14:50:34 +02:00
Elias Fleckenstein
2125c51c9c Fix mcl_util.get_color 2021-03-05 10:20:19 +01:00
Elias Fleckenstein
09671b7ac9 Add simple color validator / parser 2021-03-05 09:37:27 +01:00
Elias Fleckenstein
d57db0444f Use mod.conf in all mods, part 1 2021-03-04 15:22:14 +01:00
kay27
89e55e9065 Add sub-map generators queue, fix https://git.minetest.land/MineClone2/MineClone2/issues/993 and https://git.minetest.land/MineClone2/MineClone2/issues/1060 2021-02-22 03:15:32 +04:00
kay27
3b196da12f Speedup placing villages 1/2 (update mcl_tools through Gitea, as direct push doesn't work) 2021-02-10 13:04:49 +00:00
Elias Åström
174a3a2968 Fix creeper explosions only doing 1/2 heart damage
The solution was to move the creeper explosions to originate from the
center of the creepers collisionbox and not its entity position.
2021-01-26 14:13:30 +01:00
Wuzzy
c106a62979 Use minetest.is_creative_enabled 2020-07-10 16:45:40 +02:00
Wuzzy
c5e4ec5e27 Use ephemeral sounds 2020-04-07 00:55:45 +02:00
Wuzzy
fbba40fe5c Fix item container transfer destroying item metadata 2019-04-05 15:30:32 +02:00
Wuzzy
bae1fa072c Remove dead code 2018-05-12 22:53:21 +02:00
Wuzzy
e38f19b5f3 Comparator now detects jukebox as container 2018-05-12 22:48:49 +02:00
Wuzzy
1ce9ab22bf Turn jukebox into a container (part 1) 2018-05-12 21:50:56 +02:00
Wuzzy
b0c87f74fe Move world-related functions to mcl_worlds 2017-11-24 03:10:02 +01:00
Wuzzy
a9d95dea23 Use hardware coloring for tallgrass and friends 2017-11-16 03:13:19 +01:00
Wuzzy
6b2c06934a Autom. make grass/fern dry if placed on dry grass 2017-11-15 01:29:17 +01:00
Wuzzy
0ff6cb2837 Fix broken compass and clocks 2017-08-22 18:58:53 +02:00
Wuzzy
fe31afc119 Disable weather in Nether and End and Void 2017-08-22 18:32:05 +02:00
Wuzzy
860155e5c1 Set proper realm boundaries 2017-08-16 15:29:05 +02:00
Wuzzy
e5a34367c9 Use new Minetest settings API syntax for most mods 2017-08-09 16:17:00 +02:00
Wuzzy
4e45d66678 Implement item transfer from large src container 2017-08-04 03:34:28 +02:00
Wuzzy
d0b1e261ea Move more shulker box checks in mcl_hoppers to mcl_util 2017-08-04 03:00:33 +02:00
Wuzzy
8388235600 Simplify mcl_util.move_item_container 2017-08-04 02:19:47 +02:00
Wuzzy
fb261454df Item container transfer: Optional source_list 2017-08-04 01:58:31 +02:00
Wuzzy
a29091e23c Move double chest neighbor function to mcl_util 2017-08-03 23:27:22 +02:00
Wuzzy
3b1c0765d6 Add double container move logic into mcl_util 2017-08-03 23:23:33 +02:00
Wuzzy
38cf151806 Fix many crashes when placing item on unknown node 2017-06-29 13:02:53 +02:00
Wuzzy
823c20bd1b Fix some global variable warnings 2017-06-10 17:52:21 +02:00
Wuzzy
2a747e828a Refactor flower on_place function 2017-06-09 20:20:29 +02:00
Wuzzy
b7f50d9028 Restrict flower place to dirt/grassblock and light 2017-06-09 19:18:23 +02:00
Wuzzy
8e2d601f85 Prevent placing most plants on mycelium 2017-05-14 01:45:57 +02:00
Wuzzy
2495676e54 Rename mapgen variables 2017-03-04 23:00:23 +01:00
Wuzzy
19150ddddb Add helper functions to convert to/from MC layer 2017-03-04 22:45:08 +01:00
Wuzzy
2e7ce77985 mcl_util.is_in_void 2017-02-21 16:38:28 +01:00
Wuzzy
649fca5aff Add mcl_util.is_fuel 2017-02-21 03:00:48 +01:00
Wuzzy
d8f423ac07 Allow to put fuels into furnace with hoppers 2017-02-21 02:09:34 +01:00
Wuzzy
40783d2ca6 Fix crash w/ mcl_util group-less item move 2017-02-20 16:30:07 +01:00
Wuzzy
3696ee3761 Organize mods into modpacks for better overview 2017-02-16 01:45:21 +01:00