Skip to content

K9Developer/Cubicle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cubicle

project-image

The blazingly fast universal minecraft world parser and editor. (Still WIP)

shieldsshieldsshieldsshields

project-screenshot

Usage

fn main() {
    
    // Create world object
    let world_path = "...";
    let version = VersionManager::get("1.20.1", WorldKind::Singleplayer);
    let world = World::new(world_path.parse().unwrap(), version);

    // Register all regions and parse the region at 0 0
    world.with(|w| {
        let region_position = RegionPosition::new(0, 0, "overworld");

        w.register_regions();
        w.load_region(region_position);
    });


    // Create a filter that will catch stone blocks that their X value is <= than 3
    let block_filter = Filter::And(vec![
        Filter::Compare(FilterKey::ID, FilterOperation::Equals, "minecraft:stone".into()),
        Filter::Compare(FilterKey::X_POSITION, FilterOperation::LessThanEquals, 3.into()),
    ]);

   world.with(|w| {
       
       // Create selection of world (this way we edit and do more complicated operations on worlds)
       let mut selection = w.select();
       
       // Find the blocks using the filter and a callback
       selection.find_blocks(block_filter, |mut matching_block| {
           
           // Set the matching block to a redstone block and commit the changes to the world
           matching_block.set_id("minecraft:redstone_block");
           matching_block.commit();
           true
       });
   })
}

🧐 Features

Here're some of the project's best features:

  • Load any minecraft world (any version)
  • Modify the world data
  • Save the world as any version
  • Filter for any block or entity
  • Tick the world to simulate it
  • Compress the world to very low sizes
  • And More!

🛠️ Installation Steps:

1. Clone the repository

git clone https://github.com/K9Developer/Cubicle

2. Build The Project

cargo build

3. Code some tools

🍰 Contribution Guidelines:

Incase you'd like to contribute fork the repository make changes and then create a pull request. I'd suggest first creating an issue where we could discuss details about the features / fixes you'd like to add before coding it up :)

💻 Built with

Technologies used in the project:

🛡️ License:

This project is licensed under the

💖Like my work?

If you'd like to donate feel free to support me on https://ko-fi.com/ilaik

About

The universal minecraft world parser and editor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages