Refactor everything to WayofTime.bloodmagic.*
This commit is contained in:
parent
46742a73d1
commit
096ba02450
771 changed files with 566 additions and 573 deletions
69
src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java
Normal file
69
src/main/java/WayofTime/bloodmagic/registry/ModBlocks.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
package WayofTime.bloodmagic.registry;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.block.BlockAltar;
|
||||
import WayofTime.bloodmagic.block.BlockLifeEssence;
|
||||
import WayofTime.bloodmagic.block.BlockRitualController;
|
||||
import WayofTime.bloodmagic.item.block.ItemBlockRitualHome;
|
||||
import WayofTime.bloodmagic.util.helper.InventoryRenderHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ModBlocks {
|
||||
|
||||
public static Block altar;
|
||||
public static Block ritualStone;
|
||||
|
||||
public static Block lifeEssence;
|
||||
|
||||
public static Block crystal;
|
||||
public static Block rune;
|
||||
public static Block bloodStone;
|
||||
|
||||
public static void init() {
|
||||
FluidRegistry.registerFluid(BlockLifeEssence.getLifeEssence());
|
||||
lifeEssence = registerBlock(new BlockLifeEssence());
|
||||
|
||||
altar = registerBlock(new BlockAltar());
|
||||
ritualStone = registerBlock(new BlockRitualController(), ItemBlockRitualHome.class);
|
||||
|
||||
initTiles();
|
||||
}
|
||||
|
||||
public static void initTiles() {
|
||||
|
||||
}
|
||||
|
||||
public static void initRenders() {
|
||||
InventoryRenderHelper renderHelper = BloodMagic.instance.getRenderHelper();
|
||||
|
||||
renderHelper.fluidRender(lifeEssence);
|
||||
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 0);
|
||||
renderHelper.itemRender(InventoryRenderHelper.getItemFromBlock(ritualStone), 1);
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock, String name) {
|
||||
if (!ConfigHandler.blockBlacklist.contains(name))
|
||||
GameRegistry.registerBlock(block, itemBlock, name);
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, Class<? extends ItemBlock> itemBlock) {
|
||||
return registerBlock(block, itemBlock, block.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, String name) {
|
||||
if (!ConfigHandler.blockBlacklist.contains(name))
|
||||
GameRegistry.registerBlock(block, name);
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block) {
|
||||
return registerBlock(block, block.getClass().getSimpleName());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue