RetroCommands 图标

RetroCommands

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.7.4+babric
本资源为搬运资源,原资源地址: https://modrinth.com/mod/retrocommands
资源信息

Minecraft 版本: b1.7.3

平台: babric

标签: utility

资源介绍

Retro Commands for b1.7.3

  • 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 Retro Commands optional!!

build.gradle

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

dependencies {
    modImplementation('com.github.matthewperiut:retrocommands:0.5.2') {
        transitive false
    }
}

fabric.mod.json

  "suggests": {
    "retrocommands": "*"
  },

in your mods initialization

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

implement com.matthewperiut.retrocommands.api.Command

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

new Command() replaced with your custom command.

Add your own summon command for your entities

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

Examples from com.matthewperiut.retrocommands.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)} ");
📥 下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Destiny Pixelmon

价格:0 墨喵币
下载量:0

查看详情
Conquest Of Hunterra Modpack

价格:0 墨喵币
下载量:0

查看详情
TotemCounter

价格:0 墨喵币
下载量:0

查看详情
Amethyst Core

价格:0 墨喵币
下载量:0

查看详情