mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed stripped zap logs and wood not dropping
This commit is contained in:
parent
b467aae7b2
commit
660973371d
4 changed files with 52 additions and 5 deletions
|
@ -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")
|
||||
));
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue