blob: 8c0b93e1bf186c1bceded0973972678951d55e8d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package lv.enes.mc.eris_alchemy.block;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
// TODO: Somehow make this be an automatic thing depending on the EmcStorageEntity or something
public interface EmcStorageBlock {
double getStoredEmc(CompoundTag blockEntityData);
default double getStoredEmc(ItemStack stack) {
var bed = BlockItem.getBlockEntityData(stack);
if (bed == null) {
return 0;
}
return getStoredEmc(bed);
}
}
|