SPC Babric

SPC Babric

Mod

Single Player Commands built on Fabric for b1.7.3, but it also works in Multiplayer and has an API.

Client Utility

104 downloads
1 follower
Createda month ago
Updated4 days ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

Single Player Commands for Babric (b1.7.3)

Autofill Summon Command

  • it works on servers
  • it has an extensible API.
  • No dependencies required

Optional Dependencies

  • To access /tp with dimensions, install STAPI
  • To access /gamemode, install BHCreative

Help

  • Use /help in-game

API

Note: Please make SPC optional!!

build.gradle

repositories {
    maven {
        name = "Jitpack"
        url "https://jitpack.io/"
    }
}

dependencies {
    modImplementation('com.github.matthewperiut:spc-babric:0.4.3') {
        transitive false
    }
}

fabric.mod.json

  "suggests": {
    "spc": "*"
  },

in your mods initialization

public static void init_of_some_sort()
{
    if (FabricLoader.getInstance().isModLoaded("spc")){
        MyModsCommands.add();
    }
}

implement com.matthewperiut.api.Command

register with com.matthewperiut.api.CommandRegistry
CommandRegistry.add(new Command())

new Command() replaced with your custom command.

Add your own summon command for your entities

Use com.matthewperiut.api.SummonRegistry
SummonRegistry.add(...)

Examples from com.matthewperiut.spc.util.VanillaMobs

SummonRegistry.add(Creeper.class, (level, pos, param) -> {
    Creeper creeper = new Creeper(level);

    if (param.length > 5)
        if (!param[5].isEmpty())
            if (param[5].charAt(0) != '0')
                ((EntityAccessor) creeper).getDataTracker().setInt(17, (byte) 1);

    return creeper;
}, "{charged (0 or 1)}");

SummonRegistry.add(Sheep.class, (level, pos, param) -> {
    int color = Integer.parseInt(param[5]);
    int has_wool = 1;
    if (param.length > 6)
        has_wool = Integer.parseInt(param[6]);
    Sheep sheep = new Sheep(level);
    sheep.setSheared(has_wool == 0);
    sheep.setColour(color);
    return sheep;
}, "{wool color meta} {has wool (0/1)} ");

External resources



Project members

Slainlight

Member


Technical information

License
MIT
Client side
required
Server side
unsupported
Project ID