Chairs
In this tutorial, I will be making invisible horses on stairs to make chairs. If you are here for the commands rather than learning they are all at the bottom of the page.
The commands I will be using to achieve this are:
• Summon
• Team
• Execute
• Kill
• Give
Method / Explanation:
Firstly we need to establish how we are going to make our seat. I want to have it so my seat is a stair that I can right click on to make my player sit down on it. I am also going to add a spawn egg I place to automatically build me one to save doing it by hand every time. However we need to start of by working out how we do it manually. I am going to use horses although you could use pigs. I want my horse to be Invisible, Silent, NoGravity (So it doesn't fall into the ground) and already tame. Luckily for us these are all data tags so can give it already with these features in a summon command.
/summon horse ~ ~-2 ~ {NoGravity:1b,Type:0,Variant:0,Tame:1,Silent:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:20000000,ShowParticles:0b}]}
Although having lots of tags may seem daunting, do not worry, using the methods in my data tags tutorial here, it is easy to find out what the tags we need are. Furthermore, a really good summon command website called mcstacker can also be used.
The commands I will be using to achieve this are:
• Summon
• Team
• Execute
• Kill
• Give
Method / Explanation:
Firstly we need to establish how we are going to make our seat. I want to have it so my seat is a stair that I can right click on to make my player sit down on it. I am also going to add a spawn egg I place to automatically build me one to save doing it by hand every time. However we need to start of by working out how we do it manually. I am going to use horses although you could use pigs. I want my horse to be Invisible, Silent, NoGravity (So it doesn't fall into the ground) and already tame. Luckily for us these are all data tags so can give it already with these features in a summon command.
/summon horse ~ ~-2 ~ {NoGravity:1b,Type:0,Variant:0,Tame:1,Silent:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:20000000,ShowParticles:0b}]}
Although having lots of tags may seem daunting, do not worry, using the methods in my data tags tutorial here, it is easy to find out what the tags we need are. Furthermore, a really good summon command website called mcstacker can also be used.
Here is a quick showcase of it. If you do not understand mcstacker, it will very quickly become easy, understandable and a go-to website like it is for me!
Now you should have a summon command a bit like the one I had.
Next we need to summon it on top of a stair and you will find we can push it around and away from the stair. We do not want this but luckily a teams option can disable collision so this is what we are going to have to do for the horses.
/team add PlayerSeats
The name can be anything but keep it consistent throughout. Then we can add our options:
/team modify PlayerSeats friendlyFire false
/team modify PlayerSeats seeFriendlyInvisibles false
/team modify PlayerSeats collisionRule never
If you don't understand teams, check my usage page about them here. Now it is set up we need to make the horses join, this will need to go in a clock so every newly spawned entity will be joined into the team.
/team join PlayerSeats @e[type=horse]
Now we are ready to automate it as our seat should now work
Next we need to summon it on top of a stair and you will find we can push it around and away from the stair. We do not want this but luckily a teams option can disable collision so this is what we are going to have to do for the horses.
/team add PlayerSeats
The name can be anything but keep it consistent throughout. Then we can add our options:
/team modify PlayerSeats friendlyFire false
/team modify PlayerSeats seeFriendlyInvisibles false
/team modify PlayerSeats collisionRule never
If you don't understand teams, check my usage page about them here. Now it is set up we need to make the horses join, this will need to go in a clock so every newly spawned entity will be joined into the team.
/team join PlayerSeats @e[type=horse]
Now we are ready to automate it as our seat should now work
Note if we want to kill a seat we just need to use a normal kill command
/tp @e[type=horse,limit=1,sort=nearest] ~ ~-999 ~
Using a tp into the void instead of a kill is a very useful tool. This means the kill is instant instead of a death animation as well as it will not drop its drops. With any creation keep in mind this trick and if it is worth doing this instead of a /kill.
I also used limit=1 and sort=nearest so it is the closest horse and not every horse, unless you want every horse to die.
Now we need to create our spawn egg for the mob. I would also use mcstackers give command generator for this too as it saves a lot of time.
/give @p minecraft:bat_spawn_egg{display:{Name:"{\"text\":\"Create Chair\",\"color\":\"white\",\"italic\":false}"},EntityTag:{CustomName:"{\"text\":\"SeatBuilder\"}"}} 1
Then we just put an execute in front of our summon command in a clock and add a kill or tp on the spawn egg mob (In this case a bat) at the end so it only summons our horse once.
/execute at @e[name=SeatBuilder,type=bat] run summon horse ~ ~-2 ~ {NoGravity:1b,Type:0,Variant:0,Tame:1,Silent:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:20000000,ShowParticles:0b}]}
and
/tp @e[name=SeatBuilder,type=bat] ~ ~-999 ~
Then our spawn egg should be functional! Just place it on a stair and the horse will be there to sit on.
This was quite a confusing topic with a lot of new things but hopefully you understood most of it and all the clock commands are below! ~Blue
/tp @e[type=horse,limit=1,sort=nearest] ~ ~-999 ~
Using a tp into the void instead of a kill is a very useful tool. This means the kill is instant instead of a death animation as well as it will not drop its drops. With any creation keep in mind this trick and if it is worth doing this instead of a /kill.
I also used limit=1 and sort=nearest so it is the closest horse and not every horse, unless you want every horse to die.
Now we need to create our spawn egg for the mob. I would also use mcstackers give command generator for this too as it saves a lot of time.
/give @p minecraft:bat_spawn_egg{display:{Name:"{\"text\":\"Create Chair\",\"color\":\"white\",\"italic\":false}"},EntityTag:{CustomName:"{\"text\":\"SeatBuilder\"}"}} 1
Then we just put an execute in front of our summon command in a clock and add a kill or tp on the spawn egg mob (In this case a bat) at the end so it only summons our horse once.
/execute at @e[name=SeatBuilder,type=bat] run summon horse ~ ~-2 ~ {NoGravity:1b,Type:0,Variant:0,Tame:1,Silent:1,ActiveEffects:[{Id:14,Amplifier:1,Duration:20000000,ShowParticles:0b}]}
and
/tp @e[name=SeatBuilder,type=bat] ~ ~-999 ~
Then our spawn egg should be functional! Just place it on a stair and the horse will be there to sit on.
This was quite a confusing topic with a lot of new things but hopefully you understood most of it and all the clock commands are below! ~Blue
Your commands should look like this: