Skip to content

AStages Ore Restriction

Kessy edited this page Nov 30, 2025 · 3 revisions

AStages Ore Restriction

Overview

Ore restrictions control the ability to hide and correctly "override" blocks with other specific block based on progression stages. This feature enables tailored resource availability, enhancing challenge and progression in custom gameplay scenarios.


Methods

Method Description Parameters Returns
AStages.addRestrictionForOre(id, stage, original, replacement) Create and add generic ore restriction. id: arbitrary string used as identifier.
stage: progression stage.
original: block to be replaced.
replacement: block that replaces.
AOreRestriction

Examples

Basic Usage

// Server Script Folder -> file.js (arbitrary file name).
AStages.addRestrictionForOre("astages/ore", "stage_ore", Blocks.EMERALD_ORE.defaultBlockState(), Blocks.STONE.defaultBlockState())

Properties

Caution

Those properties only work for AStages versions above 1.3.0!

Note

You don't need to set all properties for each restriction: changes should be done only when you want to modify default values!

// Server Script Folder -> file.js (arbitrary file name).
AStages.addRestrictionForOre("astages/ore", "stage_ore", Blocks.EMERALD_ORE.defaultBlockState(), Blocks.STONE.defaultBlockState())
    .setStageAllBlockStates(false) // Restrict all block states associated with `original` block
    .setAffectsPlayerActions(false) // Affects the behaviour of item restrictions: if set to true and block is restricted, item restrictions will check the replacement instead of original block

Documentation:

  1. Home

  2. Stages
    - Usage
    - Utils

  3. Restrictions
    - Crop
    - Dimension
    - Effect
    - Enchant
    - Item (Old)
    - Loot
    - Mob
    - Ore
    - Pet
    - Recipe
    - Region
    - Screen
    - Structure

  4. Addons
    - Curios API
    - Pufferfish Skill's

  5. Simple Restrictions (via commands)
    Brand new and intuitive way to add restriction!

  6. Developers
    - Plugin
    - Restrictions
    - Simple Restrictions
    - Stage System
    - Utils

  7. Q&A
    A place where questions are on the agenda!

  8. Changelogs
    Changelogs since 0.6.0 version!

  9. Version Comparisons

  10. What's Happened? (FLOP!)
    New code formatting is coming!

Clone this wiki locally