Give the ability for players to spend extended time underwater by using glass blocks as Dive Helmets.
Put stack of glass blocks on head just as if wearing a helmet. While wearing this "dive helmet". the player can take a breath underwater by entering sneak (pressing shift key normally). This breath will refill the air level and consume a glass block from the stack on head. Breaths can continue on until the blocks are used up. When stack of glass blocks gets low, it displays a warning, reminding to start heading for surface or load on some more glass blocks.
If a breath is not taken regularly, the character drowns as normal, but a breath can be still be taken while taking damage from drowning.
Place DiveHelmet.jar in plugins folder and reload or restart. That's it, no commands, dependencies, configuration or permissions.
This is my first public plugin. It is inspired by Party Hat (showed it possible to blocks on head) and Fishpeople ("breathing to by setting air to max) but is all original code. The concept is simple, but have not found it in any other plugin. I wanted a simple way for people to stay underwater for extended length of time.
The the single source file is embedded in the DiveHelmet.jar file.
1.0 Initial Public Release
1.1 First Update
- Fixed Delay in equipping dive helmet
- Now starts warning when down to 5 helmets (per carstorm's suggestion)
- When placing glass blocks on head, slight delay for head and cursor items to update. (fixed in 1.1)
Considerations and Interactions with other Plugins:
- If sneak is somehow disabled, this plugin will not operate.
- A character will drown if does not breathe regularly, so doing thing like crafting, chatting or other activities that take ability to enter sneak mode, the player can drown.
- Shift does not trigger sneak while typing in commands or chat, or while manipulating inventory. Careful while doing those tasks underwater.
- Additional stacks of glass blocks can be placed on head while underwater, for longer under water voyages. Each stack of 64 glass if well timed will last 10-12 minutes,
- Any plugin the alters the max air level of a player, using a dive helmet will only restore to normal max air level (300). If over normal max air level, will not consume a glass block nor increase air level
- If response to plugin is good, will look at adding localization on warning message when using last glass block on head.
- look for way to improve visibility while underwater, may or may not be part of this plugin.
- Issues warnings when helmet is used and less than 5 remain, per carstorm's suggestion. gives about a minute of breathing left if breaths timed wisely
- Fixed small delay when placing glass blocks on head.
- Tinkers Construct
- Mobs, Processing, Technology, and Armor, Tools, and Weapons
- 394,413 Monthly Downloads
- Developer Tools and Admin Tools
- 339,158 Monthly Downloads
- Admin Tools, Anti-Griefing Tools, Informational, Teleportation, and World Editing and Management
- 339,760 Monthly Downloads
- Map and Information
- 306,581 Monthly Downloads
- Server Utility, API and Library, and Map and Information
- 300,063 Monthly Downloads