Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boat with chest #1

Open
SergoFox123 opened this issue Jul 21, 2022 · 1 comment
Open

Boat with chest #1

SergoFox123 opened this issue Jul 21, 2022 · 1 comment

Comments

@SergoFox123
Copy link

How to make a boat with a chest?

@moltenwolfcub
Copy link

moltenwolfcub commented May 7, 2023

It is pretty easy to modify this to make chest boats work as they reused so much of the boat code in vanilla:

  • You need to make a second mixin for the chest boats drops which would be a duplicate of BoatDropsMixin.java (probably named something like ChestBoatDropsMixin) this mixin would target the ChestBoat instead @Mixin(ChestBoatEntity.class) and you would only have to change the item returned to the callback info to a chest boat item.

  • In BoatItems.java (or wherever you are registering your items) you should add another item registry still using BoatItem. The change here is that since MC 1.19 Boats have an extra boolean parameter representing whether the boat has a chest or not:
    public static final Item WILLOW_BOAT = new BoatItem(false, <Omitted: Same as before>);
    public static final Item WILLOW_CHEST_BOAT = new BoatItem(true, <Omitted: Same as before>);

  • Then in your assets directory you need to add another item texture and model for the chest boat item

  • In the minecraft assets directory you will need to put a subdirectory in the entity texture for chest boats (src/main/resources/assets/minecraft/textures/entity/chest_boat/) in this directory you put a texture for your chest boat with the name of your boat type (in this example willow). You can find an example of how to layout the unwrapped chest boat texture in the vanilla assets (if you don't know where to find these there will be a couple of tutorials online) but in short you can copy the texture from the empty boat to a new 128x128 file and copy over the chest texture from vanilla

I hope this helps you get a chest boat in the game.

(I might open a PR implementing this to the project)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants