Skip to content

Commit

Permalink
fix: Fix hoppers not inserting into CFB containers on NeoForge #741
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Dec 15, 2024
1 parent 149f33c commit 4ef8f07
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import net.neoforged.neoforge.capabilities.RegisterCapabilitiesEvent;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.entity.player.PlayerEvent;
import net.neoforged.neoforge.items.ItemStackHandler;
import net.neoforged.neoforge.items.wrapper.InvWrapper;

@Mod(CookingForBlockheads.MOD_ID)
public class NeoForgeCookingForBlockheads {
Expand Down Expand Up @@ -58,6 +60,10 @@ private void registerCapabilities(RegisterCapabilitiesEvent event) {
event.registerBlockEntity(KITCHEN_ITEM_PROVIDER, ModBlockEntities.cowJar.get(), (blockEntity, context) -> blockEntity.getProvider(KitchenItemProvider.class));
event.registerBlockEntity(KITCHEN_ITEM_PROVIDER, ModBlockEntities.fridge.get(), (blockEntity, context) -> blockEntity.getProvider(KitchenItemProvider.class));
event.registerBlockEntity(KITCHEN_ITEM_PROVIDER, ModBlockEntities.sink.get(), (blockEntity, context) -> blockEntity.getProvider(KitchenItemProvider.class));
event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, ModBlockEntities.counter.get(), (blockEntity, context) -> new InvWrapper(blockEntity.getContainer()));
event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, ModBlockEntities.cabinet.get(), (blockEntity, context) -> new InvWrapper(blockEntity.getContainer()));
event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, ModBlockEntities.oven.get(), (blockEntity, context) -> new InvWrapper(blockEntity.getContainer()));
event.registerBlockEntity(Capabilities.ItemHandler.BLOCK, ModBlockEntities.fridge.get(), (blockEntity, context) -> new InvWrapper(blockEntity.getContainer()));
event.registerBlockEntity(Capabilities.FluidHandler.BLOCK, ModBlockEntities.sink.get(), (blockEntity, context) -> new NeoForgeFluidTank(blockEntity.getFluidTank()));
event.registerBlockEntity(Capabilities.FluidHandler.BLOCK, ModBlockEntities.milkJar.get(), (blockEntity, context) -> new NeoForgeFluidTank(blockEntity.getFluidTank()));
event.registerBlockEntity(Capabilities.FluidHandler.BLOCK, ModBlockEntities.cowJar.get(), (blockEntity, context) -> new NeoForgeFluidTank(blockEntity.getFluidTank()));
Expand Down

0 comments on commit 4ef8f07

Please sign in to comment.