Fixed stripped zap logs and wood not dropping

This commit is contained in:
Sollace 2024-02-08 14:22:52 +00:00
parent b467aae7b2
commit 660973371d
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
4 changed files with 52 additions and 5 deletions

View file

@ -27,7 +27,6 @@ import dev.emi.emi.api.render.EmiTexture;
import dev.emi.emi.api.stack.Comparison;
import dev.emi.emi.api.stack.EmiStack;
import dev.emi.emi.recipe.EmiStonecuttingRecipe;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
@ -121,11 +120,11 @@ public class Main implements EmiPlugin {
GROWING_CATEGORY,
recipe.getId(),
new Schematic.Builder()
.fill(0, 0, 0, 6, 0, 6, Block.getBlockFromItem(recipe.getCatalyst().getItem()).getDefaultState())
.fill(0, 0, 0, 6, 0, 6, recipe.getCatalystState())
.set(3, 0, 3, Blocks.FARMLAND.getDefaultState())
.set(3, 1, 3, Block.getBlockFromItem(recipe.getTargetAsItem().getItem()).getDefaultState())
.set(3, 1, 3, recipe.getTargetState())
.build(),
List.of(EmiStack.of(recipe.getTargetAsItem()), EmiStack.of(recipe.getCatalyst(), TransformCropsRecipe.AREA)),
List.of(EmiStack.of(recipe.getTarget()), EmiStack.of(recipe.getCatalyst(), TransformCropsRecipe.AREA)),
EmiStack.of(recipe.getOutput()),
Unicopia.id("textures/gui/ability/grow.png")
));

View file

@ -48,7 +48,15 @@ public class TransformCropsRecipe implements Recipe<TransformCropsRecipe.Placeme
this.catalyst = catalyst;
}
public ItemStack getTargetAsItem() {
public BlockState getCatalystState() {
return catalyst;
}
public BlockState getTargetState() {
return target.getDefaultState();
}
public ItemStack getTarget() {
return target.asItem().getDefaultStack();
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:stripped_zap_log"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "unicopia:stripped_zap_wood"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}