Test Crafting Remainder
Some checks failed
CI / Build (ARMHF) (push) Waiting to run
CI / Test (AMD64, Client) (push) Blocked by required conditions
CI / Test (AMD64, Server) (push) Blocked by required conditions
CI / Test (ARM64, Client) (push) Blocked by required conditions
CI / Test (ARM64, Server) (push) Blocked by required conditions
CI / Test (ARMHF, Client) (push) Blocked by required conditions
CI / Test (ARMHF, Server) (push) Blocked by required conditions
CI / Build Example Mods (push) Blocked by required conditions
CI / Release (push) Blocked by required conditions
CI / Build (AMD64) (push) Has been cancelled
CI / Build (ARM64) (push) Has been cancelled
Some checks failed
CI / Build (ARMHF) (push) Waiting to run
CI / Test (AMD64, Client) (push) Blocked by required conditions
CI / Test (AMD64, Server) (push) Blocked by required conditions
CI / Test (ARM64, Client) (push) Blocked by required conditions
CI / Test (ARM64, Server) (push) Blocked by required conditions
CI / Test (ARMHF, Client) (push) Blocked by required conditions
CI / Test (ARMHF, Server) (push) Blocked by required conditions
CI / Build Example Mods (push) Blocked by required conditions
CI / Release (push) Blocked by required conditions
CI / Build (AMD64) (push) Has been cancelled
CI / Build (ARM64) (push) Has been cancelled
This commit is contained in:
parent
18c6247e0c
commit
b5e9a91f75
@ -4,6 +4,7 @@
|
|||||||
#include <mods/misc/misc.h>
|
#include <mods/misc/misc.h>
|
||||||
|
|
||||||
// Custom Crafting Recipes
|
// Custom Crafting Recipes
|
||||||
|
#define SAND 12
|
||||||
static void Recipes_injection(Recipes *recipes) {
|
static void Recipes_injection(Recipes *recipes) {
|
||||||
// Add
|
// Add
|
||||||
Recipes_Type type1 = {
|
Recipes_Type type1 = {
|
||||||
@ -11,7 +12,7 @@ static void Recipes_injection(Recipes *recipes) {
|
|||||||
.tile = 0,
|
.tile = 0,
|
||||||
.instance = {
|
.instance = {
|
||||||
.count = 1,
|
.count = 1,
|
||||||
.id = 12,
|
.id = SAND,
|
||||||
.auxiliary = 0
|
.auxiliary = 0
|
||||||
},
|
},
|
||||||
.letter = 'a'
|
.letter = 'a'
|
||||||
@ -54,4 +55,10 @@ __attribute__((constructor)) static void init_recipes() {
|
|||||||
// Setup
|
// Setup
|
||||||
misc_run_on_recipes_setup(Recipes_injection);
|
misc_run_on_recipes_setup(Recipes_injection);
|
||||||
misc_run_on_furnace_recipes_setup(FurnaceRecipes_injection);
|
misc_run_on_furnace_recipes_setup(FurnaceRecipes_injection);
|
||||||
|
|
||||||
|
// Recipe Remainder
|
||||||
|
overwrite_calls(Minecraft_init, [](Minecraft_init_t original, Minecraft *self) {
|
||||||
|
original(self);
|
||||||
|
Item::items[SAND]->craftingRemainingItem = Item::snowball;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ static ItemInstance *Item_getCraftingRemainingItem_injection(__attribute__((unus
|
|||||||
if (self->craftingRemainingItem != nullptr) {
|
if (self->craftingRemainingItem != nullptr) {
|
||||||
ItemInstance *ret = new ItemInstance;
|
ItemInstance *ret = new ItemInstance;
|
||||||
ret->id = self->craftingRemainingItem->id;
|
ret->id = self->craftingRemainingItem->id;
|
||||||
ret->count = item_instance->count;
|
ret->count = 1;
|
||||||
ret->auxiliary = 0;
|
ret->auxiliary = 0;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user