Skip to content

Commit

Permalink
Simplify startup code
Browse files Browse the repository at this point in the history
  • Loading branch information
grondag committed Feb 3, 2022
1 parent 53aa32b commit eecd1a4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions common/src/main/java/grondag/xblocks/Xb.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@

public class Xb {
public static final String MODID = "xb";
public static final ResourceLocation FORCE_KEY_NAME = new ResourceLocation(MODID, "force");
public static final ResourceLocation MODIFY_KEY_NAME = new ResourceLocation(MODID, "modify");
public static final ResourceLocation FORCE_KEY_NAME = id("force");
public static final ResourceLocation MODIFY_KEY_NAME = id("modify");

public static Logger LOG = LogManager.getLogger("Exotic Blocks");

Expand All @@ -63,9 +63,7 @@ public class Xb {
private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(MODID, Registry.BLOCK_REGISTRY);

public static void initialize() {
final ResourceLocation itemGroupItemId = new ResourceLocation(MODID, BlockNames.BLOCK_CONNECTED_FANCY_STONE);
itemGroup = CreativeTabRegistry.create(new ResourceLocation(MODID, "group"), () -> new ItemStack(Registry.ITEM.get(itemGroupItemId)));

itemGroup = CreativeTabRegistry.create(id("group"), () -> new ItemStack(Registry.ITEM.get(id(BlockNames.BLOCK_CONNECTED_FANCY_STONE))));
forceKey = ModKey.getOrCreate(FORCE_KEY_NAME);
modifyKey = ModKey.getOrCreate(MODIFY_KEY_NAME);

Expand Down

0 comments on commit eecd1a4

Please sign in to comment.