In Ships Mod, every block has physical properties. These properties are used by the physical simulations that let your ships float and sail around the world.
- Mass: Mass of the block in tonnes (t). For reference, the mass of a block of water is 1000 kg, or 1 tonne.
- Volume: Volume of the block in m3. For reference, the volume of a full block of water is 1 m3. Since measurement standards happen to be based on water, this volume is also the mass of water that would be displaced by a fully-submerged instance of this block.
- Is watertight: The watertight flag indicates whether or not water can passthrough the block. You will want to build your ship's hull out of watertight blocks.
- Ignored by ships: If the ignored-by-ships flag is true, then the block can never be a part of a ship. These blocks would be useful for docks.
- Is water: The is-water flags sets whether or not the block is treated as water. This is useful for mods that define different kinds of water blocks.
Setting custom properties
All the default block properties used by Ships Mod are listed in a big table below. You can change these values on your server if you want. Just create a config/shipBlockProperties.cfg file on your server. This file isn't created by default. If you want to change blocks, you need to create this file. Once you have the file created, you can fill it with lines like:
This format is basically a key value pair, like key=value where the value is a concatentation of all the block properties using the ; character. The key is the id name of the block. It always starts with minecraft: or modid:. The next two values are the mass and volume, as floating point numbers. The final three values are boolean flags that indicate watertightness, ignored-by-ships, and is-water respectively. So the template for each line looks like this:
Note that if you're playing on a server, putting this file on your client won't do anything useful at all. =)
Where do I find the block id names?
For vanilla blocks, you can find a list of all the block id names in the big table below. Getting id names for mod blocks is a little bit harder. Hopefully, modders can post the id names of their blocks somewhere. If not, here's a trick you can use to ask the mod itself what its block id names are:
- Download the latest version of bspkrsCore to your mods folder
- Run Minecraft, then close it
- Look for a file called UniqueNames in your config folder
- Find the block id names you want in the file
Checking your configuration
Getting the config file setup correctly and be tricky. Ships Mod has some tools to help you make sure you got it right.
Checking the log
The first tool is the Forge log (the ones in the logs folder). If you don't have any config file set up, Ships Mod will write a log entry like this to let you know it didn't load any block properties:
Skipping ships block config. No config file found at: <expected config file path>
If Ships Mod does load block properties, it will log this instead:
Read 5 block properties from: <expected config file path>
or 1 or 17,432, or however many blocks you have configured. If Ships Mod doesn't know how to read a line in your config file, it will log this:
Malformed block entry: <the line Ships Mod can't read>
If for some reason, Ships Mod can't find the block you're trying to configure, it will log this:
Unknown block id name: <the id name of the block Ships Mod can't find>
If you set your block id name to be something like minecraft:unpossible, Ships Mod probably won't find it.
The blockprops command
Entering /ships blockprops into your chat box will list all the blocks that have properties overridden by your config file. If you don't have a config file (or haven't overridden any blocks), the command will just output a blank line.
If you want to query for the current properties of a block in particular, then enter /ships blockprops minecraft:planks or whatever block you like. You'll be greeted with a line like this:
minecraft:planks Ovr:N Mass:0.5 Vol:1.0 WT:Y Ignrd:N Water:N
All of the properties are listed in order using abbreviated names. The only new thing is the Ovr property. This is simply a Y/N flag that shows if the block has been overridden by a config file or not.
The default properties
Here they all are. For reference.
|Block||Mass||Volume||Is watertight||Ignored by ships||Is water|