Download Ore Stages — Minecraft Mods — MetaMods
Ore Stages

Ore Stages

Active

Downloads

0

Last update

2 years ago

Versions

1.12.2
Client and server
Forge
Adventure

Ore Stages

This mod is an extension for the GameStage API that enables assigning game stages to world blocks, including various ores. For complete understanding of the system's operation, it's recommended to review the main GameStage API mod description. In brief, stages represent progression system elements configured by modpack creators or server administrators. Players gain access to stages through commands typically activated via quest mods, achievements, or command blocks.

Work demonstration

How does the staging system work?

When a player lacks the required stage for a specific block:

  • The block appears as its replacement
  • Right-clicking the block becomes impossible
  • When broken, the block drops items corresponding to the replacement block
  • Mining time matches the characteristics of the replacement block

In situations where no players are nearby, the system assumes no stages are present - this is called default behavior.

Performance impact

The process of restoring blocks to their original appearance executes very quickly. The operation involves reloading chunk renderers on the client side. While this sounds complex, in practice even on slower computers the process takes no more than one to two seconds - similar to pressing F3+A in the vanilla game version.

Configuration via CraftTweaker

Mod configuration is handled through CraftTweaker. The following methods are available:

Replacing a block with regular stone:

mods.orestages.OreStages.addReplacement(String stage, IIngredient original);

Replacing one block with another:

mods.orestages.OreStages.addReplacement(String stage, IIngredient original, IItemStack replacement);

Replacement by exact block identifiers (the first two methods work only with blocks that have items):

mods.orestages.OreStages.addReplacementById(String stage, String original, String replacement);

The following methods add replacement without default behavior - when a block is broken without player involvement (by water, explosion, mechanism) the block will break normally:

mods.orestages.OreStages.addNonDefaultingReplacement(String stage, IIngredient original);
mods.orestages.OreStages.addNonDefaultingReplacement(String stage, IIngredient original, IItemStack replacement);
mods.orestages.OreStages.addNonDefaultingReplacementById(String stage, String original, String replacement);

Script example

mods.orestages.OreStages.addReplacementById("one", "minecraft:potatoes:", "minecraft:tallgrass:2");
mods.orestages.OreStages.addReplacementById("two", "minecraft:wheat:", "minecraft:carrots:3");
mods.orestages.OreStages.addReplacementById("three", "minecraft:nether_wart:", "minecraft:beetroots");
mods.orestages.OreStages.addReplacement("four", <minecraft:dirt>, <minecraft:stone>);
mods.orestages.OreStages.addReplacement("one", <minecraft:obsidian>, <minecraft:cobblestone>);
mods.orestages.OreStages.addNonDefaultingReplacement("one", <minecraft:torch:>, <minecraft:redstone_torch>);
mods.orestages.OreStages.addReplacement("five", <minecraft:furnace:*>, <minecraft:stone>);
Project members
Darkhax

Darkhax

Developer

DarkhaxDev

DarkhaxDev

Created: 9 Jun 2023

ID: 7799