HorseGadgets

HorseGadgets

13 devlogs
15h 28m
•  Ship certified
Created by ingobeans

a minecraft mod that adds some fun horse gadgets to make horses more relevant, like a horse pocket, to instantly be able to pick your horse up in to your inventory!

Timeline

Ship 1

This ship is currently being voted on by the community. Check back later!

ingobeans

3 days ago

ingobeans Covers 13 devlogs and 15h 28m

made mod work on servers! since mod is nearing completion i decided to check if it works when run on a server, with players connected. i set up the server, built the jar, and.... crash! and a really cryptic error log too, since the class names were stripped, and called, for instance class_5601. the error seemed to originate from this class_5601, complaining that this class didnt exist ??
with the help of a regular old search enginge, i found a page from maven.fabricmc.net that translated class_5601 to minecraft/client/model/ModelPart. turns out, i had defined the model for the elytra saddle in the shared server/client space, when it shouldve only existed client-side. this is important, because the server side literally doesnt know about the client side stuff, like rendering, and when i tell it to define a model, it doesnt know what that is and crashes. I moved the model definition over to the client side entrypoint, and voila! it worked :>
i also worked on some smaller tweaks, like editing some textures, and fixing some project settings, but that wasnt very interesting.
might ship soon :}

Update attachment

now horse scuba gear also prevents drowning!

(i made it so both player and horse get infinite air time, might change later, idk)

Update attachment

make horse scuba gear prevent player getting dismounted in water, and also made it allow jumping while submerged!
the scuba gear is now semi working! one thing though is that the player and horse still drown while under water. will work on that lol. i will either make both player and horse get infinite air time, or just give horse infinite air and give player something akin to the effect of the turtle shell, that just dramatically increases air time

Update attachment

started adding scuba gear for horses! i know it sounds silly but think about it, whats the most annoying part of having a horse in minecraft? crossing lakes, since you quickly get ejected when trying to swim with the horse. so why not kill two birds with one stone and instead make water travel a strength?
im thinking youll be able to infinitely go under/over water while on your horse with the scuba gear, making it great for underwater exploration! the scuba gear is also equiped as horse armor, meaning you can combine it with the elytra sadle for a truly OP horse.
currently the scuba gear doesnt do anything and the model isnt done lol but i figured i'd do this mini devlog anyways, since it was quite hard setting up the armormaterial and equipmentasset

Update attachment

mini devlog, but ive now added a crafting recipe for the elytra saddle! truth be told i had just forgotten to add a recipe for it, but now ive done it!

Update attachment

fixed the animation bug from last devlog! the problem really wasnt hard to solve at all, i was just way off. when adding the custom model, i had copied the code for the regular saddle, and removed everything i thought was unnecessary, just to clean the code up a bit so i could understand it and use it, but i also removed the function call for setAngles which was the function that was supposed to update the rotation for the jump animation. readding that allowed the elytra saddle to rotate with the horse! (though i also needed to copy the rotation formula from the horse class to make it be the same)

Anyways, i want to make the wings spread apart when gliding in the air now, that would look cool :D

i made the elytra-saddle model not just be a literal black box! i'm just using the texture of the regular in-game elytra, and just moddeled two wings like this. though a problem im having which seems like its going to be a tough nut to crack is the animations the horse does when it jumps, because my elytra-saddle model doesnt follow the horse body, and instead just stays relative to the head or something. it looks really weird since it doesnt rotate is all. i think to create animations you need to use an instance of a model rather than a static function that generates the moel data, like ive been doing now, so that it can be mutated, or at least thats what it seems like the built-in saddle does.
problem though: i dont know how to do that. you need a reference to some data registry that i dont have to create instances of models i think. anyways, ill try my best :=)

Update attachment

ive spent SO long trying to get this custom model for the elytra saddle to render. right now its just a large block at the horse's feet, but ill change that to wings later. it also doesnt have a texture yet- i normally would want to wait until ive got that finished before releasing a devlog, but since ive spent so many hours just getting to this point i figured id release an in-between devlog.
Like ive said in previous devlogs, im new to java, and my god are things just terribly documented. coming from rust, where docs for all libraries are automatically generated, and where the language itself is really transparent, its really hard figuring out which functions and values to use. In this case, most of the problem is just that minecraft is closed source, which means the only docs are community made, but a lot of other tools, like mixins, ive had a hard time finding complete documentation for. same goes for Fabric (the mod loader) itself! ive had to use fabric functions that straight up just arent documented!!! what is that!?
so really all you have to go off is just searching minecraft's source and try to figure out how to get things done.

anyways, i think getting textures for the saddle working wont take that long, but you never know with Java. we'll see :)

Update attachment

I started working on an Elytra-Saddle! basically gives your horses the ability to fly. i just used mixins to make horses use the gliding state when in the air and the elytra saddle is equipped, and to allow their jumping even if in the air. i havent added a custom model for the elytra saddle though which i really want to. It would look cool basically having pegasuses in minecraft!

add dispenser integration so horse pockets can be emptied with them! this was suprisingly easy to implement, i just looked up the dispenser source code, found it used something called ItemDispenserBehavior, so i looked up refernces to that and found the code that registers the behaviour of fire charges, and from there it was really simple.
im starting to get the hang of java and this IDE (ive only ever used vscode before, so an IDE like this, that is basically more context aware than i am (lol) is really new to me but also pretty cool)

Update attachment

added some sound effects and new textures for the empty and filled horse pocket! also made the name of the horse stored in the filled horse pocket's name, like how it works with fish in buckets!

wowie, ive now made horse pockets actually store the horse, and allow you to place them back down. it took SOO long for me how to figure out how to encode/decode data from minecraft's item NBT data, to actual entity data. i initially looked at the code behind buckets, since they have a similar mechanic of picking up fish. this sort of worked, but i had to manually add all fields to track, and create mixin invokers for the fields that werent publically accessible..... Then, i found out about Write/ReadViews, which is basically an internal system of encoding/decoding entities to NBT, exactly what i spent like 2 hours doing manually. Rewrote all that to 5 lines of code using the Write/ReadViews, and it works much better lol
Horse pockets are basically complete. Will work on other features next!

Update attachment

First devlog!!!!! Ive barely ever used java before, so everything minecraft modding related is unfamiliar to me, but i feel like i got some decent progress for a first devlog! I added an item, a horse pocket (lmk if you get the reference), with a crafting recipe and when you right click a horse with it, the horse dissappears. I havent added a way to, you know, get the horse back, currently it just despawns, but ill work on that til next devlog.
This entire mod is just going to be about adding some QOL features for mobs, like i want to make all animals pettable, and the horse pocket i think is just funny and also would make horses for travel actually useful.
Anyways, ty for reading, will continue working on this now!

Update attachment