blob: 69666815394df259de360729389247cb1ca67f13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package lv.enes.mc.eris_alchemy.block;
import lv.enes.mc.eris_alchemy.ErisAlchemy;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.function.BiConsumer;
public final class ErisAlchemyBlocks {
private static final Map<ResourceLocation, Block> blocks = new LinkedHashMap<>();
public static final AlchemicalChestBlock ALCHEMICAL_CHEST = register("alchemical_chest", new AlchemicalChestBlock(QuiltBlockSettings.copy(Blocks.ENDER_CHEST)));
public static void consumeBlocks(BiConsumer<? super ResourceLocation, ? super Block> consumer) {
blocks.forEach(consumer);
}
private static <T extends Block> T register(String id, T block) {
blocks.putIfAbsent(new ResourceLocation(ErisAlchemy.ID, id), block);
return block;
}
private ErisAlchemyBlocks() {}
}
|