So i was thinking about an underwater exploration mod sort of thing. I was wondering if its possible to make scuba gear that allows you to swim faster and have an oxygen tank you would need to refill. Also is it possible to have mobs only spawn in water if so that would be helpful. thanks for reading!
FORUMS
Search
I think it would be possible to do, Minecraft has the effects in place in 1.12.2 for Water Breathing and for the other one you will need Depth Strider enchantment. When I am done with the custom crops tutorials I will see if I can get something working and do a video on it. I will post here when I have more information.
sweet thanks
Just an update I finally had some time to test some ways to code this, I don't think it will be easily achieved to make the bottle refillable, however, I did manage to get something that has night vision on the helmet and water breathing on the chest-plate, hen the item is in use it will have a 0.995 equal or greater than chase or in English (0.005%) chance to apply the effect. On the effect side of things I had to increase the duration so that the random possibility had time to renew its self, I don't know how to use loops I did try setting it up with a repeater but I could not figure out how to slow it down with that element. So I had to go with a randomizer and if statement. Other than that you need to deal the item damage -1 to be exact then it will do that each time the effect takes place You can use the procedure setup below to code it to work, I will also do a tutorial next week how to make this kind of mod.
Make a variable call it "random"
Set variable to "random number"
Create a if statement
For the if statement condition ("get local variable") set it to ("equal or greater than") and set the percent of which the delay should be (higher number equals longer timer)
Add potion effect
Set the potion duration to something high enough where the random number overlaps the potion duration, the 600 (30 sec) above worked fine for 0.995% chance.
Deal damage to the item one value each time.
Link your procedure to your armor in use event.
test armor.