1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-04-19 03:50:24 +02:00

tidy comments, change float var

This commit is contained in:
tenplus1 2025-04-05 12:09:03 +01:00
parent 854834f04e
commit 027620bfa3
3 changed files with 204 additions and 298 deletions

490
api.lua

File diff suppressed because it is too large Load Diff

View File

@ -92,7 +92,7 @@ functions needed for the mob to work properly which contains the following:
When set to 16 then only natural light will kill mob.
'suffocation' when > 0 mobs will suffocate inside solid blocks and will be
hurt by the value given every second (0 to disable).
'floats' when set to 1 mob will float in water, 0 has them sink.
'floats' when True mob will float in water, otherwise they sink.
'follow' mobs follow player when holding any of the items which appear
on this table, the same items can be fed to a mob to tame or
breed e.g. {"farming:wheat", "default:apple", "group:fish"}

View File

@ -5,4 +5,8 @@ function mobs.compatibility_check(self)
-- simple mobs rotation setting
if self.drawtype == "side" then self.rotate = math.rad(90) end
-- replace floats var from number to bool
if self.floats == 1 then self.floats = true
elseif self.floats == 0 then self.floats = false end
end