|
6 | 6 | import cpw.mods.fml.common.event.FMLPreInitializationEvent; |
7 | 7 | import cpw.mods.fml.common.registry.GameRegistry; |
8 | 8 | import net.minecraft.world.World; |
| 9 | +import net.minecraft.init.Blocks; |
| 10 | +import net.minecraft.init.Items; |
| 11 | +import net.minecraft.item.ItemStack; |
9 | 12 |
|
10 | 13 | public class CommonProxy { |
11 | | - |
12 | | - @EventHandler |
| 14 | + @EventHandler |
13 | 15 | public void preinit(FMLPreInitializationEvent event) { |
14 | | - |
15 | | - } |
| 16 | + } |
16 | 17 |
|
17 | 18 | @EventHandler |
18 | 19 | public void init(FMLInitializationEvent event) { |
| 20 | + BlockSerialRedstone serialRedstoneBlock = new BlockSerialRedstone(); |
| 21 | + BlockSendSerialMessage sendSerialMessageBlock = new BlockSendSerialMessage(); |
| 22 | + |
19 | 23 | GameRegistry.registerTileEntity(TileEntitySerialRedstone.class, "serialRedstone"); |
20 | | - GameRegistry.registerBlock(new BlockSerialRedstone(), "serialRedstone"); |
| 24 | + GameRegistry.registerBlock(serialRedstoneBlock, "serialRedstone"); |
21 | 25 |
|
22 | 26 | GameRegistry.registerTileEntity(TileEntitySendSerialMessage.class, "sendSerialMessageBlock"); |
23 | | - GameRegistry.registerBlock(new BlockSendSerialMessage(), "sendSerialMessageBlock"); |
| 27 | + GameRegistry.registerBlock(sendSerialMessageBlock, "sendSerialMessageBlock"); |
| 28 | + |
| 29 | + GameRegistry.addRecipe(new ItemStack(serialRedstoneBlock), new Object[]{ |
| 30 | + "ABA", |
| 31 | + "BCB", |
| 32 | + "ADA", |
| 33 | + 'A', Blocks.redstone_block, |
| 34 | + 'B', Blocks.redstone_ore, |
| 35 | + 'C', Items.clock, |
| 36 | + 'D', Items.sign |
| 37 | + }); |
| 38 | + GameRegistry.addRecipe(new ItemStack(sendSerialMessageBlock), new Object[]{ |
| 39 | + "ABA", |
| 40 | + "BCB", |
| 41 | + "ADA", |
| 42 | + 'A', Blocks.iron_block, |
| 43 | + 'B', Blocks.redstone_ore, |
| 44 | + 'C', Items.clock, |
| 45 | + 'D', Items.sign |
| 46 | + }); |
24 | 47 |
|
25 | 48 | } |
26 | 49 |
|
|
0 commit comments