* Fix #2579: expose inner storage unit stack to transfer API * Maintain == ItemStack.EMPTY
This commit is contained in:
parent
2bceaa46c2
commit
86850033e3
2 changed files with 65 additions and 1 deletions
|
@ -25,6 +25,7 @@
|
|||
package techreborn.events;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.transfer.v1.item.ItemStorage;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -36,6 +37,7 @@ import reborncore.common.powerSystem.RcEnergyTier;
|
|||
import team.reborn.energy.api.EnergyStorage;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.blockentity.cable.CableBlockEntity;
|
||||
import techreborn.blockentity.storage.item.StorageUnitBaseBlockEntity;
|
||||
import techreborn.blocks.misc.*;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.*;
|
||||
|
@ -242,6 +244,7 @@ public class ModRegistry {
|
|||
}
|
||||
|
||||
private static void registerApis() {
|
||||
EnergyStorage.SIDED.registerForBlockEntities((be, direction) -> ((CableBlockEntity) be).getSideEnergyStorage(direction), TRBlockEntities.CABLE);
|
||||
EnergyStorage.SIDED.registerForBlockEntity(CableBlockEntity::getSideEnergyStorage, TRBlockEntities.CABLE);
|
||||
ItemStorage.SIDED.registerForBlockEntity(StorageUnitBaseBlockEntity::getExposedStorage, TRBlockEntities.STORAGE_UNIT);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue