Compare commits
76 Commits
Author | SHA1 | Date |
---|---|---|
cora | e80ce4b758 | |
cora | 51e43f7efc | |
cora | dc0ca59534 | |
FossFanatic | e35e949833 | |
cora | 0b0a48fd10 | |
cora | 1b6df20c0c | |
epCode | 8930f9da45 | |
epCode | aa2693795d | |
talamh | 23ec60fff0 | |
cora | fec0dae4ca | |
epCode | 8cd093afa9 | |
epCode | 9cf5b2a9f6 | |
epCode | 8a63e90e4a | |
epCode | a16e8f0403 | |
epCode | 090c5b086a | |
epCode | c500dc98f9 | |
epCode | 4a086db4c5 | |
epCode | ef980f2ea0 | |
cora | 0c21abf28a | |
PrairieWind | 78f1a81d1f | |
PrairieWind | 0a33c5b5df | |
PrairieWind | f9f74d2af7 | |
cora | d43494e3b7 | |
cora | 2a9d704293 | |
cora | e294466029 | |
cora | a1919b572a | |
cora | 24c03c2d32 | |
cora | 2fa2f7cbf9 | |
cora | aea899a569 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 36427d5aef | |
cora | 3e9cb597e6 | |
cora | ba6dfc7368 | |
cora | 52ac8ffd43 | |
cora | 3686d9a79d | |
AFCMS | d71d1c4b82 | |
cora | 0c4edbc4ac | |
AFCMS | 5719637ee7 | |
cora | 3aaf0f3e29 | |
epCode | 3a34773671 | |
epCode | 5a14f385a0 | |
epCode | 029638029d | |
epCode | 1d06ac5774 | |
epCode | 9a338a0eea | |
epCode | 30c77a3517 | |
epCode | 25cceb58a9 | |
epCode | 8b3087c1d3 | |
epCode | 690d97bc63 | |
epCode | 683d973d9f | |
epCode | 99350d4dc8 | |
epCode | bc0d5de1e2 | |
epCode | 5f46f9649a | |
epCode | c72b1fb9db | |
cora | 609f90dd0a | |
cora | 68d04bc4e8 | |
epCode | 1a6698abda | |
cora | 8893241ae9 | |
MysticTempest | 3eb2125538 | |
chmodsayshello | a1bb8812b1 | |
cora | 3b92a5b0d2 | |
talamh | ecd1162c2d | |
cora | 5b3b686452 | |
cora | b3c34bd081 | |
cora | d202db00b7 | |
cora | 8d8d49c87d | |
cora | 7cabdb1707 | |
cora | 9602b564c4 | |
cora | 8fbb545a70 | |
cora | bf74e75ee5 | |
cora | 5a977b5b76 | |
epCode | 5507f62142 | |
epCode | 99cc6cf307 | |
epCode | ba383091ad | |
epCode | b4f2cb61d3 | |
cora | 9107bfa62d | |
cora | d570a2dda6 | |
talamh | b4859b8e7c |
After Width: | Height: | Size: 144 B |
|
@ -610,3 +610,95 @@ function mcl_util.get_pointed_thing(player, liquid)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- This following part is 2 wrapper functions + helpers for
|
||||||
|
-- object:set_bones
|
||||||
|
-- and player:set_properties preventing them from being resent on
|
||||||
|
-- every globalstep when they have not changed.
|
||||||
|
|
||||||
|
local function roundN(n, d)
|
||||||
|
if type(n) ~= "number" then return n end
|
||||||
|
local m = 10^d
|
||||||
|
return math.floor(n * m + 0.5) / m
|
||||||
|
end
|
||||||
|
|
||||||
|
local function close_enough(a,b)
|
||||||
|
local rt=true
|
||||||
|
if type(a) == "table" and type(b) == "table" then
|
||||||
|
for k,v in pairs(a) do
|
||||||
|
if roundN(v,2) ~= roundN(b[k],2) then
|
||||||
|
rt=false
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
rt = roundN(a,2) == roundN(b,2)
|
||||||
|
end
|
||||||
|
return rt
|
||||||
|
end
|
||||||
|
|
||||||
|
local function props_changed(props,oldprops)
|
||||||
|
local changed=false
|
||||||
|
local p={}
|
||||||
|
for k,v in pairs(props) do
|
||||||
|
if not close_enough(v,oldprops[k]) then
|
||||||
|
p[k]=v
|
||||||
|
changed=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return changed,p
|
||||||
|
end
|
||||||
|
|
||||||
|
--tests for roundN
|
||||||
|
local test_round1=15
|
||||||
|
local test_round2=15.00199999999
|
||||||
|
local test_round3=15.00111111
|
||||||
|
local test_round4=15.00999999
|
||||||
|
|
||||||
|
assert(roundN(test_round1,2)==roundN(test_round1,2))
|
||||||
|
assert(roundN(test_round1,2)==roundN(test_round2,2))
|
||||||
|
assert(roundN(test_round1,2)==roundN(test_round3,2))
|
||||||
|
assert(roundN(test_round1,2)~=roundN(test_round4,2))
|
||||||
|
|
||||||
|
-- tests for close_enough
|
||||||
|
local test_cb = {-0.35,0,-0.35,0.35,0.8,0.35} --collisionboxes
|
||||||
|
local test_cb_close = {-0.351213,0,-0.35,0.35,0.8,0.351212}
|
||||||
|
local test_cb_diff = {-0.35,0,-1.35,0.35,0.8,0.35}
|
||||||
|
|
||||||
|
local test_eh = 1.65 --eye height
|
||||||
|
local test_eh_close = 1.65123123
|
||||||
|
local test_eh_diff = 1.35
|
||||||
|
|
||||||
|
local test_nt = { r = 225, b = 225, a = 225, g = 225 } --nametag
|
||||||
|
local test_nt_diff = { r = 225, b = 225, a = 0, g = 225 }
|
||||||
|
|
||||||
|
assert(close_enough(test_cb,test_cb_close))
|
||||||
|
assert(not close_enough(test_cb,test_cb_diff))
|
||||||
|
assert(close_enough(test_eh,test_eh_close))
|
||||||
|
assert(not close_enough(test_eh,test_eh_diff))
|
||||||
|
assert(not close_enough(test_nt,test_nt_diff)) --no floats involved here
|
||||||
|
|
||||||
|
--tests for properties_changed
|
||||||
|
local test_properties_set1={collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 0.65, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}
|
||||||
|
local test_properties_set2={collisionbox = {-0.35,0,-0.35,0.35,0.8,0.35}, eye_height = 1.35, nametag_color = { r = 225, b = 225, a = 225, g = 225 }}
|
||||||
|
|
||||||
|
local test_p1,_=props_changed(test_properties_set1,test_properties_set1)
|
||||||
|
local test_p2,_=props_changed(test_properties_set1,test_properties_set2)
|
||||||
|
|
||||||
|
assert(not test_p1)
|
||||||
|
assert(test_p2)
|
||||||
|
|
||||||
|
function mcl_util.set_properties(obj,props)
|
||||||
|
local changed,p=props_changed(props,obj:get_properties())
|
||||||
|
if changed then
|
||||||
|
obj:set_properties(p)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function mcl_util.set_bone_position(obj,b,p,r) --bone,position,rotation
|
||||||
|
local oldp,oldr=obj:get_bone_position(b)
|
||||||
|
if vector.equals(vector.round(oldp),vector.round(p)) and vector.equals(vector.round(oldr),vector.round(r)) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
obj:set_bone_position(b,p,r)
|
||||||
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
local enable_damage = minetest.settings:get_bool("enable_damage")
|
||||||
|
|
||||||
function mcl_burning.get_storage(obj)
|
function mcl_burning.get_storage(obj)
|
||||||
return obj:is_player() and mcl_burning.storage[obj] or obj:get_luaentity()
|
return obj:is_player() and mcl_burning.storage[obj] or obj:get_luaentity()
|
||||||
end
|
end
|
||||||
|
@ -77,7 +79,7 @@ end
|
||||||
-- The effective burn duration is modified by obj's armor protection.
|
-- The effective burn duration is modified by obj's armor protection.
|
||||||
-- If obj was already burning, its burn duration is updated if the current
|
-- If obj was already burning, its burn duration is updated if the current
|
||||||
-- duration is less than burn_time.
|
-- duration is less than burn_time.
|
||||||
-- If obj is dead, fireproof or a creative player, this function does nothing.
|
-- If obj is dead, fireproof or enable_damage is disabled, this function does nothing.
|
||||||
--
|
--
|
||||||
function mcl_burning.set_on_fire(obj, burn_time)
|
function mcl_burning.set_on_fire(obj, burn_time)
|
||||||
if obj:get_hp() < 0 then
|
if obj:get_hp() < 0 then
|
||||||
|
@ -89,8 +91,9 @@ function mcl_burning.set_on_fire(obj, burn_time)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if obj:is_player() and minetest.is_creative_enabled(obj:get_player_name()) then
|
if obj:is_player() and not enable_damage then
|
||||||
burn_time = 0
|
burn_time = 0
|
||||||
|
return
|
||||||
else
|
else
|
||||||
local max_fire_prot_lvl = 0
|
local max_fire_prot_lvl = 0
|
||||||
local inv = mcl_util.get_inventory(obj)
|
local inv = mcl_util.get_inventory(obj)
|
||||||
|
|
|
@ -5,7 +5,9 @@ Inventories for your entities. It's simple. Depend on mcl_entity_invs and regist
|
||||||
|
|
||||||
* mcl_entity_invs.register_inv("entity:name","Title shown in formspec",inventory_size,disable_on_righclick)
|
* mcl_entity_invs.register_inv("entity:name","Title shown in formspec",inventory_size,disable_on_righclick)
|
||||||
*If disable_on_righclick is true other mods can handle when to show the inventory themselves
|
*If disable_on_righclick is true other mods can handle when to show the inventory themselves
|
||||||
|
* The inventory size can be set dynamically by initializing it with an explicit nil
|
||||||
|
|
||||||
* mcl_entity_invs.show_inv_form(entity,clicker,"Title shown in formspec")
|
* mcl_entity_invs.show_inv_form(entity,clicker,[formspec text])
|
||||||
|
* formspec_text is an additional text that is put after the title
|
||||||
|
|
||||||
It works by setting up a detached inventory per entity which is accessed by an id/hash generated from the entities position at creation, the progressed gametime at creation and a random salt.
|
It works by setting up a detached inventory per entity which is accessed by an id/hash generated from the entities position at creation, the progressed gametime at creation and a random salt.
|
||||||
|
|
|
@ -46,11 +46,12 @@ local function save_inv(ent)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_entity_invs.show_inv_form(ent,player,show_name)
|
function mcl_entity_invs.show_inv_form(ent,player,text)
|
||||||
if not ent._inv_id then return end
|
if not ent._inv_id then return end
|
||||||
if not open_invs[ent] then
|
if not open_invs[ent] then
|
||||||
open_invs[ent] = 0
|
open_invs[ent] = 0
|
||||||
end
|
end
|
||||||
|
text = text or ""
|
||||||
ent._inv = load_inv(ent,ent._inv_size)
|
ent._inv = load_inv(ent,ent._inv_size)
|
||||||
open_invs[ent] = open_invs[ent] + 1
|
open_invs[ent] = open_invs[ent] + 1
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
|
@ -59,7 +60,7 @@ function mcl_entity_invs.show_inv_form(ent,player,show_name)
|
||||||
local spacing = (9 - cols) / 2
|
local spacing = (9 - cols) / 2
|
||||||
local formspec = "size[9,8.75]"
|
local formspec = "size[9,8.75]"
|
||||||
.. "label[0,0;" .. minetest.formspec_escape(
|
.. "label[0,0;" .. minetest.formspec_escape(
|
||||||
minetest.colorize("#313131", show_name)) .. "]"
|
minetest.colorize("#313131", ent._inv_title .. " ".. text)) .. "]"
|
||||||
.. "list[detached:"..ent._inv_id..";main;"..spacing..",0.5;"..cols..","..rows..";]"
|
.. "list[detached:"..ent._inv_id..";main;"..spacing..",0.5;"..cols..","..rows..";]"
|
||||||
.. mcl_formspec.get_itemslot_bg(spacing,0.5,cols,rows)
|
.. mcl_formspec.get_itemslot_bg(spacing,0.5,cols,rows)
|
||||||
.. "label[0,4.0;" .. minetest.formspec_escape(
|
.. "label[0,4.0;" .. minetest.formspec_escape(
|
||||||
|
@ -80,6 +81,7 @@ local function drop_inv(ent)
|
||||||
local p = vector.add(pos,vector.new(math.random() - 0.5, math.random()-0.5, math.random()-0.5))
|
local p = vector.add(pos,vector.new(math.random() - 0.5, math.random()-0.5, math.random()-0.5))
|
||||||
minetest.add_item(p,it)
|
minetest.add_item(p,it)
|
||||||
end
|
end
|
||||||
|
ent._items = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_remove(self,killer,oldf)
|
local function on_remove(self,killer,oldf)
|
||||||
|
@ -103,6 +105,7 @@ end)
|
||||||
function mcl_entity_invs.register_inv(entity_name,show_name,size,no_on_righclick)
|
function mcl_entity_invs.register_inv(entity_name,show_name,size,no_on_righclick)
|
||||||
assert(minetest.registered_entities[entity_name],"mcl_entity_invs.register_inv called with invalid entity: "..tostring(entity_name))
|
assert(minetest.registered_entities[entity_name],"mcl_entity_invs.register_inv called with invalid entity: "..tostring(entity_name))
|
||||||
minetest.registered_entities[entity_name]._inv_size = size
|
minetest.registered_entities[entity_name]._inv_size = size
|
||||||
|
minetest.registered_entities[entity_name]._inv_title = show_name
|
||||||
|
|
||||||
local old_oa = minetest.registered_entities[entity_name].on_activate
|
local old_oa = minetest.registered_entities[entity_name].on_activate
|
||||||
minetest.registered_entities[entity_name].on_activate = function(self,staticdata,dtime_s)
|
minetest.registered_entities[entity_name].on_activate = function(self,staticdata,dtime_s)
|
||||||
|
|
|
@ -16,6 +16,29 @@ local CRAMMING_DAMAGE = 3
|
||||||
-- Localize
|
-- Localize
|
||||||
local S = minetest.get_translator("mcl_mobs")
|
local S = minetest.get_translator("mcl_mobs")
|
||||||
|
|
||||||
|
local function shortest_term_of_yaw_rotatoin(self, rot_origin, rot_target, nums)
|
||||||
|
|
||||||
|
if not rot_origin or not rot_target then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
rot_origin = math.deg(rot_origin)
|
||||||
|
rot_target = math.deg(rot_target)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if math.abs(rot_target - rot_origin) < 180 then
|
||||||
|
return rot_target - rot_origin
|
||||||
|
else
|
||||||
|
if (rot_target - rot_origin) > 0 then
|
||||||
|
return 360-(rot_target - rot_origin)
|
||||||
|
else
|
||||||
|
return (rot_target - rot_origin)+360
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Invisibility mod check
|
-- Invisibility mod check
|
||||||
mcl_mobs.invis = {}
|
mcl_mobs.invis = {}
|
||||||
|
|
||||||
|
@ -61,6 +84,13 @@ if minetest.settings:get_bool("only_peaceful_mobs", false) then
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function dir_to_pitch(dir)
|
||||||
|
--local dir2 = vector.normalize(dir)
|
||||||
|
local xz = math.abs(dir.x) + math.abs(dir.z)
|
||||||
|
return -math.atan2(-dir.y, xz)
|
||||||
|
end
|
||||||
|
|
||||||
-- pathfinding settings
|
-- pathfinding settings
|
||||||
local enable_pathfinding = true
|
local enable_pathfinding = true
|
||||||
local stuck_timeout = 3 -- how long before mob gets stuck in place and starts searching
|
local stuck_timeout = 3 -- how long before mob gets stuck in place and starts searching
|
||||||
|
@ -302,25 +332,57 @@ local function update_roll(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set and return valid yaw
|
-- set and return valid yaw
|
||||||
|
|
||||||
|
|
||||||
local set_yaw = function(self, yaw, delay, dtime)
|
local set_yaw = function(self, yaw, delay, dtime)
|
||||||
|
|
||||||
|
|
||||||
if self.noyaw then return end
|
if self.noyaw then return end
|
||||||
if true then
|
|
||||||
self.object:set_yaw(yaw)
|
if self._kb_turn then
|
||||||
return yaw
|
self._turn_to = yaw
|
||||||
|
end
|
||||||
|
--clamp our yaw to a 360 range
|
||||||
|
if math.deg(self.object:get_yaw()) > 360 then
|
||||||
|
self.object:set_yaw(math.rad(10))
|
||||||
|
elseif math.deg(self.object:get_yaw()) < 0 then
|
||||||
|
self.object:set_yaw(math.rad(350))
|
||||||
end
|
end
|
||||||
|
|
||||||
if not yaw or yaw ~= yaw then
|
--calculate the shortest way to turn to find our target
|
||||||
yaw = 0
|
local target_shortest_path = shortest_term_of_yaw_rotatoin(self, self.object:get_yaw(), yaw, true)
|
||||||
|
|
||||||
|
--turn in the shortest path possible toward our target. if we are attacking, don't dance.
|
||||||
|
if math.abs(target_shortest_path) > 100 and (self.attack and self.attack:get_pos() or self.following and self.following:get_pos()) then
|
||||||
|
if self.following then
|
||||||
|
target_shortest_path = shortest_term_of_yaw_rotatoin(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.following:get_pos())), true)
|
||||||
|
else
|
||||||
|
target_shortest_path = shortest_term_of_yaw_rotatoin(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())), true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local ddtime = 0.05 --set_tick_rate
|
||||||
|
|
||||||
|
if dtime then
|
||||||
|
ddtime = dtime
|
||||||
|
end
|
||||||
|
|
||||||
|
if math.abs(target_shortest_path) > 280*ddtime then
|
||||||
|
if target_shortest_path > 0 then
|
||||||
|
self.object:set_yaw(self.object:get_yaw()+3.6*ddtime)
|
||||||
|
else
|
||||||
|
self.object:set_yaw(self.object:get_yaw()-3.6*ddtime)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
delay = delay or 0
|
delay = delay or 0
|
||||||
|
|
||||||
|
yaw = self.object:get_yaw()
|
||||||
|
|
||||||
if delay == 0 then
|
if delay == 0 then
|
||||||
if self.shaking and dtime then
|
if self.shaking and dtime then
|
||||||
yaw = yaw + (random() * 2 - 1) * 5 * dtime
|
yaw = yaw + (random() * 2 - 1) * 5 * dtime
|
||||||
end
|
end
|
||||||
self.object:set_yaw(yaw)
|
|
||||||
update_roll(self)
|
update_roll(self)
|
||||||
return yaw
|
return yaw
|
||||||
end
|
end
|
||||||
|
@ -405,6 +467,10 @@ local set_animation = function(self, anim, fixed_frame)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.jockey then
|
||||||
|
anim = "jockey"
|
||||||
|
end
|
||||||
|
|
||||||
if flight_check(self) and self.fly and anim == "walk" then anim = "fly" end
|
if flight_check(self) and self.fly and anim == "walk" then anim = "fly" end
|
||||||
|
|
||||||
self._current_animation = self._current_animation or ""
|
self._current_animation = self._current_animation or ""
|
||||||
|
@ -1903,7 +1969,6 @@ end
|
||||||
-- find someone to attack
|
-- find someone to attack
|
||||||
local monster_attack = function(self)
|
local monster_attack = function(self)
|
||||||
if not damage_enabled
|
if not damage_enabled
|
||||||
or minetest.is_creative_enabled("")
|
|
||||||
or self.passive ~= false
|
or self.passive ~= false
|
||||||
or self.state == "attack"
|
or self.state == "attack"
|
||||||
or day_docile(self) then
|
or day_docile(self) then
|
||||||
|
@ -3305,6 +3370,13 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
||||||
elseif luaentity and luaentity._knockback then
|
elseif luaentity and luaentity._knockback then
|
||||||
kb = kb + luaentity._knockback
|
kb = kb + luaentity._knockback
|
||||||
end
|
end
|
||||||
|
--self._kb_turn = false
|
||||||
|
self._turn_to=self.object:get_yaw()+0.85
|
||||||
|
minetest.after(0.2, function()
|
||||||
|
if self and self.object then
|
||||||
|
self._kb_turn = true
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
self.object:set_velocity({
|
self.object:set_velocity({
|
||||||
x = dir.x * kb,
|
x = dir.x * kb,
|
||||||
|
@ -3391,6 +3463,11 @@ end
|
||||||
|
|
||||||
local mob_detach_child = function(self, child)
|
local mob_detach_child = function(self, child)
|
||||||
|
|
||||||
|
if self.detach_child then
|
||||||
|
if self.detach_child(self, child) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
if self.driver == child then
|
if self.driver == child then
|
||||||
self.driver = nil
|
self.driver = nil
|
||||||
end
|
end
|
||||||
|
@ -3408,10 +3485,8 @@ local mob_staticdata = function(self)
|
||||||
and ((not self.nametag) or (self.nametag == ""))
|
and ((not self.nametag) or (self.nametag == ""))
|
||||||
and self.lifetimer <= 20 then
|
and self.lifetimer <= 20 then
|
||||||
if spawn_logging then
|
if spawn_logging then
|
||||||
minetest.log("action", "[mcl_mobs] Mob "..tostring(self.name).." despawns in mob_staticdata at "..minetest.pos_to_string(self.object:get_pos()))
|
minetest.log("action", "[mcl_mobs] Mob "..tostring(self.name).." despawns in mob_staticdata at "..minetest.pos_to_string(vector.round(self.object:get_pos())))
|
||||||
end
|
end
|
||||||
mcl_burning.extinguish(self.object)
|
|
||||||
self.object:remove()
|
|
||||||
|
|
||||||
return "remove"-- nil
|
return "remove"-- nil
|
||||||
end
|
end
|
||||||
|
@ -3441,21 +3516,19 @@ end
|
||||||
|
|
||||||
-- activate mob and reload settings
|
-- activate mob and reload settings
|
||||||
local mob_activate = function(self, staticdata, def, dtime)
|
local mob_activate = function(self, staticdata, def, dtime)
|
||||||
|
if not self.object:get_pos() or staticdata == "remove" then
|
||||||
|
mcl_burning.extinguish(self.object)
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
-- remove monsters in peaceful mode
|
-- remove monsters in peaceful mode
|
||||||
if self.type == "monster"
|
if self.type == "monster"
|
||||||
and minetest.settings:get_bool("only_peaceful_mobs", false) then
|
and minetest.settings:get_bool("only_peaceful_mobs", false) then
|
||||||
mcl_burning.extinguish(self.object)
|
mcl_burning.extinguish(self.object)
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if staticdata == "remove" then
|
|
||||||
mcl_burning.extinguish(self.object)
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- load entity variables
|
-- load entity variables
|
||||||
local tmp = minetest.deserialize(staticdata)
|
local tmp = minetest.deserialize(staticdata)
|
||||||
|
|
||||||
|
@ -3667,6 +3740,9 @@ local mob_step = function(self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- smooth rotation by ThomasMonroe314
|
-- smooth rotation by ThomasMonroe314
|
||||||
|
if self._turn_to then
|
||||||
|
set_yaw(self, self._turn_to, .1)
|
||||||
|
end
|
||||||
|
|
||||||
if self.delay and self.delay > 0 then
|
if self.delay and self.delay > 0 then
|
||||||
|
|
||||||
|
@ -3710,6 +3786,66 @@ local mob_step = function(self, dtime)
|
||||||
|
|
||||||
-- end rotation
|
-- end rotation
|
||||||
|
|
||||||
|
if self.head_swivel and type(self.head_swivel) == "string" then
|
||||||
|
local oldp,oldr = self.object:get_bone_position(self.head_swivel)
|
||||||
|
|
||||||
|
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 10)) do
|
||||||
|
if obj:is_player() and not self.attack or obj:get_luaentity() and obj:get_luaentity().name == self.name and self ~= obj:get_luaentity() then
|
||||||
|
if not self._locked_object then
|
||||||
|
if math.random(5000/self.curiosity) == 1 then
|
||||||
|
self._locked_object = obj
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if math.random(10000/self.curiosity) == 1 then
|
||||||
|
self._locked_object = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.attack then
|
||||||
|
self._locked_object = self.attack
|
||||||
|
end
|
||||||
|
|
||||||
|
if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then
|
||||||
|
local _locked_object_eye_height = 1.5
|
||||||
|
if self._locked_object:get_luaentity() then
|
||||||
|
_locked_object_eye_height = self._locked_object:get_luaentity().head_eye_height
|
||||||
|
end
|
||||||
|
if self._locked_object:is_player() then
|
||||||
|
_locked_object_eye_height = self._locked_object:get_properties().eye_height
|
||||||
|
end
|
||||||
|
local self_rot = self.object:get_rotation()
|
||||||
|
if self.object:get_attach() then
|
||||||
|
self_rot = self.object:get_attach():get_rotation()
|
||||||
|
end
|
||||||
|
local player_pos = self._locked_object:get_pos()
|
||||||
|
local direction_player = vector.direction(vector.add(self.object:get_pos(), vector.new(0, self.head_eye_height*.7, 0)), vector.add(player_pos, vector.new(0, _locked_object_eye_height, 0)))
|
||||||
|
local mob_yaw = math.deg(-(-(self_rot.y)-(-minetest.dir_to_yaw(direction_player))))+self.head_yaw_offset
|
||||||
|
local mob_pitch = math.deg(-dir_to_pitch(direction_player))*self.head_pitch_multiplier
|
||||||
|
if (mob_yaw < -60 or mob_yaw > 60) and not (self.attack and self.type == "monster") then
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.multiply(oldr, 0.9))
|
||||||
|
elseif self.attack and self.type == "monster" then
|
||||||
|
if self.head_yaw == "y" then
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.new(mob_pitch, mob_yaw, 0))
|
||||||
|
elseif self.head_yaw == "z" then
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.new(mob_pitch, 0, -mob_yaw))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if self.head_yaw == "y" then
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.new(((mob_pitch-oldr.x)*.3)+oldr.x, ((mob_yaw-oldr.y)*.3)+oldr.y, 0))
|
||||||
|
elseif self.head_yaw == "z" then
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.new(((mob_pitch-oldr.x)*.3)+oldr.x, 0, -(((mob_yaw-oldr.y)*.3)+oldr.y)*3))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif not self._locked_object and math.abs(oldr.y) > 3 and math.abs(oldr.x) < 3 then
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.multiply(oldr, 0.9))
|
||||||
|
else
|
||||||
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), vector.new(0,0,0))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- run custom function (defined in mob lua file)
|
-- run custom function (defined in mob lua file)
|
||||||
if self.do_custom then
|
if self.do_custom then
|
||||||
|
|
||||||
|
@ -3950,6 +4086,14 @@ end
|
||||||
minetest.register_entity(name, {
|
minetest.register_entity(name, {
|
||||||
|
|
||||||
use_texture_alpha = def.use_texture_alpha,
|
use_texture_alpha = def.use_texture_alpha,
|
||||||
|
head_swivel = def.head_swivel or nil, -- bool to activate this function
|
||||||
|
head_yaw_offset = def.head_yaw_offset or 0, -- for wonkey model bones
|
||||||
|
head_pitch_multiplier = def.head_pitch_multiplier or 1, --for inverted pitch
|
||||||
|
bone_eye_height = def.bone_eye_height or 1.4, -- head bone offset
|
||||||
|
head_eye_height = def.head_eye_height or def.bone_eye_height or 0, -- how hight aproximatly the mobs head is fromm the ground to tell the mob how high to look up at the player
|
||||||
|
curiosity = def.curiosity or 1, -- how often mob will look at player on idle
|
||||||
|
head_yaw = def.head_yaw or "y", -- axis to rotate head on
|
||||||
|
horrizonatal_head_height = def.horrizonatal_head_height or 0,
|
||||||
stepheight = def.stepheight or 0.6,
|
stepheight = def.stepheight or 0.6,
|
||||||
name = name,
|
name = name,
|
||||||
description = def.description,
|
description = def.description,
|
||||||
|
@ -3962,6 +4106,7 @@ minetest.register_entity(name, {
|
||||||
on_die = def.on_die,
|
on_die = def.on_die,
|
||||||
spawn_small_alternative = def.spawn_small_alternative,
|
spawn_small_alternative = def.spawn_small_alternative,
|
||||||
do_custom = def.do_custom,
|
do_custom = def.do_custom,
|
||||||
|
detach_child = def.detach_child,
|
||||||
jump_height = def.jump_height or 4, -- was 6
|
jump_height = def.jump_height or 4, -- was 6
|
||||||
rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2
|
rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2
|
||||||
lifetimer = def.lifetimer or 57.73,
|
lifetimer = def.lifetimer or 57.73,
|
||||||
|
|
|
@ -26,6 +26,12 @@ mcl_mobs:register_mob("mobs_mc:blaze", {
|
||||||
rotate = -180,
|
rotate = -180,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_blaze.b3d",
|
mesh = "mobs_mc_blaze.b3d",
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 4,
|
||||||
|
head_eye_height = 3.5,
|
||||||
|
curiosity = 10,
|
||||||
|
head_yaw_offset = 180,
|
||||||
|
head_pitch_multiplier=-1,
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_blaze.png"},
|
{"mobs_mc_blaze.png"},
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,6 +20,13 @@ mcl_mobs:register_mob("mobs_mc:chicken", {
|
||||||
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.69, 0.2},
|
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.69, 0.2},
|
||||||
runaway = true,
|
runaway = true,
|
||||||
floats = 1,
|
floats = 1,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 4,
|
||||||
|
head_eye_height = 1.5,
|
||||||
|
horrizonatal_head_height = -.3,
|
||||||
|
curiosity = 10,
|
||||||
|
head_yaw="z",
|
||||||
|
visual_size = {x=1,y=1},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_chicken.b3d",
|
mesh = "mobs_mc_chicken.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
|
|
|
@ -17,6 +17,12 @@ local cow_def = {
|
||||||
"mobs_mc_cow.png",
|
"mobs_mc_cow.png",
|
||||||
"blank.png",
|
"blank.png",
|
||||||
}, },
|
}, },
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 10,
|
||||||
|
head_eye_height = 1.1,
|
||||||
|
horrizonatal_head_height=-1.8,
|
||||||
|
curiosity = 2,
|
||||||
|
head_yaw="z",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
drops = {
|
drops = {
|
||||||
|
|
|
@ -21,6 +21,9 @@ mcl_mobs:register_mob("mobs_mc:creeper", {
|
||||||
pathfinding = 1,
|
pathfinding = 1,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_creeper.b3d",
|
mesh = "mobs_mc_creeper.b3d",
|
||||||
|
head_swivel = "Head_Control",
|
||||||
|
bone_eye_height = 2.35,
|
||||||
|
curiosity = 2,
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_creeper.png",
|
{"mobs_mc_creeper.png",
|
||||||
"mobs_mc_empty.png"},
|
"mobs_mc_empty.png"},
|
||||||
|
|
|
@ -31,17 +31,18 @@ minetest.register_entity("mobs_mc:ender_eyes", {
|
||||||
textures = {
|
textures = {
|
||||||
"mobs_mc_enderman_eyes.png",
|
"mobs_mc_enderman_eyes.png",
|
||||||
},
|
},
|
||||||
on_activate = function(self)
|
on_step = function(self)
|
||||||
minetest.after(0.1, function()
|
if self and self.object then
|
||||||
if not self.object:get_attach() then
|
if not self.object:get_attach() then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end)
|
end
|
||||||
end,
|
end,
|
||||||
glow = 50,
|
glow = 50,
|
||||||
})
|
})
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
local enable_damage = minetest.settings:get_bool("enable_damage")
|
||||||
|
|
||||||
local telesound = function(pos, is_source)
|
local telesound = function(pos, is_source)
|
||||||
local snd
|
local snd
|
||||||
|
@ -263,8 +264,8 @@ mcl_mobs:register_mob("mobs_mc:enderman", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not spider_eyes then
|
if not spider_eyes then
|
||||||
minetest.add_entity(self.object:get_pos(), "mobs_mc:ender_eyes"):set_attach(self.object, "head.low", vector.new(0,3.25,-1.98), vector.new(90,0,180))
|
minetest.add_entity(self.object:get_pos(), "mobs_mc:ender_eyes"):set_attach(self.object, "head.top", vector.new(0,2.54,-1.99), vector.new(90,0,180))
|
||||||
minetest.add_entity(self.object:get_pos(), "mobs_mc:ender_eyes"):set_attach(self.object, "head.low", vector.new(1,3.25,-1.98), vector.new(90,0,180))
|
minetest.add_entity(self.object:get_pos(), "mobs_mc:ender_eyes"):set_attach(self.object, "head.top", vector.new(1,2.54,-1.99), vector.new(90,0,180))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
sounds = {
|
sounds = {
|
||||||
|
@ -412,7 +413,7 @@ mcl_mobs:register_mob("mobs_mc:enderman", {
|
||||||
-- self:teleport(nil)
|
-- self:teleport(nil)
|
||||||
-- self.state = ""
|
-- self.state = ""
|
||||||
--else
|
--else
|
||||||
if self.attack ~= nil and not minetest.settings:get_bool("creative_mode") then
|
if self.attack ~= nil and enable_damage then
|
||||||
self.state = 'attack'
|
self.state = 'attack'
|
||||||
end
|
end
|
||||||
--end
|
--end
|
||||||
|
|
|
@ -34,6 +34,30 @@ local horse_extra_texture = function(horse)
|
||||||
return textures
|
return textures
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function get_drops(self)
|
||||||
|
self.drops = {}
|
||||||
|
table.insert(self.drops,
|
||||||
|
{name = "mcl_mobitems:leather",
|
||||||
|
chance = 1,
|
||||||
|
min = 0,
|
||||||
|
max = 2,
|
||||||
|
looting = "common",
|
||||||
|
})
|
||||||
|
if self._saddle then
|
||||||
|
table.insert(self.drops,{name = "mcl_mobitems:saddle",
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,})
|
||||||
|
end
|
||||||
|
if self._chest then
|
||||||
|
table.insert(self.drops,{name = "mcl_chests:chest",
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Helper functions to determine equipment rules
|
-- Helper functions to determine equipment rules
|
||||||
local can_equip_horse_armor = function(entity_id)
|
local can_equip_horse_armor = function(entity_id)
|
||||||
return entity_id == "mobs_mc:horse" or entity_id == "mobs_mc:skeleton_horse" or entity_id == "mobs_mc:zombie_horse"
|
return entity_id == "mobs_mc:horse" or entity_id == "mobs_mc:skeleton_horse" or entity_id == "mobs_mc:zombie_horse"
|
||||||
|
@ -237,6 +261,27 @@ local horse = {
|
||||||
local iname = item:get_name()
|
local iname = item:get_name()
|
||||||
local heal = 0
|
local heal = 0
|
||||||
|
|
||||||
|
if self._inv_id then
|
||||||
|
if not self._chest and item:get_name() == "mcl_chests:chest" then
|
||||||
|
item:take_item()
|
||||||
|
clicker:set_wielded_item(item)
|
||||||
|
self._chest = true
|
||||||
|
-- Update texture
|
||||||
|
if not self._naked_texture then
|
||||||
|
-- Base horse texture without chest or saddle
|
||||||
|
self._naked_texture = self.base_texture[2]
|
||||||
|
end
|
||||||
|
local tex = horse_extra_texture(self)
|
||||||
|
self.base_texture = tex
|
||||||
|
self.object:set_properties({textures = self.base_texture})
|
||||||
|
get_drops(self)
|
||||||
|
return
|
||||||
|
elseif self._chest and clicker:get_player_control().sneak then
|
||||||
|
mcl_entity_invs.show_inv_form(self,clicker)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Taming
|
-- Taming
|
||||||
self.temper = self.temper or (math.random(1,100))
|
self.temper = self.temper or (math.random(1,100))
|
||||||
|
|
||||||
|
@ -340,6 +385,7 @@ local horse = {
|
||||||
self.base_texture = tex
|
self.base_texture = tex
|
||||||
self.object:set_properties({textures = self.base_texture})
|
self.object:set_properties({textures = self.base_texture})
|
||||||
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=12, pos=self.object:get_pos()}, true)
|
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=12, pos=self.object:get_pos()}, true)
|
||||||
|
get_drops(self)
|
||||||
|
|
||||||
-- Put on horse armor if tamed
|
-- Put on horse armor if tamed
|
||||||
elseif can_equip_horse_armor(self.name) and not self.driver and not self._horse_armor
|
elseif can_equip_horse_armor(self.name) and not self.driver and not self._horse_armor
|
||||||
|
@ -518,8 +564,9 @@ donkey.collisionbox = {
|
||||||
donkey.jump = true
|
donkey.jump = true
|
||||||
donkey.jump_height = 3.75 -- can clear 1 block height
|
donkey.jump_height = 3.75 -- can clear 1 block height
|
||||||
|
|
||||||
mcl_mobs:register_mob("mobs_mc:donkey", donkey)
|
|
||||||
|
|
||||||
|
mcl_mobs:register_mob("mobs_mc:donkey", donkey)
|
||||||
|
mcl_entity_invs.register_inv("mobs_mc:donkey","Donkey",15,true)
|
||||||
-- Mule
|
-- Mule
|
||||||
local m = 0.94
|
local m = 0.94
|
||||||
local mule = table.copy(donkey)
|
local mule = table.copy(donkey)
|
||||||
|
@ -537,6 +584,7 @@ mule.collisionbox = {
|
||||||
horse.collisionbox[6] * m,
|
horse.collisionbox[6] * m,
|
||||||
}
|
}
|
||||||
mcl_mobs:register_mob("mobs_mc:mule", mule)
|
mcl_mobs:register_mob("mobs_mc:mule", mule)
|
||||||
|
mcl_entity_invs.register_inv("mobs_mc:mule","Mule",15,true)
|
||||||
|
|
||||||
--===========================
|
--===========================
|
||||||
--Spawn Function
|
--Spawn Function
|
||||||
|
|
|
@ -148,5 +148,3 @@ dofile(path .. "/cod.lua")
|
||||||
dofile(path .. "/salmon.lua")
|
dofile(path .. "/salmon.lua")
|
||||||
dofile(path .. "/tropical_fish.lua")
|
dofile(path .. "/tropical_fish.lua")
|
||||||
dofile(path .. "/dolphin.lua")
|
dofile(path .. "/dolphin.lua")
|
||||||
|
|
||||||
dofile(path .. "/piglin.lua")
|
|
||||||
|
|
|
@ -22,6 +22,9 @@ mcl_mobs:register_mob("mobs_mc:iron_golem", {
|
||||||
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.69, 0.7},
|
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.69, 0.7},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_iron_golem.b3d",
|
mesh = "mobs_mc_iron_golem.b3d",
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 3.38,
|
||||||
|
curiosity = 10,
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_iron_golem.png"},
|
{"mobs_mc_iron_golem.png"},
|
||||||
},
|
},
|
||||||
|
|
|
@ -24,6 +24,29 @@ local carpets = {
|
||||||
unicolor_light_blue = { "mcl_wool:light_blue_carpet", "light_blue" },
|
unicolor_light_blue = { "mcl_wool:light_blue_carpet", "light_blue" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local function get_drops(self)
|
||||||
|
self.drops = {}
|
||||||
|
table.insert(self.drops,
|
||||||
|
{name = "mcl_mobitems:leather",
|
||||||
|
chance = 1,
|
||||||
|
min = 0,
|
||||||
|
max = 2,
|
||||||
|
looting = "common",
|
||||||
|
})
|
||||||
|
if self.carpet then
|
||||||
|
table.insert(self.drops,{name = self.carpet,
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,})
|
||||||
|
end
|
||||||
|
if self._has_chest then
|
||||||
|
table.insert(self.drops,{name = "mcl_chests:chest",
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
mcl_mobs:register_mob("mobs_mc:llama", {
|
mcl_mobs:register_mob("mobs_mc:llama", {
|
||||||
description = S("Llama"),
|
description = S("Llama"),
|
||||||
type = "animal",
|
type = "animal",
|
||||||
|
@ -35,6 +58,14 @@ mcl_mobs:register_mob("mobs_mc:llama", {
|
||||||
shoot_offset = 1, --3.5 *would* be a good value visually but it somehow messes with the projectiles trajectory
|
shoot_offset = 1, --3.5 *would* be a good value visually but it somehow messes with the projectiles trajectory
|
||||||
spawn_in_group_min = 4,
|
spawn_in_group_min = 4,
|
||||||
spawn_in_group = 6,
|
spawn_in_group = 6,
|
||||||
|
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 11,
|
||||||
|
head_eye_height = 3,
|
||||||
|
horrizonatal_head_height=0,
|
||||||
|
curiosity = 60,
|
||||||
|
head_yaw = "z",
|
||||||
|
|
||||||
hp_min = 15,
|
hp_min = 15,
|
||||||
hp_max = 30,
|
hp_max = 30,
|
||||||
xp_min = 1,
|
xp_min = 1,
|
||||||
|
@ -135,17 +166,17 @@ mcl_mobs:register_mob("mobs_mc:llama", {
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
textures = self.base_texture,
|
textures = self.base_texture,
|
||||||
})
|
})
|
||||||
table.insert(self.drops,{name = "mcl_chests:chest",chance=1,min=1,max=1})
|
get_drops(self)
|
||||||
|
return
|
||||||
|
elseif self._has_chest and clicker:get_player_control().sneak then
|
||||||
|
mcl_entity_invs.show_inv_form(self,clicker," - Strength "..math.floor(self._inv_size / 3))
|
||||||
|
return
|
||||||
else
|
else
|
||||||
-- Feed with anything else
|
-- Feed with anything else
|
||||||
if mcl_mobs:feed_tame(self, clicker, 1, false, true) then return end
|
if mcl_mobs:feed_tame(self, clicker, 1, false, true) then return end
|
||||||
end
|
end
|
||||||
if mcl_mobs:protect(self, clicker) then return end
|
if mcl_mobs:protect(self, clicker) then return end
|
||||||
|
|
||||||
if self._has_chest and clicker:get_player_control().sneak then
|
|
||||||
mcl_entity_invs.show_inv_form(self,clicker,"Llama - Strength "..math.floor(self._inv_size / 3))
|
|
||||||
return
|
|
||||||
end
|
|
||||||
-- Make sure tamed llama is mature and being clicked by owner only
|
-- Make sure tamed llama is mature and being clicked by owner only
|
||||||
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
|
||||||
-- Place carpet
|
-- Place carpet
|
||||||
|
@ -164,16 +195,7 @@ mcl_mobs:register_mob("mobs_mc:llama", {
|
||||||
textures = self.base_texture,
|
textures = self.base_texture,
|
||||||
})
|
})
|
||||||
self.carpet = item:get_name()
|
self.carpet = item:get_name()
|
||||||
self.drops = {
|
get_drops(self)
|
||||||
{name = "mcl_mobitems:leather",
|
|
||||||
chance = 1,
|
|
||||||
min = 0,
|
|
||||||
max = 2,},
|
|
||||||
{name = item:get_name(),
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -36,6 +36,12 @@ local ocelot = {
|
||||||
hp_max = 10,
|
hp_max = 10,
|
||||||
xp_min = 1,
|
xp_min = 1,
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 6.2,
|
||||||
|
head_eye_height = 0.4,
|
||||||
|
horrizonatal_head_height=-0,
|
||||||
|
head_yaw="z",
|
||||||
|
curiosity = 4,
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_cat.b3d",
|
mesh = "mobs_mc_cat.b3d",
|
||||||
|
|
|
@ -135,6 +135,10 @@ mcl_mobs:register_mob("mobs_mc:parrot", {
|
||||||
hp_max = 6,
|
hp_max = 6,
|
||||||
xp_min = 1,
|
xp_min = 1,
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 1.1,
|
||||||
|
horrizonatal_head_height=0,
|
||||||
|
curiosity = 10,
|
||||||
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
|
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_parrot.b3d",
|
mesh = "mobs_mc_parrot.b3d",
|
||||||
|
|
|
@ -18,6 +18,12 @@ mcl_mobs:register_mob("mobs_mc:pig", {
|
||||||
"mobs_mc_pig.png", -- base
|
"mobs_mc_pig.png", -- base
|
||||||
"blank.png", -- saddle
|
"blank.png", -- saddle
|
||||||
}},
|
}},
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 7.5,
|
||||||
|
head_eye_height = 0.8,
|
||||||
|
horrizonatal_head_height=-1,
|
||||||
|
curiosity = 3,
|
||||||
|
head_yaw="z",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
|
|
|
@ -1,312 +0,0 @@
|
||||||
--MCmobs v0.4
|
|
||||||
--maikerumine
|
|
||||||
--made for MC like Survival game
|
|
||||||
--License for code WTFPL and otherwise stated in readmes
|
|
||||||
|
|
||||||
local trading_items = {
|
|
||||||
{ itemstring = "mcl_core:obsidian", amount_min = 1, amount_max = 1 },
|
|
||||||
{ itemstring = "mcl_core:gravel", amount_min = 8, amount_max = 16 },
|
|
||||||
{ itemstring = "mcl_mobitems:leather", amount_min = 4, amount_max = 10 },
|
|
||||||
{ itemstring = "mcl_nether:soul_sand", amount_min = 4, amount_max = 16 },
|
|
||||||
{ itemstring = "mcl_nether:nether_brick", amount_min = 4, amount_max = 16 },
|
|
||||||
{ itemstring = "mcl_mobitems:string", amount_min = 3, amount_max = 9 },
|
|
||||||
{ itemstring = "mcl_nether:quartz", amount_min = 4, amount_max = 10 },
|
|
||||||
{ itemstring = "mcl_potions:water", amount_min = 1, amount_max = 1 },
|
|
||||||
{ itemstring = "mcl_core:iron_nugget", amount_min = 10, amount_max = 36 },
|
|
||||||
{ itemstring = "mcl_throwing:ender_pearl", amount_min = 2, amount_max = 6 },
|
|
||||||
{ itemstring = "mcl_potions:fire_resistance", amount_min = 1, amount_max = 1 },
|
|
||||||
{ itemstring = "mcl_potions:fire_resistance_splash", amount_min = 1, amount_max = 1 },
|
|
||||||
}
|
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
|
||||||
local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
|
|
||||||
|
|
||||||
--###################
|
|
||||||
--################### piglin
|
|
||||||
--###################
|
|
||||||
local piglin = {
|
|
||||||
type = "monster",
|
|
||||||
passive = false,
|
|
||||||
spawn_class = "hostile",
|
|
||||||
hp_min = 16,
|
|
||||||
hp_max = 16,
|
|
||||||
xp_min = 9,
|
|
||||||
xp_max = 9,
|
|
||||||
armor = {fleshy = 90},
|
|
||||||
damage = 4,
|
|
||||||
reach = 3,
|
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
|
||||||
visual = "mesh",
|
|
||||||
mesh = "extra_mobs_piglin.b3d",
|
|
||||||
spawn_in_group = 5,
|
|
||||||
spawn_in_group_min = 3,
|
|
||||||
textures = { {
|
|
||||||
"extra_mobs_piglin.png",
|
|
||||||
"mcl_bows_bow_2.png",
|
|
||||||
} },
|
|
||||||
visual_size = {x=1, y=1},
|
|
||||||
sounds = {
|
|
||||||
random = "extra_mobs_piglin",
|
|
||||||
damage = "extra_mobs_piglin_hurt",
|
|
||||||
distance = 16,
|
|
||||||
},
|
|
||||||
jump = true,
|
|
||||||
makes_footstep_sound = true,
|
|
||||||
walk_velocity = 4.317,
|
|
||||||
run_velocity = 5.6121,
|
|
||||||
drops = {
|
|
||||||
{name = "mcl_bows:crossbow",
|
|
||||||
chance = 10,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
|
||||||
animation = {
|
|
||||||
stand_speed = 30,
|
|
||||||
walk_speed = 30,
|
|
||||||
run_speed = 30,
|
|
||||||
stand_start = 0,
|
|
||||||
stand_end = 79,
|
|
||||||
walk_start = 168,
|
|
||||||
walk_end = 187,
|
|
||||||
run_start = 440,
|
|
||||||
run_end = 459,
|
|
||||||
},
|
|
||||||
fear_height = 4,
|
|
||||||
view_range = 16,
|
|
||||||
pick_up = {"mcl_core:gold_ingot"},
|
|
||||||
on_spawn = function(self)
|
|
||||||
self.weapon = self.base_texture[2]
|
|
||||||
self.gold_items = 0
|
|
||||||
end,
|
|
||||||
do_custom = function(self)
|
|
||||||
if self.object:get_pos().y > -100 then
|
|
||||||
--local zog = minetest.add_entity(self.object:get_pos(), "mobs_mc:zombified_piglin")
|
|
||||||
--zog:set_rotation(self.object:get_rotation())
|
|
||||||
--self.object:remove()
|
|
||||||
end
|
|
||||||
if self.trading == true then
|
|
||||||
self.state = "trading"
|
|
||||||
self.object:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(20,-20,18))
|
|
||||||
self.object:set_bone_position("Head", vector.new(0,6.3,0), vector.new(-40,0,0))
|
|
||||||
self.base_texture[2] = "default_gold_ingot.png"
|
|
||||||
self.object:set_properties({textures = self.base_texture})
|
|
||||||
else
|
|
||||||
self.object:set_bone_position("Wield_Item", vector.new(.5,4.5,-1.6), vector.new(90,0,20))
|
|
||||||
self.base_texture[2] = self.weapon
|
|
||||||
self.object:set_properties({textures = self.base_texture})
|
|
||||||
self.object:set_bone_position("Head", vector.new(0,6.3,0), vector.new(0,0,0))
|
|
||||||
self.object:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(0,0,0))
|
|
||||||
end
|
|
||||||
|
|
||||||
if self.state ~= "attack" then
|
|
||||||
self._attacked_by_player = false
|
|
||||||
end
|
|
||||||
if self.state == "attack" and self.attack:is_player() then
|
|
||||||
for i=1, 6 do
|
|
||||||
local stack = self.attack:get_inventory():get_stack("armor", i)
|
|
||||||
local item = stack:get_name()
|
|
||||||
if item == "mcl_armor:chestplate_gold" or item == "mcl_armor:leggings_gold" or item == "mcl_armor:helmet_gold" or item == "mcl_armor:boots_gold" then
|
|
||||||
if self._attacked_by_player == false then
|
|
||||||
self.state = "stand"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
on_pick_up = function(self, itementity)
|
|
||||||
local clicker
|
|
||||||
for _,p in pairs(minetest.get_connected_players()) do
|
|
||||||
if vector.distance(p:get_pos(),self.object:get_pos()) < 10 then
|
|
||||||
clicker = p
|
|
||||||
end
|
|
||||||
end
|
|
||||||
--return true --do not pick up
|
|
||||||
if clicker:is_player() and clicker:get_wielded_item():get_name() == "mcl_core:gold_ingot" and self.state ~= "attack" and self.gold_items < 3 then
|
|
||||||
local item_gold = clicker:get_wielded_item()
|
|
||||||
item_gold:take_item(1)
|
|
||||||
clicker:set_wielded_item(item_gold)
|
|
||||||
self.state = "stand"
|
|
||||||
self.object:set_animation({x=0,y=79})
|
|
||||||
self.trading = true
|
|
||||||
self.gold_items = self.gold_items + 1
|
|
||||||
self.object:set_bone_position("Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
|
|
||||||
minetest.after(5, function()
|
|
||||||
self.gold_items = self.gold_items - 1
|
|
||||||
if self.gold_items == 0 then
|
|
||||||
self.trading = false
|
|
||||||
self.state = "stand"
|
|
||||||
end
|
|
||||||
local c_pos = self.object:get_pos()
|
|
||||||
if c_pos then
|
|
||||||
self.what_traded = trading_items[math.random(#trading_items)]
|
|
||||||
for x = 1, math.random(self.what_traded.amount_min, self.what_traded.amount_max) do
|
|
||||||
minetest.add_item({x=math.random(c_pos.x - 1, c_pos.x + 1), y=math.random(c_pos.y - 1, c_pos.y + 1), z= math.random(c_pos.z - 1, c_pos.z + 1)}, self.what_traded.itemstring)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
do_punch = function(self, hitter)
|
|
||||||
if hitter:is_player() then
|
|
||||||
self._attacked_by_player = true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
attack_type = "dogshoot",
|
|
||||||
arrow = "mcl_bows:arrow_entity",
|
|
||||||
shoot_arrow = function(self, pos, dir)
|
|
||||||
if mod_bows then
|
|
||||||
-- 2-4 damage per arrow
|
|
||||||
local dmg = math.max(4, math.random(2, 8))
|
|
||||||
--mobs.shoot_projectile_handling("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
shoot_interval = 1.2,
|
|
||||||
shoot_offset = 1.5,
|
|
||||||
dogshoot_switch = 1,
|
|
||||||
dogshoot_count_max =1.8,
|
|
||||||
}
|
|
||||||
|
|
||||||
mcl_mobs:register_mob("mobs_mc:piglin", piglin)
|
|
||||||
|
|
||||||
|
|
||||||
local sword_piglin = table.copy(piglin)
|
|
||||||
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
|
||||||
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
|
|
||||||
sword_piglin.on_spawn = function(self)
|
|
||||||
self.gold_items = 0
|
|
||||||
self.weapon = self.base_texture[2]
|
|
||||||
self.object:set_bone_position("Wield_Item", vector.new(0,3.9,1.3), vector.new(90,0,0))
|
|
||||||
end
|
|
||||||
sword_piglin.drops = {
|
|
||||||
{name = "mcl_tools:sword_gold",
|
|
||||||
chance = 10,
|
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
}
|
|
||||||
sword_piglin.attack_type = "dogfight"
|
|
||||||
sword_piglin.animation = {
|
|
||||||
stand_speed = 30,
|
|
||||||
walk_speed = 30,
|
|
||||||
punch_speed = 45,
|
|
||||||
run_speed = 30,
|
|
||||||
stand_start = 0,
|
|
||||||
stand_end = 79,
|
|
||||||
walk_start = 168,
|
|
||||||
walk_end = 187,
|
|
||||||
run_start = 440,
|
|
||||||
run_end = 459,
|
|
||||||
punch_start = 189,
|
|
||||||
punch_end = 198,
|
|
||||||
}
|
|
||||||
mcl_mobs:register_mob("mobs_mc:sword_piglin", sword_piglin)
|
|
||||||
|
|
||||||
local zombified_piglin = table.copy(piglin)
|
|
||||||
zombified_piglin.fire_resistant = 1
|
|
||||||
zombified_piglin.do_custom = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
zombified_piglin.on_spawn = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
zombified_piglin.on_rightclick = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
zombified_piglin.lava_damage = 0
|
|
||||||
zombified_piglin.fire_damage = 0
|
|
||||||
zombified_piglin.attack_animals = true
|
|
||||||
zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
|
||||||
zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"}
|
|
||||||
zombified_piglin.attack_type = "dogfight"
|
|
||||||
zombified_piglin.animation = {
|
|
||||||
stand_speed = 30,
|
|
||||||
walk_speed = 30,
|
|
||||||
punch_speed = 45,
|
|
||||||
run_speed = 30,
|
|
||||||
stand_start = 0,
|
|
||||||
stand_end = 79,
|
|
||||||
walk_start = 168,
|
|
||||||
walk_end = 187,
|
|
||||||
run_start = 440,
|
|
||||||
run_end = 459,
|
|
||||||
punch_start = 189,
|
|
||||||
punch_end = 198,
|
|
||||||
}
|
|
||||||
mcl_mobs:register_mob("mobs_mc:zombified_piglin", zombified_piglin)
|
|
||||||
|
|
||||||
|
|
||||||
local piglin_brute = table.copy(piglin)
|
|
||||||
piglin_brute.xp_min = 20
|
|
||||||
piglin_brute.xp_max = 20
|
|
||||||
piglin_brute.hp_min = 50
|
|
||||||
piglin_brute.hp_max = 50
|
|
||||||
piglin_brute.fire_resistant = 1
|
|
||||||
piglin_brute.do_custom = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
piglin_brute.on_spawn = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
piglin_brute.on_rightclick = function()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
piglin_brute.attacks_monsters = true
|
|
||||||
piglin_brute.lava_damage = 0
|
|
||||||
piglin_brute.fire_damage = 0
|
|
||||||
piglin_brute.attack_animals = true
|
|
||||||
piglin_brute.mesh = "extra_mobs_sword_piglin.b3d"
|
|
||||||
piglin_brute.textures = {"extra_mobs_piglin_brute.png", "default_tool_goldaxe.png", "extra_mobs_trans.png"}
|
|
||||||
piglin_brute.attack_type = "dogfight"
|
|
||||||
piglin_brute.animation = {
|
|
||||||
stand_speed = 30,
|
|
||||||
walk_speed = 30,
|
|
||||||
punch_speed = 45,
|
|
||||||
run_speed = 30,
|
|
||||||
stand_start = 0,
|
|
||||||
stand_end = 79,
|
|
||||||
walk_start = 168,
|
|
||||||
walk_end = 187,
|
|
||||||
run_start = 440,
|
|
||||||
run_end = 459,
|
|
||||||
punch_start = 189,
|
|
||||||
punch_end = 198,
|
|
||||||
}
|
|
||||||
piglin_brute.can_despawn = false
|
|
||||||
piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" }
|
|
||||||
mcl_mobs:register_mob("mobs_mc:piglin_brute", piglin_brute)
|
|
||||||
|
|
||||||
|
|
||||||
-- Regular spawning in the Nether
|
|
||||||
mcl_mobs:spawn_specific(
|
|
||||||
"mobs_mc:piglin",
|
|
||||||
"nether",
|
|
||||||
"ground",
|
|
||||||
{
|
|
||||||
"Nether",
|
|
||||||
"CrimsonForest"
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
minetest.LIGHT_MAX+1,
|
|
||||||
30,
|
|
||||||
6000,
|
|
||||||
3,
|
|
||||||
mcl_vars.mg_lava_nether_max,
|
|
||||||
mcl_vars.mg_nether_max)
|
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
|
||||||
"mobs_mc:sword_piglin",
|
|
||||||
"nether",
|
|
||||||
"ground",
|
|
||||||
{
|
|
||||||
"Nether",
|
|
||||||
"CrimsonForest"
|
|
||||||
},
|
|
||||||
0,
|
|
||||||
minetest.LIGHT_MAX+1,
|
|
||||||
30,
|
|
||||||
6000,
|
|
||||||
3,
|
|
||||||
mcl_vars.mg_lava_nether_max,
|
|
||||||
mcl_vars.mg_nether_max)
|
|
||||||
-- spawn eggs
|
|
||||||
mcl_mobs:register_egg("mobs_mc:piglin", S("Piglin"), "#00ff00","#000000", 0)
|
|
||||||
mcl_mobs:register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#ff0000","#000000", 0)
|
|
|
@ -24,6 +24,12 @@ mcl_mobs:register_mob("mobs_mc:polar_bear", {
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_polarbear.png"},
|
{"mobs_mc_polarbear.png"},
|
||||||
},
|
},
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 2.6,
|
||||||
|
head_eye_height = 1,
|
||||||
|
horrizonatal_head_height = 0,
|
||||||
|
curiosity = 20,
|
||||||
|
head_yaw="z",
|
||||||
visual_size = {x=3.0, y=3.0},
|
visual_size = {x=3.0, y=3.0},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
damage = 6,
|
damage = 6,
|
||||||
|
|
|
@ -15,7 +15,12 @@ local rabbit = {
|
||||||
xp_min = 1,
|
xp_min = 1,
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.49, 0.2},
|
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.49, 0.2},
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 2,
|
||||||
|
head_eye_height = 0.5,
|
||||||
|
horrizonatal_head_height = -.3,
|
||||||
|
curiosity = 20,
|
||||||
|
head_yaw="z",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_rabbit.b3d",
|
mesh = "mobs_mc_rabbit.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
|
|
|
@ -61,7 +61,12 @@ mcl_mobs:register_mob("mobs_mc:sheep", {
|
||||||
xp_min = 1,
|
xp_min = 1,
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.29, 0.45},
|
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.29, 0.45},
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 3.3,
|
||||||
|
head_eye_height = 1.1,
|
||||||
|
horrizonatal_head_height=-.7,
|
||||||
|
curiosity = 6,
|
||||||
|
head_yaw="z",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_sheepfur.b3d",
|
mesh = "mobs_mc_sheepfur.b3d",
|
||||||
textures = { sheep_texture("unicolor_white") },
|
textures = { sheep_texture("unicolor_white") },
|
||||||
|
|
|
@ -25,13 +25,15 @@ local skeleton = {
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.98, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.98, 0.3},
|
||||||
pathfinding = 1,
|
pathfinding = 1,
|
||||||
group_attack = true,
|
group_attack = true,
|
||||||
|
head_swivel = "Head_Control",
|
||||||
|
bone_eye_height = 2.38,
|
||||||
|
curiosity = 6,
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_skeleton.b3d",
|
mesh = "mobs_mc_skeleton.b3d",
|
||||||
textures = { {
|
textures = { {
|
||||||
"mcl_bows_bow_0.png", -- bow
|
"mcl_bows_bow_0.png", -- bow
|
||||||
"mobs_mc_skeleton.png", -- skeleton
|
"mobs_mc_skeleton.png", -- skeleton
|
||||||
} },
|
} },
|
||||||
visual_size = {x=1, y=1},
|
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
textures = {
|
textures = {
|
||||||
{
|
{
|
||||||
|
@ -78,11 +80,27 @@ local skeleton = {
|
||||||
run_speed = 30,
|
run_speed = 30,
|
||||||
shoot_start = 70,
|
shoot_start = 70,
|
||||||
shoot_end = 90,
|
shoot_end = 90,
|
||||||
|
jockey_start = 172,
|
||||||
|
jockey_end = 172,
|
||||||
die_start = 160,
|
die_start = 160,
|
||||||
die_end = 170,
|
die_end = 170,
|
||||||
die_speed = 15,
|
die_speed = 15,
|
||||||
die_loop = false,
|
die_loop = false,
|
||||||
},
|
},
|
||||||
|
jock = "mobs_mc:spider",
|
||||||
|
on_spawn = function(self)
|
||||||
|
self.jockey = false
|
||||||
|
if math.random(100) == 1 then -- 1% like from MCwiki
|
||||||
|
self.jockey = true
|
||||||
|
local jock = minetest.add_entity(self.object:get_pos(), "mobs_mc:spider")
|
||||||
|
jock:get_luaentity().docile_by_day = false
|
||||||
|
self.object:set_attach(jock, "", vector.new(0,0,0), vector.new(0,0,0))
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
on_detach=function(self, parent)
|
||||||
|
self.jockey = false
|
||||||
|
end,
|
||||||
ignited_by_sunlight = true,
|
ignited_by_sunlight = true,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
|
@ -90,6 +108,9 @@ local skeleton = {
|
||||||
arrow = "mcl_bows:arrow_entity",
|
arrow = "mcl_bows:arrow_entity",
|
||||||
shoot_arrow = function(self, pos, dir)
|
shoot_arrow = function(self, pos, dir)
|
||||||
if mod_bows then
|
if mod_bows then
|
||||||
|
if self.attack then
|
||||||
|
self.object:set_yaw(minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())))
|
||||||
|
end
|
||||||
-- 2-4 damage per arrow
|
-- 2-4 damage per arrow
|
||||||
local dmg = math.max(4, math.random(2, 8))
|
local dmg = math.max(4, math.random(2, 8))
|
||||||
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
||||||
|
|
|
@ -24,11 +24,14 @@ mcl_mobs:register_mob("mobs_mc:witherskeleton", {
|
||||||
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2.39, 0.35},
|
collisionbox = {-0.35, -0.01, -0.35, 0.35, 2.39, 0.35},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_witherskeleton.b3d",
|
mesh = "mobs_mc_witherskeleton.b3d",
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 2.38,
|
||||||
|
curiosity = 60,
|
||||||
textures = {
|
textures = {
|
||||||
{
|
{
|
||||||
"mobs_mc_empty.png", -- armor
|
"mobs_mc_empty.png", -- armor
|
||||||
"mobs_mc_wither_skeleton.png", -- wither skeleton
|
|
||||||
"default_tool_stonesword.png", -- sword
|
"default_tool_stonesword.png", -- sword
|
||||||
|
"mobs_mc_wither_skeleton.png", -- wither skeleton
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
visual_size = {x=1.2, y=1.2},
|
visual_size = {x=1.2, y=1.2},
|
||||||
|
|
|
@ -14,16 +14,16 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
minetest.register_entity("mobs_mc:spider_eyes", {
|
minetest.register_entity("mobs_mc:spider_eyes", {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_spider.b3d",
|
mesh = "mobs_mc_spider.b3d",
|
||||||
visual_size = {x=1.01, y=1.01},
|
visual_size = {x=1.01/3, y=1.01/3},
|
||||||
textures = {
|
textures = {
|
||||||
"mobs_mc_spider_eyes.png",
|
"mobs_mc_spider_eyes.png",
|
||||||
},
|
},
|
||||||
on_activate = function(self)
|
on_step = function(self)
|
||||||
minetest.after(0.1, function()
|
if self and self.object then
|
||||||
if not self.object:get_attach() then
|
if not self.object:get_attach() then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
end)
|
end
|
||||||
end,
|
end,
|
||||||
glow = 50,
|
glow = 50,
|
||||||
})
|
})
|
||||||
|
@ -44,6 +44,7 @@ local spider = {
|
||||||
xp_max = 5,
|
xp_max = 5,
|
||||||
armor = {fleshy = 100, arthropod = 100},
|
armor = {fleshy = 100, arthropod = 100},
|
||||||
on_spawn = function(self)
|
on_spawn = function(self)
|
||||||
|
self.object:set_properties({visual_size={x=1,y=1}})
|
||||||
local spider_eyes=false
|
local spider_eyes=false
|
||||||
for n = 1, #self.object:get_children() do
|
for n = 1, #self.object:get_children() do
|
||||||
local obj = self.object:get_children()[n]
|
local obj = self.object:get_children()[n]
|
||||||
|
@ -55,13 +56,25 @@ local spider = {
|
||||||
minetest.add_entity(self.object:get_pos(), "mobs_mc:spider_eyes"):set_attach(self.object, "body.head", vector.new(0,-0.98,2), vector.new(90,180,180))
|
minetest.add_entity(self.object:get_pos(), "mobs_mc:spider_eyes"):set_attach(self.object, "body.head", vector.new(0,-0.98,2), vector.new(90,180,180))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
on_die=function(self)
|
||||||
|
if self.object:get_children() and self.object:get_children()[1] then
|
||||||
|
self.object:get_children()[1]:set_detach()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
detach_child=function(self, child)
|
||||||
|
child:get_luaentity().jockey = false
|
||||||
|
end,
|
||||||
|
head_swivel = "Head_Control",
|
||||||
|
bone_eye_height = 1,
|
||||||
|
curiosity = 10,
|
||||||
|
head_yaw="z",
|
||||||
collisionbox = {-0.7, -0.01, -0.7, 0.7, 0.89, 0.7},
|
collisionbox = {-0.7, -0.01, -0.7, 0.7, 0.89, 0.7},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_spider.b3d",
|
mesh = "mobs_mc_spider.b3d",
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_spider.png"},
|
{"mobs_mc_spider.png"},
|
||||||
},
|
},
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x=1, y=1},
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "mobs_mc_spider_random",
|
random = "mobs_mc_spider_random",
|
||||||
|
|
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 2.8 KiB |
|
@ -1235,6 +1235,10 @@ mcl_mobs:register_mob("mobs_mc:villager", {
|
||||||
spawn_class = "passive",
|
spawn_class = "passive",
|
||||||
hp_min = 20,
|
hp_min = 20,
|
||||||
hp_max = 20,
|
hp_max = 20,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 6.3,
|
||||||
|
head_eye_height = 2.2,
|
||||||
|
curiosity = 10,
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_villager.b3d",
|
mesh = "mobs_mc_villager.b3d",
|
||||||
|
|
|
@ -21,6 +21,10 @@ mcl_mobs:register_mob("mobs_mc:evoker", {
|
||||||
hp_max = 24,
|
hp_max = 24,
|
||||||
xp_min = 10,
|
xp_min = 10,
|
||||||
xp_max = 10,
|
xp_max = 10,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 6.3,
|
||||||
|
head_eye_height = 2.2,
|
||||||
|
curiosity = 10,
|
||||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.95, 0.4},
|
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.95, 0.4},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_villager.b3d",
|
mesh = "mobs_mc_villager.b3d",
|
||||||
|
|
|
@ -33,6 +33,10 @@ mcl_mobs:register_mob("mobs_mc:illusioner", {
|
||||||
"mobs_mc_illusionist.png", --hat
|
"mobs_mc_illusionist.png", --hat
|
||||||
"mcl_bows_bow.png",
|
"mcl_bows_bow.png",
|
||||||
}, },
|
}, },
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 2.2,
|
||||||
|
head_eye_height = 2.2,
|
||||||
|
curiosity = 10,
|
||||||
sounds = {
|
sounds = {
|
||||||
-- TODO: more sounds
|
-- TODO: more sounds
|
||||||
distance = 16,
|
distance = 16,
|
||||||
|
|
|
@ -23,6 +23,10 @@ mcl_mobs:register_mob("mobs_mc:vindicator", {
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_vindicator.b3d",
|
mesh = "mobs_mc_vindicator.b3d",
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 2.2,
|
||||||
|
head_eye_height = 2.2,
|
||||||
|
curiosity = 10,
|
||||||
textures = {
|
textures = {
|
||||||
{
|
{
|
||||||
"mobs_mc_vindicator.png",
|
"mobs_mc_vindicator.png",
|
||||||
|
|
|
@ -39,13 +39,16 @@ mcl_mobs:register_mob("mobs_mc:villager_zombie", {
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_villager_zombie.b3d",
|
mesh = "mobs_mc_villager_zombie.b3d",
|
||||||
|
head_swivel = "Head_Control",
|
||||||
|
bone_eye_height = 2.35,
|
||||||
|
curiosity = 2,
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_empty.png", "mobs_mc_zombie_butcher.png", "mobs_mc_empty.png"},
|
{"mobs_mc_zombie_butcher.png"},
|
||||||
{"mobs_mc_empty.png", "mobs_mc_zombie_farmer.png", "mobs_mc_empty.png"},
|
{"mobs_mc_zombie_farmer.png"},
|
||||||
{"mobs_mc_empty.png", "mobs_mc_zombie_librarian.png", "mobs_mc_empty.png"},
|
{"mobs_mc_zombie_librarian.png"},
|
||||||
{"mobs_mc_empty.png", "mobs_mc_zombie_priest.png", "mobs_mc_empty.png"},
|
{"mobs_mc_zombie_priest.png"},
|
||||||
{"mobs_mc_empty.png", "mobs_mc_zombie_smith.png", "mobs_mc_empty.png"},
|
{"mobs_mc_zombie_smith.png"},
|
||||||
{"mobs_mc_empty.png", "mobs_mc_zombie_villager.png", "mobs_mc_empty.png"},
|
{"mobs_mc_zombie_villager.png"},
|
||||||
},
|
},
|
||||||
visual_size = {x=2.75, y=2.75},
|
visual_size = {x=2.75, y=2.75},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
|
|
@ -26,6 +26,12 @@ local wolf = {
|
||||||
{"mobs_mc_wolf.png"},
|
{"mobs_mc_wolf.png"},
|
||||||
},
|
},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 3.5,
|
||||||
|
head_eye_height = 1.1,
|
||||||
|
horrizonatal_head_height=0,
|
||||||
|
curiosity = 3,
|
||||||
|
head_yaw="z",
|
||||||
sounds = {
|
sounds = {
|
||||||
attack = "mobs_mc_wolf_bark",
|
attack = "mobs_mc_wolf_bark",
|
||||||
war_cry = "mobs_mc_wolf_growl",
|
war_cry = "mobs_mc_wolf_growl",
|
||||||
|
|
|
@ -53,6 +53,11 @@ local zombie = {
|
||||||
hp_max = 20,
|
hp_max = 20,
|
||||||
xp_min = 5,
|
xp_min = 5,
|
||||||
xp_max = 5,
|
xp_max = 5,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 6.3,
|
||||||
|
head_eye_height = 2.2,
|
||||||
|
curiosity = 7,
|
||||||
|
head_pitch_multiplier=-1,
|
||||||
breath_max = -1,
|
breath_max = -1,
|
||||||
armor = {undead = 90, fleshy = 90},
|
armor = {undead = 90, fleshy = 90},
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.8, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.8, 0.3},
|
||||||
|
@ -62,7 +67,6 @@ local zombie = {
|
||||||
{
|
{
|
||||||
"mobs_mc_empty.png", -- armor
|
"mobs_mc_empty.png", -- armor
|
||||||
"mobs_mc_zombie.png", -- texture
|
"mobs_mc_zombie.png", -- texture
|
||||||
"mobs_mc_empty.png", -- wielded_item
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
@ -107,7 +111,6 @@ baby_zombie.description = S("Baby Zombie")
|
||||||
baby_zombie.collisionbox = {-0.25, -0.01, -0.25, 0.25, 1, 0.25}
|
baby_zombie.collisionbox = {-0.25, -0.01, -0.25, 0.25, 1, 0.25}
|
||||||
baby_zombie.xp_min = 12
|
baby_zombie.xp_min = 12
|
||||||
baby_zombie.xp_max = 12
|
baby_zombie.xp_max = 12
|
||||||
baby_zombie.visual_size = {x = 1 / 2, y = 1 / 2}
|
|
||||||
baby_zombie.walk_velocity = 1.2
|
baby_zombie.walk_velocity = 1.2
|
||||||
baby_zombie.run_velocity = 2.4
|
baby_zombie.run_velocity = 2.4
|
||||||
baby_zombie.child = 1
|
baby_zombie.child = 1
|
||||||
|
@ -129,7 +132,6 @@ husk.textures = {
|
||||||
{
|
{
|
||||||
"mobs_mc_empty.png", -- armor
|
"mobs_mc_empty.png", -- armor
|
||||||
"mobs_mc_husk.png", -- texture
|
"mobs_mc_husk.png", -- texture
|
||||||
"mobs_mc_empty.png", -- wielded_item
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
husk.ignited_by_sunlight = false
|
husk.ignited_by_sunlight = false
|
||||||
|
@ -144,9 +146,8 @@ mcl_mobs:register_mob("mobs_mc:husk", husk)
|
||||||
local baby_husk = table.copy(baby_zombie)
|
local baby_husk = table.copy(baby_zombie)
|
||||||
baby_husk.description = S("Baby Husk")
|
baby_husk.description = S("Baby Husk")
|
||||||
baby_husk.textures = {{
|
baby_husk.textures = {{
|
||||||
"mobs_mc_empty.png", -- armor
|
|
||||||
"mobs_mc_husk.png", -- texture
|
|
||||||
"mobs_mc_empty.png", -- wielded_item
|
"mobs_mc_empty.png", -- wielded_item
|
||||||
|
"mobs_mc_husk.png", -- texture
|
||||||
}}
|
}}
|
||||||
baby_husk.ignited_by_sunlight = false
|
baby_husk.ignited_by_sunlight = false
|
||||||
baby_husk.sunlight_damage = 0
|
baby_husk.sunlight_damage = 0
|
||||||
|
|
|
@ -25,13 +25,17 @@ local pigman = {
|
||||||
group_attack = { "mobs_mc:pigman", "mobs_mc:baby_pigman" },
|
group_attack = { "mobs_mc:pigman", "mobs_mc:baby_pigman" },
|
||||||
damage = 9,
|
damage = 9,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
|
head_swivel = "head.control",
|
||||||
|
bone_eye_height = 2.4,
|
||||||
|
head_eye_height = 1.4,
|
||||||
|
curiosity = 15,
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_zombie_pigman.b3d",
|
mesh = "mobs_mc_zombie_pigman.b3d",
|
||||||
textures = { {
|
textures = { {
|
||||||
|
"mobs_mc_zombie_pigman.png", --pigman
|
||||||
"blank.png", --baby
|
"blank.png", --baby
|
||||||
"default_tool_goldsword.png", --sword
|
"default_tool_goldsword.png", --sword
|
||||||
"mobs_mc_zombie_pigman.png", --pigman
|
|
||||||
} },
|
} },
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x=3, y=3},
|
||||||
sounds = {
|
sounds = {
|
||||||
|
|
|
@ -217,7 +217,7 @@ function awards.unlock(name, award)
|
||||||
|
|
||||||
-- Get award
|
-- Get award
|
||||||
minetest.log("action", name.." has gotten award "..award)
|
minetest.log("action", name.." has gotten award "..award)
|
||||||
minetest.chat_send_all(S("@1 has made the achievement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
|
minetest.chat_send_all(S("@1 has made the advancement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
|
||||||
data.unlocked[award] = award
|
data.unlocked[award] = award
|
||||||
awards.save()
|
awards.save()
|
||||||
|
|
||||||
|
@ -257,9 +257,13 @@ function awards.unlock(name, award)
|
||||||
local custom_announce = awdef.custom_announce
|
local custom_announce = awdef.custom_announce
|
||||||
if not custom_announce then
|
if not custom_announce then
|
||||||
if awdef.secret then
|
if awdef.secret then
|
||||||
custom_announce = S("Secret achievement gotten:")
|
custom_announce = S("Secret Advancement Made:")
|
||||||
|
elseif awdef.type == "Goal" then
|
||||||
|
custom_announce = S("Goal Completed:")
|
||||||
|
elseif awdef.type == "Challenge" then
|
||||||
|
custom_announce = S("Challenge Completed:")
|
||||||
else
|
else
|
||||||
custom_announce = S("Achievement gotten:")
|
custom_announce = S("Advancement Made:")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -283,9 +287,13 @@ function awards.unlock(name, award)
|
||||||
elseif awards.show_mode == "chat" then
|
elseif awards.show_mode == "chat" then
|
||||||
local chat_announce
|
local chat_announce
|
||||||
if awdef.secret == true then
|
if awdef.secret == true then
|
||||||
chat_announce = S("Secret achievement gotten: @1")
|
chat_announce = S("Secret Advancement Made: @1")
|
||||||
|
elseif awdef.type == "Goal" then
|
||||||
|
chat_announce = S("Goal Completed: @1")
|
||||||
|
elseif awdef.type == "Challenge" then
|
||||||
|
chat_announce = S("Challenge Completed: @1")
|
||||||
else
|
else
|
||||||
chat_announce = S("Achievement gotten: @1")
|
chat_announce = S("Advancement Made: @1")
|
||||||
end
|
end
|
||||||
-- use the chat console to send it
|
-- use the chat console to send it
|
||||||
minetest.chat_send_player(name, string.format(chat_announce, title))
|
minetest.chat_send_player(name, string.format(chat_announce, title))
|
||||||
|
@ -306,9 +314,13 @@ function awards.unlock(name, award)
|
||||||
})
|
})
|
||||||
local hud_announce
|
local hud_announce
|
||||||
if awdef.secret == true then
|
if awdef.secret == true then
|
||||||
hud_announce = S("Secret achievement gotten!")
|
hud_announce = S("Secret Advancement Made!")
|
||||||
|
elseif awdef.type == "Goal" then
|
||||||
|
hud_announce = S("Goal Completed!")
|
||||||
|
elseif awdef.type == "Challenge" then
|
||||||
|
hud_announce = S("Challenge Completed!")
|
||||||
else
|
else
|
||||||
hud_announce = S("Achievement gotten!")
|
hud_announce = S("Advancement Made!")
|
||||||
end
|
end
|
||||||
local two = player:hud_add({
|
local two = player:hud_add({
|
||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
|
@ -389,10 +401,10 @@ function awards.getFormspec(name, to, sid)
|
||||||
local def = awards.def[item.name]
|
local def = awards.def[item.name]
|
||||||
|
|
||||||
if def and def.secret and not item.got then
|
if def and def.secret and not item.got then
|
||||||
formspec = formspec .. "label[1,2.75;"..minetest.formspec_escape(S("(Secret achievement)")).."]"..
|
formspec = formspec .. "label[1,2.75;"..minetest.formspec_escape(S("(Secret Advancement)")).."]"..
|
||||||
"image[1,0;3,3;awards_unknown.png]"
|
"image[1,0;3,3;awards_unknown.png]"
|
||||||
if def and def.description then
|
if def and def.description then
|
||||||
formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(S("Get this achievement to find out what it is."))..";]"
|
formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;"..minetest.formspec_escape(S("Make this advancement to find out what it is."))..";]"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local title = item.name
|
local title = item.name
|
||||||
|
@ -450,7 +462,7 @@ function awards.getFormspec(name, to, sid)
|
||||||
first = false
|
first = false
|
||||||
|
|
||||||
if def.secret and not award.got then
|
if def.secret and not award.got then
|
||||||
formspec = formspec .. "#707070" .. minetest.formspec_escape(S("(Secret Award)"))
|
formspec = formspec .. "#707070" .. minetest.formspec_escape(S("(Secret Advancement)"))
|
||||||
else
|
else
|
||||||
local title = award.name
|
local title = award.name
|
||||||
if def and def.title then
|
if def and def.title then
|
||||||
|
|
|
@ -18,7 +18,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
minetest.register_chatcommand("awards", {
|
minetest.register_chatcommand("awards", {
|
||||||
params = S("[c|clear|disable|enable]"),
|
params = S("[c|clear|disable|enable]"),
|
||||||
description = S("Show, clear, disable or enable your achievements"),
|
description = S("Show, clear, disable or enable your advancements."),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
if param == "clear" then
|
if param == "clear" then
|
||||||
if awards.player(name).disabled ~= nil then
|
if awards.player(name).disabled ~= nil then
|
||||||
|
@ -30,10 +30,10 @@ minetest.register_chatcommand("awards", {
|
||||||
end
|
end
|
||||||
elseif param == "disable" then
|
elseif param == "disable" then
|
||||||
awards.disable(name)
|
awards.disable(name)
|
||||||
minetest.chat_send_player(name, S("You have disabled your achievements."))
|
minetest.chat_send_player(name, S("You have disabled your advancements."))
|
||||||
elseif param == "enable" then
|
elseif param == "enable" then
|
||||||
awards.enable(name)
|
awards.enable(name)
|
||||||
minetest.chat_send_player(name, S("You have enabled your achievements."))
|
minetest.chat_send_player(name, S("You have enabled your advancements."))
|
||||||
elseif param == "c" then
|
elseif param == "c" then
|
||||||
if awards.player(name).disabled ~= nil then
|
if awards.player(name).disabled ~= nil then
|
||||||
minetest.chat_send_player(name, S("Awards are disabled, enable them first by using /awards enable!"))
|
minetest.chat_send_player(name, S("Awards are disabled, enable them first by using /awards enable!"))
|
||||||
|
@ -50,16 +50,16 @@ minetest.register_chatcommand("awards", {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_privilege("achievements", {
|
minetest.register_privilege("advancements", {
|
||||||
description = S("Can give achievements to any player"),
|
description = S("Can give advancements to any player"),
|
||||||
give_to_singleplayer = false,
|
give_to_singleplayer = false,
|
||||||
give_to_admin = false,
|
give_to_admin = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("achievement", {
|
minetest.register_chatcommand("advancement", {
|
||||||
params = S("(grant <player> (<achievement> | all)) | list"),
|
params = S("(grant <player> (<advancement> | all)) | list"),
|
||||||
privs = { achievements = true },
|
privs = { advancements = true },
|
||||||
description = S("Give achievement to player or list all achievements"),
|
description = S("Give advancement to player or list all advancements"),
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
if param == "list" then
|
if param == "list" then
|
||||||
local list = {}
|
local list = {}
|
||||||
|
@ -92,7 +92,7 @@ minetest.register_chatcommand("achievement", {
|
||||||
awards.unlock(playername, achievement)
|
awards.unlock(playername, achievement)
|
||||||
return true, S("Done.")
|
return true, S("Done.")
|
||||||
else
|
else
|
||||||
return false, S("Achievement “@1” does not exist.", achievement)
|
return false, S("Advancement “@1” does not exist.", achievement)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
(Secret Award)=
|
(Secret Award)=
|
||||||
<achievement ID>=
|
<achievement ID>=
|
||||||
<name>=
|
<name>=
|
||||||
Achievement gotten!=
|
Advancement Made!=
|
||||||
Achievement gotten:=
|
Advancement Made:=
|
||||||
Achievement gotten: @1=
|
Advancement: @1=
|
||||||
Achievement not found.=
|
Achievement not found.=
|
||||||
All your awards and statistics have been cleared. You can now start again.=
|
All your awards and statistics have been cleared. You can now start again.=
|
||||||
Awards=
|
Awards=
|
||||||
|
@ -27,16 +27,16 @@ Join the game.=
|
||||||
List awards in chat (deprecated)=
|
List awards in chat (deprecated)=
|
||||||
Place a block: @1=
|
Place a block: @1=
|
||||||
Place blocks: @1×@2=
|
Place blocks: @1×@2=
|
||||||
Secret achievement gotten!=
|
Secret Advancement Made!=
|
||||||
Secret achievement gotten:=
|
Secret Advancement Made:=
|
||||||
Secret achievement gotten: @1=
|
Secret Advancement Made: @1=
|
||||||
Show details of an achievement=
|
Show details of an achievement=
|
||||||
Show, clear, disable or enable your achievements=
|
Show, clear, disable or enable your advancements.=
|
||||||
Get this achievement to find out what it is.=
|
Make this advancement to find out what it is.=
|
||||||
Write @1 chat messages.=
|
Write @1 chat messages.=
|
||||||
Write something in chat.=
|
Write something in chat.=
|
||||||
You have disabled your achievements.=
|
You have disabled your advancements.=
|
||||||
You have enabled your achievements.=
|
You have enabled your advancements.=
|
||||||
You have not gotten any awards.=
|
You have not gotten any awards.=
|
||||||
You've disabled awards. Type /awards enable to reenable.=
|
You've disabled awards. Type /awards enable to reenable.=
|
||||||
[c|clear|disable|enable]=
|
[c|clear|disable|enable]=
|
||||||
|
@ -49,16 +49,22 @@ Place @1 block(s).=
|
||||||
Dig @1 block(s).=
|
Dig @1 block(s).=
|
||||||
Eat @1 item(s).=
|
Eat @1 item(s).=
|
||||||
Craft @1 item(s).=
|
Craft @1 item(s).=
|
||||||
Can give achievements to any player=
|
Can give advancements to any player=
|
||||||
(grant <player> (<achievement> | all)) | list=
|
(grant <player> (<advancement> | all)) | list=
|
||||||
Give achievement to player or list all achievements=
|
Give advancement to player or list all advancements=
|
||||||
@1 (@2)=
|
@1 (@2)=
|
||||||
Invalid syntax.=
|
Invalid syntax.=
|
||||||
Invalid action.=
|
Invalid action.=
|
||||||
Player is not online.=
|
Player is not online.=
|
||||||
Done.=
|
Done.=
|
||||||
Achievement “@1” does not exist.=
|
Advancement “@1” does not exist.=
|
||||||
@1 has made the achievement @2=
|
@1 has made the advancement @2=
|
||||||
Mine a block: @1=
|
Mine a block: @1=
|
||||||
Mine blocks: @1×@2=
|
Mine blocks: @1×@2=
|
||||||
Awards are disabled, enable them first by using /awards enable!=
|
Awards are disabled, enable them first by using /awards enable!=
|
||||||
|
Goal Completed:=
|
||||||
|
Goal Completed!=
|
||||||
|
Goal Completed: @1=
|
||||||
|
Challenge Completed:=
|
||||||
|
Challenge Completed!=
|
||||||
|
Challenge Completed: @1=
|
||||||
|
|
|
@ -15,7 +15,9 @@ awards.register_achievement("mcl_buildWorkBench", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_crafting_table:crafting_table",
|
item = "mcl_crafting_table:crafting_table",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:buildPickaxe", {
|
awards.register_achievement("mcl:buildPickaxe", {
|
||||||
title = S("Time to Mine!"),
|
title = S("Time to Mine!"),
|
||||||
|
@ -25,7 +27,9 @@ awards.register_achievement("mcl:buildPickaxe", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_tools:pick_wood",
|
item = "mcl_tools:pick_wood",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:buildFurnace", {
|
awards.register_achievement("mcl:buildFurnace", {
|
||||||
title = S("Hot Topic"),
|
title = S("Hot Topic"),
|
||||||
|
@ -35,7 +39,9 @@ awards.register_achievement("mcl:buildFurnace", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_furnaces:furnace",
|
item = "mcl_furnaces:furnace",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:buildHoe", {
|
awards.register_achievement("mcl:buildHoe", {
|
||||||
title = S("Time to Farm!"),
|
title = S("Time to Farm!"),
|
||||||
|
@ -45,7 +51,9 @@ awards.register_achievement("mcl:buildHoe", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_farming:hoe_wood",
|
item = "mcl_farming:hoe_wood",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:makeBread", {
|
awards.register_achievement("mcl:makeBread", {
|
||||||
title = S("Bake Bread"),
|
title = S("Bake Bread"),
|
||||||
|
@ -55,7 +63,9 @@ awards.register_achievement("mcl:makeBread", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_farming:bread",
|
item = "mcl_farming:bread",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:bakeCake", {
|
awards.register_achievement("mcl:bakeCake", {
|
||||||
|
@ -66,7 +76,9 @@ awards.register_achievement("mcl:bakeCake", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_cake:cake",
|
item = "mcl_cake:cake",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:buildBetterPickaxe", {
|
awards.register_achievement("mcl:buildBetterPickaxe", {
|
||||||
title = S("Getting an Upgrade"),
|
title = S("Getting an Upgrade"),
|
||||||
|
@ -77,7 +89,9 @@ awards.register_achievement("mcl:buildBetterPickaxe", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_tools:pick_stone",
|
item = "mcl_tools:pick_stone",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:buildSword", {
|
awards.register_achievement("mcl:buildSword", {
|
||||||
title = S("Time to Strike!"),
|
title = S("Time to Strike!"),
|
||||||
|
@ -87,7 +101,9 @@ awards.register_achievement("mcl:buildSword", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_tools:sword_wood",
|
item = "mcl_tools:sword_wood",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:bookcase", {
|
awards.register_achievement("mcl:bookcase", {
|
||||||
|
@ -98,7 +114,9 @@ awards.register_achievement("mcl:bookcase", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_books:bookshelf",
|
item = "mcl_books:bookshelf",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:buildIronPickaxe", {
|
awards.register_achievement("mcl:buildIronPickaxe", {
|
||||||
|
@ -109,7 +127,9 @@ awards.register_achievement("mcl:buildIronPickaxe", {
|
||||||
type = "craft",
|
type = "craft",
|
||||||
item = "mcl_tools:pick_iron",
|
item = "mcl_tools:pick_iron",
|
||||||
target = 1
|
target = 1
|
||||||
}
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Item pickup achievements: These are awarded when picking up a certain item.
|
-- Item pickup achievements: These are awarded when picking up a certain item.
|
||||||
|
@ -118,46 +138,61 @@ awards.register_achievement("mcl:diamonds", {
|
||||||
title = S("DIAMONDS!"),
|
title = S("DIAMONDS!"),
|
||||||
description = S("Pick up a diamond from the floor."),
|
description = S("Pick up a diamond from the floor."),
|
||||||
icon = "mcl_core_diamond_ore.png",
|
icon = "mcl_core_diamond_ore.png",
|
||||||
|
type = "Advancement",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:blazeRod", {
|
awards.register_achievement("mcl:blazeRod", {
|
||||||
title = S("Into Fire"),
|
title = S("Into Fire"),
|
||||||
description = S("Pick up a blaze rod from the floor."),
|
description = S("Pick up a blaze rod from the floor."),
|
||||||
icon = "mcl_mobitems_blaze_rod.png",
|
icon = "mcl_mobitems_blaze_rod.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:killCow", {
|
awards.register_achievement("mcl:killCow", {
|
||||||
title = S("Cow Tipper"),
|
title = S("Cow Tipper"),
|
||||||
description = S("Pick up leather from the floor.\nHint: Cows and some other animals have a chance to drop leather, when killed."),
|
description = S("Pick up leather from the floor.\nHint: Cows and some other animals have a chance to drop leather, when killed."),
|
||||||
icon = "mcl_mobitems_leather.png",
|
icon = "mcl_mobitems_leather.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:mineWood", {
|
awards.register_achievement("mcl:mineWood", {
|
||||||
title = S("Getting Wood"),
|
title = S("Getting Wood"),
|
||||||
description = S("Pick up a wood item from the ground.\nHint: Punch a tree trunk until it pops out as an item."),
|
description = S("Pick up a wood item from the ground.\nHint: Punch a tree trunk until it pops out as an item."),
|
||||||
icon = "default_tree.png",
|
icon = "default_tree.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:whosCuttingOnions", {
|
awards.register_achievement("mcl:whosCuttingOnions", {
|
||||||
title = S("Who is Cutting Onions?"),
|
title = S("Who is Cutting Onions?"),
|
||||||
description = S("Pick up a crying obsidian from the floor."),
|
description = S("Pick up a crying obsidian from the floor."),
|
||||||
icon = "default_obsidian.png^mcl_core_crying_obsidian.png",
|
icon = "default_obsidian.png^mcl_core_crying_obsidian.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:hiddenInTheDepths", {
|
awards.register_achievement("mcl:hiddenInTheDepths", {
|
||||||
title = S("Hidden in the Depths"),
|
title = S("Hidden in the Depths"),
|
||||||
description = S("Pick up an Ancient Debris from the floor."),
|
description = S("Pick up an Ancient Debris from the floor."),
|
||||||
icon = "mcl_nether_ancient_debris_side.png",
|
icon = "mcl_nether_ancient_debris_side.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:PickUpDragonEgg", {
|
awards.register_achievement("mcl:PickUpDragonEgg", {
|
||||||
title = S("The Next Generation"),
|
title = S("The Next Generation"),
|
||||||
description = S("Hold the Dragon Egg.\nHint: Pick up the egg from the ground and have it in your inventory."),
|
description = S("Hold the Dragon Egg.\nHint: Pick up the egg from the ground and have it in your inventory."),
|
||||||
icon = "mcl_end_dragon_egg.png",
|
icon = "mcl_end_dragon_egg.png",
|
||||||
|
type = "Goal",
|
||||||
|
group = "End",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:skysTheLimit", {
|
awards.register_achievement("mcl:skysTheLimit", {
|
||||||
title = S("Sky's the Limit"),
|
title = S("Sky's the Limit"),
|
||||||
description = S("Find the elytra and prepare to fly above and beyond!"),
|
description = S("Find the elytra and prepare to fly above and beyond!"),
|
||||||
icon = "mcl_armor_inv_elytra.png",
|
icon = "mcl_armor_inv_elytra.png",
|
||||||
|
type = "Goal",
|
||||||
|
group = "End",
|
||||||
}) -- TODO: Make also unlock when moved to inventory, not just picking up from ground
|
}) -- TODO: Make also unlock when moved to inventory, not just picking up from ground
|
||||||
|
|
||||||
-- 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
|
||||||
|
@ -166,11 +201,15 @@ awards.register_achievement("mcl:acquireIron", {
|
||||||
title = S("Aquire Hardware"),
|
title = S("Aquire Hardware"),
|
||||||
description = S("Take an iron ingot from a furnace's output slot.\nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace."),
|
description = S("Take an iron ingot from a furnace's output slot.\nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace."),
|
||||||
icon = "default_steel_ingot.png",
|
icon = "default_steel_ingot.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:cookFish", {
|
awards.register_achievement("mcl:cookFish", {
|
||||||
title = S("Delicious Fish"),
|
title = S("Delicious Fish"),
|
||||||
description = S("Take a cooked fish from a furnace.\nHint: Use a fishing rod to catch a fish and cook it in a furnace."),
|
description = S("Take a cooked fish from a furnace.\nHint: Use a fishing rod to catch a fish and cook it in a furnace."),
|
||||||
icon = "mcl_fishing_fish_cooked.png",
|
icon = "mcl_fishing_fish_cooked.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Other achievements triggered outside of mcl_achievements
|
-- Other achievements triggered outside of mcl_achievements
|
||||||
|
@ -180,6 +219,8 @@ awards.register_achievement("mcl:onARail", {
|
||||||
title = S("On A Rail"),
|
title = S("On A Rail"),
|
||||||
description = S("Travel by minecart for at least 1000 meters from your starting point in a single ride."),
|
description = S("Travel by minecart for at least 1000 meters from your starting point in a single ride."),
|
||||||
icon = "default_rail.png",
|
icon = "default_rail.png",
|
||||||
|
type = "Challenge",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_bows
|
-- Triggered in mcl_bows
|
||||||
|
@ -189,6 +230,8 @@ awards.register_achievement("mcl:snipeSkeleton", {
|
||||||
-- TODO: The range should be 50, not 20. Nerfed because of reduced bow range
|
-- TODO: The range should be 50, not 20. Nerfed because of reduced bow range
|
||||||
description = S("Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters."),
|
description = S("Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters."),
|
||||||
icon = "mcl_bows_bow.png",
|
icon = "mcl_bows_bow.png",
|
||||||
|
type = "Challenge",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_portals
|
-- Triggered in mcl_portals
|
||||||
|
@ -196,18 +239,24 @@ awards.register_achievement("mcl:buildNetherPortal", {
|
||||||
title = S("We Need to Go Deeper"),
|
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 = "mcl_fire_flint_and_steel.png",
|
icon = "mcl_fire_flint_and_steel.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:enterEndPortal", {
|
awards.register_achievement("mcl:enterEndPortal", {
|
||||||
title = S("The End?"),
|
title = S("The End?"),
|
||||||
description = S("Or the beginning?\nHint: Enter an end portal."),
|
description = S("Or the beginning?\nHint: Enter an end portal."),
|
||||||
icon = "mcl_end_end_stone.png",
|
icon = "mcl_end_end_stone.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:theNether", {
|
awards.register_achievement("mcl:theNether", {
|
||||||
title = S("The Nether"),
|
title = S("The Nether"),
|
||||||
description = S("Bring summer clothes.\nHint: Enter the Nether."),
|
description = S("Bring summer clothes.\nHint: Enter the Nether."),
|
||||||
icon = "mcl_nether_netherrack.png",
|
icon = "mcl_nether_netherrack.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_totems
|
-- Triggered in mcl_totems
|
||||||
|
@ -215,19 +264,25 @@ awards.register_achievement("mcl:postMortal", {
|
||||||
title = S("Postmortal"),
|
title = S("Postmortal"),
|
||||||
description = S("Use a Totem of Undying to cheat death."),
|
description = S("Use a Totem of Undying to cheat death."),
|
||||||
icon = "mcl_totems_totem.png",
|
icon = "mcl_totems_totem.png",
|
||||||
|
type = "Goal",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_beds
|
-- Triggered in mcl_beds
|
||||||
awards.register_achievement("mcl:sweetDreams", {
|
awards.register_achievement("mcl:sweetDreams", {
|
||||||
title = S("Sweet Dreams"),
|
title = S("Sweet Dreams"),
|
||||||
description = S("Sleep in a bed to change your respawn point."),
|
description = S("Sleep in a bed to change your respawn point."),
|
||||||
icon = "mcl_beds_bed_red.png",
|
icon = "mcl_beds_bed_red_inv.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:notQuiteNineLives", {
|
awards.register_achievement("mcl:notQuiteNineLives", {
|
||||||
title = S('Not Quite "Nine" Lives'),
|
title = S('Not Quite "Nine" Lives'),
|
||||||
description = S("Charge a Respawn Anchor to the maximum."),
|
description = S("Charge a Respawn Anchor to the maximum."),
|
||||||
icon = "respawn_anchor_side4.png",
|
icon = "respawn_anchor_side4.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mobs_mc
|
-- Triggered in mobs_mc
|
||||||
|
@ -235,24 +290,32 @@ awards.register_achievement("mcl:whatAdeal", {
|
||||||
title = S("What A Deal!"),
|
title = S("What A Deal!"),
|
||||||
description = S("Successfully trade with a Villager."),
|
description = S("Successfully trade with a Villager."),
|
||||||
icon = "mcl_core_emerald.png",
|
icon = "mcl_core_emerald.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Adventure",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:tacticalFishing", {
|
awards.register_achievement("mcl:tacticalFishing", {
|
||||||
title = S("Tactical Fishing"),
|
title = S("Tactical Fishing"),
|
||||||
description = S("Catch a fish... without a fishing rod!"),
|
description = S("Catch a fish... without a fishing rod!"),
|
||||||
icon = "pufferfish_bucket.png",
|
icon = "pufferfish_bucket.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:witheringHeights", {
|
awards.register_achievement("mcl:witheringHeights", {
|
||||||
title = S("Withering Heights"),
|
title = S("Withering Heights"),
|
||||||
description = S("Summon the wither from the dead."),
|
description = S("Summon the wither from the dead."),
|
||||||
icon = "mcl_mobitems_nether_star.png",
|
icon = "mcl_mobitems_nether_star.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:freeTheEnd", {
|
awards.register_achievement("mcl:freeTheEnd", {
|
||||||
title = S("Free the End"),
|
title = S("Free the End"),
|
||||||
description = S("Kill the ender dragon. Good Luck!"),
|
description = S("Kill the ender dragon. Good Luck!"),
|
||||||
icon = "(spawn_egg.png^[multiply:#252525)^(spawn_egg_overlay.png^[multiply:#b313c9)", -- TODO: Dragon Head Icon
|
icon = "(spawn_egg.png^[multiply:#252525)^(spawn_egg_overlay.png^[multiply:#b313c9)", -- TODO: Dragon Head Icon
|
||||||
|
type = "Advancement",
|
||||||
|
group = "End",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_fishing
|
-- Triggered in mcl_fishing
|
||||||
|
@ -260,6 +323,8 @@ awards.register_achievement("mcl:fishyBusiness", {
|
||||||
title = S("Fishy Business"),
|
title = S("Fishy Business"),
|
||||||
description = S("Catch a fish.\nHint: Catch a fish, salmon, clownfish, or pufferfish."),
|
description = S("Catch a fish.\nHint: Catch a fish, salmon, clownfish, or pufferfish."),
|
||||||
icon = "mcl_fishing_fishing_rod.png",
|
icon = "mcl_fishing_fishing_rod.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_compass
|
-- Triggered in mcl_compass
|
||||||
|
@ -267,6 +332,8 @@ awards.register_achievement("mcl:countryLode", {
|
||||||
title = S("Country Lode,\nTake Me Home"),
|
title = S("Country Lode,\nTake Me Home"),
|
||||||
description = S("Use a compass on a Lodestone."),
|
description = S("Use a compass on a Lodestone."),
|
||||||
icon = "lodestone_side4.png",
|
icon = "lodestone_side4.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_smithing_table
|
-- Triggered in mcl_smithing_table
|
||||||
|
@ -274,6 +341,8 @@ awards.register_achievement("mcl:seriousDedication", {
|
||||||
title = S("Serious Dedication"),
|
title = S("Serious Dedication"),
|
||||||
description = S("Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices."),
|
description = S("Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices."),
|
||||||
icon = "farming_tool_netheritehoe.png",
|
icon = "farming_tool_netheritehoe.png",
|
||||||
|
type = "Challenge",
|
||||||
|
group = "Husbandry",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_brewing
|
-- Triggered in mcl_brewing
|
||||||
|
@ -281,6 +350,8 @@ awards.register_achievement("mcl:localBrewery", {
|
||||||
title = S("Local Brewery"),
|
title = S("Local Brewery"),
|
||||||
description = S("Brew a Potion.\nHint: Take a potion or glass bottle out of the brewing stand."),
|
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",
|
icon = "mcl_potions_potion_overlay.png^[colorize:#F82423:"..tostring(127).."^mcl_potions_potion_bottle.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_enchanting
|
-- Triggered in mcl_enchanting
|
||||||
|
@ -288,6 +359,8 @@ awards.register_achievement("mcl:enchanter", {
|
||||||
title = S("Enchanter"),
|
title = S("Enchanter"),
|
||||||
description = S("Enchant an item using an Enchantment Table."),
|
description = S("Enchant an item using an Enchantment Table."),
|
||||||
icon = "mcl_enchanting_book_enchanted.png",
|
icon = "mcl_enchanting_book_enchanted.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
||||||
--Triggered in mcl_beacons
|
--Triggered in mcl_beacons
|
||||||
|
@ -295,12 +368,16 @@ awards.register_achievement("mcl:beacon", {
|
||||||
title = S("Bring Home the Beacon"),
|
title = S("Bring Home the Beacon"),
|
||||||
description = S("Use a beacon."),
|
description = S("Use a beacon."),
|
||||||
icon = "beacon_achievement_icon.png",
|
icon = "beacon_achievement_icon.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
awards.register_achievement("mcl:maxed_beacon", {
|
awards.register_achievement("mcl:maxed_beacon", {
|
||||||
title = S("Beaconator"),
|
title = S("Beaconator"),
|
||||||
description = S("Use a fully powered beacon."),
|
description = S("Use a fully powered beacon."),
|
||||||
icon = "beacon_achievement_icon.png",
|
icon = "beacon_achievement_icon.png",
|
||||||
|
type = "Goal",
|
||||||
|
group = "Nether",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Triggered in mcl_end
|
-- Triggered in mcl_end
|
||||||
|
@ -308,6 +385,8 @@ awards.register_achievement("mcl:theEndAgain", {
|
||||||
title = S("The End... Again..."),
|
title = S("The End... Again..."),
|
||||||
description = S("Respawn the Ender Dragon."),
|
description = S("Respawn the Ender Dragon."),
|
||||||
icon = "mcl_end_crystal_item.png",
|
icon = "mcl_end_crystal_item.png",
|
||||||
|
type = "Goal",
|
||||||
|
group = "End",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
||||||
|
@ -391,14 +470,20 @@ awards.register_achievement("mcl:stoneAge", {
|
||||||
title = S("Stone Age"),
|
title = S("Stone Age"),
|
||||||
description = S("Mine a stone with new pickaxe."),
|
description = S("Mine a stone with new pickaxe."),
|
||||||
icon = "default_cobble.png",
|
icon = "default_cobble.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:hotStuff", {
|
awards.register_achievement("mcl:hotStuff", {
|
||||||
title = S("Hot Stuff"),
|
title = S("Hot Stuff"),
|
||||||
description = S("Put lava in a bucket."),
|
description = S("Put lava in a bucket."),
|
||||||
icon = "bucket_lava.png",
|
icon = "bucket_lava.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
awards.register_achievement("mcl:obsidian", {
|
awards.register_achievement("mcl:obsidian", {
|
||||||
title = S("Ice Bucket Challenge"),
|
title = S("Ice Bucket Challenge"),
|
||||||
description = S("Obtain an obsidian block."),
|
description = S("Obtain an obsidian block."),
|
||||||
icon = "default_obsidian.png",
|
icon = "default_obsidian.png",
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
})
|
})
|
||||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -392,7 +392,7 @@ function mcl_inventory.set_creative_formspec(player, start_i, pagenum, inv_size,
|
||||||
-- Achievements button
|
-- Achievements button
|
||||||
"image_button[9,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" ..
|
"image_button[9,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" ..
|
||||||
--"style_type[image_button;border=;bgimg=;bgimg_pressed=]" ..
|
--"style_type[image_button;border=;bgimg=;bgimg_pressed=]" ..
|
||||||
"tooltip[__mcl_achievements;"..F(S("Achievements")) .. "]" ..
|
"tooltip[__mcl_achievements;"..F(S("Advancements")) .. "]" ..
|
||||||
|
|
||||||
-- Switch stack size button
|
-- Switch stack size button
|
||||||
"image_button[9,4;1,1;default_apple.png;__switch_stack;]" ..
|
"image_button[9,4;1,1;default_apple.png;__switch_stack;]" ..
|
||||||
|
|
|
@ -119,7 +119,7 @@ local function set_inventory(player, armor_change_only)
|
||||||
form = form ..
|
form = form ..
|
||||||
-- Achievements button
|
-- Achievements button
|
||||||
"image_button[7,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" ..
|
"image_button[7,3;1,1;mcl_achievements_button.png;__mcl_achievements;]" ..
|
||||||
"tooltip[__mcl_achievements;" .. F(S("Achievements")) .. "]" ..
|
"tooltip[__mcl_achievements;" .. F(S("Advancements")) .. "]" ..
|
||||||
|
|
||||||
-- For shortcuts
|
-- For shortcuts
|
||||||
"listring[current_player;main]" ..
|
"listring[current_player;main]" ..
|
||||||
|
@ -208,7 +208,6 @@ end
|
||||||
--Insta "digging" nodes in gamemode-creative
|
--Insta "digging" nodes in gamemode-creative
|
||||||
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||||
if not puncher or not puncher:is_player() then return end
|
if not puncher or not puncher:is_player() then return end
|
||||||
if minetest.is_creative_enabled() then return end
|
|
||||||
local name = puncher:get_player_name()
|
local name = puncher:get_player_name()
|
||||||
if not minetest.is_creative_enabled(name) then return end
|
if not minetest.is_creative_enabled(name) then return end
|
||||||
if pointed_thing.type ~= "node" then return end
|
if pointed_thing.type ~= "node" then return end
|
||||||
|
@ -255,10 +254,13 @@ minetest.register_chatcommand("gamemode",{
|
||||||
privs = { server = true },
|
privs = { server = true },
|
||||||
func = function(n,param)
|
func = function(n,param)
|
||||||
-- Full input validation ( just for @erlehmann <3 )
|
-- Full input validation ( just for @erlehmann <3 )
|
||||||
local p = minetest.get_player_by_name(n)
|
local p
|
||||||
local args = param:split(" ")
|
local args = param:split(" ")
|
||||||
if args[2] ~= nil then
|
if args[2] ~= nil then
|
||||||
p = minetest.get_player_by_name(args[2])
|
p = minetest.get_player_by_name(args[2])
|
||||||
|
n = args[2]
|
||||||
|
else
|
||||||
|
p = minetest.get_player_by_name(n)
|
||||||
end
|
end
|
||||||
if not p then
|
if not p then
|
||||||
return false, S("Player not online")
|
return false, S("Player not online")
|
||||||
|
@ -268,6 +270,7 @@ minetest.register_chatcommand("gamemode",{
|
||||||
elseif args[1] ~= nil then
|
elseif args[1] ~= nil then
|
||||||
mcl_inventory.player_set_gamemode(p,args[1])
|
mcl_inventory.player_set_gamemode(p,args[1])
|
||||||
end
|
end
|
||||||
|
|
||||||
--Result message - show effective game mode
|
--Result message - show effective game mode
|
||||||
local gm = p:get_meta():get_string("gamemode")
|
local gm = p:get_meta():get_string("gamemode")
|
||||||
if gm == "" then gm = gamemodes[1] end
|
if gm == "" then gm = gamemodes[1] end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Recipe book=
|
Recipe book=
|
||||||
Help=
|
Help=
|
||||||
Select player skin=
|
Select player skin=
|
||||||
Achievements=
|
Advancements=
|
||||||
Building Blocks=
|
Building Blocks=
|
||||||
Decoration Blocks=
|
Decoration Blocks=
|
||||||
Redstone=
|
Redstone=
|
||||||
|
|
|
@ -70,8 +70,8 @@ minetest.register_globalstep(function(dtime)
|
||||||
hud_elem_type = "image",
|
hud_elem_type = "image",
|
||||||
position = position,
|
position = position,
|
||||||
offset = offset,
|
offset = offset,
|
||||||
scale = {x = 2.75, y = 2.75},
|
scale = {x = 0.46875, y = 0.46875},
|
||||||
text = "mcl_offhand_slot.png",
|
text = "mcl_offhand_slot.png" .. "^[resize:" .. max_offhand_px .. "x" .. max_offhand_px,
|
||||||
z_index = 0,
|
z_index = 0,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -80,7 +80,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
hud_elem_type = "image",
|
hud_elem_type = "image",
|
||||||
position = position,
|
position = position,
|
||||||
offset = offset,
|
offset = offset,
|
||||||
scale = {x = 0.4, y = 0.4},
|
scale = {x = 0.375, y = 0.375},
|
||||||
text = item_texture,
|
text = item_texture,
|
||||||
z_index = 1,
|
z_index = 1,
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,8 +11,10 @@
|
||||||
--Note that the table storing timeouts use playername as index insteed of player objects (faster)
|
--Note that the table storing timeouts use playername as index insteed of player objects (faster)
|
||||||
--This is intended in order to speedup the process of removing HUD elements the the timeout is up
|
--This is intended in order to speedup the process of removing HUD elements the the timeout is up
|
||||||
|
|
||||||
|
---@type table<string, table<ObjectRef, any>>
|
||||||
local huds_idx = {}
|
local huds_idx = {}
|
||||||
|
|
||||||
|
---@type table<string, table<string, number>>
|
||||||
local hud_hide_timeouts = {}
|
local hud_hide_timeouts = {}
|
||||||
|
|
||||||
hud_hide_timeouts.title = {}
|
hud_hide_timeouts.title = {}
|
||||||
|
@ -24,17 +26,19 @@ huds_idx.subtitle = {}
|
||||||
huds_idx.actionbar = {}
|
huds_idx.actionbar = {}
|
||||||
|
|
||||||
mcl_title = {}
|
mcl_title = {}
|
||||||
mcl_title.defaults = {fadein = 10, stay = 70, fadeout = 20}
|
mcl_title.defaults = { fadein = 10, stay = 70, fadeout = 20 }
|
||||||
mcl_title.layout = {}
|
mcl_title.layout = {}
|
||||||
mcl_title.layout.title = {position = {x = 0.5, y = 0.5}, alignment = {x = 0, y = -1.3}, size = 7}
|
mcl_title.layout.title = { position = { x = 0.5, y = 0.5 }, alignment = { x = 0, y = -1.3 }, size = 7 }
|
||||||
mcl_title.layout.subtitle = {position = {x = 0.5, y = 0.5}, alignment = {x = 0, y = 1.7}, size = 4}
|
mcl_title.layout.subtitle = { position = { x = 0.5, y = 0.5 }, alignment = { x = 0, y = 1.7 }, size = 4 }
|
||||||
mcl_title.layout.actionbar = {position = {x = 0.5, y = 1}, alignment = {x = 0, y = 0}, size = 1}
|
mcl_title.layout.actionbar = { position = { x = 0.5, y = 1 }, alignment = { x = 0, y = 0 }, size = 1 }
|
||||||
|
|
||||||
local get_color = mcl_util.get_color
|
local get_color = mcl_util.get_color
|
||||||
|
|
||||||
--local string = string
|
--local string = string
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
|
||||||
|
---@param gametick integer
|
||||||
|
---@return number?
|
||||||
local function gametick_to_secondes(gametick)
|
local function gametick_to_secondes(gametick)
|
||||||
if gametick then
|
if gametick then
|
||||||
return gametick / 20
|
return gametick / 20
|
||||||
|
@ -44,7 +48,10 @@ local function gametick_to_secondes(gametick)
|
||||||
end
|
end
|
||||||
|
|
||||||
--https://github.com/minetest/minetest/blob/b3b075ea02034306256b486dd45410aa765f035a/doc/lua_api.txt#L8477
|
--https://github.com/minetest/minetest/blob/b3b075ea02034306256b486dd45410aa765f035a/doc/lua_api.txt#L8477
|
||||||
--[[
|
|
||||||
|
---@param bold? boolean
|
||||||
|
---@param italic? boolean
|
||||||
|
---@return integer
|
||||||
local function style_to_bits(bold, italic)
|
local function style_to_bits(bold, italic)
|
||||||
if bold then
|
if bold then
|
||||||
if italic then
|
if italic then
|
||||||
|
@ -60,9 +67,11 @@ local function style_to_bits(bold, italic)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
]]
|
|
||||||
|
|
||||||
--PARAMS SYSTEM
|
local no_style = style_to_bits(false, false)
|
||||||
|
|
||||||
|
---PARAMS SYSTEM
|
||||||
|
---@type table<ObjectRef, {stay: integer}>
|
||||||
local player_params = {}
|
local player_params = {}
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
@ -78,8 +87,8 @@ minetest.register_on_joinplayer(function(player)
|
||||||
position = mcl_title.layout.title.position,
|
position = mcl_title.layout.title.position,
|
||||||
alignment = mcl_title.layout.title.alignment,
|
alignment = mcl_title.layout.title.alignment,
|
||||||
text = "",
|
text = "",
|
||||||
--style = 0,
|
style = no_style,
|
||||||
size = {x = mcl_title.layout.title.size},
|
size = { x = mcl_title.layout.title.size },
|
||||||
number = hex_color,
|
number = hex_color,
|
||||||
z_index = 100,
|
z_index = 100,
|
||||||
})
|
})
|
||||||
|
@ -88,19 +97,19 @@ minetest.register_on_joinplayer(function(player)
|
||||||
position = mcl_title.layout.subtitle.position,
|
position = mcl_title.layout.subtitle.position,
|
||||||
alignment = mcl_title.layout.subtitle.alignment,
|
alignment = mcl_title.layout.subtitle.alignment,
|
||||||
text = "",
|
text = "",
|
||||||
--style = 0,
|
style = no_style,
|
||||||
size = {x = mcl_title.layout.subtitle.size},
|
size = { x = mcl_title.layout.subtitle.size },
|
||||||
number = hex_color,
|
number = hex_color,
|
||||||
z_index = 100,
|
z_index = 100,
|
||||||
})
|
})
|
||||||
huds_idx.actionbar[player] = player:hud_add({
|
huds_idx.actionbar[player] = player:hud_add({
|
||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
position = mcl_title.layout.actionbar.position,
|
position = mcl_title.layout.actionbar.position,
|
||||||
offset = {x = 0, y = -210},
|
offset = { x = 0, y = -210 },
|
||||||
alignment = mcl_title.layout.actionbar.alignment,
|
alignment = mcl_title.layout.actionbar.alignment,
|
||||||
--style = 0,
|
style = no_style,
|
||||||
text = "",
|
text = "",
|
||||||
size = {x = mcl_title.layout.actionbar.size},
|
size = { x = mcl_title.layout.actionbar.size },
|
||||||
number = hex_color,
|
number = hex_color,
|
||||||
z_index = 100,
|
z_index = 100,
|
||||||
})
|
})
|
||||||
|
@ -123,6 +132,8 @@ minetest.register_on_leaveplayer(function(player)
|
||||||
hud_hide_timeouts.actionbar[playername] = nil
|
hud_hide_timeouts.actionbar[playername] = nil
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
---@param player ObjectRef
|
||||||
|
---@param data {stay: integer}
|
||||||
function mcl_title.params_set(player, data)
|
function mcl_title.params_set(player, data)
|
||||||
player_params[player] = {
|
player_params[player] = {
|
||||||
stay = data.stay or mcl_title.defaults.stay,
|
stay = data.stay or mcl_title.defaults.stay,
|
||||||
|
@ -131,12 +142,18 @@ function mcl_title.params_set(player, data)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param player ObjectRef
|
||||||
|
---@return {stay: integer}
|
||||||
function mcl_title.params_get(player)
|
function mcl_title.params_get(player)
|
||||||
return player_params[player]
|
return player_params[player]
|
||||||
end
|
end
|
||||||
|
|
||||||
--API FUNCTIONS
|
--API FUNCTIONS
|
||||||
|
|
||||||
|
---@param player ObjectRef
|
||||||
|
---@param type '"title"'|'"subtitle"'|'"actionbar"'
|
||||||
|
---@param data {text: string, color: string, stay: integer, bold: boolean, italic: boolean}
|
||||||
|
---@return boolean
|
||||||
function mcl_title.set(player, type, data)
|
function mcl_title.set(player, type, data)
|
||||||
if not data.color then
|
if not data.color then
|
||||||
data.color = "white"
|
data.color = "white"
|
||||||
|
@ -149,20 +166,25 @@ function mcl_title.set(player, type, data)
|
||||||
player:hud_change(huds_idx[type][player], "text", data.text)
|
player:hud_change(huds_idx[type][player], "text", data.text)
|
||||||
player:hud_change(huds_idx[type][player], "number", hex_color)
|
player:hud_change(huds_idx[type][player], "number", hex_color)
|
||||||
|
|
||||||
--apply bold and italic
|
-- Apply bold and italic
|
||||||
--player:hud_change(huds_idx[type][player], "style", style_to_bits(data.bold, data.italic))
|
player:hud_change(huds_idx[type][player], "style", style_to_bits(data.bold, data.italic))
|
||||||
|
|
||||||
|
hud_hide_timeouts[type][player:get_player_name()] = gametick_to_secondes(data.stay) or
|
||||||
|
gametick_to_secondes(mcl_title.params_get(player).stay)
|
||||||
|
|
||||||
hud_hide_timeouts[type][player:get_player_name()] = gametick_to_secondes(data.stay) or gametick_to_secondes(mcl_title.params_get(player).stay)
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param player ObjectRef?
|
||||||
|
---@param type '"title"'|'"subtitle"'|'"actionbar"'
|
||||||
function mcl_title.remove(player, type)
|
function mcl_title.remove(player, type)
|
||||||
if player then
|
if player then
|
||||||
player:hud_change(huds_idx[type][player], "text", "")
|
player:hud_change(huds_idx[type][player], "text", "")
|
||||||
--player:hud_change(huds_idx[type][player], "style", 0) --no styling
|
player:hud_change(huds_idx[type][player], "style", no_style)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param player ObjectRef
|
||||||
function mcl_title.clear(player)
|
function mcl_title.clear(player)
|
||||||
mcl_title.remove(player, "title")
|
mcl_title.remove(player, "title")
|
||||||
mcl_title.remove(player, "subtitle")
|
mcl_title.remove(player, "subtitle")
|
||||||
|
@ -179,6 +201,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
subtitle = {},
|
subtitle = {},
|
||||||
actionbar = {},
|
actionbar = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
for element, content in pairs(hud_hide_timeouts) do
|
for element, content in pairs(hud_hide_timeouts) do
|
||||||
for name, timeout in pairs(content) do
|
for name, timeout in pairs(content) do
|
||||||
timeout = timeout - dtime
|
timeout = timeout - dtime
|
||||||
|
@ -190,47 +213,95 @@ minetest.register_globalstep(function(dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hud_hide_timeouts = new_timeouts
|
hud_hide_timeouts = new_timeouts
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
--DEBUG STUFF!!
|
--DEBUG STUFF!!
|
||||||
--[[
|
--TODO:Proper /title command that can send the title to other players.
|
||||||
|
--These commands are just for debugging right now.
|
||||||
|
local dbg_msg = "Note that these are just debug commands right now. e.g. the title is only sent to he player issuing the command. Proper /title commands will be added in the future."
|
||||||
minetest.register_chatcommand("title", {
|
minetest.register_chatcommand("title", {
|
||||||
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
mcl_title.set(player, "title", {text=param, color="gold", bold=true, italic=true})
|
if player then
|
||||||
|
mcl_title.set(player, "title", { text = param, color = "gold", bold = true, italic = true })
|
||||||
|
return true, dbg_msg
|
||||||
|
else
|
||||||
|
return false, dbg_msg
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("subtitle", {
|
minetest.register_chatcommand("subtitle", {
|
||||||
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
mcl_title.set(player, "subtitle", {text=param, color="gold"})
|
if player then
|
||||||
|
mcl_title.set(player, "subtitle", { text = param, color = "gold" })
|
||||||
|
return true, dbg_msg
|
||||||
|
else
|
||||||
|
return false, dbg_msg
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("actionbar", {
|
minetest.register_chatcommand("actionbar", {
|
||||||
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
mcl_title.set(player, "actionbar", {text=param, color="gold"})
|
if player then
|
||||||
|
mcl_title.set(player, "actionbar", { text = param, color = "gold", bold = true, italic = true })
|
||||||
|
return true, dbg_msg
|
||||||
|
else
|
||||||
|
return false, dbg_msg
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("timeout", {
|
minetest.register_chatcommand("title_timeout", {
|
||||||
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
mcl_title.params_set(player, {stay = 600})
|
if player then
|
||||||
|
mcl_title.params_set(player, { stay = 600 })
|
||||||
|
return true, dbg_msg
|
||||||
|
else
|
||||||
|
return false, dbg_msg
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("all", {
|
minetest.register_chatcommand("title_all", {
|
||||||
|
privs = { debug = true },
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
mcl_title.params_set(player, {stay = 600})
|
if player then
|
||||||
mcl_title.set(player, "title", {text=param, color="gold"})
|
mcl_title.params_set(player, { stay = 600 })
|
||||||
mcl_title.set(player, "subtitle", {text=param, color="gold"})
|
mcl_title.set(player, "title", { text = param, color = "gold" })
|
||||||
mcl_title.set(player, "actionbar", {text=param, color="gold"})
|
mcl_title.set(player, "subtitle", { text = param, color = "gold" })
|
||||||
|
mcl_title.set(player, "actionbar", { text = param, color = "gold" })
|
||||||
|
return true, dbg_msg
|
||||||
|
else
|
||||||
|
return false, dbg_msg
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_chatcommand("title_all_styles", {
|
||||||
|
privs = { debug = true },
|
||||||
|
func = function(name, param)
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
if player then
|
||||||
|
mcl_title.params_set(player, { stay = 600 })
|
||||||
|
mcl_title.set(player, "title", { text = param, color = "gold" })
|
||||||
|
mcl_title.set(player, "subtitle", { text = param, color = "gold", bold = true })
|
||||||
|
mcl_title.set(player, "actionbar", { text = param, color = "gold", italic = true })
|
||||||
|
return true, dbg_msg
|
||||||
|
else
|
||||||
|
return false, dbg_msg
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
]]
|
|
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 306 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 5.6 KiB |
|
@ -129,27 +129,24 @@ if minetest.get_modpath("mcl_sounds") then
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_beds.register_bed(name, def)
|
function mcl_beds.register_bed(name, def)
|
||||||
local node_box_bottom, selection_box_bottom, collision_box_bottom
|
local common_box = {
|
||||||
if def.nodebox and def.nodebox.bottom then
|
type = "fixed",
|
||||||
node_box_bottom = { type = "fixed", fixed = def.nodebox.bottom }
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
||||||
end
|
}
|
||||||
if def.selectionbox and def.selectionbox.bottom then
|
|
||||||
selection_box_bottom = { type = "fixed", fixed = def.selectionbox.bottom }
|
|
||||||
end
|
|
||||||
if def.collisionbox and def.collisionbox.bottom then
|
|
||||||
collision_box_bottom = { type = "fixed", fixed = def.collisionbox.bottom }
|
|
||||||
end
|
|
||||||
minetest.register_node(name .. "_bottom", {
|
minetest.register_node(name .. "_bottom", {
|
||||||
description = def.description,
|
description = def.description,
|
||||||
_tt_help = S("Allows you to sleep"),
|
_tt_help = S("Allows you to sleep"),
|
||||||
|
|
||||||
_doc_items_longdesc = def._doc_items_longdesc or beddesc,
|
_doc_items_longdesc = def._doc_items_longdesc or beddesc,
|
||||||
_doc_items_usagehelp = def._doc_items_usagehelp or beduse,
|
_doc_items_usagehelp = def._doc_items_usagehelp or beduse,
|
||||||
_doc_items_create_entry = def._doc_items_create_entry,
|
_doc_items_create_entry = def._doc_items_create_entry,
|
||||||
_doc_items_entry_name = def._doc_items_entry_name,
|
_doc_items_entry_name = def._doc_items_entry_name,
|
||||||
inventory_image = def.inventory_image,
|
inventory_image = def.inventory_image,
|
||||||
wield_image = def.wield_image,
|
wield_image = def.wield_image,
|
||||||
drawtype = "nodebox",
|
drawtype = "mesh",
|
||||||
tiles = def.tiles.bottom,
|
mesh = "mcl_beds_bed_bottom.obj",
|
||||||
|
tiles = def.tiles,
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
@ -159,11 +156,11 @@ function mcl_beds.register_bed(name, def)
|
||||||
_mcl_hardness = 0.2,
|
_mcl_hardness = 0.2,
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
sounds = def.sounds or default_sounds,
|
sounds = def.sounds or default_sounds,
|
||||||
node_box = node_box_bottom,
|
selection_box = common_box,
|
||||||
selection_box = selection_box_bottom,
|
collision_box = common_box,
|
||||||
collision_box = collision_box_bottom,
|
|
||||||
drop = "",
|
drop = "",
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local under = pointed_thing.under
|
local under = pointed_thing.under
|
||||||
|
|
||||||
|
@ -229,20 +226,12 @@ function mcl_beds.register_bed(name, def)
|
||||||
on_rotate = rotate,
|
on_rotate = rotate,
|
||||||
})
|
})
|
||||||
|
|
||||||
local node_box_top, selection_box_top, collision_box_top
|
|
||||||
if def.nodebox and def.nodebox.top then
|
|
||||||
node_box_top = { type = "fixed", fixed = def.nodebox.top }
|
|
||||||
end
|
|
||||||
if def.selectionbox and def.selectionbox.top then
|
|
||||||
selection_box_top = { type = "fixed", fixed = def.selectionbox.top }
|
|
||||||
end
|
|
||||||
if def.collisionbox and def.collisionbox.top then
|
|
||||||
collision_box_top = { type = "fixed", fixed = def.collisionbox.top }
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_node(name .. "_top", {
|
minetest.register_node(name .. "_top", {
|
||||||
drawtype = "nodebox",
|
drawtype = "mesh",
|
||||||
tiles = def.tiles.top,
|
mesh = "mcl_beds_bed_top.obj",
|
||||||
|
tiles = def.tiles,
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
@ -253,13 +242,14 @@ function mcl_beds.register_bed(name, def)
|
||||||
_mcl_blast_resistance = 1,
|
_mcl_blast_resistance = 1,
|
||||||
sounds = def.sounds or default_sounds,
|
sounds = def.sounds or default_sounds,
|
||||||
drop = "",
|
drop = "",
|
||||||
node_box = node_box_top,
|
selection_box = common_box,
|
||||||
selection_box = selection_box_top,
|
collision_box = common_box,
|
||||||
collision_box = collision_box_top,
|
|
||||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
mcl_beds.on_rightclick(pos, clicker, true)
|
mcl_beds.on_rightclick(pos, clicker, true)
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_rotate = rotate,
|
on_rotate = rotate,
|
||||||
after_destruct = destruct_bed,
|
after_destruct = destruct_bed,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,18 +1,6 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
local mod_doc = minetest.get_modpath("doc")
|
local mod_doc = minetest.get_modpath("doc")
|
||||||
|
|
||||||
local nodebox = {
|
|
||||||
bottom = {
|
|
||||||
{-0.5, -5/16, -0.5, 0.5, 0.06, 0.5},
|
|
||||||
{-0.5, -0.5, -0.5, -5/16, -5/16, -5/16},
|
|
||||||
{0.5, -0.5, -0.5, 5/16, -5/16, -5/16},
|
|
||||||
},
|
|
||||||
top = {
|
|
||||||
{-0.5, -5/16, -0.5, 0.5, 0.06, 0.5},
|
|
||||||
{-0.5, -0.5, 0.5, -5/16, -5/16, 5/16},
|
|
||||||
{0.5, -0.5, 0.5, 5/16, -5/16, 5/16},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local colors = {
|
local colors = {
|
||||||
-- { ID, decription, wool, dye }
|
-- { ID, decription, wool, dye }
|
||||||
|
@ -70,36 +58,13 @@ for c=1, #colors do
|
||||||
description = colors[c][2],
|
description = colors[c][2],
|
||||||
_doc_items_entry_name = entry_name,
|
_doc_items_entry_name = entry_name,
|
||||||
_doc_items_create_entry = create_entry,
|
_doc_items_create_entry = create_entry,
|
||||||
inventory_image = "mcl_beds_bed_"..colorid..".png",
|
inventory_image = "mcl_beds_bed_"..colorid.."_inv.png",
|
||||||
wield_image = "mcl_beds_bed_"..colorid..".png",
|
wield_image = "mcl_beds_bed_"..colorid.."_inv.png",
|
||||||
|
|
||||||
tiles = {
|
tiles = {
|
||||||
bottom = {
|
"mcl_beds_bed_"..colorid..".png"
|
||||||
"mcl_beds_bed_top_bottom_"..colorid..".png^[transformR90",
|
|
||||||
"default_wood.png^mcl_beds_bed_bottom_bottom.png",
|
|
||||||
"mcl_beds_bed_side_bottom_r_"..colorid..".png",
|
|
||||||
"mcl_beds_bed_side_bottom_r_"..colorid..".png^[transformfx",
|
|
||||||
"mcl_beds_bed_side_top_"..colorid..".png",
|
|
||||||
"mcl_beds_bed_side_bottom_"..colorid..".png"
|
|
||||||
},
|
|
||||||
top = {
|
|
||||||
"mcl_beds_bed_top_top_"..colorid..".png^[transformR90",
|
|
||||||
"default_wood.png^mcl_beds_bed_bottom_top.png",
|
|
||||||
"mcl_beds_bed_side_top_r_"..colorid..".png",
|
|
||||||
"mcl_beds_bed_side_top_r_"..colorid..".png^[transformfx",
|
|
||||||
"mcl_beds_bed_side_top_"..colorid..".png",
|
|
||||||
"mcl_beds_bed_side_bottom_"..colorid..".png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
nodebox = nodebox,
|
|
||||||
selectionbox = {
|
|
||||||
bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
|
||||||
top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
|
||||||
},
|
|
||||||
-- Simplified collision box because Minetest acts weird if we use the nodebox one
|
|
||||||
collisionbox = {
|
|
||||||
bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
|
||||||
top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
recipe = main_recipe,
|
recipe = main_recipe,
|
||||||
})
|
})
|
||||||
if mod_doc and not is_canonical then
|
if mod_doc and not is_canonical then
|
||||||
|
|
|
@ -0,0 +1,290 @@
|
||||||
|
# Made in Blockbench 3.6.6
|
||||||
|
mtllib mcl_beds_bed_bottom.mtl
|
||||||
|
o cube
|
||||||
|
v 0.5 0.0625 0.5
|
||||||
|
v 0.5 0.0625 -0.5
|
||||||
|
v 0.5 -0.3125 0.5
|
||||||
|
v 0.5 -0.3125 -0.5
|
||||||
|
v -0.5 0.0625 -0.5
|
||||||
|
v -0.5 0.0625 0.5
|
||||||
|
v -0.5 -0.3125 -0.5
|
||||||
|
v -0.5 -0.3125 0.5
|
||||||
|
vt 0.09375 0.5625
|
||||||
|
vt 0 0.5625
|
||||||
|
vt 0.09375 0.3125
|
||||||
|
vt 0 0.5625
|
||||||
|
vt 0 0.3125
|
||||||
|
vt 0.09375 0.3125
|
||||||
|
vt 0.34375 0.3125
|
||||||
|
vt 0.4375 0.3125
|
||||||
|
vt 0.34375 0.5625
|
||||||
|
vt 0.4375 0.3125
|
||||||
|
vt 0.4375 0.5625
|
||||||
|
vt 0.34375 0.5625
|
||||||
|
vt 0.34375 0.3125
|
||||||
|
vt 0.34375 0.5625
|
||||||
|
vt 0.09375 0.3125
|
||||||
|
vt 0.34375 0.5625
|
||||||
|
vt 0.09375 0.5625
|
||||||
|
vt 0.09375 0.3125
|
||||||
|
vt 0.43750000000000006 0.5625
|
||||||
|
vt 0.43750000000000006 0.3125
|
||||||
|
vt 0.6875 0.5625
|
||||||
|
vt 0.43750000000000006 0.3125
|
||||||
|
vt 0.6875 0.3125
|
||||||
|
vt 0.6875 0.5625
|
||||||
|
vt 0 0.015625
|
||||||
|
vt 0 0
|
||||||
|
vt 0.125 0.015625
|
||||||
|
vt 0 0
|
||||||
|
vt 0.125 0
|
||||||
|
vt 0.125 0.015625
|
||||||
|
vt 0.59375 0.5625
|
||||||
|
vt 0.59375 0.65625
|
||||||
|
vt 0.34374999999999994 0.5625
|
||||||
|
vt 0.59375 0.65625
|
||||||
|
vt 0.34374999999999994 0.65625
|
||||||
|
vt 0.34374999999999994 0.5625
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
usemtl m_0
|
||||||
|
f 1/1/1 3/2/2 2/3/3
|
||||||
|
f 3/4/4 4/5/5 2/6/6
|
||||||
|
usemtl m_0
|
||||||
|
f 5/7/7 7/8/8 6/9/9
|
||||||
|
f 7/10/10 8/11/11 6/12/12
|
||||||
|
usemtl m_0
|
||||||
|
f 5/13/13 6/14/14 2/15/15
|
||||||
|
f 6/16/16 1/17/17 2/18/18
|
||||||
|
usemtl m_0
|
||||||
|
f 8/19/19 7/20/20 3/21/21
|
||||||
|
f 7/22/22 4/23/23 3/24/24
|
||||||
|
usemtl m_0
|
||||||
|
f 2/31/31 4/32/32 5/33/33
|
||||||
|
f 4/34/34 7/35/35 5/36/36
|
||||||
|
o cube
|
||||||
|
v -0.3125 -0.3125 -0.3125
|
||||||
|
v -0.3125 -0.3125 -0.5
|
||||||
|
v -0.3125 -0.5 -0.3125
|
||||||
|
v -0.3125 -0.5 -0.5
|
||||||
|
v -0.5 -0.3125 -0.5
|
||||||
|
v -0.5 -0.3125 -0.3125
|
||||||
|
v -0.5 -0.5 -0.5
|
||||||
|
v -0.5 -0.5 -0.3125
|
||||||
|
vt 0.921875 0.671875
|
||||||
|
vt 0.921875 0.625
|
||||||
|
vt 0.96875 0.671875
|
||||||
|
vt 0.921875 0.625
|
||||||
|
vt 0.96875 0.625
|
||||||
|
vt 0.96875 0.671875
|
||||||
|
vt 0.828125 0.765625
|
||||||
|
vt 0.828125 0.71875
|
||||||
|
vt 0.875 0.765625
|
||||||
|
vt 0.828125 0.71875
|
||||||
|
vt 0.875 0.71875
|
||||||
|
vt 0.875 0.765625
|
||||||
|
vt 0.046875 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.921875 0.765625
|
||||||
|
vt 0.921875 0.8125
|
||||||
|
vt 0.875 0.765625
|
||||||
|
vt 0.921875 0.8125
|
||||||
|
vt 0.875 0.8125
|
||||||
|
vt 0.875 0.765625
|
||||||
|
vt 0.875 0.765625
|
||||||
|
vt 0.875 0.71875
|
||||||
|
vt 0.921875 0.765625
|
||||||
|
vt 0.875 0.71875
|
||||||
|
vt 0.921875 0.71875
|
||||||
|
vt 0.921875 0.765625
|
||||||
|
vt 0.78125 0.765625
|
||||||
|
vt 0.78125 0.71875
|
||||||
|
vt 0.828125 0.765625
|
||||||
|
vt 0.78125 0.71875
|
||||||
|
vt 0.828125 0.71875
|
||||||
|
vt 0.828125 0.765625
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
usemtl m_0
|
||||||
|
f 9/37/37 11/38/38 10/39/39
|
||||||
|
f 11/40/40 12/41/41 10/42/42
|
||||||
|
usemtl m_0
|
||||||
|
f 13/43/43 15/44/44 14/45/45
|
||||||
|
f 15/46/46 16/47/47 14/48/48
|
||||||
|
usemtl m_0
|
||||||
|
f 16/55/55 15/56/56 11/57/57
|
||||||
|
f 15/58/58 12/59/59 11/60/60
|
||||||
|
usemtl m_0
|
||||||
|
f 14/61/61 16/62/62 9/63/63
|
||||||
|
f 16/64/64 11/65/65 9/66/66
|
||||||
|
usemtl m_0
|
||||||
|
f 10/67/67 12/68/68 13/69/69
|
||||||
|
f 12/70/70 15/71/71 13/72/72
|
||||||
|
o cube
|
||||||
|
v 0.5 -0.3125 -0.3125
|
||||||
|
v 0.5 -0.3125 -0.5
|
||||||
|
v 0.5 -0.5 -0.3125
|
||||||
|
v 0.5 -0.5 -0.5
|
||||||
|
v 0.3125 -0.3125 -0.5
|
||||||
|
v 0.3125 -0.3125 -0.3125
|
||||||
|
v 0.3125 -0.5 -0.5
|
||||||
|
v 0.3125 -0.5 -0.3125
|
||||||
|
vt 0.78125 0.953125
|
||||||
|
vt 0.78125 0.90625
|
||||||
|
vt 0.828125 0.953125
|
||||||
|
vt 0.78125 0.90625
|
||||||
|
vt 0.828125 0.90625
|
||||||
|
vt 0.828125 0.953125
|
||||||
|
vt 0.875 0.953125
|
||||||
|
vt 0.875 0.90625
|
||||||
|
vt 0.921875 0.953125
|
||||||
|
vt 0.875 0.90625
|
||||||
|
vt 0.921875 0.90625
|
||||||
|
vt 0.921875 0.953125
|
||||||
|
vt 0.046875 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.921875 0.953125
|
||||||
|
vt 0.921875 1
|
||||||
|
vt 0.875 0.953125
|
||||||
|
vt 0.921875 1
|
||||||
|
vt 0.875 1
|
||||||
|
vt 0.875 0.953125
|
||||||
|
vt 0.921875 0.953125
|
||||||
|
vt 0.921875 0.90625
|
||||||
|
vt 0.96875 0.953125
|
||||||
|
vt 0.921875 0.90625
|
||||||
|
vt 0.96875 0.90625
|
||||||
|
vt 0.96875 0.953125
|
||||||
|
vt 0.828125 0.953125
|
||||||
|
vt 0.828125 0.90625
|
||||||
|
vt 0.875 0.953125
|
||||||
|
vt 0.828125 0.90625
|
||||||
|
vt 0.875 0.90625
|
||||||
|
vt 0.875 0.953125
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn 1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn -1 0 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
vn 0 0 -1
|
||||||
|
usemtl m_0
|
||||||
|
f 17/73/73 19/74/74 18/75/75
|
||||||
|
f 19/76/76 20/77/77 18/78/78
|
||||||
|
usemtl m_0
|
||||||
|
f 21/79/79 23/80/80 22/81/81
|
||||||
|
f 23/82/82 24/83/83 22/84/84
|
||||||
|
usemtl m_0
|
||||||
|
f 24/91/91 23/92/92 19/93/93
|
||||||
|
f 23/94/94 20/95/95 19/96/96
|
||||||
|
usemtl m_0
|
||||||
|
f 22/97/97 24/98/98 17/99/99
|
||||||
|
f 24/100/100 19/101/101 17/102/102
|
||||||
|
usemtl m_0
|
||||||
|
f 18/103/103 20/104/104 21/105/105
|
||||||
|
f 20/106/106 23/107/107 21/108/108
|
|
@ -0,0 +1,299 @@
|
||||||
|
# Made in Blockbench 3.6.6
|
||||||
|
mtllib mcl_beds_bed_top.mtl
|
||||||
|
o cube
|
||||||
|
v -0.5000000000000001 0.0625 -0.49999999999999994
|
||||||
|
v -0.49999999999999994 0.0625 0.5000000000000001
|
||||||
|
v -0.5000000000000001 -0.3125 -0.49999999999999994
|
||||||
|
v -0.49999999999999994 -0.3125 0.5000000000000001
|
||||||
|
v 0.5000000000000001 0.0625 0.49999999999999994
|
||||||
|
v 0.49999999999999994 0.0625 -0.5000000000000001
|
||||||
|
v 0.5000000000000001 -0.3125 0.49999999999999994
|
||||||
|
v 0.49999999999999994 -0.3125 -0.5000000000000001
|
||||||
|
vt 0.34374999999999994 0.65625
|
||||||
|
vt 0.43749999999999994 0.65625
|
||||||
|
vt 0.34374999999999994 0.90625
|
||||||
|
vt 0.43749999999999994 0.65625
|
||||||
|
vt 0.43749999999999994 0.90625
|
||||||
|
vt 0.34374999999999994 0.90625
|
||||||
|
vt 0.09375 0.90625
|
||||||
|
vt 0 0.90625
|
||||||
|
vt 0.09375 0.65625
|
||||||
|
vt 0 0.90625
|
||||||
|
vt 0 0.65625
|
||||||
|
vt 0.09375 0.65625
|
||||||
|
vt 0.09375 0.90625
|
||||||
|
vt 0.09375 0.65625
|
||||||
|
vt 0.34375 0.90625
|
||||||
|
vt 0.09375 0.65625
|
||||||
|
vt 0.34375 0.65625
|
||||||
|
vt 0.34375 0.90625
|
||||||
|
vt 0.6874843749999999 0.6562812499999999
|
||||||
|
vt 0.6874843749999999 0.90628125
|
||||||
|
vt 0.437484375 0.6562812499999999
|
||||||
|
vt 0.6874843749999999 0.90628125
|
||||||
|
vt 0.437484375 0.90628125
|
||||||
|
vt 0.437484375 0.6562812499999999
|
||||||
|
vt 0 1
|
||||||
|
vt 0 0.875
|
||||||
|
vt 0.1875 1
|
||||||
|
vt 0 0.875
|
||||||
|
vt 0.1875 0.875
|
||||||
|
vt 0.1875 1
|
||||||
|
vt 0.34375 0.90625
|
||||||
|
vt 0.34375 1
|
||||||
|
vt 0.09375 0.90625
|
||||||
|
vt 0.34375 1
|
||||||
|
vt 0.09375 1
|
||||||
|
vt 0.09375 0.90625
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
usemtl m_0
|
||||||
|
f 1/1/1 3/2/2 2/3/3
|
||||||
|
f 3/4/4 4/5/5 2/6/6
|
||||||
|
usemtl m_0
|
||||||
|
f 5/7/7 7/8/8 6/9/9
|
||||||
|
f 7/10/10 8/11/11 6/12/12
|
||||||
|
usemtl m_0
|
||||||
|
f 5/13/13 6/14/14 2/15/15
|
||||||
|
f 6/16/16 1/17/17 2/18/18
|
||||||
|
usemtl m_0
|
||||||
|
f 8/19/19 7/20/20 3/21/21
|
||||||
|
f 7/22/22 4/23/23 3/24/24
|
||||||
|
usemtl none
|
||||||
|
f 6/25/25 8/26/26 1/27/27
|
||||||
|
f 8/28/28 3/29/29 1/30/30
|
||||||
|
usemtl m_0
|
||||||
|
f 2/31/31 4/32/32 5/33/33
|
||||||
|
f 4/34/34 7/35/35 5/36/36
|
||||||
|
o cube
|
||||||
|
v 0.31250000000000006 -0.3125 0.31249999999999994
|
||||||
|
v 0.31250000000000006 -0.3125 0.49999999999999994
|
||||||
|
v 0.31250000000000006 -0.5 0.31249999999999994
|
||||||
|
v 0.31250000000000006 -0.5 0.49999999999999994
|
||||||
|
v 0.5000000000000001 -0.3125 0.49999999999999994
|
||||||
|
v 0.5 -0.3125 0.31249999999999994
|
||||||
|
v 0.5000000000000001 -0.5 0.49999999999999994
|
||||||
|
v 0.5 -0.5 0.31249999999999994
|
||||||
|
vt 0.921875 0.859375
|
||||||
|
vt 0.921875 0.8125
|
||||||
|
vt 0.96875 0.859375
|
||||||
|
vt 0.921875 0.8125
|
||||||
|
vt 0.96875 0.8125
|
||||||
|
vt 0.96875 0.859375
|
||||||
|
vt 0.828125 0.859375
|
||||||
|
vt 0.828125 0.8125
|
||||||
|
vt 0.875 0.859375
|
||||||
|
vt 0.828125 0.8125
|
||||||
|
vt 0.875 0.8125
|
||||||
|
vt 0.875 0.859375
|
||||||
|
vt 0 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.046875 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0.875 0.90625
|
||||||
|
vt 0.875 0.859375
|
||||||
|
vt 0.921875 0.90625
|
||||||
|
vt 0.875 0.859375
|
||||||
|
vt 0.921875 0.859375
|
||||||
|
vt 0.921875 0.90625
|
||||||
|
vt 0.875 0.859375
|
||||||
|
vt 0.875 0.8125
|
||||||
|
vt 0.921875 0.859375
|
||||||
|
vt 0.875 0.8125
|
||||||
|
vt 0.921875 0.8125
|
||||||
|
vt 0.921875 0.859375
|
||||||
|
vt 0.78125 0.859375
|
||||||
|
vt 0.78125 0.8125
|
||||||
|
vt 0.828125 0.859375
|
||||||
|
vt 0.78125 0.8125
|
||||||
|
vt 0.828125 0.8125
|
||||||
|
vt 0.828125 0.859375
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
usemtl m_0
|
||||||
|
f 9/37/37 11/38/38 10/39/39
|
||||||
|
f 11/40/40 12/41/41 10/42/42
|
||||||
|
usemtl m_0
|
||||||
|
f 13/43/43 15/44/44 14/45/45
|
||||||
|
f 15/46/46 16/47/47 14/48/48
|
||||||
|
usemtl none
|
||||||
|
f 13/49/49 14/50/50 10/51/51
|
||||||
|
f 14/52/52 9/53/53 10/54/54
|
||||||
|
usemtl m_0
|
||||||
|
f 16/55/55 15/56/56 11/57/57
|
||||||
|
f 15/58/58 12/59/59 11/60/60
|
||||||
|
usemtl m_0
|
||||||
|
f 14/61/61 16/62/62 9/63/63
|
||||||
|
f 16/64/64 11/65/65 9/66/66
|
||||||
|
usemtl m_0
|
||||||
|
f 10/67/67 12/68/68 13/69/69
|
||||||
|
f 12/70/70 15/71/71 13/72/72
|
||||||
|
o cube
|
||||||
|
v -0.5 -0.3125 0.31249999999999994
|
||||||
|
v -0.4999999999999999 -0.3125 0.49999999999999994
|
||||||
|
v -0.5 -0.5 0.31249999999999994
|
||||||
|
v -0.4999999999999999 -0.5 0.49999999999999994
|
||||||
|
v -0.3124999999999999 -0.3125 0.4999999999999999
|
||||||
|
v -0.3125 -0.3125 0.3124999999999999
|
||||||
|
v -0.3124999999999999 -0.5 0.4999999999999999
|
||||||
|
v -0.3125 -0.5 0.3124999999999999
|
||||||
|
vt 0.78125 0.671875
|
||||||
|
vt 0.78125 0.625
|
||||||
|
vt 0.828125 0.671875
|
||||||
|
vt 0.78125 0.625
|
||||||
|
vt 0.828125 0.625
|
||||||
|
vt 0.828125 0.671875
|
||||||
|
vt 0.875 0.671875
|
||||||
|
vt 0.875 0.625
|
||||||
|
vt 0.921875 0.671875
|
||||||
|
vt 0.875 0.625
|
||||||
|
vt 0.921875 0.625
|
||||||
|
vt 0.921875 0.671875
|
||||||
|
vt 0 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0 0.953125
|
||||||
|
vt 0.046875 0.953125
|
||||||
|
vt 0.046875 1
|
||||||
|
vt 0.87496875 0.7187656250000001
|
||||||
|
vt 0.87496875 0.6719062499999999
|
||||||
|
vt 0.921828125 0.7187656250000001
|
||||||
|
vt 0.87496875 0.6719062499999999
|
||||||
|
vt 0.921828125 0.6719062499999999
|
||||||
|
vt 0.921828125 0.7187656250000001
|
||||||
|
vt 0.921875 0.671875
|
||||||
|
vt 0.921875 0.625
|
||||||
|
vt 0.96875 0.671875
|
||||||
|
vt 0.921875 0.625
|
||||||
|
vt 0.96875 0.625
|
||||||
|
vt 0.96875 0.671875
|
||||||
|
vt 0.828125 0.671875
|
||||||
|
vt 0.828125 0.625
|
||||||
|
vt 0.875 0.671875
|
||||||
|
vt 0.828125 0.625
|
||||||
|
vt 0.875 0.625
|
||||||
|
vt 0.875 0.671875
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn -1 0 1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 1 0 -1.2246467991473532e-16
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn 0 -1 0
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn -1.2246467991473532e-16 0 -1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
vn 1.2246467991473532e-16 0 1
|
||||||
|
usemtl m_0
|
||||||
|
f 17/73/73 19/74/74 18/75/75
|
||||||
|
f 19/76/76 20/77/77 18/78/78
|
||||||
|
usemtl m_0
|
||||||
|
f 21/79/79 23/80/80 22/81/81
|
||||||
|
f 23/82/82 24/83/83 22/84/84
|
||||||
|
usemtl none
|
||||||
|
f 21/85/85 22/86/86 18/87/87
|
||||||
|
f 22/88/88 17/89/89 18/90/90
|
||||||
|
usemtl m_0
|
||||||
|
f 24/91/91 23/92/92 19/93/93
|
||||||
|
f 23/94/94 20/95/95 19/96/96
|
||||||
|
usemtl m_0
|
||||||
|
f 22/97/97 24/98/98 17/99/99
|
||||||
|
f 24/100/100 19/101/101 17/102/102
|
||||||
|
usemtl m_0
|
||||||
|
f 18/103/103 20/104/104 21/105/105
|
||||||
|
f 20/106/106 23/107/107 21/108/108
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 973 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 973 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 973 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 973 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 971 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 972 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 973 B |
After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 973 B |
After Width: | Height: | Size: 237 B |