All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Ratatouille

Ratatouille

by RAT • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

Ratatouille

A library for doctor4t's mods and supporter cosmetics

Features

Library

  • Rendering utils derived from Lodestone (by Sammy; and Lodestar, removed with 1.21.1)
  • Cosmetics customization util: Made for my supporter cosmetics but can also be used out of the box for more general cosmetic mods who need simple customization
  • Item custom hit sound and particle utils
  • First person feature rendering util: Allows adding features that render on the player's hand in first person by implementing the RendersArmInFirstPerson interface in your feature renderer.
  • Custom model armor util: Allows adding armor with custom models with a single method call (and custom model), bypassing the requirements of making a model layer, feature renderer, mixins to inject said feature renderer into player and armor stand rendering, coding display conditions, etc... as well as automatically display said custom armor on a player's hands in first person. A usage guide can be found further down.

Additional Goodies

  • RAT Plushies (Rat Maid, Folly and Mauve)
    • Can be honked
    • Noteblocks can be placed on top to play the plush's honk sound as the instrument
  • Mobs can be given items and armor by interacting with them while in creative and sneaking with an item in hand. Hitting them in creative while sneaking with an empty hand will make them drop all their equipped items.

Supporter Cosmetics

  • For Ko-Fi or YouTube members
    • Icon next to your name as well as colored name
    • Head plushies: Sneak-use any plush item while not aiming at a block to open the cosmetics screen

Gallery

Expand gallery

Plushies Cosmetics screen

Documentation

Expand documentation

Setup (build.gradle)

Expand Gradle details
repositories {
    maven {
        name = 'Ladysnake Mods'
        url = 'https://maven.ladysnake.org/releases'
}

dependencies {
    modImplementation "dev.doctor4t:ratatouille:${project.ratatouille_version}"
}

Custom model armor util

Expand Custom model armor util details

This util allows you to easily register new armor sets that use a custom model with a single method call (and that custom model as the game does need to know what you wish to render).

Step 1: Defining the model

Before we can add our custom armor, we need a model that respects a few rules. You can find an armor template model (Blockbench model file) and texture in the RESOURCES folder of the repository. While you can edit this model and texture freely in order to shape up the armor of your dreams, please note that the existing groups are very important and while you can add new sub-groups to them, you cannot and should not delete any existing group as they allow the library to know what should be displayed when a player (or armor stand or mob) dons armor pieces:

  • helmet displays when the helmet item is equipped
  • body_chestplate, right_arm_chestplate and left_arm_chestplate display when the chestplate item is equipped
  • body_leggings, right_leg_leggings and left_leg_leggings display when the leggings item is equipped
  • right_leg_boot and left_leg_boot display when the boots item is equipped

Once you have finalized your model, you can export it with Blockbench: File -> Export -> Export Java Entity. Open the generated Java class and copy the lines between ModelPartData modelPartData = modelData.getRoot(); and the line right before the return (included) in getTexturedModelData(). Ratatouille adds a new model class type that simplifies armor model definition called CustomArmorModelDefinition; extend that class and implement the addModelParts method by pasting the snippet you copied from the generated model class. Then implement getTexture(); the simplest way to do so is to have a static Identifier for your armor texture in your Model Definition class and return that, but if you wish to do a special logic that varies the returned texture you can naturally do so as well.

Step 2: Registering the custom armor with Ratatouille

The second - and last - step is to register your custom armor rendering in your client initialization. Call CustomModelArmorUtil.registerCustomArmor and give it the required parameters:

  • Identifier id: The id of the custom armor. This is used in order to automatically generate and register the model layer of your armor, it should therefore be unique.
  • ArmorDisplayConditions displayConditions: The display conditions that need to be met for your armor parts to render. If you want a simple armor that displays its parts for each item you equip, the ItemSetDisplayConditions allows you to define the helmet, chestplate, leggings and boots items and will automatically check which armor items are equipped and need to be displayed, as well as prevent the rendering of the vanilla armor model with a missing texture. If you wish to have a custom logic for displaying different pieces that is not just checking whether the item is being worn, you can implement the ArmorDisplayConditions and its four shouldDisplay methods.
  • CustomArmorModelDefinition armorModelDefinition: The model definition we created in Step 1, simply create a new instance of it.
  • int textureWidth, int textureHeight: The armor's texture width and height.

Registering your armor through this method call will take care of everything for you, like creating the textured model data, model layer and appending the feature to the player / armor stand / mob renderers. If you need to access the model data or model layer of the armor, you can find them in the CustomModelArmorUtil.CUSTOM_ARMOR_MODELS HashMap by using the armor's displayConditions as the key.

Ambience util

Expand Ambience util details This util allows you to easily register ambient loops as general background audio or block entity dependant audio.

Registering background ambience

To register a background ambience, all you need to do is call the AmbienceUtil.registerBackgroundAmbience method in your client initializer class and give it a new BackgroundAmbience object with the required parameters:

  • SoundEvent soundEvent: The ambient loop sound to play.
  • SoundCategory soundCategory: The audio category to play the sound in.
  • PlayPredicate predicate: The predicate determining whether the sound is allowed to play or not. Takes a ClientPlayerEntity and must return a boolean.
  • int fadeIn: The fade-in time of the ambient loop when it starts playing (in ticks).
  • int fadeOut: The fade-out time of the ambient loop when it stops playing (in ticks).

Registering Block entity ambience

To register a block entity ambience, all you need to do is call the AmbienceUtil.registerBlockEntityAmbience method in your client initializer class and give it the BlockEntityType<? extends BlockEntity> that should play said ambience and a new BlockEntityAmbience object with the required parameters:

  • SoundEvent soundEvent: The ambient loop sound to play.
  • SoundCategory soundCategory: The audio category to play the sound in.
  • PlayPredicate predicate: The predicate determining whether the sound is allowed to play or not. Takes a BlockEntity and must return a boolean.
  • int fadeIn: The fade-in time of the ambient loop when it starts playing (in ticks).
  • int fadeOut: The fade-out time of the ambient loop when it stops playing (in ticks).

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.1
Fabric Quilt
16h ago 1
1.21.7
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
1.20.1
Fabric Quilt
16h ago 1
Ratatouille 1.4.3 - 1.21.1:

  • Added getItemRegistrar() method to the block registrar



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.4.3-1.21.1/changelog.md "Changelog")
Ratatouille 1.4.2 - 1.21.1:

  • Added getEntriesToRegister() method to registrars



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.4.2-1.21.1/changelog.md "Changelog")
Ratatouille 1.4.1 - 1.21.1:

  • Fixed cosmetics screen being blurry and player preview being wrong
  • Fixed a disconnect that would happen when changing plush cosmetics on a server



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.4.1-1.21.1/changelog.md "Changelog")
Ratatouille 1.4 - 1.21.1:

  • Added a registrar util to streamline blocks, items, entity types, sound events, etc... registering
  • Added an option locker util
  • Added text utils
  • Fixed plushies using a hand item renderer instead of a simple item renderer



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.4-1.21.1/changelog.md "Changelog")
Ratatouille 1.3 - 1.21.1:

  • Added an ambience util: can be used to register background ambiences or block entity dependant ambiences



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.3-1.21.1/changelog.md "Changelog")
Ratatouille 1.2.5 - 1.21.1:

  • Custom armor pieces using the custom model armor util now properly display glint
  • Added four new methods to the ArmorDisplayConditions class that allows defining custom glint display conditions for armor pieces
  • Added a custom test armor using the custom model armor util in dev environments



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.2.5-1.21.1/changelog.md "Changelog")
Ratatouille 1.2.4 - 1.21.1:

  • Fixed custom armor rendering missing textures and vanilla armor no longer rendering (I accidentally inverted the check condition I'm so silly and incompetent)



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.2.4-1.21.1/changelog.md "Changelog")
Ratatouille 1.2.3 - 1.21.1:

  • Removed the CustomRenderArmor interface and CustomRenderArmorItem class and made the CustomModelArmorUtil automatically not render items registered with ItemSetDisplayConditions



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.2.3-1.21.1/changelog.md "Changelog")
Ratatouille 1.2.2 - 1.21.1:

  • Replaced CustomModelArmorUtil.SetItems record with the ArmorDisplayConditions abstract class
  • This abstract class has no functionality on its own and needs to be extended and have its four shouldDisplay methods defined
  • Added an ItemSetDisplayConditions class that works the same way CustomModelArmorUtil.SetItems did



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.2.2-1.21.1/changelog.md "Changelog")
Ratatouille 1.2.1 - 1.21.1:

  • Removed getRightArm and getLeftArm from the RendersArmInFirstPerson interface
  • Given the interface is supposed to be implemented on a BipedEntityModel, it will now automatically use the "right_arm" and "left_arm" parts of the biped model
  • Tweaked the custom armor model and template to more closely match biped entity models
  • Fixed custom armor models not properly matching baby biped mobs



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.2.1-1.21.1/changelog.md "Changelog")
Ratatouille 1.2.0 - 1.21.1:

  • Added the ability to give items and armor to mobs by interacting with them while in creative and sneaking with an item in hand
  • Added the ability to hit mobs in creative while sneaking with an empty hand to make them drop all their equipped items
  • Added a custom model armor util
  • Allows adding armor with custom models with a single method call (and custom model)
  • Automatically displays said custom armor on a player's hands in first person.



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.2.0-1.21.1/changelog.md "Changelog")
Ratatouille 1.1.3 - 1.21.1:

  • Changed getRightArm for the RendersArmInFirstPerson interface to take in a living entity parameter
  • Changed getLeftArm for the RendersArmInFirstPerson interface to take in a living entity parameter



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.1.3-1.21.1/changelog.md "Changelog")
Ratatouille 1.1.2 - 1.21.1:

  • Changed getTexture for the RendersArmInFirstPerson interface to take in a living entity parameter



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.1.2-1.21.1/changelog.md "Changelog")
Ratatouille 1.1.1 - 1.21.1:

  • Added an interface and class for custom armor items that does not render the vanilla armor model when equipped
  • Changed getModel for the RendersArmInFirstPerson interface to take in a living entity parameter



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.1.1-1.21.1/changelog.md "Changelog")
Ratatouille 1.1.0 - 1.21.1:

  • Added an interface that allows feature renderers extending it to render on the arm in first person automatically



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.1.0-1.21.1/changelog.md "Changelog")
Ratatouille 1.0.10 - 1.21.7:

  • Updated to Minecraft 1.21.7 thanks to HollowedWanderer!
  • Make plushies bop to the beat when placed on top of a playing jukebox



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.9-1.21.7/changelog.md "Changelog")
Ratatouille 1.0.8 - 1.20.1:

  • Fixed custom hit particle and sound items not always playing their effects when crits do



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.9-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.8 - 1.20.1:

  • Added item custom hit sound and particle utils



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.8-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.7 - 1.20.1:

  • Added a subtitle for the plush honk sounds



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.7-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.6 - 1.20.1:

  • Removed colored names from supporters for now, leaving only a folly red rat icon appended to the name
  • Plan is to make supporters able to choose their own custom colors in the future
  • Fixed supporter icons appearing for non-supporters
  • Fixed supporter cosmetics screen not appearing locked to non-supporters



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.6-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.5 - 1.20.1:

  • Removed Cardinal Components, Satin API and Midnightlib from dependencies



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.5-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.3 - 1.20.1:

  • Fixed a desync between equipped cosmetics and indicated cosmetics when opening the plush cosmetics screen



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.3-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.2 - 1.20.1:

  • Added a cosmetics configuration screen util
  • Added a text formatting util that capitalizes strings and replaces underscores with spaces
  • Added a screen to adjust the plush on head cosmetic for supporters, accessible by sneak-right-clicking any plush in the air
  • Fixed plush on head rendering rotating too much other feature renderers



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.2-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.1 - 1.20.1:

  • Fixed plush on head rendering messing up other feature renderers



see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.1-1.20.1/changelog.md "Changelog")
Ratatouille 1.0.0 - 1.20.1:

Initial release


see full changelog [here](https://github.com/Doctor4t/Ratatouille/blob/1.0.0-1.20.1/changelog.md "Changelog")
Ratatouille Icon
Download Ratatouille
Select game version
Select platform