Add content

This commit is contained in:
Timo Ley 2021-04-06 09:33:28 +02:00
parent d9a57f7530
commit 6ce9cfaac0
7 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,32 @@
package ley.modding.pocketcraft;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import ley.modding.pocketcraft.block.BlockNetherReactor;
import ley.modding.pocketcraft.block.BlockStonecutter;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@Mod(modid = PocketCraft.MODID, name = PocketCraft.NAME, version = PocketCraft.VERSION)
public class PocketCraft {
public static final String MODID = "pocketcraft";
public static final String NAME = "PocketCraft";
public static final String VERSION = "1.0";
public static Block stonecutter;
public static Block reactor;
@Mod.EventHandler
public void init(FMLInitializationEvent e) {
stonecutter = new BlockStonecutter();
reactor = new BlockNetherReactor();
GameRegistry.registerBlock(stonecutter, "stonecutter");
GameRegistry.registerBlock(reactor, "reactor");
GameRegistry.addShapedRecipe(new ItemStack(stonecutter), "cc", "cc", 'c', Blocks.cobblestone);
GameRegistry.addShapedRecipe(new ItemStack(reactor), "idi", "idi", "idi", 'i', Items.iron_ingot, 'd', Items.diamond);
}
}

View file

@ -0,0 +1,21 @@
package ley.modding.pocketcraft.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class BlockNetherReactor extends Block {
public BlockNetherReactor() {
super(Material.iron);
setBlockName("reactor");
setCreativeTab(CreativeTabs.tabDecorations);
}
@Override
public void registerBlockIcons(IIconRegister reg) {
blockIcon = reg.registerIcon("reactor");
}
}

View file

@ -0,0 +1,41 @@
package ley.modding.pocketcraft.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.util.IIcon;
public class BlockStonecutter extends Block {
private IIcon top;
private IIcon side;
private IIcon side2;
private IIcon bottom;
public BlockStonecutter() {
super(Material.rock);
setBlockName("stonecutter");
setCreativeTab(CreativeTabs.tabDecorations);
}
@Override
public IIcon getIcon(int dir, int meta) {
switch (dir) {
case 0: return bottom;
case 1: return top;
case 2:
case 3:
return side;
}
return side2;
}
@Override
public void registerBlockIcons(IIconRegister reg) {
top = reg.registerIcon("stonecutter_top");
side = reg.registerIcon("stonecutter_side");
side2 = reg.registerIcon("furnace_side");
bottom = reg.registerIcon("furnace_top");
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

View file

@ -0,0 +1,2 @@
tile.stonecutter.name=Stonecutter
tile.reactor.name=Nether Reactor Core