Compare commits
349 Commits
Author | SHA1 | Date |
---|---|---|
cora | 14cba8197e | |
cora | aab3180269 | |
PrairieWind | 1a53c4081f | |
cora | e271e87aca | |
cora | dae4a99a85 | |
cora | 18e90cc766 | |
cora | 455fac9350 | |
cora | 8cad4a6886 | |
cora | 5d2ffb36f2 | |
cora | 931cb2b991 | |
cora | a7302882af | |
cora | 9e60d24fe0 | |
cora | 825da03ba3 | |
cora | 8d9c5059f3 | |
PrairieWind | 7323536e55 | |
cora | 2b835221a7 | |
cora | 571c57e891 | |
cora | 33739dc5af | |
cora | df2934c548 | |
cora | c1686923d3 | |
cora | 489db73dca | |
TheRandomLegoBrick | 408c72e4bf | |
cora | 0b197d3605 | |
NO11 | a16613f31c | |
cora | c900c04194 | |
MysticTempest | 484ad2b630 | |
cora | ec6d5628e2 | |
cora | 4a4636523e | |
cora | e9b72083b3 | |
cora | aed96a4912 | |
cora | f202ed8327 | |
cora | 44abef44e1 | |
PrairieAstronomer | 88cdc9baf3 | |
PrairieAstronomer | 27ea6087c7 | |
cora | ae0eb85ffc | |
cora | 6d5e8822dd | |
RandomLegoBrick | 5ceffe1a3c | |
cora | 5c61c96d4f | |
cora | de9056ae62 | |
cora | 08a1ecd879 | |
cora | bcb76f7bd2 | |
cora | 8fe40fcd26 | |
cora | 98c48dab8c | |
RandomLegoBrick | 31e53ceff0 | |
TheRandomLegoBrick | 05186c9a19 | |
TheRandomLegoBrick | dfd16d1110 | |
TheRandomLegoBrick | c26a9aded5 | |
cora | 3118102ca7 | |
PrairieAstronomer | 0ecffaf472 | |
cora | 3c2633ee2c | |
PrairieAstronomer | f0241bbf6a | |
PrairieAstronomer | 67494f8905 | |
PrairieAstronomer | e9fe5c1377 | |
PrairieAstronomer | 5de3c7977c | |
PrairieAstronomer | 465d91036f | |
PrairieAstronomer | 3786c46b30 | |
cora | 37798bfa42 | |
PrairieAstronomer | f141427dfe | |
PrairieAstronomer | 41be8a5a85 | |
PrairieAstronomer | d9a25552d8 | |
TheRandomLegoBrick | cbe0f80d68 | |
cora | a930f3a814 | |
TheRandomLegoBrick | 06f8688f26 | |
TheRandomLegoBrick | f3dd3e92fa | |
TheRandomLegoBrick | 4f1960d6ef | |
TheRandomLegoBrick | 0414493f5c | |
TheRandomLegoBrick | be1427205e | |
TheRandomLegoBrick | 0142b58edc | |
TheRandomLegoBrick | 973dc7fa41 | |
TheRandomLegoBrick | 24ab7ff825 | |
cora | f98242bb0c | |
cora | b0da96611e | |
cora | 31289f5686 | |
cora | 672b9dbedf | |
cora | dd5e9afbd9 | |
cora | 21d5ab88a5 | |
PrairieWind | dc75a4d854 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 236c1ce760 | |
cora | fdea5988a0 | |
cora | efad7dad24 | |
cora | 27a945b8f3 | |
cora | b08a79b070 | |
cora | daa95e3688 | |
cora | 889e72c50d | |
cora | ea99341f94 | |
cora | 4b95185fba | |
cora | 86233c774d | |
cora | 3584d89028 | |
cora | 40d0c1affb | |
cora | 0a2e68d136 | |
cora | 9f66c9f673 | |
cora | a92b405efd | |
cora | db4f2baafc | |
cora | d6306d78b8 | |
cora | 0d8e6b103e | |
cora | 0e6250b2a3 | |
cora | c66cb834a2 | |
cora | bc2e61921f | |
cora | b1c97a0510 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | e22d543d80 | |
cora | ded679aaf7 | |
MysticTempest | 677110e39f | |
cora | 12e6c0e661 | |
PrairieAstronomer | 9c3a4f3436 | |
PrairieAstronomer | 1abeccfaab | |
PrairieAstronomer | 2845cd79b7 | |
PrairieAstronomer | 4bfadffadc | |
PrairieAstronomer | f998f3bc05 | |
PrairieAstronomer | acff3e525c | |
PrairieAstronomer | 6757b8f900 | |
PrairieAstronomer | 8f7ac1e5a2 | |
PrairieAstronomer | 40a421ddd0 | |
PrairieAstronomer | 687bc04560 | |
cora | cea6af267f | |
cora | 6ad00e4170 | |
cora | ef14006f15 | |
cora | c59a890963 | |
cora | ac69b7c710 | |
cora | f115fc8ea0 | |
cora | 8684140740 | |
cora | be2a8d7054 | |
cora | f5cc0ef2dc | |
cora | 7945de1324 | |
cora | a09226c370 | |
cora | 3ca6d4de3b | |
cora | 7f8a366a7b | |
cora | 607511518f | |
cora | 14cd360214 | |
cora | dfbb832f96 | |
cora | 063e17bc0a | |
cora | befe493ff0 | |
cora | fcb8160a60 | |
cora | 065767cc77 | |
cora | 47eca3f774 | |
cora | b396a3c6ee | |
cora | 9381657f5d | |
cora | e37358d220 | |
cora | d8697cb59c | |
cora | 0b3a4c18d7 | |
cora | 8e976d9191 | |
cora | fed81932e2 | |
cora | eb8db0dc0b | |
cora | 69dac8ded4 | |
PrairieWind | 4b18c7fe8e | |
cora | c1bd8f4204 | |
cora | 9f2691343c | |
cora | be8692daab | |
cora | c9dadc0bc7 | |
PrairieAstronomer | 145d183998 | |
PrairieAstronomer | 074f1df354 | |
PrairieAstronomer | 6543d819da | |
cora | b8fc1c03b3 | |
PrairieAstronomer | 1fc79ffb61 | |
PrairieAstronomer | ed2fc6601e | |
cora | 7136e54615 | |
PrairieAstronomer | d86be83b2b | |
cora | 352a52e086 | |
cora | 909aa71dd3 | |
cora | c05e1b5f45 | |
PrairieAstronomer | 79c014f356 | |
Code-Sploit | 7f340b7e2a | |
NO11 | e0c5f2f7fa | |
Code-Sploit | 10ea6da4e8 | |
Code-Sploit | 1283967132 | |
Code-Sploit | dc2a74140e | |
Code-Sploit | bbf63cf66b | |
Code-Sploit | 688d1e3f7e | |
Code-Sploit | e8cedbc553 | |
Code-Sploit | af2a4b1de0 | |
Code-Sploit | 8080932353 | |
Code-Sploit | 3b2a34c670 | |
Code-Sploit | aee4d15a57 | |
Code-Sploit | 9b25567274 | |
Code-Sploit | f2375abc47 | |
Code-Sploit | 9c0e9964a6 | |
Code-Sploit | 338114aecc | |
Code-Sploit | 8ee792e965 | |
Code-Sploit | 3f30251f26 | |
Code-Sploit | 57ebfbfb56 | |
Code-Sploit | f0f52713f7 | |
Code-Sploit | 92992cb44e | |
cora | 48a2d25698 | |
cora | 817fb83ba6 | |
cora | 3286330b26 | |
cora | ce2531a488 | |
cora | 78e187537f | |
kay27 | 9d8ff427f3 | |
PrairieWind | c504e9b4ac | |
TheRandomLegoBrick | f1e5790308 | |
cora | 815893a15a | |
cora | d9e40d5223 | |
cora | 86651e7557 | |
cora | 1262216f9d | |
PrairieAstronomer | 94e7c4c85b | |
PrairieAstronomer | 52bb8c6401 | |
PrairieAstronomer | 29329c4aac | |
PrairieAstronomer | 2e0fa714ed | |
cora | 679309d20c | |
MysticTempest | e3abe72522 | |
MysticTempest | a6e2c94028 | |
cora | bb413bfdb1 | |
cora | 2b87958678 | |
cora | f883b45809 | |
cora | ecbc94e822 | |
cora | ca6cf81e24 | |
cora | 1401f398ae | |
cora | 3a7022ab66 | |
cora | 685cba6821 | |
cora | 7a8d20e124 | |
cora | 9937224997 | |
cora | 820b97f065 | |
cora | 432ec760b7 | |
MysticTempest | f6599d237e | |
PrairieWind | b925ebb087 | |
TheRandomLegoBrick | 90ee8ecf0f | |
TheRandomLegoBrick | 6ec9765b58 | |
RandomLegoBrick | b5eda3000e | |
TheRandomLegoBrick | 99469ff1c5 | |
cora | 7429f5dc93 | |
cora | e3c5b2cbb5 | |
cora | 64b8f15f47 | |
cora | dcc7df5f02 | |
cora | 30e543d4d2 | |
cora | d9da50e292 | |
cora | ca27237ffc | |
cora | 855b18ee30 | |
cora | ffa15727e3 | |
cora | 31b94f5b22 | |
cora | ecf6236152 | |
cora | 41f708e03e | |
cora | 5b366c692d | |
cora | 0890c719a3 | |
cora | fefb15f2a8 | |
cora | 01eea4ab8a | |
cora | 969ac0be78 | |
cora | d9a74ac180 | |
cora | a0264ed5e0 | |
cora | 48189cb3a7 | |
cora | db9fba70dd | |
cora | 8efbd89b6a | |
cora | 3c79685c48 | |
cora | 06fdfd2e63 | |
cora | 1c3a6f8a19 | |
cora | 489ee80490 | |
AFCMS | f285e18d24 | |
cora | 7d653011fc | |
cora | 6af3fecacb | |
3raven | 9d5bbd7d22 | |
3raven | 686b62f6e3 | |
3raven | ee2f8f46f1 | |
3raven | 653020d2ef | |
kay27 | 7420877077 | |
3raven | 69da3ffc05 | |
3raven | b25c23f5fa | |
kay27 | 352fd7562f | |
debiankaios | 4a727d79c7 | |
debiankaios | b2b86e4fcc | |
debiankaios | c3e00a1c26 | |
debiankaios | 4b976a663f | |
debiankaios | 6755675021 | |
debiankaios | 324aa159a7 | |
debiankaios | 5b06af4fec | |
Lizzy Fleckenstein | c1ee0228f0 | |
cora | 49cb60f2e5 | |
debiankaios | 8a181661a5 | |
cora | 08d677d788 | |
cora | 98a322443b | |
cora | de994f3f06 | |
cora | cd43076ea3 | |
cora | e630ea59c9 | |
cora | fb6e790535 | |
Nathan Fritzler | d8dec7c316 | |
cora | 22d3b4a5d4 | |
MysticTempest | 965d10c003 | |
cora | 87bf3fdc0d | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | a455e7bb8e | |
cora | 20945db0e6 | |
cora | 92da429f50 | |
cora | 726d1f07fa | |
cora | 9c6aafa3c1 | |
cora | 1b0053299c | |
cora | fa56ce5d52 | |
cora | a0bed1d8bc | |
cora | a895292371 | |
cora | b0b8638a4c | |
cora | 8fa67e6b4f | |
cora | 1eaac3c406 | |
cora | 6406a14738 | |
cora | 899c849996 | |
cora | deeb7ce919 | |
cora | 8651e3b04e | |
cora | 60f164d46a | |
cora | 44c524f7bc | |
mrminer | 110b293297 | |
cora | d78ba13dea | |
cora | 27a84799e4 | |
cora | bd6d777f05 | |
cora | 7dd6d5f886 | |
PrairieAstronomer | e58387d123 | |
NO11 | c4aa634a40 | |
cora | 38a99d99ed | |
cora | 9cea10a706 | |
cora | 2074fec7a1 | |
cora | 4e1b6074c7 | |
cora | 8aaa7f9400 | |
cora | a43627e268 | |
cora | 00e94c81c4 | |
PrairieAstronomer | 87a45ad78e | |
PrairieAstronomer | bbd86045e5 | |
PrairieAstronomer | eb72bb81da | |
PrairieAstronomer | b544fb819d | |
PrairieAstronomer | 17e2f05971 | |
PrairieAstronomer | 2a62936fe7 | |
PrairieAstronomer | 91f8f44e17 | |
PrairieAstronomer | 1a5195b5e6 | |
epCode | fab6cf8152 | |
epCode | ef92475d35 | |
epCode | 6bc5e76b8f | |
cora | e4f514bb10 | |
epCode | 6a74adc261 | |
cora | ad55ba435a | |
cora | d1149ee49a | |
cora | 8d9131eda3 | |
chmodsayshello | 6048efbc98 | |
epCode | 0aaede2f50 | |
MysticTempest | 45ec876167 | |
epCode | 6c804f44d5 | |
cora | 61ddec5a85 | |
cora | 5c057f24fb | |
cora | 0fd25d15fa | |
epCode | ca5db36ccd | |
epCode | d738229298 | |
epCode | 78940e109c | |
epCode | fdb7d5bfad | |
epCode | f2c2f4106b | |
epCode | e1feec9a30 | |
cora | 6f3c013d41 | |
cora | 3cd87dfe38 | |
cora | 62d7b8cc77 | |
chmodsayshello | a4c608aada | |
chmodsayshello | da12a0a5b2 | |
chmodsayshello | f6867ffedd | |
chmodsayshello | 326edffaef | |
chmodsayshello | 9ea12e450a | |
chmodsayshello | e9547c54bb | |
chmodsayshello | fdd85e234b | |
chmodsayshello | 37adcc1ec5 | |
chmodsayshello | 6b32c36a4f | |
chmodsayshello | 2a2501c626 |
2
API.md
|
@ -42,7 +42,7 @@ A lot of things are possible by using one of the APIs in the mods. Note that not
|
||||||
* Buckets: `ITEMS/mcl_buckets`
|
* Buckets: `ITEMS/mcl_buckets`
|
||||||
* Dispenser support: `ITEMS/REDSTONE/mcl_dispensers`
|
* Dispenser support: `ITEMS/REDSTONE/mcl_dispensers`
|
||||||
|
|
||||||
## Mobs
|
### Mobs
|
||||||
* Mobs: `ENTITIES/mcl_mobs`
|
* Mobs: `ENTITIES/mcl_mobs`
|
||||||
|
|
||||||
MineClone 2 uses its own mobs framework, called “Mobs Redo: MineClone 2 Edition” or “MRM” for short.
|
MineClone 2 uses its own mobs framework, called “Mobs Redo: MineClone 2 Edition” or “MRM” for short.
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
name = MineClone 2
|
title = MineClone 2
|
||||||
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
||||||
|
|
|
@ -59,6 +59,8 @@ mcl_item_entity.register_pickup_achievement("tree", "mcl:mineWood")
|
||||||
mcl_item_entity.register_pickup_achievement("mcl_mobitems:blaze_rod", "mcl:blazeRod")
|
mcl_item_entity.register_pickup_achievement("mcl_mobitems:blaze_rod", "mcl:blazeRod")
|
||||||
mcl_item_entity.register_pickup_achievement("mcl_mobitems:leather", "mcl:killCow")
|
mcl_item_entity.register_pickup_achievement("mcl_mobitems:leather", "mcl:killCow")
|
||||||
mcl_item_entity.register_pickup_achievement("mcl_core:diamond", "mcl:diamonds")
|
mcl_item_entity.register_pickup_achievement("mcl_core:diamond", "mcl:diamonds")
|
||||||
|
mcl_item_entity.register_pickup_achievement("mcl_core:crying_obsidian", "mcl:whosCuttingOnions")
|
||||||
|
mcl_item_entity.register_pickup_achievement("mcl_nether:ancient_debris", "mcl:hiddenInTheDepths")
|
||||||
|
|
||||||
local function check_pickup_achievements(object, player)
|
local function check_pickup_achievements(object, player)
|
||||||
if has_awards then
|
if has_awards then
|
||||||
|
@ -535,9 +537,9 @@ minetest.register_entity(":__builtin:item", {
|
||||||
self.itemstring = data.itemstring
|
self.itemstring = data.itemstring
|
||||||
self.always_collect = data.always_collect
|
self.always_collect = data.always_collect
|
||||||
if data.age then
|
if data.age then
|
||||||
self.age = data.age + dtime_s
|
self.age = data.age
|
||||||
else
|
else
|
||||||
self.age = dtime_s
|
self.age = self.age
|
||||||
end
|
end
|
||||||
--remember collection data
|
--remember collection data
|
||||||
-- If true, can collect item without delay
|
-- If true, can collect item without delay
|
||||||
|
|
|
@ -21,7 +21,7 @@ local function register_rail(itemstring, tiles, def_extras, creative)
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = groups,
|
groups = groups,
|
||||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||||
_mcl_blast_resistance = 3.5,
|
_mcl_blast_resistance = 0.7,
|
||||||
_mcl_hardness = 0.7,
|
_mcl_hardness = 0.7,
|
||||||
after_destruct = function(pos)
|
after_destruct = function(pos)
|
||||||
-- Scan for minecarts in this pos and force them to execute their "floating" check.
|
-- Scan for minecarts in this pos and force them to execute their "floating" check.
|
||||||
|
|
|
@ -91,7 +91,7 @@ minetest.register_chatcommand("clearmobs",{
|
||||||
if o.is_mob then
|
if o.is_mob then
|
||||||
if param == "all" or
|
if param == "all" or
|
||||||
( param == "nametagged" and o.nametag ) or
|
( param == "nametagged" and o.nametag ) or
|
||||||
( param == "" and not o.nametag and not o.tamed ) or
|
( param == "" and ( not o.nametag or o.nametag == "" ) and not o.tamed ) or
|
||||||
( num and num > 0 and vector.distance(p:get_pos(),o.object:get_pos()) <= num ) then
|
( num and num > 0 and vector.distance(p:get_pos(),o.object:get_pos()) <= num ) then
|
||||||
o.object:remove()
|
o.object:remove()
|
||||||
end
|
end
|
||||||
|
@ -298,9 +298,13 @@ local function update_roll(self)
|
||||||
|
|
||||||
if is_Fleckenstein then
|
if is_Fleckenstein then
|
||||||
cbox[2], cbox[5] = -cbox[5], -cbox[2]
|
cbox[2], cbox[5] = -cbox[5], -cbox[2]
|
||||||
|
self.object:set_properties({collisionbox = cbox})
|
||||||
|
-- This leads to child mobs having the wrong collisionbox
|
||||||
|
-- and seeing as it seems to be nothing but an easter egg
|
||||||
|
-- i've put it inside the if. Which just makes it be upside
|
||||||
|
-- down lol.
|
||||||
end
|
end
|
||||||
|
|
||||||
self.object:set_properties({collisionbox = cbox})
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set and return valid yaw
|
-- set and return valid yaw
|
||||||
|
@ -2283,6 +2287,9 @@ end
|
||||||
local function go_to_pos(entity,b)
|
local function go_to_pos(entity,b)
|
||||||
if not entity then return end
|
if not entity then return end
|
||||||
local s=entity.object:get_pos()
|
local s=entity.object:get_pos()
|
||||||
|
if not b then
|
||||||
|
--self.state = "stand"
|
||||||
|
return end
|
||||||
if vector.distance(b,s) < 1 then
|
if vector.distance(b,s) < 1 then
|
||||||
--set_velocity(entity,0)
|
--set_velocity(entity,0)
|
||||||
return true
|
return true
|
||||||
|
@ -2314,6 +2321,43 @@ local function check_doors(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local gowp_etime = 0
|
||||||
|
|
||||||
|
local function check_gowp(self,dtime)
|
||||||
|
gowp_etime = gowp_etime + dtime
|
||||||
|
if gowp_etime < 0.2 then return end
|
||||||
|
gowp_etime = 0
|
||||||
|
local p = self.object:get_pos()
|
||||||
|
if not p or not self._target then return end
|
||||||
|
if vector.distance(p,self._target) < 1 then
|
||||||
|
self.waypoints = nil
|
||||||
|
self._target = nil
|
||||||
|
self.current_target = nil
|
||||||
|
self.state = "stand"
|
||||||
|
if self.callback_arrived then return self.callback_arrived(self) end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
if self.waypoints and ( not self.current_target or vector.distance(p,self.current_target) < 2 ) then
|
||||||
|
self.current_target = table.remove(self.waypoints, 1)
|
||||||
|
--minetest.log("nextwp:".. tostring(self.current_target) )
|
||||||
|
go_to_pos(self,self.current_target)
|
||||||
|
return
|
||||||
|
elseif self.current_target then
|
||||||
|
go_to_pos(self,self.current_target)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.current_target and not minetest.line_of_sight(self.object:get_pos(),self.current_target) then
|
||||||
|
self.waypoints=minetest.find_path(p,self._target,150,1,4)
|
||||||
|
if not self.waypoints then self.state = "walk" end --give up
|
||||||
|
self.current_target = nil
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not self.current_target then
|
||||||
|
--minetest.log("no path")
|
||||||
|
self.state = "walk"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- execute current state (stand, walk, run, attacks)
|
-- execute current state (stand, walk, run, attacks)
|
||||||
-- returns true if mob has died
|
-- returns true if mob has died
|
||||||
local do_states = function(self, dtime)
|
local do_states = function(self, dtime)
|
||||||
|
@ -2326,9 +2370,8 @@ local do_states = function(self, dtime)
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local objs = minetest.get_objects_inside_radius(s, 3)
|
local objs = minetest.get_objects_inside_radius(s, 3)
|
||||||
|
local lp
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
|
|
||||||
if objs[n]:is_player() then
|
if objs[n]:is_player() then
|
||||||
lp = objs[n]:get_pos()
|
lp = objs[n]:get_pos()
|
||||||
break
|
break
|
||||||
|
@ -2336,7 +2379,7 @@ local do_states = function(self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- look at any players nearby, otherwise turn randomly
|
-- look at any players nearby, otherwise turn randomly
|
||||||
if self.look_at_players then
|
if lp and self.look_at_players then
|
||||||
|
|
||||||
local vec = {
|
local vec = {
|
||||||
x = lp.x - s.x,
|
x = lp.x - s.x,
|
||||||
|
@ -2372,32 +2415,7 @@ local do_states = function(self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif self.state == "gowp" then
|
elseif self.state == "gowp" then
|
||||||
local p = self.object:get_pos()
|
check_gowp(self,dtime)
|
||||||
if not p or not self._target then return end
|
|
||||||
if vector.distance(p,self._target) < 2 or ( self.waypoints and #self.waypoints == 0 ) then
|
|
||||||
self.waypoints = nil
|
|
||||||
self._target = nil
|
|
||||||
self.current_target = nil
|
|
||||||
self.state = "walk"
|
|
||||||
if self.callback_arrived then return self.callback_arrived(self) end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
if self.waypoints and ( not self.current_target or vector.distance(p,self.current_target) < 1.5 ) then
|
|
||||||
self.current_target = table.remove(self.waypoints, 1)
|
|
||||||
--minetest.log("nextwp:".. tostring(self.current_target) )
|
|
||||||
elseif self.current_target then
|
|
||||||
go_to_pos(self,self.current_target)
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.current_target and not minetest.line_of_sight(self.object:get_pos(),self.current_target) then
|
|
||||||
self.waypoints=minetest.find_path(p,self._target,150,1,4)
|
|
||||||
self.current_target = nil
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if not self.current_target then
|
|
||||||
--minetest.log("no path")
|
|
||||||
self.state = "walk"
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif self.state == "walk" then
|
elseif self.state == "walk" then
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
|
@ -2908,7 +2926,12 @@ local plane_adjacents = {
|
||||||
vector.new(0,0,-1),
|
vector.new(0,0,-1),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
local gopath_last = os.time()
|
||||||
function mcl_mobs:gopath(self,target,callback_arrived)
|
function mcl_mobs:gopath(self,target,callback_arrived)
|
||||||
|
if os.time() - gopath_last < 15 then return end
|
||||||
|
gopath_last = os.time()
|
||||||
|
--minetest.log("gowp")
|
||||||
local p = self.object:get_pos()
|
local p = self.object:get_pos()
|
||||||
local t = vector.offset(target,0,1,0)
|
local t = vector.offset(target,0,1,0)
|
||||||
local wp = minetest.find_path(p,t,150,1,4)
|
local wp = minetest.find_path(p,t,150,1,4)
|
||||||
|
@ -2928,11 +2951,15 @@ function mcl_mobs:gopath(self,target,callback_arrived)
|
||||||
if wp and #wp > 0 then
|
if wp and #wp > 0 then
|
||||||
self._target = t
|
self._target = t
|
||||||
self.callback_arrived = callback_arrived
|
self.callback_arrived = callback_arrived
|
||||||
|
table.remove(wp,1)
|
||||||
self.waypoints = wp
|
self.waypoints = wp
|
||||||
self.state = "gowp"
|
self.state = "gowp"
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
--minetest.log("no path found")
|
self.state = "walk"
|
||||||
|
self.waypoints = nil
|
||||||
|
self.current_target = nil
|
||||||
|
-- minetest.log("no path found")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2964,7 +2991,7 @@ local function damage_mob(self,reason,damage)
|
||||||
if damage > 0 then
|
if damage > 0 then
|
||||||
self.health = self.health - damage
|
self.health = self.health - damage
|
||||||
|
|
||||||
effect(pos, 5, "mcl_particles_smoke.png", 1, 2, 2, nil)
|
effect(self.object:get_pos(), 5, "mcl_particles_smoke.png", 1, 2, 2, nil)
|
||||||
|
|
||||||
if check_for_death(self, reason, {type = reason}) then
|
if check_for_death(self, reason, {type = reason}) then
|
||||||
return true
|
return true
|
||||||
|
@ -3210,9 +3237,10 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
||||||
|
|
||||||
local die = false
|
local die = false
|
||||||
|
|
||||||
|
|
||||||
|
if damage >= 0 then
|
||||||
-- only play hit sound and show blood effects if damage is 1 or over; lower to 0.1 to ensure armor works appropriately.
|
-- only play hit sound and show blood effects if damage is 1 or over; lower to 0.1 to ensure armor works appropriately.
|
||||||
if damage >= 0.1 then
|
if damage >= 0.1 then
|
||||||
|
|
||||||
-- weapon sounds
|
-- weapon sounds
|
||||||
if weapon:get_definition().sounds ~= nil then
|
if weapon:get_definition().sounds ~= nil then
|
||||||
|
|
||||||
|
@ -3238,7 +3266,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
||||||
if check_for_death(self, "hit", {type = "punch", puncher = hitter}) then
|
if check_for_death(self, "hit", {type = "punch", puncher = hitter}) then
|
||||||
die = true
|
die = true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
-- knock back effect (only on full punch)
|
-- knock back effect (only on full punch)
|
||||||
if not die
|
if not die
|
||||||
and self.knock_back
|
and self.knock_back
|
||||||
|
@ -4008,6 +4036,7 @@ minetest.register_entity(name, {
|
||||||
fire_resistant = def.fire_resistant or false,
|
fire_resistant = def.fire_resistant or false,
|
||||||
fire_damage_resistant = def.fire_damage_resistant or false,
|
fire_damage_resistant = def.fire_damage_resistant or false,
|
||||||
ignited_by_sunlight = def.ignited_by_sunlight or false,
|
ignited_by_sunlight = def.ignited_by_sunlight or false,
|
||||||
|
spawn_in_group = def.spawn_in_group,
|
||||||
-- End of MCL2 extensions
|
-- End of MCL2 extensions
|
||||||
|
|
||||||
on_spawn = def.on_spawn,
|
on_spawn = def.on_spawn,
|
||||||
|
@ -4333,7 +4362,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- feeding, taming and breeding (thanks blert2112)
|
-- feeding, taming and breeding (thanks blert2112)
|
||||||
function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame, notake)
|
||||||
if not self.follow then
|
if not self.follow then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -4346,7 +4375,7 @@ function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame)
|
||||||
|
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
|
|
||||||
item:take_item()
|
if not notake then item:take_item() end
|
||||||
|
|
||||||
clicker:set_wielded_item(item)
|
clicker:set_wielded_item(item)
|
||||||
end
|
end
|
||||||
|
|
|
@ -189,6 +189,9 @@ local list_of_all_biomes = {
|
||||||
"MesaBryce",
|
"MesaBryce",
|
||||||
"JungleEdge",
|
"JungleEdge",
|
||||||
"SavannaM",
|
"SavannaM",
|
||||||
|
"Nether",
|
||||||
|
"WarpedForest",
|
||||||
|
"SoulsandValley"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- count how many mobs are in an area
|
-- count how many mobs are in an area
|
||||||
|
@ -376,6 +379,24 @@ local function is_farm_animal(n)
|
||||||
return n == "mobs_mc:pig" or n == "mobs_mc:cow" or n == "mobs_mc:sheep" or n == "mobs_mc:chicken" or n == "mobs_mc:horse" or n == "mobs_mc:donkey"
|
return n == "mobs_mc:pig" or n == "mobs_mc:cow" or n == "mobs_mc:sheep" or n == "mobs_mc:chicken" or n == "mobs_mc:horse" or n == "mobs_mc:donkey"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function get_water_spawn(p)
|
||||||
|
local nn = minetest.find_nodes_in_area(vector.offset(p,-2,-1,-2),vector.offset(p,2,-15,2),{"group:water"})
|
||||||
|
if nn and #nn > 0 then
|
||||||
|
return nn[math.random(#nn)]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function spawn_group(p,mob,spawn_on,group_max)
|
||||||
|
local nn = minetest.find_nodes_in_area(vector.offset(p,-3,-3,-3),vector.offset(p,3,3,3),spawn_on)
|
||||||
|
if not nn or #nn < 1 then
|
||||||
|
nn = {}
|
||||||
|
table.insert(nn,p)
|
||||||
|
end
|
||||||
|
for i = 1, math.random(group_max) do
|
||||||
|
minetest.add_entity(nn[math.random(#nn)],mob)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if mobs_spawn then
|
if mobs_spawn then
|
||||||
|
|
||||||
local perlin_noise
|
local perlin_noise
|
||||||
|
@ -407,6 +428,7 @@ if mobs_spawn then
|
||||||
|
|
||||||
local is_water = get_item_group(gotten_node, "water") ~= 0
|
local is_water = get_item_group(gotten_node, "water") ~= 0
|
||||||
local is_lava = get_item_group(gotten_node, "lava") ~= 0
|
local is_lava = get_item_group(gotten_node, "lava") ~= 0
|
||||||
|
local is_leaf = get_item_group(gotten_node, "leaves") ~= 0
|
||||||
local is_ground = not (is_water or is_lava)
|
local is_ground = not (is_water or is_lava)
|
||||||
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
||||||
local has_bed = minetest.find_node_near(pos,25,{"group:bed"})
|
local has_bed = minetest.find_node_near(pos,25,{"group:bed"})
|
||||||
|
@ -426,6 +448,7 @@ if mobs_spawn then
|
||||||
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
||||||
local noise = perlin_noise:get_3d(spawning_position)
|
local noise = perlin_noise:get_3d(spawning_position)
|
||||||
local current_summary_chance = summary_chance
|
local current_summary_chance = summary_chance
|
||||||
|
table.shuffle(mob_library_worker_table)
|
||||||
while #mob_library_worker_table > 0 do
|
while #mob_library_worker_table > 0 do
|
||||||
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
||||||
local mob_index = 1
|
local mob_index = 1
|
||||||
|
@ -438,6 +461,7 @@ if mobs_spawn then
|
||||||
end
|
end
|
||||||
local mob_def = mob_library_worker_table[mob_index]
|
local mob_def = mob_library_worker_table[mob_index]
|
||||||
local mob_type = minetest.registered_entities[mob_def.name].type
|
local mob_type = minetest.registered_entities[mob_def.name].type
|
||||||
|
local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group
|
||||||
if mob_def
|
if mob_def
|
||||||
and spawning_position.y >= mob_def.min_height
|
and spawning_position.y >= mob_def.min_height
|
||||||
and spawning_position.y <= mob_def.max_height
|
and spawning_position.y <= mob_def.max_height
|
||||||
|
@ -446,14 +470,25 @@ if mobs_spawn then
|
||||||
and gotten_light >= mob_def.min_light
|
and gotten_light >= mob_def.min_light
|
||||||
and gotten_light <= mob_def.max_light
|
and gotten_light <= mob_def.max_light
|
||||||
and (is_ground or mob_def.type_of_spawning ~= "ground")
|
and (is_ground or mob_def.type_of_spawning ~= "ground")
|
||||||
|
and (mob_def.type_of_spawning ~= "ground" or not is_leaf)
|
||||||
and (mob_def.check_position and mob_def.check_position(spawning_position) or true)
|
and (mob_def.check_position and mob_def.check_position(spawning_position) or true)
|
||||||
and (not is_farm_animal(mob_def.name) or is_grass)
|
and (not is_farm_animal(mob_def.name) or is_grass)
|
||||||
and (mob_type ~= "npc" or has_bed)
|
and (mob_type ~= "npc" or has_bed)
|
||||||
|
and (mob_def.type_of_spawning ~= "water" or is_water)
|
||||||
then
|
then
|
||||||
|
if mob_def.type_of_spawning == "water" then
|
||||||
|
spawning_position = get_water_spawn(spawning_position)
|
||||||
|
if not spawning_position then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
--everything is correct, spawn mob
|
--everything is correct, spawn mob
|
||||||
local object = minetest.add_entity(spawning_position, mob_def.name)
|
local object = minetest.add_entity(spawning_position, mob_def.name)
|
||||||
|
if spawn_in_group then
|
||||||
|
spawn_group(spawning_position,mob_def.name,{gotten_node},spawn_in_group)
|
||||||
|
end
|
||||||
if object then
|
if object then
|
||||||
return mob_def.on_spawn and mob_def.on_spawn(object, pos)
|
return mob_def.on_spawn and mob_def.on_spawn(object, spawning_position)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
current_summary_chance = current_summary_chance - mob_chance
|
current_summary_chance = current_summary_chance - mob_chance
|
||||||
|
|
|
@ -46,6 +46,9 @@ end
|
||||||
local wither_head = minetest.registered_nodes["mcl_heads:wither_skeleton"]
|
local wither_head = minetest.registered_nodes["mcl_heads:wither_skeleton"]
|
||||||
local old_on_place = wither_head.on_place
|
local old_on_place = wither_head.on_place
|
||||||
function wither_head.on_place(itemstack, placer, pointed)
|
function wither_head.on_place(itemstack, placer, pointed)
|
||||||
|
local n = minetest.get_node(vector.offset(pointed.above,0,-1,0))
|
||||||
|
if n and n.name == "mcl_nether:soul_sand" then
|
||||||
minetest.after(0, wither_spawn, pointed.above)
|
minetest.after(0, wither_spawn, pointed.above)
|
||||||
old_on_place(itemstack, placer, pointed)
|
end
|
||||||
|
return old_on_place(itemstack, placer, pointed)
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,273 @@
|
||||||
|
--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(minetest.get_current_modname())
|
||||||
|
|
||||||
|
--###################
|
||||||
|
--################### 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 = 180,
|
||||||
|
spawn_in_group = 10,
|
||||||
|
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,
|
||||||
|
fly = true,
|
||||||
|
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
|
||||||
|
breathes_in_water = true,
|
||||||
|
jump = false,
|
||||||
|
view_range = 16,
|
||||||
|
runaway = true,
|
||||||
|
fear_height = 4,
|
||||||
|
do_custom = function(self)
|
||||||
|
--[[ this is supposed to make them jump out the water but doesn't appear to work very well
|
||||||
|
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
|
||||||
|
--]]
|
||||||
|
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 == "mobs_mc: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,
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||||
|
self.object:remove()
|
||||||
|
clicker:set_wielded_item("mcl_fishing:bucket_cod")
|
||||||
|
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
mcl_mobs:register_mob("mobs_mc:cod", cod)
|
||||||
|
|
||||||
|
|
||||||
|
--spawning TODO: in schools
|
||||||
|
|
||||||
|
local water = 0
|
||||||
|
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc: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+1)
|
||||||
|
|
||||||
|
--spawn egg
|
||||||
|
mcl_mobs:register_egg("mobs_mc:cod", S("Cod"), "extra_mobs_spawn_icon_cod.png", 0)
|
|
@ -0,0 +1,253 @@
|
||||||
|
--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(minetest.get_current_modname())
|
||||||
|
|
||||||
|
--###################
|
||||||
|
--################### 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 = 180,
|
||||||
|
spawn_in_group = 3,
|
||||||
|
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,
|
||||||
|
fly = true,
|
||||||
|
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
|
||||||
|
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,dtime)
|
||||||
|
--[[ this is supposed to make them jump out the water but doesn't appear to work very well
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
|
||||||
|
mcl_mobs:register_mob("mobs_mc:dolphin", dolphin)
|
||||||
|
|
||||||
|
|
||||||
|
--spawning TO DO: in schools
|
||||||
|
local water = 0
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc: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+1)
|
||||||
|
|
||||||
|
--spawn egg
|
||||||
|
mcl_mobs:register_egg("mobs_mc:dolphin", S("Dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)
|
|
@ -35,6 +35,7 @@ mcl_mobs:register_mob("mobs_mc:enderdragon", {
|
||||||
},
|
},
|
||||||
physical = true,
|
physical = true,
|
||||||
damage = 10,
|
damage = 10,
|
||||||
|
knock_back = false,
|
||||||
jump = true,
|
jump = true,
|
||||||
jump_height = 14,
|
jump_height = 14,
|
||||||
fly = true,
|
fly = true,
|
||||||
|
|
|
@ -766,15 +766,32 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"Nether",
|
||||||
|
"SoulsandValley",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
7,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
27500,
|
27500,
|
||||||
4,
|
4,
|
||||||
mcl_vars.mg_nether_min,
|
mcl_vars.mg_nether_min,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
|
-- Warped Forest spawn (common)
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc:enderman",
|
||||||
|
"nether",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"WarpedForest"
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
minetest.LIGHT_MAX+1,
|
||||||
|
30,
|
||||||
|
5000,
|
||||||
|
4,
|
||||||
|
mcl_vars.mg_nether_min,
|
||||||
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0)
|
mcl_mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0)
|
||||||
|
|
|
@ -81,12 +81,14 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"Nether",
|
||||||
|
"SoulsandValley",
|
||||||
|
"BasaltDelta",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
7,
|
||||||
30,
|
30,
|
||||||
18000,
|
72000,
|
||||||
2,
|
2,
|
||||||
mcl_vars.mg_nether_min,
|
mcl_vars.mg_nether_min,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
|
@ -105,7 +107,12 @@ mcl_mobs:register_arrow("mobs_mc:fireball", {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = 6},
|
damage_groups = {fleshy = 6},
|
||||||
}, nil)
|
}, nil)
|
||||||
mcl_mobs:boom(self, self.object:get_pos(), 1, true)
|
local p = self.object:get_pos()
|
||||||
|
if p then
|
||||||
|
mcl_mobs:boom(self, p, 1, true)
|
||||||
|
else
|
||||||
|
mcl_mobs:boom(self, player:get_pos(), 1, true)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, mob)
|
hit_mob = function(self, mob)
|
||||||
|
|
|
@ -542,41 +542,14 @@ mcl_mobs:spawn_specific(
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"flat",
|
"flat",
|
||||||
"IcePlainsSpikes",
|
|
||||||
"ColdTaiga",
|
|
||||||
"ColdTaiga_beach",
|
|
||||||
"ColdTaiga_beach_water",
|
|
||||||
"MegaTaiga",
|
|
||||||
"MegaSpruceTaiga",
|
|
||||||
"ExtremeHills",
|
|
||||||
"ExtremeHills_beach",
|
|
||||||
"ExtremeHillsM",
|
|
||||||
"ExtremeHills+",
|
|
||||||
"ExtremeHills+_snowtop",
|
|
||||||
"StoneBeach",
|
|
||||||
"Plains",
|
"Plains",
|
||||||
"Plains_beach",
|
"Plains_beach",
|
||||||
"SunflowerPlains",
|
"SunflowerPlains",
|
||||||
"Taiga",
|
|
||||||
"Taiga_beach",
|
|
||||||
"Forest",
|
|
||||||
"Forest_beach",
|
|
||||||
"FlowerForest",
|
|
||||||
"FlowerForest_beach",
|
|
||||||
"BirchForest",
|
|
||||||
"BirchForestM",
|
|
||||||
"RoofedForest",
|
|
||||||
"Savanna",
|
"Savanna",
|
||||||
"Savanna_beach",
|
"Savanna_beach",
|
||||||
"SavannaM",
|
"SavannaM",
|
||||||
"Jungle",
|
"Savanna_beach",
|
||||||
"Jungle_shore",
|
"Plains_beach",
|
||||||
"JungleM",
|
|
||||||
"JungleM_shore",
|
|
||||||
"JungleEdge",
|
|
||||||
"JungleEdgeM",
|
|
||||||
"Swampland",
|
|
||||||
"Swampland_shore"
|
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
@ -586,18 +559,20 @@ minetest.LIGHT_MAX+1,
|
||||||
mobs_mc.water_level+3,
|
mobs_mc.water_level+3,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:donkey",
|
"mobs_mc:donkey",
|
||||||
"overworld",
|
"overworld",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Mesa",
|
"flat",
|
||||||
"MesaPlateauFM_grasstop",
|
"Plains",
|
||||||
"MesaPlateauF",
|
"Plains_beach",
|
||||||
"MesaPlateauFM",
|
"SunflowerPlains",
|
||||||
"MesaPlateauF_grasstop",
|
"Savanna",
|
||||||
"MesaBryce",
|
"Savanna_beach",
|
||||||
|
"SavannaM",
|
||||||
|
"Savanna_beach",
|
||||||
|
"Plains_beach",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
|
|
@ -142,3 +142,7 @@ dofile(path .. "/slime+magma_cube.lua") -- Wuzzy
|
||||||
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
||||||
dofile(path .. "/vex.lua") -- KrupnoPavel
|
dofile(path .. "/vex.lua") -- KrupnoPavel
|
||||||
dofile(path .. "/wither.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/wither.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
||||||
|
|
||||||
|
dofile(path .. "/cod.lua")
|
||||||
|
dofile(path .. "/salmon.lua")
|
||||||
|
dofile(path .. "/dolphin.lua")
|
||||||
|
|
|
@ -37,6 +37,7 @@ mcl_mobs:register_mob("mobs_mc:iron_golem", {
|
||||||
run_velocity = 1.2,
|
run_velocity = 1.2,
|
||||||
-- Approximation
|
-- Approximation
|
||||||
damage = 14,
|
damage = 14,
|
||||||
|
knock_back = false,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
group_attack = true,
|
group_attack = true,
|
||||||
attacks_monsters = true,
|
attacks_monsters = true,
|
||||||
|
|
|
@ -62,3 +62,6 @@ Weapon Smith=
|
||||||
Tool Smith=
|
Tool Smith=
|
||||||
Cleric=
|
Cleric=
|
||||||
Nitwit=
|
Nitwit=
|
||||||
|
Cod=
|
||||||
|
Salmon=
|
||||||
|
Dolphin=
|
||||||
|
|
|
@ -76,7 +76,6 @@ mcl_mobs:spawn_specific(
|
||||||
"ColdTaiga",
|
"ColdTaiga",
|
||||||
"IcePlainsSpikes",
|
"IcePlainsSpikes",
|
||||||
"IcePlains",
|
"IcePlains",
|
||||||
"ExtremeHills+_snowtop",
|
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
|
|
@ -132,18 +132,9 @@ mcl_mobs:spawn_specific(
|
||||||
"Desert",
|
"Desert",
|
||||||
"FlowerForest",
|
"FlowerForest",
|
||||||
"Taiga",
|
"Taiga",
|
||||||
"ExtremeHills",
|
|
||||||
"BirchForest",
|
|
||||||
"MegaSpruceTaiga",
|
"MegaSpruceTaiga",
|
||||||
"MegaTaiga",
|
"MegaTaiga",
|
||||||
"ExtremeHills+",
|
|
||||||
"Plains",
|
|
||||||
"ColdTaiga",
|
"ColdTaiga",
|
||||||
"SunflowerPlains",
|
|
||||||
"RoofedForest",
|
|
||||||
"MesaPlateauFM_grasstop",
|
|
||||||
"ExtremeHillsM",
|
|
||||||
"BirchForestM",
|
|
||||||
},
|
},
|
||||||
9,
|
9,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
|
|
@ -0,0 +1,228 @@
|
||||||
|
--MCmobs v0.4
|
||||||
|
--maikerumine
|
||||||
|
--made for MC like Survival game
|
||||||
|
--License for code WTFPL and otherwise stated in readmes
|
||||||
|
|
||||||
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
|
--###################
|
||||||
|
--################### 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,
|
||||||
|
spawn_in_group = 5,
|
||||||
|
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,
|
||||||
|
fly = true,
|
||||||
|
fly_in = "mcl_core:water_source",
|
||||||
|
breathes_in_water = true,
|
||||||
|
jump = false,
|
||||||
|
view_range = 16,
|
||||||
|
runaway = true,
|
||||||
|
fear_height = 4,
|
||||||
|
on_rightclick = function(self, clicker)
|
||||||
|
if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then
|
||||||
|
self.object:remove()
|
||||||
|
clicker:set_wielded_item("mcl_fishing:bucket_salmon")
|
||||||
|
awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
mcl_mobs:register_mob("mobs_mc:salmon", salmon)
|
||||||
|
|
||||||
|
|
||||||
|
--spawning TODO: in schools
|
||||||
|
local water = 0
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc: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+1)
|
||||||
|
|
||||||
|
--spawn egg
|
||||||
|
mcl_mobs:register_egg("mobs_mc:salmon", S("Salmon"), "extra_mobs_spawn_icon_salmon.png", 0)
|
|
@ -33,6 +33,7 @@ mcl_mobs:register_mob("mobs_mc:shulker", {
|
||||||
-- TODO: Make shulker dye-able
|
-- TODO: Make shulker dye-able
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x=3, y=3},
|
||||||
walk_chance = 0,
|
walk_chance = 0,
|
||||||
|
knock_back = false,
|
||||||
jump = false,
|
jump = false,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mcl_mobitems:shulker_shell",
|
{name = "mcl_mobitems:shulker_shell",
|
||||||
|
|
|
@ -302,10 +302,10 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"SoulsandValley",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
7,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
10000,
|
10000,
|
||||||
3,
|
3,
|
||||||
|
|
|
@ -402,7 +402,8 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"Nether",
|
||||||
|
"BasaltDelta",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
@ -418,7 +419,8 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"Nether",
|
||||||
|
"BasaltDelta",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
@ -433,7 +435,8 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"Nether",
|
||||||
|
"BasaltDelta",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
|
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 443 B |
After Width: | Height: | Size: 830 B |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.1 KiB |
|
@ -136,8 +136,7 @@ local professions = {
|
||||||
{
|
{
|
||||||
{ { "mcl_fishing:fish_raw", 6, 15,}, E1 },
|
{ { "mcl_fishing:fish_raw", 6, 15,}, E1 },
|
||||||
{ { "mcl_fishing:salmon_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:salmon_cooked", 6, 6 } },
|
{ { "mcl_fishing:salmon_raw", 6, 6, "mcl_core:emerald", 1, 1 },{ "mcl_fishing:salmon_cooked", 6, 6 } },
|
||||||
-- FIXME missing campfire
|
{ { "mcl_core:emerald", 1, 2 },{"mcl_campfires:campfire_lit",1,1} },
|
||||||
-- {{ "mcl_core:emerald", 1, 2 },{"mcl_campfires:campfire",1,1} },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{ { "mcl_fishing:salmon_raw", 6, 13,}, E1 },
|
{ { "mcl_fishing:salmon_raw", 6, 13,}, E1 },
|
||||||
|
@ -427,7 +426,7 @@ local professions = {
|
||||||
"mobs_mc_villager_weaponsmith.png",
|
"mobs_mc_villager_weaponsmith.png",
|
||||||
"mobs_mc_villager_weaponsmith.png",
|
"mobs_mc_villager_weaponsmith.png",
|
||||||
},
|
},
|
||||||
jobsite = "mcl_furnaces:furnace", --FIXME: grindstone
|
jobsite = "mcl_grindstone:grindstone",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
||||||
|
@ -458,7 +457,7 @@ local professions = {
|
||||||
"mobs_mc_villager_toolsmith.png",
|
"mobs_mc_villager_toolsmith.png",
|
||||||
"mobs_mc_villager_toolsmith.png",
|
"mobs_mc_villager_toolsmith.png",
|
||||||
},
|
},
|
||||||
jobsite = "mcl_anvils:anvil", --FIXME: smithing table
|
jobsite = "mcl_smithing_table:table",
|
||||||
trades = {
|
trades = {
|
||||||
{
|
{
|
||||||
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
{ { "mcl_core:coal_lump", 15, 15 }, E1 },
|
||||||
|
@ -613,6 +612,8 @@ local function employ(self,jobsite_pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function look_for_job(self)
|
local function look_for_job(self)
|
||||||
|
if self.last_jobhunt and os.time() - self.last_jobhunt < 360 then return end
|
||||||
|
self.last_jobhunt = os.time() + math.random(0,60)
|
||||||
local p = self.object:get_pos()
|
local p = self.object:get_pos()
|
||||||
local nn = minetest.find_nodes_in_area(vector.offset(p,-48,-48,-48),vector.offset(p,48,48,48),jobsites)
|
local nn = minetest.find_nodes_in_area(vector.offset(p,-48,-48,-48),vector.offset(p,48,48,48),jobsites)
|
||||||
for _,n in pairs(nn) do
|
for _,n in pairs(nn) do
|
||||||
|
@ -628,14 +629,24 @@ local function look_for_job(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_a_job(self)
|
local function get_a_job(self)
|
||||||
|
if self.child then return end
|
||||||
local p = self.object:get_pos()
|
local p = self.object:get_pos()
|
||||||
local nn = minetest.find_nodes_in_area(vector.offset(p,-8,-8,-8),vector.offset(p,8,8,8),jobsites)
|
local n = minetest.find_node_near(p,1,jobsites)
|
||||||
for _,n in pairs(nn) do
|
|
||||||
if n and employ(self,n) then return true end
|
if n and employ(self,n) then return true end
|
||||||
end
|
|
||||||
if self.state ~= "gowp" then look_for_job(self) end
|
if self.state ~= "gowp" then look_for_job(self) end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function check_jobsite(self)
|
||||||
|
if self._traded or not self._jobsite then return end
|
||||||
|
local n = mcl_vars.get_node(self._jobsite)
|
||||||
|
local m = minetest.get_meta(self._jobsite)
|
||||||
|
if m:get_string("villager") ~= self._id then
|
||||||
|
self._profession = "unemployed"
|
||||||
|
self._trades = nil
|
||||||
|
set_textures(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function update_max_tradenum(self)
|
local function update_max_tradenum(self)
|
||||||
if not self._trades then
|
if not self._trades then
|
||||||
return
|
return
|
||||||
|
@ -985,6 +996,11 @@ local trade_inventory = {
|
||||||
elseif listname == "output" then
|
elseif listname == "output" then
|
||||||
if not trader_exists(player:get_player_name()) then
|
if not trader_exists(player:get_player_name()) then
|
||||||
return 0
|
return 0
|
||||||
|
-- Begin Award Code
|
||||||
|
-- May need to be moved if award gets unlocked in the wrong cases.
|
||||||
|
elseif trader_exists(player:get_player_name()) then
|
||||||
|
awards.unlock(player:get_player_name(), "mcl:whatAdeal")
|
||||||
|
-- End Award Code
|
||||||
end
|
end
|
||||||
-- Only allow taking full stack
|
-- Only allow taking full stack
|
||||||
local count = stack:get_count()
|
local count = stack:get_count()
|
||||||
|
@ -1097,6 +1113,7 @@ local trade_inventory = {
|
||||||
local trader = player_trading_with[name]
|
local trader = player_trading_with[name]
|
||||||
local tradenum = player_tradenum[name]
|
local tradenum = player_tradenum[name]
|
||||||
local trades
|
local trades
|
||||||
|
trader._traded = true
|
||||||
if trader and trader._trades then
|
if trader and trader._trades then
|
||||||
trades = minetest.deserialize(trader._trades)
|
trades = minetest.deserialize(trader._trades)
|
||||||
end
|
end
|
||||||
|
@ -1267,13 +1284,12 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if clicker then
|
if clicker then
|
||||||
mcl_mobs:feed_tame(self, clicker, 1, true, false)
|
mcl_mobs:feed_tame(self, clicker, 1, true, false, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return true --do not pick up
|
return true --do not pick up
|
||||||
end,
|
end,
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
local trg=vector.new(0,9,0)
|
|
||||||
if self._jobsite then
|
if self._jobsite then
|
||||||
mcl_mobs:gopath(self,self._jobsite,function()
|
mcl_mobs:gopath(self,self._jobsite,function()
|
||||||
--minetest.log("arrived at jobsite")
|
--minetest.log("arrived at jobsite")
|
||||||
|
@ -1350,20 +1366,24 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
||||||
end
|
end
|
||||||
if self._profession == "unemployed" then
|
if self._profession == "unemployed" then
|
||||||
get_a_job(self)
|
get_a_job(self)
|
||||||
|
else
|
||||||
|
check_jobsite(self)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_spawn = function(self)
|
on_spawn = function(self)
|
||||||
|
if not self._profession then
|
||||||
|
self._profession = "unemployed"
|
||||||
|
if math.random(100) == 1 then
|
||||||
|
self._profession = "nitwit"
|
||||||
|
end
|
||||||
|
end
|
||||||
if self._id then
|
if self._id then
|
||||||
set_textures(self)
|
set_textures(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random()))
|
self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random()))
|
||||||
self._profession = "unemployed"
|
|
||||||
if math.random(100) == 1 then
|
|
||||||
self._profession = "nitwit"
|
|
||||||
end
|
|
||||||
set_textures(self)
|
set_textures(self)
|
||||||
end,
|
end,
|
||||||
on_die = function(self, pos)
|
on_die = function(self, pos)
|
||||||
|
@ -1382,7 +1402,8 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Villager spawning in mcl_villages
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:villager",
|
"mobs_mc:villager",
|
||||||
"overworld",
|
"overworld",
|
||||||
|
@ -1412,6 +1433,6 @@ minetest.LIGHT_MAX+1,
|
||||||
4,
|
4,
|
||||||
mobs_mc.water_level+1,
|
mobs_mc.water_level+1,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
--]]
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs:register_egg("mobs_mc:villager", S("Villager"), "mobs_mc_spawn_icon_villager.png", 0)
|
mcl_mobs:register_egg("mobs_mc:villager", S("Villager"), "mobs_mc_spawn_icon_villager.png", 0)
|
||||||
|
|
|
@ -119,20 +119,7 @@ mcl_mobs:register_mob("mobs_mc:villager_zombie", {
|
||||||
villager_obj:set_yaw(yaw)
|
villager_obj:set_yaw(yaw)
|
||||||
villager.target_yaw = yaw
|
villager.target_yaw = yaw
|
||||||
villager.nametag = self.nametag
|
villager.nametag = self.nametag
|
||||||
local texture = self.base_texture[1]:gsub("zombie", "villager")
|
villager._profession = "unemployed"
|
||||||
if texture == "mobs_mc_villager_villager.png" then
|
|
||||||
texture = "mobs_mc_villager.png"
|
|
||||||
end
|
|
||||||
local textures = {texture}
|
|
||||||
villager.base_texture = textures
|
|
||||||
villager_obj:set_properties({textures = textures})
|
|
||||||
local matches = {}
|
|
||||||
for prof, tex in pairs(professions) do
|
|
||||||
if texture == tex then
|
|
||||||
table.insert(matches, prof)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
villager._profession = matches[math.random(#matches)]
|
|
||||||
self._curing = nil
|
self._curing = nil
|
||||||
mcl_burning.extinguish(obj)
|
mcl_burning.extinguish(obj)
|
||||||
obj:remove()
|
obj:remove()
|
||||||
|
|
|
@ -232,29 +232,22 @@ dog.on_rightclick = function(self, clicker)
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_mobs:register_mob("mobs_mc:dog", dog)
|
mcl_mobs:register_mob("mobs_mc:dog", dog)
|
||||||
|
|
||||||
-- Spawn
|
-- Spawn
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:wolf",
|
"mobs_mc:wolf",
|
||||||
"overworld",
|
"overworld",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"FlowerForest",
|
"Taiga",
|
||||||
"Swampland",
|
"MegaSpruceTaiga",
|
||||||
"Taiga",
|
"MegaTaiga",
|
||||||
"ExtremeHills",
|
"Forest",
|
||||||
"BirchForest",
|
"ColdTaiga",
|
||||||
"MegaSpruceTaiga",
|
"FlowerForest_beach",
|
||||||
"MegaTaiga",
|
"Forest_beach",
|
||||||
"ExtremeHills+",
|
"ColdTaiga_beach_water",
|
||||||
"Forest",
|
"Taiga_beach",
|
||||||
"Plains",
|
"ColdTaiga_beach",
|
||||||
"ColdTaiga",
|
|
||||||
"SunflowerPlains",
|
|
||||||
"RoofedForest",
|
|
||||||
"MesaPlateauFM_grasstop",
|
|
||||||
"ExtremeHillsM",
|
|
||||||
"BirchForestM",
|
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
|
|
@ -118,7 +118,8 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether"
|
"Nether",
|
||||||
|
"CrimsonForest",
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
|
|
|
@ -238,8 +238,8 @@ after(5, function(dtime)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_chatcommand("lightning", {
|
minetest.register_chatcommand("lightning", {
|
||||||
params = "[<X> <Y> <Z>]",
|
params = "[<X> <Y> <Z> | <player name>]",
|
||||||
description = S("Let lightning strike at the specified position or yourself"),
|
description = S("Let lightning strike at the specified position or player. No parameter will strike yourself."),
|
||||||
privs = { maphack = true },
|
privs = { maphack = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local pos = {}
|
local pos = {}
|
||||||
|
@ -247,21 +247,21 @@ minetest.register_chatcommand("lightning", {
|
||||||
pos.x = tonumber(pos.x)
|
pos.x = tonumber(pos.x)
|
||||||
pos.y = tonumber(pos.y)
|
pos.y = tonumber(pos.y)
|
||||||
pos.z = tonumber(pos.z)
|
pos.z = tonumber(pos.z)
|
||||||
|
local player_to_strike
|
||||||
if not (pos.x and pos.y and pos.z) then
|
if not (pos.x and pos.y and pos.z) then
|
||||||
pos = nil
|
pos = nil
|
||||||
|
player_to_strike = minetest.get_player_by_name(param)
|
||||||
|
if not player_to_strike and param == "" then
|
||||||
|
player_to_strike = minetest.get_player_by_name(name)
|
||||||
end
|
end
|
||||||
if name == "" and pos == nil then
|
end
|
||||||
|
if not player_to_strike and pos == nil then
|
||||||
return false, "No position specified and unknown player"
|
return false, "No position specified and unknown player"
|
||||||
end
|
end
|
||||||
if pos then
|
if pos then
|
||||||
lightning.strike(pos)
|
lightning.strike(pos)
|
||||||
else
|
elseif player_to_strike then
|
||||||
local player = minetest.get_player_by_name(name)
|
lightning.strike(player_to_strike:get_pos())
|
||||||
if player then
|
|
||||||
lightning.strike(player:get_pos())
|
|
||||||
else
|
|
||||||
return false, S("No position specified and unknown player")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# textdomain: lightning
|
# textdomain: lightning
|
||||||
@1 was struck by lightning.=
|
Let lightning strike at the specified position or player. No parameter will strike yourself.=
|
||||||
Let lightning strike at the specified position or yourself=
|
|
||||||
No position specified and unknown player=
|
No position specified and unknown player=
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
mcl_weather.nether_dust = {}
|
mcl_weather.nether_dust = {}
|
||||||
mcl_weather.nether_dust.particlespawners = {}
|
mcl_weather.nether_dust.particlespawners = {}
|
||||||
|
|
||||||
|
local PARTICLES_COUNT_NETHER_DUST = tonumber(minetest.settings:get("mcl_weather_rain_particles")) or 150
|
||||||
|
|
||||||
local psdef= {
|
local psdef= {
|
||||||
amount = 150,
|
amount = PARTICLES_COUNT_NETHER_DUST,
|
||||||
time = 0,
|
time = 0,
|
||||||
minpos = vector.new(-15,-15,-15),
|
minpos = vector.new(-15,-15,-15),
|
||||||
maxpos =vector.new(15,15,15),
|
maxpos =vector.new(15,15,15),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
local PARTICLES_COUNT_RAIN = 800
|
local PARTICLES_COUNT_RAIN = tonumber(minetest.settings:get("mcl_weather_rain_particles")) or 500
|
||||||
local PARTICLES_COUNT_THUNDER = 1200
|
local PARTICLES_COUNT_THUNDER = tonumber(minetest.settings:get("mcl_weather_thunder_particles")) or 900
|
||||||
|
|
||||||
local get_connected_players = minetest.get_connected_players
|
local get_connected_players = minetest.get_connected_players
|
||||||
|
|
||||||
|
@ -20,22 +20,20 @@ mcl_weather.rain = {
|
||||||
init_done = false,
|
init_done = false,
|
||||||
}
|
}
|
||||||
local update_sound={}
|
local update_sound={}
|
||||||
local vel=math.random(0,3)
|
|
||||||
local falling_speed=math.random(10,15)
|
|
||||||
local size = math.random(1,3)
|
|
||||||
local psdef= {
|
local psdef= {
|
||||||
amount = mcl_weather.rain.particles_count,
|
amount = mcl_weather.rain.particles_count,
|
||||||
time=0,
|
time=0,
|
||||||
minpos = vector.new(-15,20,-15),
|
minpos = vector.new(-15,20,-15),
|
||||||
maxpos = vector.new(15,25,15),
|
maxpos = vector.new(15,25,15),
|
||||||
minvel = vector.new(-2,-falling_speed-2,-2),
|
minvel = vector.new(-2,-17,-2),
|
||||||
maxvel = vector.new(2,-falling_speed+2,2),
|
maxvel = vector.new(2,-8,2),
|
||||||
minacc = vector.new(0,0,0),
|
minacc = vector.new(0,0,0),
|
||||||
maxacc = vector.new(0,-0.5,0),
|
maxacc = vector.new(0,-0.5,0),
|
||||||
minexptime = 15,
|
minexptime = 1,
|
||||||
maxexptime = 30,
|
maxexptime = 4,
|
||||||
minsize = size,
|
minsize = 4,
|
||||||
maxsize= size*2,
|
maxsize= 8,
|
||||||
collisiondetection = true,
|
collisiondetection = true,
|
||||||
collision_removal = true,
|
collision_removal = true,
|
||||||
vertical = true,
|
vertical = true,
|
||||||
|
@ -70,9 +68,10 @@ end
|
||||||
-- no no no NO NO f*.. no. no manual particle creatin' PLS!! this sends EVERY particle over the net.
|
-- no no no NO NO f*.. no. no manual particle creatin' PLS!! this sends EVERY particle over the net.
|
||||||
function mcl_weather.rain.add_rain_particles(player)
|
function mcl_weather.rain.add_rain_particles(player)
|
||||||
mcl_weather.rain.last_rp_count = mcl_weather.rain.particles_count
|
mcl_weather.rain.last_rp_count = mcl_weather.rain.particles_count
|
||||||
|
local l = false
|
||||||
for k,v in pairs(textures) do
|
for k,v in pairs(textures) do
|
||||||
psdef.texture=v
|
psdef.texture=v
|
||||||
mcl_weather.add_spawner_player(player,"rain"..k,psdef)
|
l = l or mcl_weather.add_spawner_player(player,"rain"..k,psdef)
|
||||||
end
|
end
|
||||||
if l then
|
if l then
|
||||||
update_sound[player:get_player_name()]=true
|
update_sound[player:get_player_name()]=true
|
||||||
|
|
|
@ -146,8 +146,25 @@ mcl_weather.skycolor = {
|
||||||
player:set_stars({visible = false})
|
player:set_stars({visible = false})
|
||||||
mcl_weather.skycolor.override_day_night_ratio(player, 0.5)
|
mcl_weather.skycolor.override_day_night_ratio(player, 0.5)
|
||||||
elseif dim == "nether" then
|
elseif dim == "nether" then
|
||||||
player:set_sky({ type = "plain",
|
local nether_sky = {
|
||||||
base_color = "#300808",
|
Nether = "#300808",
|
||||||
|
BasaltDelta = "#685F70",
|
||||||
|
SoulsandValley = "#1B4745",
|
||||||
|
CrimsonForest = "#330303",
|
||||||
|
WarpedForest = "#1A051A"
|
||||||
|
}
|
||||||
|
local biometint = nether_sky[minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)]
|
||||||
|
|
||||||
|
player:set_sky({
|
||||||
|
type = "regular",
|
||||||
|
sky_color = {
|
||||||
|
day_sky = "#300808",
|
||||||
|
day_horizon = biometint,
|
||||||
|
dawn_sky = "#300808",
|
||||||
|
dawn_horizon = biometint,
|
||||||
|
night_sky = "#300808",
|
||||||
|
night_horizon = biometint,
|
||||||
|
},
|
||||||
clouds = false,
|
clouds = false,
|
||||||
})
|
})
|
||||||
player:set_sun({visible = false , sunrise_visible = false})
|
player:set_sun({visible = false , sunrise_visible = false})
|
||||||
|
|
|
@ -2,11 +2,11 @@ local get_connected_players = minetest.get_connected_players
|
||||||
|
|
||||||
mcl_weather.snow = {}
|
mcl_weather.snow = {}
|
||||||
|
|
||||||
mcl_weather.snow.particles_count = 15
|
local PARTICLES_COUNT_SNOW = tonumber(minetest.settings:get("mcl_weather_snow_particles")) or 99
|
||||||
mcl_weather.snow.init_done = false
|
mcl_weather.snow.init_done = false
|
||||||
|
|
||||||
local psdef= {
|
local psdef= {
|
||||||
amount = 99,
|
amount = PARTICLES_COUNT_SNOW,
|
||||||
time = 0, --stay on til we turn it off
|
time = 0, --stay on til we turn it off
|
||||||
minpos = vector.new(-25,20,-25),
|
minpos = vector.new(-25,20,-25),
|
||||||
maxpos =vector.new(25,25,25),
|
maxpos =vector.new(25,25,25),
|
||||||
|
@ -14,9 +14,9 @@ local psdef= {
|
||||||
maxvel = vector.new(0.2,-4,0.2),
|
maxvel = vector.new(0.2,-4,0.2),
|
||||||
minacc = vector.new(0,-1,0),
|
minacc = vector.new(0,-1,0),
|
||||||
maxacc = vector.new(0,-4,0),
|
maxacc = vector.new(0,-4,0),
|
||||||
minexptime = 15,
|
minexptime = 3,
|
||||||
maxexptime = 30,
|
maxexptime = 5,
|
||||||
minsize = 0.5,
|
minsize = 2,
|
||||||
maxsize = 5,
|
maxsize = 5,
|
||||||
collisiondetection = true,
|
collisiondetection = true,
|
||||||
collision_removal = true,
|
collision_removal = true,
|
||||||
|
|
|
@ -101,6 +101,17 @@ awards.register_achievement("mcl:bookcase", {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:buildIronPickaxe", {
|
||||||
|
title = S("Isn't It Iron Pick"),
|
||||||
|
description = S("Craft a iron pickaxe using sticks and iron."),
|
||||||
|
icon = "default_tool_steelpick.png",
|
||||||
|
trigger = {
|
||||||
|
type = "craft",
|
||||||
|
item = "mcl_tools:pick_iron",
|
||||||
|
target = 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Item pickup achievements: These are awarded when picking up a certain item.
|
-- Item pickup achievements: These are awarded when picking up a certain item.
|
||||||
-- The achivements are manually given in the mod mcl_item_entity.
|
-- The achivements are manually given in the mod mcl_item_entity.
|
||||||
awards.register_achievement("mcl:diamonds", {
|
awards.register_achievement("mcl:diamonds", {
|
||||||
|
@ -125,6 +136,18 @@ awards.register_achievement("mcl:mineWood", {
|
||||||
icon = "default_tree.png",
|
icon = "default_tree.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:whosCuttingOnions", {
|
||||||
|
title = S("Who is Cutting Onions?"),
|
||||||
|
description = S("Pick up a crying obsidian from the floor."),
|
||||||
|
icon = "default_obsidian.png^mcl_core_crying_obsidian.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:hiddenInTheDepths", {
|
||||||
|
title = S("Hidden in the Depths"),
|
||||||
|
description = S("Pick up an Ancient Debris from the floor."),
|
||||||
|
icon = "mcl_nether_ancient_debris_side.png",
|
||||||
|
})
|
||||||
|
|
||||||
-- Smelting achivements: These are awarded when picking up an item from a furnace
|
-- Smelting achivements: These are awarded when picking up an item from a furnace
|
||||||
-- output. They are given in mcl_furnaces.
|
-- output. They are given in mcl_furnaces.
|
||||||
awards.register_achievement("mcl:acquireIron", {
|
awards.register_achievement("mcl:acquireIron", {
|
||||||
|
@ -158,9 +181,89 @@ awards.register_achievement("mcl:snipeSkeleton", {
|
||||||
|
|
||||||
-- Triggered in mcl_portals
|
-- Triggered in mcl_portals
|
||||||
awards.register_achievement("mcl:buildNetherPortal", {
|
awards.register_achievement("mcl:buildNetherPortal", {
|
||||||
title = S("Into the Nether"),
|
title = S("We Need to Go Deeper"),
|
||||||
description = S("Use obsidian and a fire starter to construct a Nether portal."),
|
description = S("Use obsidian and a fire starter to construct a Nether portal."),
|
||||||
icon = "default_obsidian.png",
|
icon = "mcl_fire_flint_and_steel.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:enterEndPortal", {
|
||||||
|
title = S("The End?"),
|
||||||
|
description = S("Or the beginning?\nHint: Enter an end portal."),
|
||||||
|
icon = "mcl_end_end_stone.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:theNether", {
|
||||||
|
title = S("The Nether"),
|
||||||
|
description = S("Bring summer clothes.\nHint: Enter the Nether."),
|
||||||
|
icon = "mcl_nether_netherrack.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_totems
|
||||||
|
awards.register_achievement("mcl:postMortal", {
|
||||||
|
title = S("Postmortal"),
|
||||||
|
description = S("Use a Totem of Undying to cheat death."),
|
||||||
|
icon = "mcl_totems_totem.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_beds
|
||||||
|
awards.register_achievement("mcl:sweetDreams", {
|
||||||
|
title = S("Sweet Dreams"),
|
||||||
|
description = S("Sleep in a bed to change your respawn point."),
|
||||||
|
icon = "mcl_beds_bed_red.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:notQuiteNineLives", {
|
||||||
|
title = S('Not Quite "Nine" Lives'),
|
||||||
|
description = S("Charge a Respawn Anchor to the maximum."),
|
||||||
|
icon = "respawn_anchor_side4.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mobs_mc
|
||||||
|
awards.register_achievement("mcl:whatAdeal", {
|
||||||
|
title = S("What A Deal!"),
|
||||||
|
description = S("Successfully trade with a Villager."),
|
||||||
|
icon = "mcl_core_emerald.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
awards.register_achievement("mcl:tacticalFishing", {
|
||||||
|
title = S("Tactical Fishing"),
|
||||||
|
description = S("Catch a fish... without a fishing rod!"),
|
||||||
|
icon = "pufferfish_bucket.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_fishing
|
||||||
|
awards.register_achievement("mcl:fishyBusiness", {
|
||||||
|
title = S("Fishy Business"),
|
||||||
|
description = S("Catch a fish.\nHint: Catch a fish, salmon, clownfish, or pufferfish."),
|
||||||
|
icon = "mcl_fishing_fishing_rod.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_compass
|
||||||
|
awards.register_achievement("mcl:countryLode", {
|
||||||
|
title = S("Country Lode,\nTake Me Home"),
|
||||||
|
description = S("Use a compass on a Lodestone."),
|
||||||
|
icon = "lodestone_side4.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_smithing_table
|
||||||
|
awards.register_achievement("mcl:seriousDedication", {
|
||||||
|
title = S("Serious Dedication"),
|
||||||
|
description = S("Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices."),
|
||||||
|
icon = "farming_tool_netheritehoe.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_brewing
|
||||||
|
awards.register_achievement("mcl:localBrewery", {
|
||||||
|
title = S("Local Brewery"),
|
||||||
|
description = S("Brew a Potion.\nHint: Take a potion or glass bottle out of the brewing stand."),
|
||||||
|
icon = "mcl_potions_potion_overlay.png^[colorize:#F82423:"..tostring(127).."^mcl_potions_potion_bottle.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_enchanting
|
||||||
|
awards.register_achievement("mcl:enchanter", {
|
||||||
|
title = S("Enchanter"),
|
||||||
|
description = S("Enchant an item using an Enchantment Table."),
|
||||||
|
icon = "mcl_enchanting_book_enchanted.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
||||||
|
|
|
@ -19,7 +19,7 @@ Getting an Upgrade=
|
||||||
Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters.=
|
Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters.=
|
||||||
Hot Topic=
|
Hot Topic=
|
||||||
Into Fire=
|
Into Fire=
|
||||||
Into the Nether=
|
We Need to Go Deeper=
|
||||||
Iron Belly=
|
Iron Belly=
|
||||||
Librarian=
|
Librarian=
|
||||||
Mine emerald ore.=
|
Mine emerald ore.=
|
||||||
|
@ -47,3 +47,29 @@ Use a crafting table to craft a wooden hoe from wooden planks and sticks.=
|
||||||
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=
|
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=
|
||||||
Use obsidian and a fire starter to construct a Nether portal.=
|
Use obsidian and a fire starter to construct a Nether portal.=
|
||||||
Use wheat to craft a bread.=
|
Use wheat to craft a bread.=
|
||||||
|
Who is Cutting Onions?=
|
||||||
|
Pick up a crying obsidian from the floor.=
|
||||||
|
Hidden in the Depths=
|
||||||
|
Pick up an Ancient Debris from the floor.=
|
||||||
|
The Nether=
|
||||||
|
Bring summer clothes.@nHint: Enter the Nether.=
|
||||||
|
Isn't It Iron Pick=
|
||||||
|
Craft a iron pickaxe using sticks and iron.=
|
||||||
|
Postmortal=
|
||||||
|
Use a Totem of Undying to cheat death.=
|
||||||
|
Sweet Dreams=
|
||||||
|
Sleep in a bed to change your respawn point.=
|
||||||
|
Not Quite "Nine" Lives=
|
||||||
|
Charge a Respawn Anchor to the maximum.=
|
||||||
|
What A Deal!=
|
||||||
|
Successfully trade with a Villager.=
|
||||||
|
Fishy Business=
|
||||||
|
Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=
|
||||||
|
Country Lode,@nTake Me Home=
|
||||||
|
Use a compass on a Lodestone.=
|
||||||
|
Serious Dedication=
|
||||||
|
Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices.=
|
||||||
|
Local Brewery=
|
||||||
|
Brew a Potion.@nHint: Take a potion or glass bottle out of the brewing stand.=
|
||||||
|
Enchanter=
|
||||||
|
Enchant an item using an Enchantment Table.=
|
||||||
|
|
|
@ -117,7 +117,6 @@ for _, def in pairs(bud_def) do
|
||||||
walkable = false,
|
walkable = false,
|
||||||
light_source = def.light_source,
|
light_source = def.light_source,
|
||||||
groups = {
|
groups = {
|
||||||
dig_by_water = 1,
|
|
||||||
destroy_by_lava_flow = 1,
|
destroy_by_lava_flow = 1,
|
||||||
dig_by_piston = 1,
|
dig_by_piston = 1,
|
||||||
pickaxey = 1,
|
pickaxey = 1,
|
||||||
|
@ -162,7 +161,6 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
|
||||||
walkable = false,
|
walkable = false,
|
||||||
light_source = 7,
|
light_source = 7,
|
||||||
groups = {
|
groups = {
|
||||||
dig_by_water = 1,
|
|
||||||
destroy_by_lava_flow = 1,
|
destroy_by_lava_flow = 1,
|
||||||
dig_by_piston = 1,
|
dig_by_piston = 1,
|
||||||
pickaxey = 1,
|
pickaxey = 1,
|
||||||
|
|
|
@ -84,6 +84,19 @@ local function distinguish_tool_and_material(input1, input2)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Helper function to make sure update_anvil_slots NEVER overstacks the output slot
|
||||||
|
local function fix_stack_size(stack)
|
||||||
|
if not stack or stack == "" then return "" end
|
||||||
|
local count = stack:get_count()
|
||||||
|
local max_count = stack:get_stack_max()
|
||||||
|
|
||||||
|
if count > max_count then
|
||||||
|
stack:set_count(max_count)
|
||||||
|
count = max_count
|
||||||
|
end
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
|
||||||
-- Update the inventory slots of an anvil node.
|
-- Update the inventory slots of an anvil node.
|
||||||
-- meta: Metadata of anvil node
|
-- meta: Metadata of anvil node
|
||||||
local function update_anvil_slots(meta)
|
local function update_anvil_slots(meta)
|
||||||
|
@ -213,6 +226,7 @@ local function update_anvil_slots(meta)
|
||||||
|
|
||||||
-- Set the new output slot
|
-- Set the new output slot
|
||||||
if new_output then
|
if new_output then
|
||||||
|
fix_stack_size(new_output)
|
||||||
inv:set_stack("output", 1, new_output)
|
inv:set_stack("output", 1, new_output)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -114,6 +114,10 @@ function mcl_armor.register_set(def)
|
||||||
for k, v in pairs(element_groups) do
|
for k, v in pairs(element_groups) do
|
||||||
groups[k] = v
|
groups[k] = v
|
||||||
end
|
end
|
||||||
|
local upgrade_item = nil
|
||||||
|
if def._mcl_upgradable and def._mcl_upgrade_item_material then
|
||||||
|
upgrade_item = itemstring:gsub("_[%l%d]*$",def._mcl_upgrade_item_material)
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_tool(itemstring, {
|
minetest.register_tool(itemstring, {
|
||||||
description = S(def.description .. " " .. (descriptions[name] or element.description)),
|
description = S(def.description .. " " .. (descriptions[name] or element.description)),
|
||||||
|
@ -133,6 +137,8 @@ function mcl_armor.register_set(def)
|
||||||
_on_break = on_break_callbacks[name] or def.on_break,
|
_on_break = on_break_callbacks[name] or def.on_break,
|
||||||
_mcl_armor_element = name,
|
_mcl_armor_element = name,
|
||||||
_mcl_armor_texture = textures[name] or modname .. "_" .. itemname .. ".png",
|
_mcl_armor_texture = textures[name] or modname .. "_" .. itemname .. ".png",
|
||||||
|
_mcl_upgradable = def._mcl_upgradable,
|
||||||
|
_mcl_upgrade_item = upgrade_item
|
||||||
})
|
})
|
||||||
|
|
||||||
if def.craft_material then
|
if def.craft_material then
|
||||||
|
|
|
@ -49,6 +49,8 @@ mcl_armor.register_set({
|
||||||
},
|
},
|
||||||
repair_material = "mcl_core:iron_ingot",
|
repair_material = "mcl_core:iron_ingot",
|
||||||
cook_material = "mcl_core:iron_nugget",
|
cook_material = "mcl_core:iron_nugget",
|
||||||
|
sound_equip = "mcl_armor_equip_iron",
|
||||||
|
sound_unequip = "mcl_armor_unequip_iron",
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_armor.register_set({
|
mcl_armor.register_set({
|
||||||
|
@ -64,6 +66,8 @@ mcl_armor.register_set({
|
||||||
},
|
},
|
||||||
craft_material = "mcl_core:iron_ingot",
|
craft_material = "mcl_core:iron_ingot",
|
||||||
cook_material = "mcl_core:iron_nugget",
|
cook_material = "mcl_core:iron_nugget",
|
||||||
|
sound_equip = "mcl_armor_equip_iron",
|
||||||
|
sound_unequip = "mcl_armor_unequip_iron",
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_armor.register_set({
|
mcl_armor.register_set({
|
||||||
|
@ -79,6 +83,27 @@ mcl_armor.register_set({
|
||||||
},
|
},
|
||||||
toughness = 2,
|
toughness = 2,
|
||||||
craft_material = "mcl_core:diamond",
|
craft_material = "mcl_core:diamond",
|
||||||
|
sound_equip = "mcl_armor_equip_diamond",
|
||||||
|
sound_unequip = "mcl_armor_unequip_diamond",
|
||||||
|
_mcl_upgradable = true,
|
||||||
|
_mcl_upgrade_item_material = "_netherite",
|
||||||
|
})
|
||||||
|
|
||||||
|
mcl_armor.register_set({
|
||||||
|
name = "netherite",
|
||||||
|
description = "Netherite",
|
||||||
|
durability = 555,
|
||||||
|
enchantability = 10,
|
||||||
|
points = {
|
||||||
|
head = 3,
|
||||||
|
torso = 8,
|
||||||
|
legs = 6,
|
||||||
|
feet = 3,
|
||||||
|
},
|
||||||
|
toughness = 2,
|
||||||
|
craft_material = "mcl_nether:netherite_ingot",
|
||||||
|
sound_equip = "mcl_armor_equip_diamond",
|
||||||
|
sound_unequip = "mcl_armor_unequip_diamond",
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_armor.register_protection_enchantment({
|
mcl_armor.register_protection_enchantment({
|
||||||
|
|
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 535 B |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 459 B |
|
@ -76,6 +76,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||||
-- save respawn position when entering bed
|
-- save respawn position when entering bed
|
||||||
if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then
|
if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then
|
||||||
minetest.chat_send_player(name, S("New respawn position set!"))
|
minetest.chat_send_player(name, S("New respawn position set!"))
|
||||||
|
awards.unlock(player:get_player_name(), "mcl:sweetDreams")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- No sleeping if too far away
|
-- No sleeping if too far away
|
||||||
|
|
|
@ -39,6 +39,9 @@ for i=0,4 do
|
||||||
elseif string.match(node.name, "mcl_beds:respawn_anchor_charged_") then
|
elseif string.match(node.name, "mcl_beds:respawn_anchor_charged_") then
|
||||||
minetest.chat_send_player(player.get_player_name(player), S"New respawn position set!")
|
minetest.chat_send_player(player.get_player_name(player), S"New respawn position set!")
|
||||||
mcl_spawn.set_spawn_pos(player, pos, nil)
|
mcl_spawn.set_spawn_pos(player, pos, nil)
|
||||||
|
if i == 4 then
|
||||||
|
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -88,11 +91,11 @@ for i=0,4 do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_craft({ --TODO: Please change this crafting recipe once crying obsidian is implemented!
|
minetest.register_craft({
|
||||||
output = "mcl_beds:respawn_anchor",
|
output = "mcl_beds:respawn_anchor",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"},
|
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
|
||||||
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
|
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
|
||||||
{"mcl_core:obsidian", "mcl_core:obsidian", "mcl_core:obsidian"}
|
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -35,10 +35,14 @@ minetest.register_node("mcl_bells:bell", {
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {pickaxey=2, deco_block=1 },
|
groups = {pickaxey=2, deco_block=1 },
|
||||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 5,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 5,
|
||||||
on_rightclick = mcl_bells.ring_once,
|
on_rightclick = mcl_bells.ring_once,
|
||||||
use_texture_alpha = "clip",
|
use_texture_alpha = "clip",
|
||||||
|
mesecons = {effector = {
|
||||||
|
action_on = mcl_bells.ring_once,
|
||||||
|
rules = mesecon.rules.flat,
|
||||||
|
}},
|
||||||
})
|
})
|
||||||
|
|
||||||
if has_mcl_wip then
|
if has_mcl_wip then
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
name = mcl_bells
|
name = mcl_bells
|
||||||
|
depends = mesecons
|
||||||
optional_depends = mcl_wip
|
optional_depends = mcl_wip
|
|
@ -13,8 +13,8 @@ minetest.register_node("mcl_blackstone:blackstone", {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1, cobble=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1, cobble=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:blackstone_gilded", {
|
minetest.register_node("mcl_blackstone:blackstone_gilded", {
|
||||||
description = S("Gilded Blackstone"),
|
description = S("Gilded Blackstone"),
|
||||||
|
@ -53,8 +53,8 @@ minetest.register_node("mcl_blackstone:nether_gold", {
|
||||||
{items = {"mcl_blackstone:nether_gold"}, rarity = 8},
|
{items = {"mcl_blackstone:nether_gold"}, rarity = 8},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 3,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 3,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
|
_mcl_fortune_drop = mcl_core.fortune_drop_ore,
|
||||||
})
|
})
|
||||||
|
@ -67,8 +67,8 @@ minetest.register_node("mcl_blackstone:basalt_polished", {
|
||||||
on_rotate = on_rotate,
|
on_rotate = on_rotate,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 4.2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 1.25,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:basalt", {
|
minetest.register_node("mcl_blackstone:basalt", {
|
||||||
description = S("Basalt"),
|
description = S("Basalt"),
|
||||||
|
@ -79,8 +79,17 @@ minetest.register_node("mcl_blackstone:basalt", {
|
||||||
on_rotate = on_rotate,
|
on_rotate = on_rotate,
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 4.2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 1.25,
|
||||||
|
})
|
||||||
|
minetest.register_node("mcl_blackstone:basalt_smooth", {
|
||||||
|
description = S("Smooth Basalt"),
|
||||||
|
tiles = {"mcl_blackstone_basalt_smooth.png"},
|
||||||
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
|
_mcl_blast_resistance = 4.2,
|
||||||
|
_mcl_hardness = 1.25,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:blackstone_polished", {
|
minetest.register_node("mcl_blackstone:blackstone_polished", {
|
||||||
description = S("Polished Blackstone"),
|
description = S("Polished Blackstone"),
|
||||||
|
@ -88,7 +97,7 @@ minetest.register_node("mcl_blackstone:blackstone_polished", {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:blackstone_chiseled_polished", {
|
minetest.register_node("mcl_blackstone:blackstone_chiseled_polished", {
|
||||||
|
@ -97,8 +106,8 @@ minetest.register_node("mcl_blackstone:blackstone_chiseled_polished", {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:blackstone_brick_polished", {
|
minetest.register_node("mcl_blackstone:blackstone_brick_polished", {
|
||||||
description = S("Polished Blackstone Bricks"),
|
description = S("Polished Blackstone Bricks"),
|
||||||
|
@ -106,8 +115,8 @@ minetest.register_node("mcl_blackstone:blackstone_brick_polished", {
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 1.5,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:quartz_brick", {
|
minetest.register_node("mcl_blackstone:quartz_brick", {
|
||||||
description = S("Quartz Bricks"),
|
description = S("Quartz Bricks"),
|
||||||
|
@ -116,8 +125,8 @@ minetest.register_node("mcl_blackstone:quartz_brick", {
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
groups = {cracky = 3, pickaxey=2, material_stone=1},
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 0.8,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 0.8,
|
||||||
})
|
})
|
||||||
minetest.register_node("mcl_blackstone:soul_soil", {
|
minetest.register_node("mcl_blackstone:soul_soil", {
|
||||||
description = S("Soul Soil"),
|
description = S("Soul Soil"),
|
||||||
|
@ -314,36 +323,7 @@ for s=1, #specialstones do
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.settings:get_bool("mcl_generate_ores", true) then
|
if minetest.settings:get_bool("mcl_generate_ores", true) then
|
||||||
minetest.register_ore({
|
|
||||||
ore_type = "scatter",
|
|
||||||
ore = "mcl_blackstone:blackstone_gilded",
|
|
||||||
wherein = "mcl_blackstone:blackstone",
|
|
||||||
clust_scarcity = 4775,
|
|
||||||
clust_num_ores = 2,
|
|
||||||
clust_size = 2,
|
|
||||||
y_min = mcl_vars.mg_nether_min,
|
|
||||||
y_max = mcl_vars.mg_nether_max,
|
|
||||||
})
|
|
||||||
minetest.register_ore({
|
|
||||||
ore_type = "scatter",
|
|
||||||
ore = "mcl_blackstone:nether_gold",
|
|
||||||
wherein = "mcl_nether:netherrack",
|
|
||||||
clust_scarcity = 830,
|
|
||||||
clust_num_ores = 5,
|
|
||||||
clust_size = 3,
|
|
||||||
y_min = mcl_vars.mg_nether_min,
|
|
||||||
y_max = mcl_vars.mg_nether_max,
|
|
||||||
})
|
|
||||||
minetest.register_ore({
|
|
||||||
ore_type = "scatter",
|
|
||||||
ore = "mcl_blackstone:nether_gold",
|
|
||||||
wherein = "mcl_nether:netherrack",
|
|
||||||
clust_scarcity = 1660,
|
|
||||||
clust_num_ores = 4,
|
|
||||||
clust_size = 2,
|
|
||||||
y_min = mcl_vars.mg_nether_min,
|
|
||||||
y_max = mcl_vars.mg_nether_max,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
--]]
|
--]]
|
||||||
--soul torch
|
--soul torch
|
||||||
|
|
|
@ -288,7 +288,8 @@ local function blast_furnace_node_timer(pos, elapsed)
|
||||||
-- Cooking
|
-- Cooking
|
||||||
--
|
--
|
||||||
|
|
||||||
local el = elapsed_game_time
|
-- Run the blast_furnace at twice the speed of a furnace.
|
||||||
|
local el = elapsed_game_time * 2
|
||||||
|
|
||||||
-- Check if we have cookable content: cookable
|
-- Check if we have cookable content: cookable
|
||||||
local aftercooked
|
local aftercooked
|
||||||
|
@ -329,13 +330,12 @@ local function blast_furnace_node_timer(pos, elapsed)
|
||||||
elseif active then
|
elseif active then
|
||||||
el = math.min(el, fuel_totaltime - fuel_time)
|
el = math.min(el, fuel_totaltime - fuel_time)
|
||||||
-- The furnace is currently active and has enough fuel
|
-- The furnace is currently active and has enough fuel
|
||||||
fuel_time = (fuel_time + el) *2 --multiply speed of fuel consumption to match proper output
|
fuel_time = fuel_time + el
|
||||||
end
|
end
|
||||||
|
|
||||||
-- If there is a cookable item then check if it is ready yet
|
-- If there is a cookable item then check if it is ready yet
|
||||||
if cookable and active then
|
if cookable and active then
|
||||||
-- In the src_time variable, the *2 is the multiplication that makes the blast furnace work faster than a normal furnace.
|
src_time = src_time + el
|
||||||
src_time = (src_time + el)*2
|
|
||||||
-- Place result in dst list if done
|
-- Place result in dst list if done
|
||||||
if src_time >= cooked.time then
|
if src_time >= cooked.time then
|
||||||
inv:add_item("dst", cooked.item)
|
inv:add_item("dst", cooked.item)
|
||||||
|
|
|
@ -188,7 +188,8 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
-- The radius of 3 is fairly liberal, but anything lower than than will cause
|
-- The radius of 3 is fairly liberal, but anything lower than than will cause
|
||||||
-- arrow to hilariously go through mobs often.
|
-- arrow to hilariously go through mobs often.
|
||||||
-- TODO: Implement an ACTUAL collision detection (engine support needed).
|
-- TODO: Implement an ACTUAL collision detection (engine support needed).
|
||||||
local objs = minetest.get_objects_inside_radius(pos, 1.5)
|
|
||||||
|
|
||||||
local closest_object
|
local closest_object
|
||||||
local closest_distance
|
local closest_distance
|
||||||
|
|
||||||
|
@ -196,31 +197,32 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
self._deflection_cooloff = self._deflection_cooloff - dtime
|
self._deflection_cooloff = self._deflection_cooloff - dtime
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Iterate through all objects and remember the closest attackable object
|
local arrow_dir = self.object:get_velocity()
|
||||||
for k, obj in pairs(objs) do
|
--create a raycast from the arrow based on the velocity of the arrow to deal with lag
|
||||||
|
local raycast = minetest.raycast(pos, vector.add(pos, vector.multiply(arrow_dir, 0.1)), true, false)
|
||||||
|
for hitpoint in raycast do
|
||||||
|
if hitpoint.type == "object" then
|
||||||
|
-- find the closest object that is in the way of the arrow
|
||||||
local ok = false
|
local ok = false
|
||||||
-- Arrows can only damage players and mobs
|
if hitpoint.ref:is_player() then
|
||||||
if obj:is_player() then
|
|
||||||
ok = true
|
ok = true
|
||||||
elseif obj:get_luaentity() then
|
elseif hitpoint.ref:get_luaentity() then
|
||||||
if (obj:get_luaentity().is_mob or obj:get_luaentity()._hittable_by_projectile) then
|
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ok then
|
if ok then
|
||||||
local dist = vector.distance(pos, obj:get_pos())
|
local dist = vector.distance(hitpoint.ref:get_pos(), pos)
|
||||||
if not closest_object or not closest_distance then
|
if not closest_object or not closest_distance then
|
||||||
closest_object = obj
|
closest_object = hitpoint.ref
|
||||||
closest_distance = dist
|
closest_distance = dist
|
||||||
elseif dist < closest_distance then
|
elseif dist < closest_distance then
|
||||||
closest_object = obj
|
closest_object = hitpoint.ref
|
||||||
closest_distance = dist
|
closest_distance = dist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
-- If an attackable object was found, we will damage the closest one only
|
|
||||||
|
|
||||||
if closest_object then
|
if closest_object then
|
||||||
local obj = closest_object
|
local obj = closest_object
|
||||||
|
@ -249,7 +251,7 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
-- Punch target object but avoid hurting enderman.
|
-- Punch target object but avoid hurting enderman.
|
||||||
if not lua or lua.name ~= "mobs_mc:enderman" then
|
if not lua or lua.name ~= "mobs_mc:enderman" then
|
||||||
if not self._in_player then
|
if not self._in_player then
|
||||||
damage_particles(self.object:get_pos(), self._is_critical)
|
damage_particles(vector.add(pos, vector.multiply(self.object:get_velocity(), 0.1)), self._is_critical)
|
||||||
end
|
end
|
||||||
if mcl_burning.is_burning(self.object) then
|
if mcl_burning.is_burning(self.object) then
|
||||||
mcl_burning.set_on_fire(obj, 5)
|
mcl_burning.set_on_fire(obj, 5)
|
||||||
|
@ -304,6 +306,8 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
minetest.after(150, function()
|
minetest.after(150, function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
|
else
|
||||||
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -151,7 +151,7 @@ S("The speed and damage of the arrow increases the longer you charge. The regula
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("mcl_bows:crossbow_loaded", {
|
minetest.register_tool("mcl_bows:crossbow_loaded", {
|
||||||
description = S("Corssbow"),
|
description = S("Crossbow"),
|
||||||
_tt_help = S("Launches arrows"),
|
_tt_help = S("Launches arrows"),
|
||||||
_doc_items_longdesc = S("Corssbow are ranged weapons to shoot arrows at your foes.").."\n"..
|
_doc_items_longdesc = S("Corssbow are ranged weapons to shoot arrows at your foes.").."\n"..
|
||||||
S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."),
|
S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."),
|
||||||
|
@ -181,7 +181,7 @@ S("The speed and damage of the arrow increases the longer you charge. The regula
|
||||||
itemstack:get_meta():set_string("active", "true")
|
itemstack:get_meta():set_string("active", "true")
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
groups = {weapon=1,weapon_ranged=1,crossbow=1,enchantability=1},
|
groups = {weapon=1,weapon_ranged=1,crossbow=1,enchantability=1,not_in_creative_inventory=1},
|
||||||
_mcl_uses = 326,
|
_mcl_uses = 326,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -410,28 +410,33 @@ function ARROW_ENTITY.on_step(self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Iterate through all objects and remember the closest attackable object
|
-- Iterate through all objects and remember the closest attackable object
|
||||||
for k, obj in pairs(objs) do
|
local arrow_dir = self.object:get_velocity()
|
||||||
|
--create a raycast from the arrow based on the velocity of the arrow to deal with lag
|
||||||
|
local raycast = minetest.raycast(pos, vector.add(pos, vector.multiply(arrow_dir, 0.1)), true, false)
|
||||||
|
for hitpoint in raycast do
|
||||||
|
if hitpoint.type == "object" then
|
||||||
|
-- find the closest object that is in the way of the arrow
|
||||||
local ok = false
|
local ok = false
|
||||||
-- Arrows can only damage players and mobs
|
if hitpoint.ref:is_player() then
|
||||||
if obj:is_player() then
|
|
||||||
ok = true
|
ok = true
|
||||||
elseif obj:get_luaentity() then
|
elseif hitpoint.ref:get_luaentity() then
|
||||||
if (obj:get_luaentity().is_mob or obj:get_luaentity()._hittable_by_projectile) then
|
if (hitpoint.ref:get_luaentity().is_mob or hitpoint.ref:get_luaentity()._hittable_by_projectile) then
|
||||||
ok = true
|
ok = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if ok then
|
||||||
|
local dist = vector.distance(hitpoint.ref:get_pos(), pos)
|
||||||
|
if not closest_object or not closest_distance then
|
||||||
|
closest_object = hitpoint.ref
|
||||||
|
closest_distance = dist
|
||||||
|
elseif dist < closest_distance then
|
||||||
|
closest_object = hitpoint.ref
|
||||||
|
closest_distance = dist
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if ok then
|
|
||||||
local dist = vector.distance(pos, obj:get_pos())
|
|
||||||
if not closest_object or not closest_distance then
|
|
||||||
closest_object = obj
|
|
||||||
closest_distance = dist
|
|
||||||
elseif dist < closest_distance then
|
|
||||||
closest_object = obj
|
|
||||||
closest_distance = dist
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- If an attackable object was found, we will damage the closest one only
|
-- If an attackable object was found, we will damage the closest one only
|
||||||
|
|
||||||
|
|
|
@ -369,6 +369,9 @@ local function allow_take(pos, listname, index, stack, player)
|
||||||
minetest.record_protection_violation(pos, name)
|
minetest.record_protection_violation(pos, name)
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
if listname == "stand" then
|
||||||
|
awards.unlock(name, "mcl:localBrewery")
|
||||||
|
end
|
||||||
return stack:get_count()
|
return stack:get_count()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,15 +29,15 @@ local is_creative_enabled = minetest.is_creative_enabled
|
||||||
local is_protected = minetest.is_protected
|
local is_protected = minetest.is_protected
|
||||||
local record_protection_violation = minetest.record_protection_violation
|
local record_protection_violation = minetest.record_protection_violation
|
||||||
|
|
||||||
if mod_mcl_core then
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_buckets:bucket_empty 1",
|
output = "mcl_buckets:bucket_empty 1",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mcl_core:iron_ingot", "", "mcl_core:iron_ingot"},
|
{"mcl_core:iron_ingot", "", "mcl_core:iron_ingot"},
|
||||||
{"", "mcl_core:iron_ingot", ""},
|
{"", "mcl_core:iron_ingot", ""},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
|
||||||
mcl_buckets = {
|
mcl_buckets = {
|
||||||
liquids = {},
|
liquids = {},
|
||||||
|
@ -88,9 +88,7 @@ end
|
||||||
local pointable_sources = {}
|
local pointable_sources = {}
|
||||||
|
|
||||||
local function bucket_raycast(user)
|
local function bucket_raycast(user)
|
||||||
--local pos = user:get_pos()
|
|
||||||
local pos = user:get_pos()
|
local pos = user:get_pos()
|
||||||
--local pos = vector.add(user:get_pos(), user:get_bone_position("Head_Control"))
|
|
||||||
pos.y = pos.y + user:get_properties().eye_height
|
pos.y = pos.y + user:get_properties().eye_height
|
||||||
local look_dir = user:get_look_dir()
|
local look_dir = user:get_look_dir()
|
||||||
look_dir = vector.multiply(look_dir, 5)
|
look_dir = vector.multiply(look_dir, 5)
|
||||||
|
@ -100,7 +98,6 @@ local function bucket_raycast(user)
|
||||||
if ray then
|
if ray then
|
||||||
for pointed_thing in ray do
|
for pointed_thing in ray do
|
||||||
if pointed_thing and pointable_sources[get_node(pointed_thing.above).name] then
|
if pointed_thing and pointable_sources[get_node(pointed_thing.above).name] then
|
||||||
--minetest.chat_send_all("found!")
|
|
||||||
return {under=pointed_thing.under,above=pointed_thing.above}
|
return {under=pointed_thing.under,above=pointed_thing.above}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -242,7 +239,6 @@ local function on_place_bucket_empty(itemstack, user, pointed_thing)
|
||||||
if liquid_name then
|
if liquid_name then
|
||||||
local liquid_def = mcl_buckets.liquids[liquid_name]
|
local liquid_def = mcl_buckets.liquids[liquid_name]
|
||||||
if liquid_def then
|
if liquid_def then
|
||||||
--minetest.chat_send_all("test")
|
|
||||||
-- Fill bucket, but not in Creative Mode
|
-- Fill bucket, but not in Creative Mode
|
||||||
-- FIXME: remove this line
|
-- FIXME: remove this line
|
||||||
--if not is_creative_enabled(user:get_player_name()) then
|
--if not is_creative_enabled(user:get_player_name()) then
|
||||||
|
@ -282,6 +278,12 @@ local function on_place_bucket_empty(itemstack, user, pointed_thing)
|
||||||
new_bucket = ItemStack("mcl_buckets:bucket_river_water")
|
new_bucket = ItemStack("mcl_buckets:bucket_river_water")
|
||||||
end
|
end
|
||||||
sound_take("mclx_core:river_water_source", pointed_thing.under)
|
sound_take("mclx_core:river_water_source", pointed_thing.under)
|
||||||
|
elseif nn == "mcl_cauldrons:cauldron_3_lava" then
|
||||||
|
set_node(pointed_thing.under, {name="mcl_cauldrons:cauldron"})
|
||||||
|
if not is_creative_enabled(user:get_player_name()) then
|
||||||
|
new_bucket = ItemStack("mcl_buckets:bucket_lava")
|
||||||
|
end
|
||||||
|
sound_take("mcl_core:lava_source", pointed_thing.under)
|
||||||
end
|
end
|
||||||
if new_bucket then
|
if new_bucket then
|
||||||
return give_bucket(new_bucket, itemstack, user)
|
return give_bucket(new_bucket, itemstack, user)
|
||||||
|
@ -366,7 +368,6 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", {
|
||||||
_doc_items_longdesc = S("A bucket can be used to collect and release liquids."),
|
_doc_items_longdesc = S("A bucket can be used to collect and release liquids."),
|
||||||
_doc_items_usagehelp = S("Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else."),
|
_doc_items_usagehelp = S("Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else."),
|
||||||
_tt_help = S("Collects liquids"),
|
_tt_help = S("Collects liquids"),
|
||||||
--liquids_pointable = true,
|
|
||||||
inventory_image = "bucket.png",
|
inventory_image = "bucket.png",
|
||||||
stack_max = 16,
|
stack_max = 16,
|
||||||
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
|
||||||
|
|
|
@ -10,13 +10,6 @@ local function sound_place(itemname, pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[local sound_take = function(itemname, pos)
|
|
||||||
local def = minetest.registered_nodes[itemname]
|
|
||||||
if def and def.sounds and def.sounds.dug then
|
|
||||||
minetest.sound_play(def.sounds.dug, {gain=1.0, pos = pos, pitch = 1 + math.random(-10, 10)*0.005}, true)
|
|
||||||
end
|
|
||||||
end]]
|
|
||||||
|
|
||||||
if mod_mcl_core then
|
if mod_mcl_core then
|
||||||
-- Lava bucket
|
-- Lava bucket
|
||||||
mcl_buckets.register_liquid({
|
mcl_buckets.register_liquid({
|
||||||
|
@ -34,6 +27,16 @@ if mod_mcl_core then
|
||||||
awards.unlock(user:get_player_name(), "mcl:hotStuff")
|
awards.unlock(user:get_player_name(), "mcl:hotStuff")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
extra_check = function(pos, placer)
|
||||||
|
local nn = minetest.get_node(pos).name
|
||||||
|
if minetest.get_item_group(nn, "cauldron") ~= 0 then
|
||||||
|
if nn ~= "mcl_cauldrons:cauldron_3_lava" then
|
||||||
|
minetest.set_node(pos, {name="mcl_cauldrons:cauldron_3_lava"})
|
||||||
|
end
|
||||||
|
sound_place("mcl_core:lava_source", pos)
|
||||||
|
return false, true
|
||||||
|
end
|
||||||
|
end,
|
||||||
bucketname = "mcl_buckets:bucket_lava",
|
bucketname = "mcl_buckets:bucket_lava",
|
||||||
inventory_image = "bucket_lava.png",
|
inventory_image = "bucket_lava.png",
|
||||||
name = S("Lava Bucket"),
|
name = S("Lava Bucket"),
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
mcl_campfires
|
||||||
|
===============
|
||||||
|
Adds the campfire and its soul variant.
|
||||||
|
|
||||||
|
License of code
|
||||||
|
---------------
|
||||||
|
See the main MineClone 2 README.md file.
|
||||||
|
Authors:
|
||||||
|
Gerold55 - Code Start + Models?
|
||||||
|
PrairieWind - Improved and Cleaned Up Code, and added the soul campfire and crafting recipes.
|
||||||
|
cora - Added burning damage.
|
||||||
|
|
||||||
|
License of media
|
||||||
|
----------------
|
||||||
|
See the main MineClone 2 README.md file for license on most of the textures.
|
||||||
|
|
||||||
|
For the following textures:
|
||||||
|
mcl_campfires_campfire_inv.png
|
||||||
|
mcl_campfires_soul_campfire_inv.png
|
||||||
|
License: CC0 1.0 Universal (CC0 1.0)
|
||||||
|
Author: RandomLegoBrick
|
|
@ -0,0 +1,145 @@
|
||||||
|
-- ||||||||||||||||||||||||||||||||
|
||||||
|
-- ||||||||||| CAMPFIRES ||||||||||
|
||||||
|
-- ||||||||||||||||||||||||||||||||
|
||||||
|
|
||||||
|
-- TO-DO:
|
||||||
|
-- * Add Smoke Particles
|
||||||
|
-- * Add Spark Particles
|
||||||
|
-- * Add Cooking Meat
|
||||||
|
-- * Add Working Sounds
|
||||||
|
|
||||||
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
|
local campfires = {
|
||||||
|
{ name = "Campfire", lightlevel = 15, techname = "campfire", damage = 1, drops = "mcl_core:charcoal_lump 2" },
|
||||||
|
{ name = "Soul Campfire", lightlevel = 10, techname = "soul_campfire", damage = 2, drops = "mcl_blackstone:soul_soil" },
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, campfire in pairs(campfires) do
|
||||||
|
-- Define Campfire
|
||||||
|
minetest.register_node("mcl_campfires:" .. campfire.techname, {
|
||||||
|
description = S(campfire.name),
|
||||||
|
_tt_help = S("Cooks food and keeps bees happy."),
|
||||||
|
_doc_items_longdesc = S("Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap."),
|
||||||
|
inventory_image = "mcl_campfires_" .. campfire.techname .. "_inv.png",
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "mcl_campfires_campfire.obj",
|
||||||
|
tiles = {{name="mcl_campfires_log.png"},},
|
||||||
|
groups = { handy=1, axey=1, material_wood=1, not_in_creative_inventory=1, campfire=1, },
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_rightclick = function (pos, node, player, itemstack, pointed_thing)
|
||||||
|
if player:get_wielded_item():get_name() == "mcl_fire:flint_and_steel" then
|
||||||
|
node.name = "mcl_campfires:" .. campfire.techname .. "_lit"
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
drop = campfire.drops,
|
||||||
|
_mcl_silk_touch_drop = {"mcl_campfires:" .. campfire.techname},
|
||||||
|
mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = 'fixed',
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5}, --left, bottom, front, right, top
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = 'fixed',
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5},
|
||||||
|
},
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Define Lit Campfire
|
||||||
|
minetest.register_node("mcl_campfires:" .. campfire.techname .. "_lit", {
|
||||||
|
description = S(campfire.name),
|
||||||
|
_tt_help = S("Cooks food and keeps bees happy."),
|
||||||
|
_doc_items_longdesc = S("Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap."),
|
||||||
|
inventory_image = "mcl_campfires_" .. campfire.techname .. "_inv.png",
|
||||||
|
drawtype = "mesh",
|
||||||
|
mesh = "mcl_campfires_campfire_lit.obj",
|
||||||
|
tiles = {{
|
||||||
|
name="mcl_campfires_" .. campfire.techname .. "_fire.png",
|
||||||
|
animation={
|
||||||
|
type="vertical_frames",
|
||||||
|
aspect_w=16,
|
||||||
|
aspect_h=16,
|
||||||
|
length=2.0
|
||||||
|
}},
|
||||||
|
{name="mcl_campfires_" .. campfire.techname .. "_log_lit.png",
|
||||||
|
animation={
|
||||||
|
type="vertical_frames",
|
||||||
|
aspect_w=16,
|
||||||
|
aspect_h=16,
|
||||||
|
length=2.0
|
||||||
|
}}
|
||||||
|
},
|
||||||
|
groups = { handy=1, axey=1, material_wood=1, campfire=1, lit_campfire=1 },
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_rightclick = function (pos, node, player, itemstack, pointed_thing)
|
||||||
|
if player:get_wielded_item():get_name():find("shovel") then
|
||||||
|
node.name = "mcl_campfires:" .. campfire.techname
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
drop = campfire.drops,
|
||||||
|
_mcl_silk_touch_drop = {"mcl_campfires:" .. campfire.techname .. "_lit"},
|
||||||
|
light_source = campfire.lightlevel,
|
||||||
|
mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5}, --left, bottom, front, right, top
|
||||||
|
},
|
||||||
|
collision_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-.5, -.5, -.5, .5, -.05, .5},
|
||||||
|
},
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
damage_per_second = campfire.damage,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_campfires:campfire_lit",
|
||||||
|
recipe = {
|
||||||
|
{ "", "mcl_core:stick", "" },
|
||||||
|
{ "mcl_core:stick", "group:coal", "mcl_core:stick" },
|
||||||
|
{ "group:tree", "group:tree", "group:tree" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_campfires:soul_campfire_lit",
|
||||||
|
recipe = {
|
||||||
|
{ "", "mcl_core:stick", "" },
|
||||||
|
{ "mcl_core:stick", "group:soul_block", "mcl_core:stick" },
|
||||||
|
{ "group:tree", "group:tree", "group:tree" },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
local function burn_in_campfire(obj)
|
||||||
|
local p = obj:get_pos()
|
||||||
|
if p then
|
||||||
|
local n = minetest.find_node_near(p,0.4,{"group:lit_campfire"},true)
|
||||||
|
if n then
|
||||||
|
mcl_burning.set_on_fire(obj, 5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local etime = 0
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
etime = dtime + etime
|
||||||
|
if etime < 0.5 then return end
|
||||||
|
etime = 0
|
||||||
|
for _,pl in pairs(minetest.get_connected_players()) do
|
||||||
|
burn_in_campfire(pl)
|
||||||
|
end
|
||||||
|
for _,ent in pairs(minetest.luaentities) do
|
||||||
|
if ent.is_mob then
|
||||||
|
burn_in_campfire(ent.object)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
|
@ -0,0 +1,4 @@
|
||||||
|
Campfire=
|
||||||
|
Soul Campfire=
|
||||||
|
Cooks food and keeps bees happy.=
|
||||||
|
Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap.=
|
|
@ -0,0 +1,3 @@
|
||||||
|
name = mcl_campfires
|
||||||
|
depends = mcl_sounds
|
||||||
|
author = PrairieWind, Gerold55
|
|
@ -0,0 +1,224 @@
|
||||||
|
# Blender v2.78 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib campfire.mtl
|
||||||
|
o nodebox4
|
||||||
|
v 0.500000 -0.312500 0.250000
|
||||||
|
v 0.500000 -0.312500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.250000
|
||||||
|
v -0.500000 -0.312500 0.250000
|
||||||
|
v -0.500000 -0.312500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.250000
|
||||||
|
v 0.500000 -0.312500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.312500 0.500000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 -0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none
|
||||||
|
s 1
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 5/5/1 6/6/1 7/7/1 8/8/1
|
||||||
|
f 1/9/2 4/10/2 8/11/2 5/5/2
|
||||||
|
f 1/9/3 2/12/3 6/13/3 5/5/3
|
||||||
|
f 4/14/3 3/15/3 7/16/3 8/17/3
|
||||||
|
f 9/18/2 10/19/2 11/20/2 12/21/2
|
||||||
|
o nodebox4.001
|
||||||
|
v 0.500000 -0.312500 -0.498288
|
||||||
|
v 0.500000 -0.312500 -0.248288
|
||||||
|
v 0.500000 -0.062500 -0.248288
|
||||||
|
v 0.500000 -0.062500 -0.498288
|
||||||
|
v -0.500000 -0.312500 -0.498288
|
||||||
|
v -0.500000 -0.312500 -0.248288
|
||||||
|
v -0.500000 -0.062500 -0.248288
|
||||||
|
v -0.500000 -0.062500 -0.498288
|
||||||
|
v 0.500000 -0.312500 -0.248288
|
||||||
|
v 0.500000 -0.062500 -0.248288
|
||||||
|
v -0.500000 -0.062500 -0.248288
|
||||||
|
v -0.500000 -0.312500 -0.248288
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 -0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none
|
||||||
|
s 1
|
||||||
|
f 13/22/4 14/23/4 15/24/4 16/25/4
|
||||||
|
f 17/26/4 18/27/4 19/28/4 20/29/4
|
||||||
|
f 13/30/5 16/31/5 20/32/5 17/26/5
|
||||||
|
f 13/30/6 14/33/6 18/34/6 17/26/6
|
||||||
|
f 16/35/6 15/36/6 19/37/6 20/38/6
|
||||||
|
f 21/39/5 22/40/5 23/41/5 24/42/5
|
||||||
|
o nodebox3
|
||||||
|
v 0.250000 -0.500000 -0.500000
|
||||||
|
v 0.250000 -0.437500 -0.500000
|
||||||
|
v -0.250000 -0.437500 -0.500000
|
||||||
|
v -0.250000 -0.500000 -0.500000
|
||||||
|
v 0.250000 -0.500000 0.500000
|
||||||
|
v 0.250000 -0.437500 0.500000
|
||||||
|
v -0.250000 -0.437500 0.500000
|
||||||
|
v -0.250000 -0.500000 0.500000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 0.1250
|
||||||
|
vt 0.0000 0.1250
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 0.1250
|
||||||
|
vt 0.0000 0.1250
|
||||||
|
vt 1.0000 0.5000
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.0001 0.0001
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 0.5000
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none_NONE
|
||||||
|
s 1
|
||||||
|
f 25/43/7 29/44/7 30/45/7 26/46/7
|
||||||
|
f 28/47/7 32/48/7 31/49/7 27/50/7
|
||||||
|
usemtl none
|
||||||
|
f 25/51/8 26/52/8 27/53/8 28/47/8
|
||||||
|
f 29/54/8 30/55/8 31/56/8 32/48/8
|
||||||
|
f 25/51/9 29/57/9 32/58/9 28/59/9
|
||||||
|
f 26/46/9 30/60/9 31/61/9 27/62/9
|
||||||
|
o nodebox4.003
|
||||||
|
v -0.248335 -0.500045 0.508619
|
||||||
|
v -0.498333 -0.500045 0.509533
|
||||||
|
v -0.498334 -0.250045 0.509533
|
||||||
|
v -0.248335 -0.250045 0.508619
|
||||||
|
v -0.251992 -0.500045 -0.491375
|
||||||
|
v -0.501991 -0.500045 -0.490460
|
||||||
|
v -0.501991 -0.250045 -0.490460
|
||||||
|
v -0.251992 -0.250045 -0.491375
|
||||||
|
v -0.498333 -0.500045 0.509533
|
||||||
|
v -0.498334 -0.250045 0.509533
|
||||||
|
v -0.501991 -0.250045 -0.490460
|
||||||
|
v -0.501991 -0.500045 -0.490460
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vn -0.0037 -0.0000 -1.0000
|
||||||
|
vn -1.0000 0.0000 0.0037
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none
|
||||||
|
s 1
|
||||||
|
f 33/63/10 34/64/10 35/65/10 36/66/10
|
||||||
|
f 37/67/10 38/68/10 39/69/10 40/70/10
|
||||||
|
f 33/71/11 36/72/11 40/73/11 37/67/11
|
||||||
|
f 33/71/12 34/74/12 38/75/12 37/67/12
|
||||||
|
f 36/76/12 35/77/12 39/78/12 40/79/12
|
||||||
|
f 41/80/11 42/81/11 43/82/11 44/83/11
|
||||||
|
o nodebox4.002
|
||||||
|
v 0.499948 -0.500045 0.505882
|
||||||
|
v 0.249950 -0.500045 0.506796
|
||||||
|
v 0.249950 -0.250045 0.506796
|
||||||
|
v 0.499948 -0.250045 0.505882
|
||||||
|
v 0.496291 -0.500045 -0.494111
|
||||||
|
v 0.246293 -0.500045 -0.493197
|
||||||
|
v 0.246293 -0.250045 -0.493197
|
||||||
|
v 0.496291 -0.250045 -0.494111
|
||||||
|
v 0.249950 -0.500045 0.506796
|
||||||
|
v 0.249950 -0.250045 0.506796
|
||||||
|
v 0.246293 -0.250045 -0.493197
|
||||||
|
v 0.246293 -0.500045 -0.493197
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vn -0.0037 0.0000 -1.0000
|
||||||
|
vn -1.0000 -0.0000 0.0037
|
||||||
|
vn -0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none
|
||||||
|
s 1
|
||||||
|
f 45/84/13 46/85/13 47/86/13 48/87/13
|
||||||
|
f 49/88/13 50/89/13 51/90/13 52/91/13
|
||||||
|
f 45/92/14 48/93/14 52/94/14 49/88/14
|
||||||
|
f 45/92/15 46/95/15 50/96/15 49/88/15
|
||||||
|
f 48/97/15 47/98/15 51/99/15 52/100/15
|
||||||
|
f 53/101/14 54/102/14 55/103/14 56/104/14
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Blender MTL File: 'campfire.blend'
|
||||||
|
# Material Count: 3
|
||||||
|
|
||||||
|
newmtl Material.001
|
||||||
|
Ns 96.078431
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.640000 0.640000 0.640000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd G:\minetest-0.4.16-win641\textures\Pixel Perfection v4.0\mcl_campfire_fire.png
|
||||||
|
|
||||||
|
newmtl none
|
||||||
|
Ns 96.078431
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.640000 0.640000 0.640000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd \home\nathan\Downloads\mcl_campfire_log.png
|
||||||
|
|
||||||
|
newmtl none_NONE
|
||||||
|
Ns 96.078431
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.640000 0.640000 0.640000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd \\home\\nathan\\Downloads\\mcl_campfire_log.png
|
|
@ -0,0 +1,248 @@
|
||||||
|
# Blender v2.78 (sub 0) OBJ File: 'campfire.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib campfire1.mtl
|
||||||
|
o nodebox4.005_nodebox4.006
|
||||||
|
v 0.243779 -0.499707 -0.497529
|
||||||
|
v 0.493779 -0.499707 -0.497421
|
||||||
|
v 0.493779 -0.249707 -0.497421
|
||||||
|
v 0.243779 -0.249707 -0.497529
|
||||||
|
v 0.243349 -0.499707 0.502471
|
||||||
|
v 0.493349 -0.499707 0.502578
|
||||||
|
v 0.493349 -0.249707 0.502578
|
||||||
|
v 0.243349 -0.249707 0.502471
|
||||||
|
v 0.493779 -0.499707 -0.497421
|
||||||
|
v 0.493779 -0.249707 -0.497421
|
||||||
|
v 0.493349 -0.499707 0.502578
|
||||||
|
v 0.493349 -0.249707 0.502578
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt -0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt -0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vn -0.0004 0.0000 1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0004
|
||||||
|
vn -0.0000 -1.0000 0.0000
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 5/5/1 6/6/1 7/7/1 8/8/1
|
||||||
|
f 1/9/2 4/10/2 8/11/2 5/5/2
|
||||||
|
f 1/9/3 2/12/3 6/13/3 5/5/3
|
||||||
|
f 4/14/3 3/15/3 7/16/3 8/17/3
|
||||||
|
f 9/18/2 10/19/2 12/20/2 11/21/2
|
||||||
|
o nodebox4.004_nodebox4.005
|
||||||
|
v -0.500021 -0.499707 -0.497848
|
||||||
|
v -0.250021 -0.499707 -0.497741
|
||||||
|
v -0.250021 -0.249707 -0.497741
|
||||||
|
v -0.500021 -0.249707 -0.497848
|
||||||
|
v -0.500451 -0.499707 0.502152
|
||||||
|
v -0.250451 -0.499707 0.502259
|
||||||
|
v -0.250451 -0.249707 0.502259
|
||||||
|
v -0.500451 -0.249707 0.502152
|
||||||
|
v -0.250021 -0.499707 -0.497741
|
||||||
|
v -0.250021 -0.249707 -0.497741
|
||||||
|
v -0.250451 -0.499707 0.502259
|
||||||
|
v -0.250451 -0.249707 0.502259
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt -0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt -0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vn -0.0004 0.0000 1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0004
|
||||||
|
vn -0.0000 -1.0000 0.0000
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
f 13/22/4 14/23/4 15/24/4 16/25/4
|
||||||
|
f 17/26/4 18/27/4 19/28/4 20/29/4
|
||||||
|
f 13/30/5 16/31/5 20/32/5 17/26/5
|
||||||
|
f 13/30/6 14/33/6 18/34/6 17/26/6
|
||||||
|
f 16/35/6 15/36/6 19/37/6 20/38/6
|
||||||
|
f 21/39/5 22/40/5 24/41/5 23/42/5
|
||||||
|
o nodebox4.001_nodebox4.004
|
||||||
|
v 0.500000 -0.312500 -0.493800
|
||||||
|
v 0.500000 -0.312500 -0.243800
|
||||||
|
v 0.500000 -0.062500 -0.243800
|
||||||
|
v 0.500000 -0.062500 -0.493800
|
||||||
|
v -0.500000 -0.312500 -0.493800
|
||||||
|
v -0.500000 -0.312500 -0.243800
|
||||||
|
v -0.500000 -0.062500 -0.243800
|
||||||
|
v -0.500000 -0.062500 -0.493800
|
||||||
|
v 0.500000 -0.312500 -0.243800
|
||||||
|
v 0.500000 -0.062500 -0.243800
|
||||||
|
v -0.500000 -0.312500 -0.243800
|
||||||
|
v -0.500000 -0.062500 -0.243800
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.7500
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 -0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
f 25/43/7 26/44/7 27/45/7 28/46/7
|
||||||
|
f 29/47/7 30/48/7 31/49/7 32/50/7
|
||||||
|
f 25/51/8 28/52/8 32/53/8 29/47/8
|
||||||
|
f 25/51/9 26/54/9 30/55/9 29/47/9
|
||||||
|
f 28/56/9 27/57/9 31/58/9 32/59/9
|
||||||
|
f 33/60/8 34/61/8 36/62/8 35/63/8
|
||||||
|
o Plane
|
||||||
|
v -0.311754 -0.438770 -0.196249
|
||||||
|
v 0.276360 -0.438621 0.247948
|
||||||
|
v -0.311276 0.135801 -0.196634
|
||||||
|
v 0.276838 0.135950 0.247562
|
||||||
|
v -0.274993 -0.438696 0.270317
|
||||||
|
v 0.240407 -0.438696 -0.218656
|
||||||
|
v -0.275322 0.135875 0.269969
|
||||||
|
v 0.240077 0.135875 -0.219003
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt -0.0000 1.0000
|
||||||
|
vn -0.6027 0.0010 0.7980
|
||||||
|
vn 0.6883 0.0008 0.7255
|
||||||
|
usemtl Material.001
|
||||||
|
s off
|
||||||
|
f 37/64/10 38/65/10 40/66/10 39/67/10
|
||||||
|
f 41/68/11 42/69/11 44/70/11 43/71/11
|
||||||
|
o nodebox3
|
||||||
|
v 0.250000 -0.500000 -0.500000
|
||||||
|
v 0.250000 -0.500000 0.500000
|
||||||
|
v 0.250000 -0.437500 0.500000
|
||||||
|
v 0.250000 -0.437500 -0.500000
|
||||||
|
v -0.250000 -0.500000 -0.500000
|
||||||
|
v -0.250000 -0.500000 0.500000
|
||||||
|
v -0.250000 -0.437500 0.500000
|
||||||
|
v -0.250000 -0.437500 -0.500000
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 0.0625
|
||||||
|
vt 0.0000 0.0625
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 1.0000 0.0000
|
||||||
|
vt 1.0000 0.0625
|
||||||
|
vt 0.0000 0.0625
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 1.0000 0.4375
|
||||||
|
vt 0.0000 0.4375
|
||||||
|
vt 0.0001 0.0001
|
||||||
|
vt 0.9999 0.0001
|
||||||
|
vt 1.0000 0.5000
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.0001 0.0001
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vt 0.0000 0.0000
|
||||||
|
vn 0.0000 0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
f 45/72/12 48/73/12 52/74/12 49/75/12
|
||||||
|
f 46/76/12 47/77/12 51/78/12 50/79/12
|
||||||
|
f 45/72/13 46/80/13 50/81/13 49/82/13
|
||||||
|
f 48/83/13 47/84/13 51/85/13 52/86/13
|
||||||
|
usemtl none_NONE
|
||||||
|
f 45/87/14 46/88/14 47/89/14 48/90/14
|
||||||
|
f 49/75/14 50/79/14 51/91/14 52/92/14
|
||||||
|
o nodebox4
|
||||||
|
v 0.500000 -0.312500 0.250000
|
||||||
|
v 0.500000 -0.312500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.250000
|
||||||
|
v -0.500000 -0.312500 0.250000
|
||||||
|
v -0.500000 -0.312500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.250000
|
||||||
|
v 0.500000 -0.312500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.312500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.500000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt 0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt -0.0000 0.5000
|
||||||
|
vt 0.2500 0.5000
|
||||||
|
vt 0.2500 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vt 1.0000 0.7500
|
||||||
|
vt 1.0000 1.0000
|
||||||
|
vt 0.0000 1.0000
|
||||||
|
vt -0.0000 0.7500
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 -0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
usemtl none
|
||||||
|
s off
|
||||||
|
f 53/93/15 54/94/15 55/95/15 56/96/15
|
||||||
|
f 57/97/15 58/98/15 59/99/15 60/100/15
|
||||||
|
f 53/101/16 56/102/16 60/103/16 57/97/16
|
||||||
|
f 53/101/17 54/104/17 58/105/17 57/97/17
|
||||||
|
f 56/106/17 55/107/17 59/108/17 60/109/17
|
||||||
|
f 61/110/16 62/111/16 64/112/16 63/113/16
|
|
@ -0,0 +1,225 @@
|
||||||
|
# Blender v2.79 (sub 7) OBJ File: 'campfire.blend'
|
||||||
|
# www.blender.org
|
||||||
|
o Plane
|
||||||
|
v -0.240246 -0.438696 -0.141059
|
||||||
|
v 0.205043 -0.438696 0.192756
|
||||||
|
v -0.239959 0.135875 -0.141442
|
||||||
|
v 0.205331 0.135875 0.192373
|
||||||
|
v -0.216088 -0.438696 0.214432
|
||||||
|
v 0.181502 -0.438696 -0.162771
|
||||||
|
v -0.216417 0.135875 0.214085
|
||||||
|
v 0.181172 0.135875 -0.163119
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt -0.000000 1.000000
|
||||||
|
vn -0.5998 0.0008 0.8001
|
||||||
|
vn 0.6883 0.0008 0.7255
|
||||||
|
g Plane_Plane_Material.001
|
||||||
|
s off
|
||||||
|
f 1/1/1 2/2/1 4/3/1 3/4/1
|
||||||
|
f 5/5/2 6/6/2 8/7/2 7/8/2
|
||||||
|
o nodebox3
|
||||||
|
v 0.250000 -0.500000 -0.500000
|
||||||
|
v 0.250000 -0.500000 0.500000
|
||||||
|
v 0.250000 -0.437500 0.500000
|
||||||
|
v 0.250000 -0.437500 -0.500000
|
||||||
|
v -0.250000 -0.500000 -0.500000
|
||||||
|
v -0.250000 -0.500000 0.500000
|
||||||
|
v -0.250000 -0.437500 0.500000
|
||||||
|
v -0.250000 -0.437500 -0.500000
|
||||||
|
v 0.243779 -0.499707 -0.497529
|
||||||
|
v 0.493779 -0.499707 -0.497421
|
||||||
|
v 0.493779 -0.249707 -0.497421
|
||||||
|
v 0.243779 -0.249707 -0.497529
|
||||||
|
v 0.243349 -0.499707 0.502471
|
||||||
|
v 0.493349 -0.499707 0.502579
|
||||||
|
v 0.493349 -0.249707 0.502578
|
||||||
|
v 0.243349 -0.249707 0.502471
|
||||||
|
v 0.493779 -0.499707 -0.497421
|
||||||
|
v 0.493779 -0.249707 -0.497421
|
||||||
|
v 0.493349 -0.499707 0.502579
|
||||||
|
v 0.493349 -0.249707 0.502578
|
||||||
|
v -0.500021 -0.499707 -0.497848
|
||||||
|
v -0.250021 -0.499707 -0.497741
|
||||||
|
v -0.250021 -0.249707 -0.497741
|
||||||
|
v -0.500021 -0.249707 -0.497848
|
||||||
|
v -0.500451 -0.499707 0.502152
|
||||||
|
v -0.250451 -0.499707 0.502259
|
||||||
|
v -0.250451 -0.249707 0.502259
|
||||||
|
v -0.500451 -0.249707 0.502152
|
||||||
|
v -0.250021 -0.499707 -0.497741
|
||||||
|
v -0.250021 -0.249707 -0.497741
|
||||||
|
v -0.250451 -0.499707 0.502259
|
||||||
|
v -0.250451 -0.249707 0.502259
|
||||||
|
v 0.500000 -0.312500 -0.493800
|
||||||
|
v 0.500000 -0.312500 -0.243800
|
||||||
|
v 0.500000 -0.062500 -0.243800
|
||||||
|
v 0.500000 -0.062500 -0.493800
|
||||||
|
v -0.500000 -0.312500 -0.493800
|
||||||
|
v -0.500000 -0.312500 -0.243800
|
||||||
|
v -0.500000 -0.062500 -0.243800
|
||||||
|
v -0.500000 -0.062500 -0.493800
|
||||||
|
v 0.500000 -0.312500 -0.243800
|
||||||
|
v 0.500000 -0.062500 -0.243800
|
||||||
|
v -0.500000 -0.312500 -0.243800
|
||||||
|
v -0.500000 -0.062500 -0.243800
|
||||||
|
v 0.500000 -0.312500 0.250000
|
||||||
|
v 0.500000 -0.312500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.250000
|
||||||
|
v -0.500000 -0.312500 0.250000
|
||||||
|
v -0.500000 -0.312500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.250000
|
||||||
|
v 0.500000 -0.312500 0.500000
|
||||||
|
v 0.500000 -0.062500 0.500000
|
||||||
|
v -0.500000 -0.312500 0.500000
|
||||||
|
v -0.500000 -0.062500 0.500000
|
||||||
|
vt 0.999982 0.000018
|
||||||
|
vt 1.000000 0.062500
|
||||||
|
vt 0.000000 0.062500
|
||||||
|
vt 0.000018 0.000018
|
||||||
|
vt 0.999982 0.000018
|
||||||
|
vt 1.000000 0.062500
|
||||||
|
vt 0.000000 0.062500
|
||||||
|
vt 0.000018 0.000018
|
||||||
|
vt 1.000000 0.437500
|
||||||
|
vt 0.000000 0.437500
|
||||||
|
vt 0.000071 0.000071
|
||||||
|
vt 0.999929 0.000071
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.000071 0.000071
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt -0.000000 0.500000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.000000 1.000000
|
||||||
|
vt -0.000000 0.750000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vn 0.0000 0.0000 1.0000
|
||||||
|
vn 0.0000 -1.0000 -0.0000
|
||||||
|
vn -0.0004 0.0000 1.0000
|
||||||
|
vn 1.0000 -0.0000 0.0004
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
g nodebox3_nodebox3_none
|
||||||
|
s off
|
||||||
|
f 9/9/3 12/10/3 16/11/3 13/12/3
|
||||||
|
f 10/13/3 11/14/3 15/15/3 14/16/3
|
||||||
|
f 9/9/4 10/17/4 14/18/4 13/19/4
|
||||||
|
f 12/20/4 11/21/4 15/22/4 16/23/4
|
||||||
|
f 17/24/5 18/25/5 19/26/5 20/27/5
|
||||||
|
f 21/28/5 22/29/5 23/30/5 24/31/5
|
||||||
|
f 17/32/6 20/33/6 24/34/6 21/28/6
|
||||||
|
f 17/32/4 18/35/4 22/36/4 21/28/4
|
||||||
|
f 20/37/4 19/38/4 23/39/4 24/40/4
|
||||||
|
f 25/41/6 26/42/6 28/43/6 27/44/6
|
||||||
|
f 29/45/5 30/46/5 31/47/5 32/48/5
|
||||||
|
f 33/49/5 34/50/5 35/51/5 36/52/5
|
||||||
|
f 29/53/6 32/54/6 36/55/6 33/49/6
|
||||||
|
f 29/53/4 30/56/4 34/57/4 33/49/4
|
||||||
|
f 32/58/4 31/59/4 35/60/4 36/61/4
|
||||||
|
f 37/62/6 38/63/6 40/64/6 39/65/6
|
||||||
|
f 41/66/7 42/67/7 43/68/7 44/69/7
|
||||||
|
f 45/70/7 46/71/7 47/72/7 48/73/7
|
||||||
|
f 41/74/3 44/75/3 48/76/3 45/70/3
|
||||||
|
f 41/74/4 42/77/4 46/78/4 45/70/4
|
||||||
|
f 44/79/4 43/80/4 47/81/4 48/82/4
|
||||||
|
f 49/83/3 50/84/3 52/85/3 51/86/3
|
||||||
|
f 53/87/7 54/88/7 55/89/7 56/90/7
|
||||||
|
f 57/91/7 58/92/7 59/93/7 60/94/7
|
||||||
|
f 53/95/3 56/96/3 60/97/3 57/91/3
|
||||||
|
f 53/95/4 54/98/4 58/99/4 57/91/4
|
||||||
|
f 56/100/4 55/101/4 59/102/4 60/103/4
|
||||||
|
f 61/104/3 62/105/3 64/106/3 63/107/3
|
||||||
|
g nodebox3_nodebox3_none_NONE
|
||||||
|
f 9/108/7 10/109/7 11/110/7 12/111/7
|
||||||
|
f 13/12/7 14/16/7 15/112/7 16/113/7
|
After Width: | Height: | Size: 533 B |
After Width: | Height: | Size: 534 B |
After Width: | Height: | Size: 811 B |
After Width: | Height: | Size: 889 B |
After Width: | Height: | Size: 387 B |
After Width: | Height: | Size: 937 B |
After Width: | Height: | Size: 531 B |
After Width: | Height: | Size: 1.1 KiB |
|
@ -5,7 +5,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
-- TODO: Extinguish fire of burning entities
|
-- TODO: Extinguish fire of burning entities
|
||||||
|
|
||||||
-- Convenience function because the cauldron nodeboxes are very similar
|
-- Convenience function because the cauldron nodeboxes are very similar
|
||||||
local create_cauldron_nodebox = function(water_level)
|
local function create_cauldron_nodebox(water_level)
|
||||||
local floor_y
|
local floor_y
|
||||||
if water_level == 0 then -- empty
|
if water_level == 0 then -- empty
|
||||||
floor_y = -0.1875
|
floor_y = -0.1875
|
||||||
|
@ -36,12 +36,6 @@ local create_cauldron_nodebox = function(water_level)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local cauldron_nodeboxes = {}
|
|
||||||
for w=0,3 do
|
|
||||||
cauldron_nodeboxes[w] = create_cauldron_nodebox(w)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- Empty cauldron
|
-- Empty cauldron
|
||||||
minetest.register_node("mcl_cauldrons:cauldron", {
|
minetest.register_node("mcl_cauldrons:cauldron", {
|
||||||
description = S("Cauldron"),
|
description = S("Cauldron"),
|
||||||
|
@ -55,7 +49,7 @@ minetest.register_node("mcl_cauldrons:cauldron", {
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {pickaxey=1, deco_block=1, cauldron=1},
|
groups = {pickaxey=1, deco_block=1, cauldron=1},
|
||||||
node_box = cauldron_nodeboxes[0],
|
node_box = create_cauldron_nodebox(0),
|
||||||
selection_box = { type = "regular" },
|
selection_box = { type = "regular" },
|
||||||
tiles = {
|
tiles = {
|
||||||
"mcl_cauldrons_cauldron_inner.png^mcl_cauldrons_cauldron_top.png",
|
"mcl_cauldrons_cauldron_inner.png^mcl_cauldrons_cauldron_top.png",
|
||||||
|
@ -68,12 +62,15 @@ minetest.register_node("mcl_cauldrons:cauldron", {
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Template function for cauldrons with water
|
-- Template function for cauldrons with water
|
||||||
local register_filled_cauldron = function(water_level, description, river_water)
|
local function register_filled_cauldron(water_level, description, liquid)
|
||||||
local id = "mcl_cauldrons:cauldron_"..water_level
|
local id = "mcl_cauldrons:cauldron_"..water_level
|
||||||
local water_tex
|
local water_tex
|
||||||
if river_water then
|
if liquid == "river_water" then
|
||||||
id = id .. "r"
|
id = id .. "r"
|
||||||
water_tex = "default_river_water_source_animated.png^[verticalframe:16:0"
|
water_tex = "default_river_water_source_animated.png^[verticalframe:16:0"
|
||||||
|
elseif liquid == "lava" then
|
||||||
|
id = id .. "_lava"
|
||||||
|
water_tex = "default_lava_source_animated.png^[verticalframe:16:0"
|
||||||
else
|
else
|
||||||
water_tex = "default_water_source_animated.png^[verticalframe:16:0"
|
water_tex = "default_water_source_animated.png^[verticalframe:16:0"
|
||||||
end
|
end
|
||||||
|
@ -85,8 +82,8 @@ local register_filled_cauldron = function(water_level, description, river_water)
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
groups = {pickaxey=1, not_in_creative_inventory=1, cauldron=(1+water_level), cauldron_filled=water_level, comparator_signal=water_level},
|
groups = {pickaxey=1, not_in_creative_inventory=1, cauldron=(1+water_level), cauldron_filled=water_level, comparator_signal=water_level},
|
||||||
node_box = cauldron_nodeboxes[water_level],
|
node_box = create_cauldron_nodebox(water_level),
|
||||||
collision_box = cauldron_nodeboxes[0],
|
collision_box = create_cauldron_nodebox(0),
|
||||||
selection_box = { type = "regular" },
|
selection_box = { type = "regular" },
|
||||||
tiles = {
|
tiles = {
|
||||||
"("..water_tex..")^mcl_cauldrons_cauldron_top.png",
|
"("..water_tex..")^mcl_cauldrons_cauldron_top.png",
|
||||||
|
@ -106,14 +103,12 @@ local register_filled_cauldron = function(water_level, description, river_water)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Filled cauldrons (3 levels)
|
-- Filled cauldrons (3 levels)
|
||||||
register_filled_cauldron(1, S("Cauldron (1/3 Water)"))
|
for i=1,3 do
|
||||||
register_filled_cauldron(2, S("Cauldron (2/3 Water)"))
|
register_filled_cauldron(i, S("Cauldron (" ..i .. "/3 Water)"))
|
||||||
register_filled_cauldron(3, S("Cauldron (3/3 Water)"))
|
register_filled_cauldron(i, S("Cauldron (" ..i .. "/3 Water)"),"lava")
|
||||||
|
if minetest.get_modpath("mclx_core") then
|
||||||
if minetest.get_modpath("mclx_core") then
|
register_filled_cauldron(i, S("Cauldron (" ..i .. "/3 Water)"),"river_water")
|
||||||
register_filled_cauldron(1, S("Cauldron (1/3 River Water)"), true)
|
end
|
||||||
register_filled_cauldron(2, S("Cauldron (2/3 River Water)"), true)
|
|
||||||
register_filled_cauldron(3, S("Cauldron (3/3 River Water)"), true)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -125,19 +120,36 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
local function cauldron_extinguish(obj,pos)
|
||||||
label = "cauldrons",
|
local node = minetest.get_node(pos)
|
||||||
nodenames = {"group:cauldron_filled"},
|
|
||||||
interval = 0.5,
|
|
||||||
chance = 1,
|
|
||||||
action = function(pos, node)
|
|
||||||
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.4)) do
|
|
||||||
if mcl_burning.is_burning(obj) then
|
if mcl_burning.is_burning(obj) then
|
||||||
mcl_burning.extinguish(obj)
|
mcl_burning.extinguish(obj)
|
||||||
local new_group = minetest.get_item_group(node.name, "cauldron_filled") - 1
|
local new_group = minetest.get_item_group(node.name, "cauldron_filled") - 1
|
||||||
minetest.swap_node(pos, {name = "mcl_cauldrons:cauldron" .. (new_group == 0 and "" or "_" .. new_group)})
|
minetest.swap_node(pos, {name = "mcl_cauldrons:cauldron" .. (new_group == 0 and "" or "_" .. new_group)})
|
||||||
break
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local etime = 0
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
etime = dtime + etime
|
||||||
|
if etime < 0.5 then return end
|
||||||
|
etime = 0
|
||||||
|
for _,pl in pairs(minetest.get_connected_players()) do
|
||||||
|
local n = minetest.find_node_near(pl:get_pos(),0.4,{"group:cauldron_filled"},true)
|
||||||
|
if n and not minetest.get_node(n).name:find("lava") then
|
||||||
|
cauldron_extinguish(pl,n)
|
||||||
|
elseif n and minetest.get_node(n).name:find("lava") then
|
||||||
|
mcl_burning.set_on_fire(pl, 5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for _,ent in pairs(minetest.luaentities) do
|
||||||
|
if ent.object:get_pos() and ent.is_mob then
|
||||||
|
local n = minetest.find_node_near(ent.object:get_pos(),0.4,{"group:cauldron_filled"},true)
|
||||||
|
if n and not minetest.get_node(n).name:find("lava") then
|
||||||
|
cauldron_extinguish(ent.object,n)
|
||||||
|
elseif n and minetest.get_node(n).name:find("lava") then
|
||||||
|
mcl_burning.set_on_fire(ent.object, 5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
end)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = mcl_cauldrons
|
name = mcl_cauldrons
|
||||||
depends = mcl_core, mcl_sounds
|
depends = mcl_core, mcl_sounds
|
||||||
optional_depends = mclx_core, doc
|
optional_depends = mclx_core, doc, mcl_burning
|
||||||
|
|
|
@ -189,6 +189,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
if string_find(stack:get_name(), "_lodestone") then
|
if string_find(stack:get_name(), "_lodestone") then
|
||||||
stack:set_name("mcl_compass:" .. compass_frame .. "_lodestone")
|
stack:set_name("mcl_compass:" .. compass_frame .. "_lodestone")
|
||||||
|
awards.unlock(player:get_player_name(), "mcl:countryLode")
|
||||||
else
|
else
|
||||||
stack:set_name("mcl_compass:" .. compass_frame)
|
stack:set_name("mcl_compass:" .. compass_frame)
|
||||||
end
|
end
|
||||||
|
@ -284,7 +285,7 @@ minetest.register_craft({
|
||||||
output = "mcl_compass:lodestone",
|
output = "mcl_compass:lodestone",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
|
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
|
||||||
{"mcl_core:stonebrickcarved", "mcl_core:diamondblock", "mcl_core:stonebrickcarved"},
|
{"mcl_core:stonebrickcarved", "mcl_nether:netherite_ingot", "mcl_core:stonebrickcarved"},
|
||||||
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
|
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -34,7 +34,7 @@ minetest.register_node("mcl_copper:block", {
|
||||||
groups = {pickaxey = 2, building_block = 1},
|
groups = {pickaxey = 2, building_block = 1},
|
||||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 3,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_copper:block_exposed", {
|
minetest.register_node("mcl_copper:block_exposed", {
|
||||||
|
|
|
@ -1698,3 +1698,68 @@ function mcl_core.after_snow_destruct(pos)
|
||||||
local node = minetest.get_node(npos)
|
local node = minetest.get_node(npos)
|
||||||
mcl_core.clear_snow_dirt(npos, node)
|
mcl_core.clear_snow_dirt(npos, node)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Obsidian crying
|
||||||
|
|
||||||
|
local crobby_psdef = {
|
||||||
|
amount = 1,
|
||||||
|
time = 0.9, --everything longer than 1 is a coord exploit
|
||||||
|
minvel = vector.new(0,-2,0),
|
||||||
|
maxvel = vector.new(0,-0.5,0),
|
||||||
|
minacc = vector.new(0,-10,0),
|
||||||
|
maxacc = vector.new(0,-8,0),
|
||||||
|
minexptime = 1,
|
||||||
|
maxexptime = 6,
|
||||||
|
minsize = 1.5,
|
||||||
|
maxsize = 2,
|
||||||
|
collisiondetection = true,
|
||||||
|
collision_removal = true,
|
||||||
|
object_collision = true,
|
||||||
|
vertical = true,
|
||||||
|
texture = "mcl_core_crying_obsidian_tear.png",
|
||||||
|
}
|
||||||
|
local crobby_psdef2 = {
|
||||||
|
amount = 1,
|
||||||
|
time = 0.9, --everything longer than 1 is a coord exploit
|
||||||
|
minvel = vector.new(0,-0.01,0),
|
||||||
|
maxvel = vector.new(0,-0.005,0),
|
||||||
|
minacc = vector.new(0,-0.1,0),
|
||||||
|
maxacc = vector.new(0,-0.01,0),
|
||||||
|
minexptime = 2,
|
||||||
|
maxexptime = 3,
|
||||||
|
minsize = 0.3,
|
||||||
|
maxsize = 0.6,
|
||||||
|
collisiondetection = true,
|
||||||
|
collision_removal = true,
|
||||||
|
object_collision = true,
|
||||||
|
vertical = true,
|
||||||
|
texture = "mcl_core_crying_obsidian_tear.png",
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Obsidian cries",
|
||||||
|
nodenames = {"mcl_core:crying_obsidian"},
|
||||||
|
interval = 5,
|
||||||
|
chance = 10,
|
||||||
|
action = function(pos, node)
|
||||||
|
minetest.after(math.random(0.1,1.5),function()
|
||||||
|
crobby_psdef.minpos = vector.offset(pos,-0.6,-0.51,-0.6)
|
||||||
|
crobby_psdef.maxpos = vector.offset(pos,0.6,0.51,0.6)
|
||||||
|
minetest.add_particlespawner(crobby_psdef)
|
||||||
|
crobby_psdef2.minpos = vector.offset(pos,-0.51,-0.51,-0.51)
|
||||||
|
crobby_psdef2.maxpos = vector.offset(pos,-0.5,0.51,-0.5)
|
||||||
|
minetest.add_particlespawner(crobby_psdef2)
|
||||||
|
crobby_psdef2.minpos = vector.offset(pos,0.51,-0.51,-0.51)
|
||||||
|
crobby_psdef2.maxpos = vector.offset(pos,0.5,0.51,-0.5)
|
||||||
|
minetest.add_particlespawner(crobby_psdef2)
|
||||||
|
crobby_psdef2.minpos = vector.offset(pos,0.51,-0.51,0.51)
|
||||||
|
crobby_psdef2.maxpos = vector.offset(pos,0.5,0.51,0.5)
|
||||||
|
minetest.add_particlespawner(crobby_psdef2)
|
||||||
|
crobby_psdef2.minpos = vector.offset(pos,-0.51,-0.51,0.51)
|
||||||
|
crobby_psdef2.maxpos = vector.offset(pos,-0.5,0.51,0.5)
|
||||||
|
minetest.add_particlespawner(crobby_psdef2)
|
||||||
|
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
|
@ -389,7 +389,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
|
||||||
return mcl_core.on_snowable_construct(pos)
|
return mcl_core.on_snowable_construct(pos)
|
||||||
end,
|
end,
|
||||||
_mcl_snowed = "mcl_core:dirt_with_grass_snow",
|
_mcl_snowed = "mcl_core:dirt_with_grass_snow",
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.6,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
|
@ -434,7 +434,7 @@ minetest.register_node("mcl_core:mycelium", {
|
||||||
|
|
||||||
on_construct = mcl_core.on_snowable_construct,
|
on_construct = mcl_core.on_snowable_construct,
|
||||||
_mcl_snowed = "mcl_core:mycelium_snow",
|
_mcl_snowed = "mcl_core:mycelium_snow",
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.6,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.6,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
|
@ -451,8 +451,8 @@ minetest.register_node("mcl_core:podzol", {
|
||||||
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
sounds = mcl_sounds.node_sound_dirt_defaults(),
|
||||||
on_construct = mcl_core.on_snowable_construct,
|
on_construct = mcl_core.on_snowable_construct,
|
||||||
_mcl_snowed = "mcl_core:podzol_snow",
|
_mcl_snowed = "mcl_core:podzol_snow",
|
||||||
_mcl_blast_resistance = 0.5,
|
_mcl_blast_resistance = 0.8,
|
||||||
_mcl_hardness = 0.6,
|
_mcl_hardness = 0.8,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow"))
|
mcl_core.register_snowed_node("mcl_core:podzol_snow", "mcl_core:podzol", nil, nil, false, S("Podzol with Snow"))
|
||||||
|
@ -556,8 +556,8 @@ minetest.register_node("mcl_core:sandstonesmooth", {
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
_mcl_blast_resistance = 0.8,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_core:sandstonecarved", {
|
minetest.register_node("mcl_core:sandstonecarved", {
|
||||||
|
@ -581,8 +581,8 @@ minetest.register_node("mcl_core:sandstonesmooth2", {
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
|
groups = {pickaxey=1, sandstone=1, normal_sandstone=1, building_block=1, material_stone=1},
|
||||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
_mcl_blast_resistance = 0.8,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 0.8,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- red sandstone --
|
-- red sandstone --
|
||||||
|
@ -775,7 +775,7 @@ minetest.register_node("mcl_core:goldblock", {
|
||||||
groups = {pickaxey=4, building_block=1},
|
groups = {pickaxey=4, building_block=1},
|
||||||
sounds = mcl_sounds.node_sound_metal_defaults(),
|
sounds = mcl_sounds.node_sound_metal_defaults(),
|
||||||
_mcl_blast_resistance = 6,
|
_mcl_blast_resistance = 6,
|
||||||
_mcl_hardness = 5,
|
_mcl_hardness = 3,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_core:diamondblock", {
|
minetest.register_node("mcl_core:diamondblock", {
|
||||||
|
@ -831,6 +831,19 @@ minetest.register_node("mcl_core:obsidian", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_core:crying_obsidian", {
|
||||||
|
description = S("Crying Obsidian"),
|
||||||
|
_doc_items_longdesc = S("Crying obsidian is a luminous obsidian that can generate as part of ruined portals."),
|
||||||
|
tiles = {"default_obsidian.png^mcl_core_crying_obsidian.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
light_source = 10,
|
||||||
|
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||||
|
stack_max = 64,
|
||||||
|
groups = {pickaxey=5, building_block=1, material_stone=1},
|
||||||
|
_mcl_blast_resistance = 1200,
|
||||||
|
_mcl_hardness = 50,
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node("mcl_core:ice", {
|
minetest.register_node("mcl_core:ice", {
|
||||||
description = S("Ice"),
|
description = S("Ice"),
|
||||||
_doc_items_longdesc = S("Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source."),
|
_doc_items_longdesc = S("Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source."),
|
||||||
|
@ -1062,8 +1075,8 @@ minetest.register_node("mcl_core:snowblock", {
|
||||||
on_construct = mcl_core.on_snow_construct,
|
on_construct = mcl_core.on_snow_construct,
|
||||||
after_destruct = mcl_core.after_snow_destruct,
|
after_destruct = mcl_core.after_snow_destruct,
|
||||||
drop = "mcl_throwing:snowball 4",
|
drop = "mcl_throwing:snowball 4",
|
||||||
_mcl_blast_resistance = 0.2,
|
_mcl_blast_resistance = 0.1,
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.1,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
After Width: | Height: | Size: 250 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 86 B |
After Width: | Height: | Size: 83 B |
|
@ -0,0 +1,485 @@
|
||||||
|
local modname = minetest.get_current_modname()
|
||||||
|
local S = minetest.get_translator(modname)
|
||||||
|
local modpath = minetest.get_modpath(modname)
|
||||||
|
-- Warped and Crimson fungus
|
||||||
|
-- by debiankaios
|
||||||
|
-- adapted for mcl2 by cora
|
||||||
|
|
||||||
|
local function generate_warped_tree(pos)
|
||||||
|
minetest.place_schematic(pos,modpath.."/schematics/warped_fungus_1.mts","random",nil,false,"place_center_x,place_center_z")
|
||||||
|
end
|
||||||
|
|
||||||
|
function generate_crimson_tree(pos)
|
||||||
|
minetest.place_schematic(pos,modpath.."/schematics/crimson_fungus_1.mts","random",nil,false,"place_center_x,place_center_z")
|
||||||
|
end
|
||||||
|
|
||||||
|
function grow_twisting_vines(pos, moreontop)
|
||||||
|
local y = pos.y + 1
|
||||||
|
while not (moreontop == 0) do
|
||||||
|
if minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "air" then
|
||||||
|
minetest.set_node({x = pos.x, y = y, z = pos.z}, {name="mcl_crimson:twisting_vines"})
|
||||||
|
moreontop = moreontop - 1
|
||||||
|
y = y + 1
|
||||||
|
elseif minetest.get_node({x = pos.x, y = y, z = pos.z}).name == "mcl_crimson:twisting_vines" then
|
||||||
|
y = y + 1
|
||||||
|
else
|
||||||
|
moreontop = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_fungus", {
|
||||||
|
description = S("Warped Fungus Mushroom"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = { "farming_warped_fungus.png" },
|
||||||
|
inventory_image = "farming_warped_fungus.png",
|
||||||
|
wield_image = "farming_warped_fungus.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
|
||||||
|
light_source = 1,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -3/16, -0.5, -3/16, 3/16, -2/16, 3/16 },
|
||||||
|
},
|
||||||
|
node_placement_prediction = "",
|
||||||
|
on_rightclick = function(pos, node, pointed_thing, player, itemstack)
|
||||||
|
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
|
||||||
|
local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||||
|
if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
|
||||||
|
local random = math.random(1, 5)
|
||||||
|
if random == 1 then
|
||||||
|
generate_warped_tree(pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
_mcl_blast_resistance = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:twisting_vines", {
|
||||||
|
description = S("Twisting Vines"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = { "twisting_vines_plant.png" },
|
||||||
|
inventory_image = "twisting_vines.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
climbable = true,
|
||||||
|
buildable_to = true,
|
||||||
|
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -3/16, -0.5, -3/16, 3/16, 0.5, 3/16 },
|
||||||
|
},
|
||||||
|
node_placement_prediction = "",
|
||||||
|
on_rightclick = function(pos, node, pointed_thing, itemstack)
|
||||||
|
if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then
|
||||||
|
itemstack:take_item()
|
||||||
|
grow_twisting_vines(pos, 1)
|
||||||
|
elseif pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
|
||||||
|
itemstack:take_item()
|
||||||
|
grow_twisting_vines(pos, math.random(1, 3))
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
drop = {
|
||||||
|
max_items = 1,
|
||||||
|
items = {
|
||||||
|
{items = {"mcl_crimson:twisting_vines"}, rarity = 3},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
_mcl_shears_drop = true,
|
||||||
|
_mcl_silk_touch_drop = true,
|
||||||
|
_mcl_fortune_drop = {
|
||||||
|
items = {
|
||||||
|
{items = {"mcl_crimson:twisting_vines"}, rarity = 3},
|
||||||
|
},
|
||||||
|
items = {
|
||||||
|
{items = {"mcl_crimson:twisting_vines"}, rarity = 1.8181818181818181},
|
||||||
|
},
|
||||||
|
"mcl_crimson:twisting_vines",
|
||||||
|
"mcl_crimson:twisting_vines",
|
||||||
|
},
|
||||||
|
_mcl_blast_resistance = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:nether_sprouts", {
|
||||||
|
description = S("Nether Sprouts"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = { "nether_sprouts.png" },
|
||||||
|
inventory_image = "nether_sprouts.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -4/16, -0.5, -4/16, 4/16, 0, 4/16 },
|
||||||
|
},
|
||||||
|
node_placement_prediction = "",
|
||||||
|
drop = "",
|
||||||
|
_mcl_shears_drop = true,
|
||||||
|
_mcl_silk_touch_drop = false,
|
||||||
|
_mcl_blast_resistance = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_roots", {
|
||||||
|
description = S("Warped Roots"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = { "warped_roots.png" },
|
||||||
|
inventory_image = "warped_roots.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -6/16, -0.5, -6/16, 6/16, -4/16, 6/16 },
|
||||||
|
},
|
||||||
|
node_placement_prediction = "",
|
||||||
|
_mcl_silk_touch_drop = false,
|
||||||
|
_mcl_blast_resistance = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_wart_block", {
|
||||||
|
description = S("Warped Wart Block"),
|
||||||
|
tiles = {"warped_wart_block.png"},
|
||||||
|
groups = {handy = 1, hoe = 7, swordy = 1, deco_block = 1},
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:shroomlight", {
|
||||||
|
description = S("Shroomlight"),
|
||||||
|
tiles = {"shroomlight.png"},
|
||||||
|
groups = {handy = 1, hoe = 7, swordy = 1, leafdecay = 5, leaves = 1, deco_block = 1},
|
||||||
|
light_source = minetest.LIGHT_MAX,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_hyphae", {
|
||||||
|
description = S("Warped Hyphae"),
|
||||||
|
_doc_items_longdesc = S("The stem of a warped hyphae"),
|
||||||
|
_doc_items_hidden = false,
|
||||||
|
tiles = {
|
||||||
|
"warped_hyphae.png",
|
||||||
|
"warped_hyphae.png",
|
||||||
|
"warped_hyphae_side.png",
|
||||||
|
"warped_hyphae_side.png",
|
||||||
|
"warped_hyphae_side.png",
|
||||||
|
"warped_hyphae_side.png",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
_mcl_stripped_variant = "mcl_crimson:stripped_warped_hyphae",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_nylium", {
|
||||||
|
description = S("Warped Nylium"),
|
||||||
|
tiles = {
|
||||||
|
"warped_nylium.png",
|
||||||
|
"mcl_nether_netherrack.png",
|
||||||
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
|
"mcl_nether_netherrack.png^warped_nylium_side.png",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = true,
|
||||||
|
drop = "mcl_nether:netherrack",
|
||||||
|
groups = {pickaxey=1, building_block=1, material_stone=1},
|
||||||
|
_mcl_hardness = 0.4,
|
||||||
|
_mcl_blast_resistance = 0.4,
|
||||||
|
_mcl_silk_touch_drop = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
--Stem bark, stripped stem and bark
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_hyphae_bark", {
|
||||||
|
description = S("Warped Hyphae Bark"),
|
||||||
|
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."),
|
||||||
|
tiles = {"warped_hyphae_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
is_ground_content = false,
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
_mcl_stripped_variant = "mcl_crimson:stripped_warped_hyphae_bark",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:warped_hyphae_bark 3",
|
||||||
|
recipe = {
|
||||||
|
{ "mcl_crimson:warped_hyphae", "mcl_crimson:warped_hyphae" },
|
||||||
|
{ "mcl_crimson:warped_hyphae", "mcl_crimson:warped_hyphae" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:stripped_warped_hyphae", {
|
||||||
|
description = S("Stripped warped hyphae"),
|
||||||
|
_doc_items_longdesc = S("The stripped hyphae of a warped fungus"),
|
||||||
|
_doc_items_hidden = false,
|
||||||
|
tiles = {"warped_stem_stripped_top.png", "warped_stem_stripped_top.png", "warped_stem_stripped_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:stripped_warped_hyphae_bark", {
|
||||||
|
description = S("Stripped warped hyphae bark"),
|
||||||
|
_doc_items_longdesc = S("The stripped hyphae bark of a warped fungus"),
|
||||||
|
tiles = {"crimson_stem_stripped_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
is_ground_content = false,
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:stripped_warped_hyphae_bark 3",
|
||||||
|
recipe = {
|
||||||
|
{ "mcl_crimson:stripped_warped_hyphae", "mcl_crimson:stripped_warped_hyphae" },
|
||||||
|
{ "mcl_crimson:stripped_warped_hyphae", "mcl_crimson:stripped_warped_hyphae" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:warped_hyphae_wood", {
|
||||||
|
description = S("Warped Hyphae Wood"),
|
||||||
|
tiles = {"warped_hyphae_wood.png"},
|
||||||
|
groups = {handy = 5,axey = 1, flammable = 3, wood=1,building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
mcl_stairs.register_stair_and_slab_simple("warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", S("Warped Stair"), S("Warped Slab"), S("Double Warped Slab"))
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:warped_hyphae_wood 4",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_crimson:warped_hyphae"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:warped_nylium 2",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_crimson:warped_wart_block"},
|
||||||
|
{"mcl_nether:netherrack"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "mcl_crimson:warped_fungus",
|
||||||
|
nodenames = {"mcl_crimson:warped_fungus"},
|
||||||
|
interval = 11,
|
||||||
|
chance = 128,
|
||||||
|
action = function(pos)
|
||||||
|
local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
|
||||||
|
if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then
|
||||||
|
if pos.y < -28400 then
|
||||||
|
generate_warped_tree(pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:crimson_fungus", {
|
||||||
|
description = S("Crimson Fungus Mushroom"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = { "farming_crimson_fungus.png" },
|
||||||
|
inventory_image = "farming_crimson_fungus.png",
|
||||||
|
wield_image = "farming_crimson_fungus.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
|
||||||
|
light_source = 1,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -3/16, -0.5, -3/16, 3/16, -2/16, 3/16 },
|
||||||
|
},
|
||||||
|
node_placement_prediction = "",
|
||||||
|
on_rightclick = function(pos, node, pointed_thing, player)
|
||||||
|
if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then
|
||||||
|
local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
|
||||||
|
if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
|
||||||
|
local random = math.random(1, 5)
|
||||||
|
if random == 1 then
|
||||||
|
generate_crimson_tree(pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
_mcl_blast_resistance = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:crimson_roots", {
|
||||||
|
description = S("Crimson Roots"),
|
||||||
|
drawtype = "plantlike",
|
||||||
|
tiles = { "crimson_roots.png" },
|
||||||
|
inventory_image = "crimson_roots.png",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
paramtype = "light",
|
||||||
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
|
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = { -6/16, -0.5, -6/16, 6/16, -4/16, 6/16 },
|
||||||
|
},
|
||||||
|
node_placement_prediction = "",
|
||||||
|
_mcl_silk_touch_drop = false,
|
||||||
|
_mcl_blast_resistance = 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:crimson_hyphae", {
|
||||||
|
description = S("Crimson Hyphae"),
|
||||||
|
_doc_items_longdesc = S("The stem of a crimson hyphae"),
|
||||||
|
_doc_items_hidden = false,
|
||||||
|
tiles = {
|
||||||
|
"crimson_hyphae.png",
|
||||||
|
"crimson_hyphae.png",
|
||||||
|
"crimson_hyphae_side.png",
|
||||||
|
"crimson_hyphae_side.png",
|
||||||
|
"crimson_hyphae_side.png",
|
||||||
|
"crimson_hyphae_side.png",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
_mcl_stripped_variant = "mcl_crimson:stripped_crimson_hyphae",
|
||||||
|
})
|
||||||
|
|
||||||
|
--Stem bark, stripped stem and bark
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:crimson_hyphae_bark", {
|
||||||
|
description = S("Crimson Hyphae Bark"),
|
||||||
|
_doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."),
|
||||||
|
tiles = {"crimson_hyphae_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
is_ground_content = false,
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
_mcl_stripped_variant = "mcl_crimson:stripped_crimson_hyphae_bark",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:crimson_hyphae_bark 3",
|
||||||
|
recipe = {
|
||||||
|
{ "mcl_crimson:crimson_hyphae", "mcl_crimson:crimson_hyphae" },
|
||||||
|
{ "mcl_crimson:crimson_hyphae", "mcl_crimson:crimson_hyphae" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:stripped_crimson_hyphae", {
|
||||||
|
description = S("Stripped Crimson Hyphae"),
|
||||||
|
_doc_items_longdesc = S("The stripped stem of a crimson hyphae"),
|
||||||
|
_doc_items_hidden = false,
|
||||||
|
tiles = {"crimson_stem_stripped_top.png", "crimson_stem_stripped_top.png", "crimson_stem_stripped_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, tree = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:stripped_crimson_hyphae_bark", {
|
||||||
|
description = S("Stripped Crimson Hyphae Bark"),
|
||||||
|
_doc_items_longdesc = S("The stripped wood of a crimson hyphae"),
|
||||||
|
tiles = {"crimson_stem_stripped_side.png"},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
on_place = mcl_util.rotate_axis,
|
||||||
|
groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1},
|
||||||
|
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||||
|
is_ground_content = false,
|
||||||
|
_mcl_blast_resistance = 2,
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:stripped_crimson_hyphae_bark 3",
|
||||||
|
recipe = {
|
||||||
|
{ "mcl_crimson:stripped_crimson_hyphae", "mcl_crimson:stripped_crimson_hyphae" },
|
||||||
|
{ "mcl_crimson:stripped_crimson_hyphae", "mcl_crimson:stripped_crimson_hyphae" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:crimson_hyphae_wood", {
|
||||||
|
description = S("Crimson Hyphae Wood"),
|
||||||
|
tiles = {"crimson_hyphae_wood.png"},
|
||||||
|
groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
_mcl_hardness = 2,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("mcl_crimson:crimson_nylium", {
|
||||||
|
description = S("Crimson Nylium"),
|
||||||
|
tiles = {
|
||||||
|
"crimson_nylium.png",
|
||||||
|
"mcl_nether_netherrack.png",
|
||||||
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
|
"mcl_nether_netherrack.png^crimson_nylium_side.png",
|
||||||
|
},
|
||||||
|
groups = {pickaxey = 1, building_block = 1, material_stone = 1},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = true,
|
||||||
|
drop = "mcl_nether:netherrack",
|
||||||
|
_mcl_hardness = 0.4,
|
||||||
|
_mcl_blast_resistance = 0.4,
|
||||||
|
_mcl_silk_touch_drop = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:crimson_hyphae_wood 4",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_crimson:crimson_hyphae"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mcl_crimson:crimson_nylium 2",
|
||||||
|
recipe = {
|
||||||
|
{"mcl_nether:nether_wart"},
|
||||||
|
{"mcl_nether:netherrack"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
mcl_stairs.register_stair_and_slab_simple("crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "Crimson Stair", "Crimson Slab", "Double Crimson Slab")
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "mcl_crimson:crimson_fungus",
|
||||||
|
nodenames = {"mcl_crimson:crimson_fungus"},
|
||||||
|
interval = 11,
|
||||||
|
chance = 128,
|
||||||
|
action = function(pos)
|
||||||
|
local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0))
|
||||||
|
if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then
|
||||||
|
if pos.y < -28400 then
|
||||||
|
generate_crimson_tree(pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
|
@ -0,0 +1,24 @@
|
||||||
|
# textdomain: mcl_crimson
|
||||||
|
|
||||||
|
Warped Fungus Mushroom=Wirrpilz
|
||||||
|
Twisting Vines=Zwirbelranken
|
||||||
|
Nether Sprouts=Nethersprossen
|
||||||
|
Warped Roots=Wirrwurzeln
|
||||||
|
Warped Wart Block=Wirrwarzenblock
|
||||||
|
Shroomlight=Pilzlicht
|
||||||
|
Warped Hyphae=Wirrhyphe
|
||||||
|
Warped Nylium=Wirr-Nezel
|
||||||
|
Warped Checknode - only to check!=Wirr Checkblock - Nur zum checken!
|
||||||
|
Warped Hyphae Wood=Wirrhyphen Holz
|
||||||
|
Warped Stair=Wirrtreppe
|
||||||
|
Warped Slab=Wirrstufe
|
||||||
|
Double Warped Slab=Doppelte Wirrstufe
|
||||||
|
Crimson Fungus Mushroom=Karmesinpilz
|
||||||
|
Crimson Roots=Karmesinwurzeln
|
||||||
|
Crimson Hyphae=Karmesinhyphe
|
||||||
|
Crimson Hyphae Wood=Karmesinhyphenholz
|
||||||
|
Crimson Stair=Karmesintreppe
|
||||||
|
Crimson Slab=Karmesinstufe
|
||||||
|
Double Crimson Slab=Doppelte Karmesinstufe
|
||||||
|
Crimson Nylium=Karmesin-Nezel
|
||||||
|
Crimson Checknode - only to check!=Karmesin Checkblock - Nur zum checken!
|
|
@ -0,0 +1,23 @@
|
||||||
|
# textdomain: mcl_crimson
|
||||||
|
|
||||||
|
Warped Fungus Mushroom=Champignon tordu
|
||||||
|
Twisting Vines=Liane tordue
|
||||||
|
Nether Sprouts=Racines du nether
|
||||||
|
Warped Roots=Racines tordues
|
||||||
|
Warped Wart Block=Bloc de verrues tordu
|
||||||
|
Shroomlight=Champilampe
|
||||||
|
Warped Hyphae=Tige tordue
|
||||||
|
Warped Nylium=Nylium tordu
|
||||||
|
Warped Checknode - only to check!=Bloc de vérification tordu - seulement pour vérifier !
|
||||||
|
Warped Hyphae Wood=Planches tordues
|
||||||
|
Warped Stair=Escalier tordu
|
||||||
|
Warped Slab=Dalle tordue
|
||||||
|
Crimson Fungus Mushroom=Champignon écarlate
|
||||||
|
Crimson Roots=Racines écarlates
|
||||||
|
Crimson Hyphae=Tige écarlate
|
||||||
|
Crimson Hyphae Wood=Planches écarlates
|
||||||
|
Crimson Stair=Escalier écarlate
|
||||||
|
Crimson Slab=Dalle écarlate
|
||||||
|
Double Crimson Slab=Dalle double écarlate
|
||||||
|
Crimson Nylium=Nylium écarlate
|
||||||
|
Crimson Checknode - only to check!=Bloc de vérification écarlate - seulement pour vérifier !
|