Team-Let-s-Do / DoAPI

GNU Lesser General Public License v3.0
3 stars 4 forks source link

DoApi Wiki

Terraform Api for boats and signs

public class Test {

    // Replace DoApi.MOD_ID with your modid

    public static ResourceLocation PALM_BOAT_TYPE_LOCATION = new ResourceLocation(DoApi.MOD_ID, "palm");

    public static final ResourceLocation PALM_SIGN_TEXTURE_ID = new ResourceLocation(DoApi.MOD_ID, "entity/sign/palm");

    private static final String PALM_SIGN_ID = "palm_sign";
    private static final String PALM_WALL_SIGN_ID = "palm_wall_sign";

    public static void init() {
        RegistrySupplier<Item> palmBoat = TerraformBoatItemHelper.registerBoatItem(DoApi.ITEMS, "palm_boat", PALM_BOAT_TYPE_LOCATION, false, DoApi.CREATIVE_TAB);
        RegistrySupplier<Item> palmChestBoat = TerraformBoatItemHelper.registerBoatItem(DoApi.ITEMS, "palm_chest_boat", PALM_BOAT_TYPE_LOCATION, true, DoApi.CREATIVE_TAB);

        DoApiExpectPlatform.register(PALM_BOAT_TYPE_LOCATION, TerraformBoatType.builder().item(palmBoat).chestItem(palmChestBoat).build());

        RegistrySupplier<Block> sign = registerWithoutItem(PALM_SIGN_ID, () -> DoApiExpectPlatform.getSign(PALM_SIGN_TEXTURE_ID));
        RegistrySupplier<Block> wallSign = registerWithoutItem(PALM_WALL_SIGN_ID, () -> DoApiExpectPlatform.getWallSign(PALM_SIGN_TEXTURE_ID));

        RegistrySupplier<Item> palmSignItem = registerItem(PALM_SIGN_ID, () -> new SignItem(new Item.Properties().stacksTo(16).tab(DoApi.CREATIVE_TAB), sign.get(), wallSign.get()));
    }

}

Don't forget to register your DeferredRegisters after init()

Client

public class DoApiClient {

    public static void onClientInit(){
        DoApiExpectPlatform.addSignSprite(Test.PALM_SIGN_TEXTURE_ID);
    }

}

Recipe Book

There is no tutorial yet, but you can take a look at this example of the Vinery mod

Conditional Recipes

There is no tutorial yet, but you can take a look at these recipes from the Meadow mod: https://github.com/satisfyu/Meadow/tree/1.20.1-architectury/common/src/main/resources/data/conditional/recipes