GithubHelp home page GithubHelp logo

jriwanek-forks / mobstages Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darkhax-minecraft/mobstages

0.0 1.0 0.0 153 KB

Allows mob spawning to be put into stages

License: GNU Lesser General Public License v2.1

Java 100.00%

mobstages's Introduction

Mob Stages

This mod hooks in to the GameStage API, and allows mob spawning to be gated behind custom progression.

Nodecraft
This project is sponsored by Nodecraft. Use code Darkhax for 30% off your first month of service!

Description

This mod is an addon for the GameStage API. This allows for mob spawning to be put into a custom progression system. You should check out the GameStage API mod's description for more info. To give a brief run down, stages are parts of the progression system set up by the modpack or server. Stages are given to players through a command, which is typically ran by a questing mod, advancement, or even a Command Block.

Setup

This mod uses CraftTweaker for configuration.

Global Setup

  • mod.MobStages.addStage(String stage, String entityId); - Adds a mob to a stage. When it attempts to spawn in the world, it will check for nearby players that have this stage unlocked. If no valid players are found, the mob will not be able to spawn.
  • mob.MobStages.addReplacement(String entityId, String replacementId); - Adds a replacement for the mob. If it fails to spawn, the replacement will be spawned instead. This requires that you add the mob to a stage first. This is optional.
  • mob.MobStages.addRange(String entityId, int range); - Sets the range to search for players. The fault range is 256, and is automatically set for you. This is optional.
  • mob.MobStages.toggleSpawners(String entityId, boolean allow); - Allows for mob spawners to ignore the stage rules and spawn the mob anyway.

Dimensional Setup

This mod adds dimension specific versions of all the methods in the previous section. The dimension versions accept the numeric dimension id as an additional last parameter. For example, mod.MobStages.addStage(String stage, String entityId); becomes mod.MobStages.addStage(String stage, String entityId, int dimension);. If a mob has a dimensional entry, it will override the global entry.

Example Script

// Creepers require stage one to spawn
mods.MobStages.addStage("one", "minecraft:creeper");

// Skeletons require stage two, or any spawner.
mods.MobStages.addStage("two", "minecraft:skeleton");
mods.MobStages.toggleSpawner("minecraft:skeleton", true);

// Spiders require stage three in the nether.
mods.MobStages.addStage("three", "minecraft:spider", -1);

// Zombies can spawn from spawners in the nether
mods.MobStages.addStage("four", "minecraft:zombie", -1);
mods.MobStages.toggleSpawner("minecraft:zombie", true, -1);

// Zombies are replaced by bats in other dimensions.
mods.MobStages.addStage("four", "minecraft:zombie");
mods.MobStages.addReplacement("minecraft:zombie", "minecraft:bat");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.