The Best Resource for Minecraft
The Best Resource for Minecraft

ShadowMC 1.12.2, Wiki

ShadowMC is a comprehensive core library mod for Minecraft that provides essential APIs, networking wrappers, and configuration systems for all of Shadowfacts' mods.

7 sections · 719 words

Overview#

ShadowMC is a mandatory backend library designed by Shadowfacts to streamline the development and interoperability of their mod suite. It does not function as a standalone content mod; instead, it serves as a foundational framework that handles complex tasks such as GUI rendering, network communication, and data synchronization.

By centralizing these systems, ShadowMC ensures that mods like Forgelin, Sleeping Bag, and Ye Olde Tanks operate with a consistent logic and reduced memory footprint. It is primarily known for its robust configuration API and its specialized handling of custom recipes and world-generation structures.

Core Mechanics#

ShadowMC introduces several internal mechanics that govern how dependent mods interact with the Minecraft engine. These systems are invisible to the player during standard gameplay but are critical for the functionality of the modpack environment.

ShadowGUI Framework

ShadowGUI is a custom API that replaces the standard Minecraft GUI logic for Shadowfacts' mods. It allows for:

  • Dynamic Scaling: Interfaces that adapt to different screen resolutions and GUI scales.
  • Interactive Elements: Advanced buttons, scrolling lists, and text input fields used in complex machines or configuration menus.
  • Container Management: Streamlined handling of player inventories and tile entity synchronization.

ShadowNetwork

This is a networking wrapper that simplifies the process of sending packets between the server and the client. It ensures that data, such as the contents of a fluid tank or the state of a sleeping bag, is updated instantly across all connected players without causing significant network lag.

RTFM Integration

ShadowMC provides the underlying engine for the "RTFM" (Read The Manual) system. This framework allows mods to implement in-game documentation books with rich text formatting, image embedding, and interactive recipe links.

Recipe and Ingredient API#

ShadowMC extends the base Minecraft recipe system, allowing for more complex crafting logic. This is particularly useful for mods that require specific item states or metadata.

Feature Description
IngredientStack Allows a single recipe slot to accept multiple different items or any item from a specific Ore Dictionary tag.
NBT Matching Enables recipes to require items with specific NBT data (e.g., a specific enchant or energy level).
Fluid Ingredients Provides support for recipes that utilize fluid containers as crafting components.

These enhancements allow for more flexible automation and compatibility with other large-scale technical mods.

Structure Generation API#

The mod includes a specialized Structure API that facilitates the generation of complex buildings and features in the world. This system is used by dependent mods to spawn structures during world generation or via specific player actions.

  • NBT Loading: It can load standard Minecraft .nbt structure files directly from a mod's assets folder.
  • Transformation Support: Structures can be automatically rotated or mirrored based on the orientation of the placement, ensuring they fit naturally into the terrain.
  • Integrity Checks: Includes logic to prevent structures from spawning inside solid rock or floating in mid-air unless specifically intended.

Items and Blocks#

As a library mod, ShadowMC does not add traditional blocks or items to the game world. However, it does implement a shared Creative Tab.

  • Shadowfacts Creative Tab: This tab appears in the Creative Mode inventory and serves as a unified location for all items and blocks added by any mod that utilizes the ShadowMC library. This prevents the creative menu from becoming cluttered with multiple individual tabs for small utility mods.

Commands#

ShadowMC adds a set of administrative commands primarily used for debugging and managing the library's state.

Command Description
/smc version Displays the current version of ShadowMC and checks for available updates.
/smc reload Attempts to reload the configuration files for ShadowMC and its dependent mods without restarting the game.
/smc help Provides a list of available sub-commands and their usage.

Configuration#

The mod features a centralized configuration file located at /config/shadowmc.cfg. This file allows players and server owners to toggle global library settings.

General Settings

  • allowUpdateChecking: (Boolean, Default: true) If set to true, the mod will check for newer versions of ShadowMC and Shadowfacts' mods upon joining a world. It will display a notification in the chat if an update is found.
  • debug: (Boolean, Default: false) Enables verbose logging in the console. This is useful for troubleshooting crashes or identifying conflicts between different mods using the ShadowMC framework.

ShadowConfig GUI

ShadowMC provides a user-friendly configuration GUI accessible via the "Mods" button on the main menu. This allows users to change settings for all Shadowfacts mods in real-time without needing to manually edit .cfg files.