Additional Blocks and Items registry helpers
This commit is contained in:
parent
09f5cd60fa
commit
ee77b07561
7 changed files with 22 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
|||
package ru.betterend.registry;
|
||||
|
||||
import net.minecraft.world.item.Item;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||
|
@ -44,6 +45,8 @@ import ru.betterend.item.material.EndArmorMaterial;
|
|||
import ru.betterend.item.material.EndToolMaterial;
|
||||
import ru.betterend.tab.CreativeTabs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EndBlocks extends BlocksRegistry {
|
||||
// Terrain //
|
||||
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
||||
|
@ -329,6 +332,10 @@ public class EndBlocks extends BlocksRegistry {
|
|||
super(creativeTab);
|
||||
}
|
||||
|
||||
public static List<Item> getModBlocks() {
|
||||
return getModBlocks(BetterEnd.MOD_ID);
|
||||
}
|
||||
|
||||
public static Block registerBlock(ResourceLocation id, Block block) {
|
||||
if (!Configs.BLOCK_CONFIG.getBooleanRoot(id.getPath(), true)) {
|
||||
return block;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue