Boats - Lemonszz/LKLib GitHub Wiki

Classes related to boats can be found in party.lemons.lklib.util.registry.boat, party.lemons.lklib.entity & party.lemons.lklib.entity.render

LKLib adds the ability to easily add your own boat types, as this is not possible with the vanilla setup.

An entity (LKEntities.LK_BOAT) is added to handle this. The new boat entity is identical to the vanilla boat entity, with added functionality to change the boats skin based on a BoatType.

Adding a Boat Type

BoatTypes must be registered to the BoatTypes.REGISTRY registry. This can be done manually, or through the RegistryHelper.

BoatTypes require an Identifier which is used for the texture location and a Supplier<Item> that will be used to get the boat item.

   public static final BoatType EBONY = new BoatType(new Identifier("mymodid", "ebony"), ()->ModItems.EBONY_BOAT);

Note: If you are using WoodTypeInfo to create your boat item, use the getItem method to get your boat item.

   public static final BoatType EBONY = new BoatType(new Identifier("mymodid", "ebony"), ()->ModBlocks.EBONY_WODO_INFO.getItem(WoodTypeInfo.Type.BOAT));

Make sure to register your boat type with the BoatTypes.REGISTRY registry.

Now that your boat type is created, you must put your boat texture in the correct place. This will usually be assets/modid/textures/entity/boat/boat_name.png.

With the above example, the path will be assets/mymodid/textures/entity/boat/ebony.png

⚠️ **GitHub.com Fallback** ⚠️