Skip to content

Commit

Permalink
fix: Fix Container, EnergyStorage and FluidTank not being registered …
Browse files Browse the repository at this point in the history
…as provider on NeoForge
  • Loading branch information
BlayTheNinth committed Jul 3, 2024
1 parent 0bd8957 commit 97e4276
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.config.AbstractBalmConfig;
import net.blay09.mods.balm.api.energy.EnergyStorage;
import net.blay09.mods.balm.api.fluid.FluidTank;
import net.blay09.mods.balm.common.command.BalmCommand;
import net.blay09.mods.balm.config.ExampleConfig;
import net.blay09.mods.balm.neoforge.client.NeoForgeBalmClient;
import net.blay09.mods.balm.neoforge.provider.NeoForgeBalmProviders;
import net.blay09.mods.balm.neoforge.world.NeoForgeBalmWorldGen;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.Container;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.capabilities.BlockCapability;
import net.neoforged.neoforge.capabilities.Capabilities;
import net.neoforged.neoforge.energy.IEnergyStorage;
import net.neoforged.neoforge.fluids.capability.IFluidHandler;
Expand All @@ -31,6 +36,10 @@ public NeoForgeBalm(IEventBus modBus) {
providers.registerBlockProvider(IFluidHandler.class, Capabilities.FluidHandler.BLOCK);
providers.registerItemProvider(IFluidHandlerItem.class, Capabilities.FluidHandler.ITEM);
providers.registerBlockProvider(IEnergyStorage.class, Capabilities.EnergyStorage.BLOCK);

providers.registerBlockProvider(Container.class, BlockCapability.createSided(ResourceLocation.fromNamespaceAndPath("balm", "container"), Container.class));
providers.registerBlockProvider(FluidTank.class, BlockCapability.createSided(ResourceLocation.fromNamespaceAndPath("balm", "fluid_tank"), FluidTank.class));
providers.registerBlockProvider(EnergyStorage.class, BlockCapability.createSided(ResourceLocation.fromNamespaceAndPath("balm", "energy_storage"), EnergyStorage.class));
}

}

0 comments on commit 97e4276

Please sign in to comment.