Minecraft Mods in Rust

156 points theaddonn

Violin.rs allows you to easily build Minecraft Mods in Rust!

Our Github can be found here bedrock-crustaceans/violin\_rs

We also have a Violin.rs Discord, feel free to join it for further information and help!

The following code demonstrates how easy it is be to create new unqiue 64 swords via Violin.rs

for i in 1..=64 {
    pack.register_item_texture(ItemTexture::new(
        format!("violin_sword_{i}"),
        format!("sword_{i}"),
        Image::new(r"./textures/diamond_sword.png").with_hue_shift((i * 5) as f64),
    ));
    
    pack.register_item(
        Item::new(Identifier::new("violin", format!("sword_{i}")))
            .with_components(vec![
                ItemDamageComponent::new(i).build(),
                ItemDisplayNameComponent::new(format!("Sword No {i}\


The power of programmatic addons.")).build(),
ItemIconComponent::new(format!("violin_sword_{i}")).build(),
ItemHandEquippedComponent::new(true).build(),
ItemMaxStackValueComponent::new(1).build(),
ItemAllowOffHandComponent::new(true).build(),
])
.using_format_version(SemVer::new(1, 21, 20)),
);
}

This code ends up looking surprisingly clean and nice!

Here is how it looks in game, we've added 64 different and unique swords with just a few lines of code.. and look they all even have a different color

https://preview.redd.it/2xijaknh9xzd1.png?width=1425&format=png&auto=webp&s=1a3ca8c37ff22854faea9a3a31f1f21dbe779658

Any suggestions are really appreciated! Warning this is for Minecraft Bedrock, doesn't mean that it is bad or not worth it.. if this makes you curious, please give it a shot and try it out!

We are planning on adding support for a lot more, be new blocks and mbos or use of the internal Scripting-API

We are also interested in crafting a Javascript/Typescript API that can generate mods easier and makes our tool more accessible for others!

This is a high quality product made by the bedrock-crustaceans (bedrock-crustaceans discord)