3
I would like to shear p e o p l e
This is my first post to the forums so please spare me if I'm doing something wrong!! As the title suggests, I'd like to find a way to either make a datapack/maybe modpack (or a command block(s) if possible) to make it so if I try to use shears on a player it will drop a block of wool (it would be cyan wool if it matters). It's for a lorepoint in an smp I am working on with some friends and it'd add a new layer to the character (Her name is Julez if you care lmao). Any help is appreciated!! I am pretty basic when it comes to command/coding skills just an FYI.
Create an account or sign in to comment.
9
2
*chuckles*
4
You need to have right click detection with your shears and detect if the player is in front of the you.
I suggest you make this via a datapack for which bertiecrafter has put up a tutorial in pmc, as one of the core functions this concept would require usually isnt adequate without being in a datapack/function
There are 3 main functions, the right click detection (to detect if you've right clicked on the person), storing the nbt of the shears into a storage and changing the durability via a /item item modifier (optional, but more realistic), and raycasting + shearing the person.
Theres also more potential questions you need to answer, such as if shearing the player should get a cooldown.
These are all really advanced commands/datapack features and assumes you know commands/features like
If you dont, this becomes a lot easier and would only require right click detection and raycasting + shearing the wool.
If you want to make the datapack yourself I can also supply your the raycasting generator.
Alternatively I can make a datapack for it (and be hopefully done with it in 1-2 weeks), as this idea is very interesting
I suggest you make this via a datapack for which bertiecrafter has put up a tutorial in pmc, as one of the core functions this concept would require usually isnt adequate without being in a datapack/function
There are 3 main functions, the right click detection (to detect if you've right clicked on the person), storing the nbt of the shears into a storage and changing the durability via a /item item modifier (optional, but more realistic), and raycasting + shearing the person.
Theres also more potential questions you need to answer, such as if shearing the player should get a cooldown.
These are all really advanced commands/datapack features and assumes you know commands/features like
- /execute (for right click detection)
- /data storage
- /execute store (to store nbt of shears into a storage)
- /item (to give back the item and change the durability nbt of the shears; 1.17+ command)
If you dont, this becomes a lot easier and would only require right click detection and raycasting + shearing the wool.
If you want to make the datapack yourself I can also supply your the raycasting generator.
Alternatively I can make a datapack for it (and be hopefully done with it in 1-2 weeks), as this idea is very interesting
2
YOOOOOO!!! Thanks for the reply!! I don't mind if the shears don't lose durability and It would be super cool if you want to make it! When we upload/stream the smp I'll definitely make sure to credit you as well!
1
Do you want the action to have a cooldown as well?
2
If it isn't too big of a problem to get working sure! It'd prolly be like 30 seconds maybe?
1
Where would you need execute store and data storage, all you need is right click detection, a scoreboard, and /item for the durability, plus (assuming its 1.17, since you used /item) there is a predicate for looking at entity, so you don't actually need raycast
1
Forgot about lookat entity
Execute store is to get the durability of the shears in a score, which then reduces by 1. The changed durability is then stored into a storage and the item modifier is used on the shears with the durability value taken from storage
Execute store is to get the durability of the shears in a score, which then reduces by 1. The changed durability is then stored into a storage and the item modifier is used on the shears with the durability value taken from storage
1
phoenixSC made a datapack that shears people
BUT
it drops HAIR
BUT
it drops HAIR
1
I don't know of any data or mod packs but when I read the title I was so confused XD