Created
January 23, 2019 19:55
-
-
Save Zamion101/c9a93cf0229718b7f0c70273896f4358 to your computer and use it in GitHub Desktop.
My Blocks Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.Zamion101.HMM.utils; | |
import me.Zamion101.HMM.blocks.impl.HBlock; | |
import me.Zamion101.HMM.blocks.others.BlockStoneCutter; | |
import net.minecraft.item.ItemBlock; | |
import java.util.Objects; | |
public class HBlocks { | |
public static final HBlock STONE_CUTTER = registerBlock(new BlockStoneCutter()); | |
private static HBlock registerBlock(HBlock block){ | |
RegistryUtils.addBlock(block); | |
RegistryUtils.addItem(new ItemBlock(block).setRegistryName(Objects.requireNonNull(block.getRegistryName()))); | |
return block; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment