Skip to content

Commit

Permalink
Fix inventory capability for crates and reinforced crates
Browse files Browse the repository at this point in the history
  • Loading branch information
malte0811 committed Jan 22, 2024
1 parent 720544c commit 7f6987d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static void registerBlockCapabilities(RegisterCapabilitiesEvent event)
LogicUnitBlockEntity.registerCapabilities(forType(event, IEBlockEntities.LOGIC_UNIT));
SorterBlockEntity.registerCapabilities(forType(event, IEBlockEntities.SORTER));
WoodenBarrelBlockEntity.registerCapabilities(forType(event, IEBlockEntities.WOODEN_BARREL));
WoodenCrateBlockEntity.registerCapabilities(forType(event, IEBlockEntities.WOODEN_CRATE));

// Vanilla
event.registerBlockEntity(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
import blusunrize.immersiveengineering.common.config.IEServerConfig;
import blusunrize.immersiveengineering.common.register.IEBlocks.*;
import com.google.common.collect.ImmutableSet;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.Holder;

import java.util.Collection;
import java.util.List;
import java.util.function.Supplier;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -59,7 +59,7 @@ public class IEBlockEntities
"craftingtable", makeType(CraftingTableBlockEntity::new, WoodenDevices.CRAFTING_TABLE)
);
public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<WoodenCrateBlockEntity>> WOODEN_CRATE = REGISTER.register(
"woodencrate", makeType(WoodenCrateBlockEntity::new, WoodenDevices.CRATE)
"woodencrate", makeTypeMultipleBlocks(WoodenCrateBlockEntity::new, List.of(WoodenDevices.CRATE, WoodenDevices.REINFORCED_CRATE))
);
public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<WoodenBarrelBlockEntity>> WOODEN_BARREL = REGISTER.register(
"woodenbarrel", makeType(WoodenBarrelBlockEntity::new, WoodenDevices.WOODEN_BARREL)
Expand Down

0 comments on commit 7f6987d

Please sign in to comment.