]> git.lizzy.rs Git - Crafter.git/commitdiff
Add in Nitro Creeper and make it spawn in the nether
authoroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 19 May 2020 14:54:34 +0000 (10:54 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 19 May 2020 14:54:34 +0000 (10:54 -0400)
mods/mob/api/timers.lua
mods/mob/init.lua
mods/mob/spawning.lua
mods/mob/textures/nitro_creeper.png [new file with mode: 0644]

index ea15b71f806f08809daf0f640701b4a5d7c0715b..5345ef7d57e3425e5f3676fa03e0ea54b81be9f7 100644 (file)
@@ -56,7 +56,7 @@ mobs.create_timer_functions = function(def,mob_register)
                        local pos = self.object:get_pos()
                        --direction.y = direction.y + 1
                        
-                       tnt(pos,7)
+                       tnt(pos,self.explosion_power)
                        self.death_animation_timer = 1
                        self.dead = true
                        self.tnt_timer = 100
index a7d7bc1b3f0c43437281f94a073a989db5144320..92479360debf11aaeb96d153c8953aed8973b3b6 100644 (file)
@@ -418,3 +418,68 @@ mobs.register_mob(
        }
 )
 
+
+
+mobs.register_mob(
+       {
+        mobname = "nitro_creeper",
+        physical = true,
+        collide_with_objects = false,
+        collisionbox = {-0.37,0, -0.37, 0.37, 1.5, 0.37},
+        visual = "mesh",
+        visual_size = {x = 3.2, y = 3.2},
+        mesh = "creeper.b3d",
+        textures = {
+               "nitro_creeper.png"
+       },
+        is_visible = true,
+        pointable = true,
+        automatic_face_movement_max_rotation_per_sec = 300,
+        makes_footstep_sound = false,
+        hp = 10,
+        gravity = {x = 0, y = -9.81, z = 0},
+        movement_type = "walk",
+        max_speed = 4,
+        hostile = true,
+        hostile_cooldown = false,
+        state = 0,
+        view_distance = 20,
+        item_drop = "mob:cooked_porkchop",
+         
+        standing_frame = {x=0,y=0},
+        moving_frame = {x=0,y=40},
+        animation_multiplier = 20,
+        ----
+        pathfinds = true,
+        
+        --these are used to anchor a point to the head position
+        -----
+        automatic_face_movement_dir = 0,
+        head_bone = "head",
+        debug_head_pos = false,
+        --this always has to be slightly positive
+        head_directional_offset = 0.01,
+        head_height_offset = 1.45, --added to the base y position
+        --use this to correct the head position initially because it becomes severly offset - look at your blender model to get this perfect
+        head_position_correction = vector.new(0,2.4,0),
+        head_coord = "vertical",
+        -----
+         
+        
+        death_rotation = "x",
+        
+        hurt_sound = "creeper_hurt",
+        die_sound = "creeper_hurt",
+        
+        attack_type = "explode",
+        --projectile_timer_cooldown = 5,
+        --projectile_type = "tnt:tnt",
+        
+        explosion_radius = 6, -- how far away the mob has to be to initialize the explosion
+        explosion_power = 14, -- how big the explosion is (radius)
+        explosion_time = 3, -- how long it takes for a mob to explode
+        
+        die_in_light = false,
+        --die_in_light_level = 12,
+       }
+)
index d871503ccb8881df3913018b3dbc9c4498d1b408..0e1d57552378eac8e35b1e2c1832c7267ec57eab 100644 (file)
@@ -13,7 +13,7 @@ local spawn = true
 
 local spawn_table = {"pig"}
 local dark_spawn_table = {"creeper"}
-local nether_spawn_table = {"creeper"}
+local nether_spawn_table = {"nitro_creeper"}
 local aether_spawn_table = {"phyg"}
 
 local function spawn_mobs()
diff --git a/mods/mob/textures/nitro_creeper.png b/mods/mob/textures/nitro_creeper.png
new file mode 100644 (file)
index 0000000..bc44cac
Binary files /dev/null and b/mods/mob/textures/nitro_creeper.png differ