mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-05 04:49:10 +01:00
fixed recipes
This commit is contained in:
parent
5497de1f1d
commit
fc6c376d37
7 changed files with 15 additions and 15 deletions
|
@ -83,7 +83,7 @@ public class BlockEntityWoodStand extends BlockEntityImpl implements ITickableBl
|
|||
|
||||
var item = new ItemEntity(this.level,
|
||||
this.ritualPos.getX() + 0.5, this.ritualPos.getY() + 4.5, this.ritualPos.getZ() + 0.5,
|
||||
this.recipe.value().result.copy());
|
||||
this.recipe.value().output.copy());
|
||||
this.level.addFreshEntity(item);
|
||||
|
||||
PacketHandler.sendToAllAround(this.level, this.worldPosition, 32,
|
||||
|
|
|
@ -45,7 +45,7 @@ public class TreeRitualCategory implements IRecipeCategory<TreeRitualRecipe> {
|
|||
@Override
|
||||
public void setRecipe(IRecipeLayoutBuilder builder, TreeRitualRecipe recipe, IFocusGroup focuses) {
|
||||
builder.addSlot(RecipeIngredientRole.CATALYST, 35, 35).addItemStacks(Arrays.asList(recipe.saplingType.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 125, 35).addItemStack(recipe.result);
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 125, 35).addItemStack(recipe.output);
|
||||
|
||||
var positions = new int[][]{{35, 1}, {35, 69}, {1, 35}, {69, 35}, {12, 12}, {58, 58}, {58, 12}, {12, 58}};
|
||||
for (var i = 0; i < recipe.ingredients.size(); i++)
|
||||
|
|
|
@ -24,9 +24,9 @@ public class ProcessorTreeRitual implements IComponentProcessor {
|
|||
return this.recipe.ingredients.size() > id ? PatchouliCompat.ingredientVariable(this.recipe.ingredients.get(id)) : null;
|
||||
} else {
|
||||
return switch (key) {
|
||||
case "output" -> IVariable.from(this.recipe.result);
|
||||
case "output" -> IVariable.from(this.recipe.output);
|
||||
case "sapling" -> PatchouliCompat.ingredientVariable(this.recipe.saplingType);
|
||||
case "name" -> IVariable.wrap(this.recipe.result.getHoverName().getString());
|
||||
case "name" -> IVariable.wrap(this.recipe.output.getHoverName().getString());
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -46,8 +46,8 @@ public class AltarRecipe extends ModRecipe {
|
|||
|
||||
private static final Codec<AltarRecipe> CODEC = RecordCodecBuilder.create(i -> i.group(
|
||||
Ingredient.CODEC.fieldOf("input").forGetter(r -> r.input),
|
||||
ItemStack.CODEC.fieldOf("output").forGetter(r -> r.output),
|
||||
Ingredient.CODEC.fieldOf("catalyst").forGetter(r -> r.catalyst),
|
||||
ItemStack.ITEM_WITH_COUNT_CODEC.fieldOf("output").forGetter(r -> r.output),
|
||||
Ingredient.CODEC.optionalFieldOf("catalyst", Ingredient.EMPTY).forGetter(r -> r.catalyst),
|
||||
Codec.INT.fieldOf("aura").forGetter(r -> r.aura),
|
||||
Codec.INT.fieldOf("time").forGetter(r -> r.time)
|
||||
).apply(i, AltarRecipe::new));
|
||||
|
|
|
@ -43,7 +43,7 @@ public class OfferingRecipe extends ModRecipe {
|
|||
private static final Codec<OfferingRecipe> CODEC = RecordCodecBuilder.create(i -> i.group(
|
||||
Ingredient.CODEC.fieldOf("input").forGetter(r -> r.input),
|
||||
Ingredient.CODEC.fieldOf("start_item").forGetter(r -> r.startItem),
|
||||
ItemStack.CODEC.fieldOf("output").forGetter(r -> r.output)
|
||||
ItemStack.ITEM_WITH_COUNT_CODEC.fieldOf("output").forGetter(r -> r.output)
|
||||
).apply(i, OfferingRecipe::new));
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,19 +17,19 @@ public class TreeRitualRecipe extends ModRecipe {
|
|||
|
||||
public final Ingredient saplingType;
|
||||
public final List<Ingredient> ingredients;
|
||||
public final ItemStack result;
|
||||
public final ItemStack output;
|
||||
public final int time;
|
||||
|
||||
public TreeRitualRecipe(Ingredient saplingType, ItemStack result, int time, List<Ingredient> ingredients) {
|
||||
public TreeRitualRecipe(Ingredient saplingType, ItemStack output, int time, List<Ingredient> ingredients) {
|
||||
this.saplingType = saplingType;
|
||||
this.ingredients = ingredients;
|
||||
this.result = result;
|
||||
this.output = output;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getResultItem(RegistryAccess access) {
|
||||
return this.result;
|
||||
return this.output;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,7 +46,7 @@ public class TreeRitualRecipe extends ModRecipe {
|
|||
|
||||
private static final Codec<TreeRitualRecipe> CODEC = RecordCodecBuilder.create(i -> i.group(
|
||||
Ingredient.CODEC.fieldOf("sapling").forGetter(r -> r.saplingType),
|
||||
ItemStack.CODEC.fieldOf("result").forGetter(r -> r.result),
|
||||
ItemStack.ITEM_WITH_COUNT_CODEC.fieldOf("output").forGetter(r -> r.output),
|
||||
Codec.INT.fieldOf("time").forGetter(r -> r.time),
|
||||
Ingredient.CODEC.listOf().fieldOf("ingredients").forGetter(recipe -> recipe.ingredients)
|
||||
).apply(i, TreeRitualRecipe::new));
|
||||
|
@ -71,7 +71,7 @@ public class TreeRitualRecipe extends ModRecipe {
|
|||
for (var ing : recipe.ingredients)
|
||||
ing.toNetwork(buffer);
|
||||
recipe.saplingType.toNetwork(buffer);
|
||||
buffer.writeItem(recipe.result);
|
||||
buffer.writeItem(recipe.output);
|
||||
buffer.writeInt(recipe.time);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"tag": "forge:nuggets/gold"
|
||||
},
|
||||
"G": {
|
||||
"item": "minecraft:grass"
|
||||
"item": "minecraft:grass_block"
|
||||
},
|
||||
"L": {
|
||||
"tag": "minecraft:leaves"
|
||||
|
@ -20,4 +20,4 @@
|
|||
"item": "naturesaura:gold_fiber",
|
||||
"count": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue