1

Making a custom dragon boss

ICrashedAServer's Avatar ICrashedAServer1/22/23 1:16 am
1 emeralds 222 9
1/23/2023 7:06 pm
ICrashedAServer's Avatar ICrashedAServer
I am trying to make a custom dragon boss with a datapack and resource pack. I know how to make models with blockbench and I know how to make datapacks. I currently have a generic poly model of the boss in blockbench, but I cannot convert it into an item/block format. I know that the size limit for a minecraft item/block is 3 blocks, so I shrunk the model down into the 3 block area, but when I click convert in blockbench, all the rotations get reset and some colors change. Second, the entire boss, as it is a dragon, is longer than 3 blocks, so I am going to have an invisible armor stand snake with the custom model item on its head. But need to a efficient way to code that, as well as a simple movement/attack animation (i am thinking that the first armor stand moves and the rest move along with it, like a snake)
Does anyone have some advice on how I can get this done?
Posted by ICrashedAServer's Avatar
ICrashedAServer
Level 45 : Master Modder
43

Create an account or sign in to comment.

9

2
01/22/2023 5:12 amhistory
Level 2 : Apprentice Miner
sigstop
sigstop's Avatar
To glue together different armor stands and make big compound model, you should create some scoreboard that will store some id for each armor stand of such complex entity. Each armor stands that compose one entity should have the same value, and it should be differentiable by some tag like head, torso, tail, etc. That way, you could easily select first all bodies, and then select all remaining body parts that connect to it.



execute as @e[tag=body] at @s run function #as_body

# functoin as_body
scoreboard players set a tmp = @s id
execute as @e[tag=is_model_part] run function #check_body_part
# function check_body_part
scoreboard players operation @s id -= a tmp
execute if score @s id matches 0 run function #position_body_part
scoreboard players operation @s id += a tmp


# function position_body_part
execute if entitiy @s[tag=head] run teleport @s ^ ^1 ^5 facing ^ ^ ^1
execute if entitiy @s[tag=tail] run teleport @s ^ ^-1 ^-5 facing ^ ^ ^-1

If you would like your snake to expand infinitely with time, instead of tags, you should use another id scoreboard, that would track what segment it is
2
01/22/2023 12:56 pm
Level 45 : Master Modder
ICrashedAServer
ICrashedAServer's Avatar
What if I only had like 9 sections and I tagged them with section_x ?
1
01/22/2023 1:26 pm
Level 2 : Apprentice Miner
sigstop
sigstop's Avatar
The idea behind tags/scores is to distinguish between different body parts, so mostly it's just a difference in your writing style.

Just remember that when you want to make your mob snake around the world, its head should tp towards the target, then segment -1 should tp towards head, segment -2 towards -1, -3 to -2 and so on.
1
01/22/2023 1:31 pm
Level 45 : Master Modder
ICrashedAServer
ICrashedAServer's Avatar
Tp toward the front body part as in tp ^ ^ ^-1 ?
2
01/22/2023 2:26 pmhistory
Level 2 : Apprentice Miner
sigstop
sigstop's Avatar
yes, something like execute facing entity @e[​tag=<next-segment>,id=0] eyes run teleport @s ^ ^ ^1
1
01/22/2023 6:29 pmhistory
Level 45 : Master Modder
ICrashedAServer
ICrashedAServer's Avatar
It works, with a bit of tweaking. But how do I make the parts of the snake face the part infront of it? As in, i am using the facing parameter for /tp but it glitches. Seem to only happen to the second entity in the snake (I had NoAI to 1b), where it isn't looking at the right direction. I don't have any other entities in this world.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome