How to make custom recipe type for my block entity minecraft 1.21.4 mod #4312
Unanswered
JCS-Mecabricks
asked this question in
Mod Dev Support
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am adding a custom recipe type for my custom Block entity that can bake items but I get errors. Can someone help me? Here is the file in case you need it.
package github.jcsmecabricks.customcrops.block.entity.custom;
import github.jcsmecabricks.customcrops.block.custom.PastryStationBlock;
import github.jcsmecabricks.customcrops.block.entity.ImplementedInventory;
import github.jcsmecabricks.customcrops.block.entity.ModBlockEntities;
import github.jcsmecabricks.customcrops.item.ModItems;
import github.jcsmecabricks.customcrops.recipe.ModRecipes;
import github.jcsmecabricks.customcrops.recipe.PastryStationRecipe;
import github.jcsmecabricks.customcrops.recipe.PastryStationRecipeInput;
import github.jcsmecabricks.customcrops.screen.custom.PastryScreenHandler;
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory;
import net.minecraft.block.BlockState;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Inventories;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.network.listener.ClientPlayPacketListener;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket;
import net.minecraft.recipe.RecipeEntry;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.screen.PropertyDelegate;
import net.minecraft.screen.ScreenHandler;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.text.Text;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.jetbrains.annotations.Nullable;
import java.util.Optional;
public class PastryStationBlockEntity extends BlockEntity implements ExtendedScreenHandlerFactory, ImplementedInventory {
private final DefaultedList inventory = DefaultedList.ofSize(4, ItemStack.EMPTY);
}
Beta Was this translation helpful? Give feedback.
All reactions