Zrips / CMI

115 stars 97 forks source link

Items with effects #2707

Closed Blueeyestar closed 4 years ago

Blueeyestar commented 4 years ago

I would think it would be great if the custom recipes also had the option of adding certain effects to food.

as an example that I can make a beer head with the special recipes nausea when he eats / drinks it.

I used to do this with a PLugin, but it has not been used since 1.15.

mrfloris commented 4 years ago

You can create a custom recipe using /cmi customrecipe feature. You can make an item like a bottle you can drink first, using

/cmi itemname &6 Beer
/cmi itemlore 1 &6 Drink this maybe
/cmi attachcommand !consume!;;!cc!cmi effect [playerName] confusion 15 1 -visual

This means, however you setup your recipe.. if they craft it they will get this item, then upon consumption, of the item with the title beer and lore 'drink this maybe', they will get 15 seconds of confusion (naussious) effect.

Blueeyestar commented 4 years ago

I've tried it now but you can't use the item. Nothing happens

bier

is it because i try to apply this to a deco head?

mrfloris commented 4 years ago

Consume is for things you consume. my info was merely an example.

If you use an item you dont consume, then instead of !consume! use !limited!

/cmi attachcommand !limiteduse:1!;;!cc!cmi effect [playerName] confusion 15 1 -visual

Then when the dont eat it, but they use the item, like right click on a chest or in the air or try to place it etc. It will disappear, and the commands will execute.

Blueeyestar commented 4 years ago

Great how it works :) great :)