Home›Java›Mods›Ocean API
Ocean API
ModsJava

Ocean API

Minecraft Java mod. Downloads from the MC Java Mods app on Android.

by jbredwards · on CurseForge

⬇ Download on CurseForge
Ocean API — screenshot 1Ocean API — screenshot 2Ocean API — screenshot 3Ocean API — screenshot 4

A library mod for adding ocean biomes, water colors, and entity buckets!

Ocean API — Minecraft Java mod, screenshot 1

curseforge modrinth

If you're a modpack developer wanting to add Ocean API to a modpack distributed outside of CurseForge or Modrinth, use File Director to avoid reuploading Ocean API's files.


The new grayscale water textures used by Ocean API are generated dynamically at runtime and change depending on your resource packs! Screenshots shown below are using the Faithful 32x and Tropical Waters resource packs.

Ocean API — Minecraft Java mod, screenshot 2Ocean API — Minecraft Java mod, screenshot 3

If you want to use explicit textures instead of auto-generated grayscale ones, place your textures at the following paths: assets/ocean_api/textures/minecraft/blocks/water_still, assets/ocean_api/textures/minecraft/blocks/water_flow, and assets/ocean_api/textures/minecraft/blocks/water_overlay.

Ocean API also provides a config setting (disabled by default) to enable the modern water textures used by newer Minecraft versions! Note: This config setting requires AssetMover or Aqua Acrobatics to be installed, because those mods provide a way for Ocean API to grab the modern water textures.

The water fluid references the new textures and colors, so any mods that have a system for rendering any fluid will work properly with the new textures. The new water textures are registered to new sprites, and do not replace the Vanilla water sprites. This means that any mods referencing the old textures outright will correctly continue to do so. If you find any mods that render an uncolored grayscale water texture, report it to Ocean API's bug tracker so I can add special support for it!


Biome water colors can be added by editing the config/ocean_api/fog_colors.cfg and config/ocean_api/surface_colors.cfg files directly, or by using the config gui. Here's what that looks like with the default entries:

Ocean API — Minecraft Java mod, screenshot 4

This has a cool render of your new water colors, and uses the format biomeId = color or #biomeTag = color, where biome tags must be prefixed with the pound (#) character.

If you have an entry that isn't complete or improperly formatted (bad biome id, unrecognized color, etc), the renderer will show a missing texture to signify that the entry will be skipped. This is in the hopes of making it easy to troubleshoot bad entries!

This mod has full support for Aqua Acrobatics's biome water colors, and will automatically register them if they're enabled! Support also exists for the water fluids from Simple Difficulty and SimpleDifficulty for Underdog.

Ocean API adds a couple of ways for other mods to register custom water colors for their biomes:

Note that Vanilla allows biomes to have custom water colors. Since mods using that system don't expect grayscale water textures, those water colors are automatically color-corrected by Ocean API with an additional blue tint to simulate how they would appear when rendered onto the Vanilla water textures!


Ocean API applies its ocean biome generation by "masking" over Vanilla ocean biomes in the layer before its finalized, using Forge's WorldTypeEvent.InitBiomeGens event to inject a new GenLayer. This means that any modded world types using the event will be supported automatically!

Registering ocean biomes for generation through Ocean API can be done by invoking OceanAPI.registerOceanBiome(type, entry, deepOcean, shoreOcean) during or before FMLPostInitializationEvent, where:

This will also add the shallow ocean, deep ocean, and shore ocean to Forge's internal ocean biome list and to the "ocean" biome dictionary entry.

Ocean API provides other miscellaneous methods for changing other properties of your ocean biomes, which are:

If Biomes O' Plenty is installed and its ocean biomes are enabled, Ocean API will automatically register them for ocean biome generation and give them new deep ocean biomes!


The entity bucket system added by Ocean API is controlled entirely through nbt and is called "Bucketable Entity Behavior", which does not add any new items! This means that buckets containing any fluid (or even no fluid) can be supported!

Bucketable Entity Behaviors control everything related to entity buckets for any given entity, including valid fluids, how the item overlay renders, creative tab variants, etc. Each one is paired to an entity class when created, and comes with a new Forge registry. No changes need to be made to entities themselves to support a Bucketable Entity Behavior. See the api.BucketableEntityBehavior class for more information.

By default, Ocean API adds support for Buckettable Entity Behaviors to the following items:

If you find other modded bucket items that should support Bucketable Entity Behaviors, request it on Ocean API's bug tracker!

If you have a custom bucket item, and want to add Bucketable Entity Behavior support, create a new assets/ocean_api/bucketable_info.jsonc file in your mod. See the file in Ocean API as an example (linked here). Then just make sure the item uses Forge's FluidUtil class to place its contained fluid, and that it manages fluid capabilities correctly.

Ocean API also comes with many entity classes related to fish entities! (see the api.entity package).


List of general config settings added by Ocean API:


Direct contact: jbred.dev@gmail.com
This mod will not be ported
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more