Carpet Mod Documentation

website·Indexed 31 days ago

https://carpet.tis.world

Documentation for Carpet TIS Addition, a mod providing technical tools and features for Minecraft. Includes guides on configuration rules, server and world state inspection commands, loggers, and the Scarpet scripting language for versions 1.16.4+.

Tokens
14.9K
Snippets
167
Records
192
Agent score
57%

What's inside Carpet

  1. Overview of Carpet TIS Addition features

    Carpet TIS Addition is a mod for Technical Minecraft that provides a suite of tools including carpet rules, loggers, and commands. It is designed to maintain vanilla game behavior unless the user explicitly configures changes, ensuring the game remains vanilla by default.
  2. Inspect server and world state using /info

    The /info command provides real-time data about the game world and server counters.
    # Show the ticking order of current dimensions
    /info world ticking_order
    
    # Show world weather properties and a weather forecast
    /info world weather
    
    # Show the current server entity ID counter (net.minecraft.world.entity.Entity#ENTITY_COUNTER)
    /info server entity_id_counter
    
    # Show the current server tick counter (net.minecraft.server.MinecraftServer#getTickCount)
    /info server server_tick_counter
  3. Remove placement requirements for Wither Roses

    Allows Wither Roses to be planted on any surface by removing all placement requirements. This is useful for creating update-suppressed wither rose setups for wither skeleton farms.
    # Default: false
    # Options: true, false
  4. Track entity lifetimes and spawn/removal reasons

    The /lifetime tracker monitors how long entities (mobs, items, XP orbs, vehicles) exist and why they were spawned or removed. This is primarily used for debugging mob farms.

    Key Concepts:

    • Lifetime Definition: The number of game ticks an entity counts towards the mobcap between spawning and removal.
    • Realtime Tracking: Append realtime to the command to get results based on real-world time instead of in-game ticks.
    • Mobcap Rule: By default, only entities counting towards the mobcap are tracked. This behavior can be modified via the lifeTimeTrackerConsidersMobcap rule.
    # Start, stop, or restart the lifetime tracker
    /lifetime tracking [<start|stop|restart>]
    
    # Show detailed statistics for a specific entity type (e.g., creeper)
    /lifetime creeper
    
    # Show only removal statistics for a specific entity type
    /lifetime creeper removal
    
    # Show only spawning statistics for a specific entity type
    /lifetime creeper spawning
  5. Configure movement logger permissions

    The loggerMovement rule defines the switch or permission requirement for the movement logger. Supported values include true, false, ops, or permission levels (0-4).
    /carpet loggerMovement ops
  6. Remove permission requirements for F3 + I NBT queries

    Enable debugNbtQueryNoPermission to remove the requirement for permission level 2 when performing the client's F3 + I debug NBT request. This requires the Carpet TIS Addition to be installed on the client.
    # Set to true to remove permission requirement
    debugNbtQueryNoPermission true
  7. Track block events using Scarpet

    Scarpet allows developers to register specific block positions to be tracked for events. When a tracked block triggers an event, the __on_microtiming_event function is called. This functionality requires the Carpet rule microTiming to be set to true.
  8. Log redstone micro timings

    The /log microTiming <type> command logs micro timings of redstone components. Requirements: The chunk ticket must be at least lazy-processing (level 32) and /carpet microTiming true must be enabled.

    Options:

    • all: Log all events.
    • merged: Log all events and merged continuous identical events.
    • unique: Log the first unique event per gametick.
    /carpet microTiming true
    /log microTiming merged
  9. Use the microTiming logger for redstone debugging

    The microTiming rule enables the MicroTiming logger, which logs and displays redstone component actions, block updates, and stack traces.

    • Activation: Use /log microTiming to start logging.
    • Dye Markers: Use the microTimingDyeMarker rule to mark blocks for logging by right-clicking with a dye item. Renamed dyes create named markers. Use /carpet microTimingDyeMarker clear to remove all markers.
    • Targeting: Use microTimingTarget to define what is logged. The marker_only option (default) logs only events labeled with dye markers. Other options like labelled, in_range, and all are deprecated.
    • Tick Division: Use microTimingTickDivision to choose how game ticks are divided: world_timer (Overworld timer increment) or player_action (beginning of player action).
    # Enable microTiming
    /carpet microTiming true
    # Start logging
    /log microTiming
    # Set target to marker only
    /carpet microTimingTarget marker_only
  10. Understand Carpet development branching strategy

    Carpet uses a specific branching strategy to manage feature development and releases across different Minecraft versions. The project utilizes a preprocessor to maintain support for multiple Minecraft versions within a single branch. The current main development Minecraft version is 1.15.2 (tracked by versions/mainProject).

    Branch purposes:

    • master: Contains stable release versions; this is the preferred target for Pull Requests. Direct commits to master are typically reserved for documentation updates.
    • dev: Used for active feature development.
    • future: Used for snapshot migrations.
  11. Reintroduce dust-trapdoor instant update looper (MC >= 1.20)

    For Minecraft 1.20 and above, enable dustTrapdoorReintroduced to restore pre-1.20 behavior. This does two things: 1) Makes opened trapdoors unable to redirect redstone dust, and 2) Makes redstone dust ignore state updates from below (pre-1.20.3 behavior).
    dustTrapdoorReintroduced true
  12. Configure lifetime tracker mobcap strategy

    The lifeTimeTrackerConsidersMobcap rule determines how the lifetime tracker handles mobs that do not count towards the mobcap:

    • true: Does not track mobs that don't count towards mobcap and treats them as removed as soon as they stop affecting the mobcap (e.g., when picking up items). Recommended for mob farm design.
    • false: Tracks all possible mobs and only marks them as removed when they are actually removed. Recommended for raid testing or non-mobfarm scenarios.
    /carpet lifeTimeTrackerConsidersMobcap false