The Simulated Project Documentation

repository·main·Indexed 21 days ago

https://github.com/creators-of-aeronautics/simulated-project

A suite of Minecraft mods powered by Sable that extends the 'Create' mod with physics-based contraptions. It consists of three modules: Simulated (core assembly and tools), Aeronautics (flying machines via propellers and hot air), and Offroad (land vehicles). Includes documentation on the /simulated command for managing sub-level locks, applying honey glue, and development debug tools.

Tokens
1K
Snippets
8
Records
9
Agent score
25%

What's inside Simulated Project

  1. Overview of The Simulated Project

    main

    The Simulated Project is a suite of Minecraft mods designed to extend the 'Create' mod with physics-based contraptions. It provides a cohesive framework for interacting with physics objects like planes, cars, and insect machines. The project is composed of three primary modules:

    1. Simulated: The core module. It provides assembly, redstone components, and the fundamental tools required to interact with simulated contraptions.
    2. Aeronautics: An expansion module that enables flying contraptions using mechanics such as hot air, propellers, and magic floating rocks.
    3. Offroad: An expansion module that enables land vehicles by allowing almost any wheel-like object to be used for movement.

    The project is powered by Sable.

  2. Debug commands for development environments

    main

    When running in a development environment (detected via CatnipServices.PLATFORM.isDevelopmentEnvironment()), the /simulated debugthing command tree is available for testing purposes. These commands are restricted to permission level 2.

    Subcommands:

    • start <steps>: Starts the debug process with a specified number of steps.
    • stop: Stops the debug process.
    • abort: Aborts the debug process.
    • stop_sublevels: Stops all sub-levels.
    # Available only in development environments:
    /simulated debugthing start <steps>
    /simulated debugthing stop
    /simulated debugthing abort
    /simulated debugthing stop_sublevels
  3. Stop sublevels physics

    main

    Iterates through all sublevels within the current level's plot container and applies counter-impulses to stop their movement. For each ServerSubLevel found, it calculates the negation of current angular and linear velocities, transforms them by the logical pose orientation, and applies the resulting linear impulse and torque impulse via the RigidBodyHandle to reset the physics state.

    stopSublevels
  4. Apply honey glue with /simulated glue

    main

    The /simulated glue command creates a HoneyGlueEntity spanning a defined area between two block positions. This is useful for binding contraptions or areas together using honey glue logic.

    Arguments:

    • from: The starting BlockPos.
    • to: The ending BlockPos.

    Permissions: Requires permission level 2.

    /simulated glue <from_block_pos> <to_block_pos>
  5. Lock or unlock sub-levels with /simulated lock

    main

    Use the /simulated lock command to toggle the lock state of specific sub-levels. This interacts with the PhysicsStaffServerHandler to manage sub-level physics states.

    Arguments:

    • sub_levels: A collection of ServerSubLevel entities to target.
    • locked (optional): A boolean (true/false) specifying the desired state. If omitted, the command toggles the current state.

    Permissions: Requires permission level 2.

    # To toggle the lock state of specific sub-levels:
    /simulated lock <sub_levels>
    
    # To explicitly lock sub-levels:
    /simulated lock <sub_levels> true
    
    # To explicitly unlock sub-levels:
    /simulated lock <sub_levels> false