SHOW:
|
|
- or go back to the newest paste.
1 | Snowstorm.java: | |
2 | ||
3 | package snowstorm; | |
4 | ||
5 | import snowstorm.ClientProxySnowstorm; | |
6 | import snowstorm.BlockSnowstormBlock; | |
7 | import net.minecraft.block.Block; | |
8 | import net.minecraft.block.material.Material; | |
9 | import cpw.mods.fml.common.Mod; | |
10 | import cpw.mods.fml.common.Mod.Init; | |
11 | import cpw.mods.fml.common.event.FMLInitializationEvent; | |
12 | import cpw.mods.fml.common.network.NetworkMod; | |
13 | import cpw.mods.fml.common.registry.GameRegistry; | |
14 | import cpw.mods.fml.common.registry.LanguageRegistry; | |
15 | ||
16 | @Mod(modid = "Snowstorm", name = "Snowstorm", version = "1.0.0") | |
17 | @NetworkMod(clientSideRequired = true, serverSideRequired = false) | |
18 | public class Snowstorm { | |
19 | ||
20 | Block snowstormBlock; | |
21 | ||
22 | int snowstormBlockID = 500; | |
23 | ||
24 | @Init | |
25 | public void load(FMLInitializationEvent event){ | |
26 | - | snowstormBlock = new BlockSnowstormBlock(snowstormBlockID, snowstormBlockID, Material.cloth).setBlockName("Blanket"); |
26 | + | snowstormBlock = new BlockSnowstormBlock(500, Material.cloth); |
27 | gameRegisters(); | |
28 | languageRegisters(); | |
29 | } | |
30 | ||
31 | private void languageRegisters() { | |
32 | // TODO Auto-generated method stub | |
33 | ||
34 | } | |
35 | ||
36 | ||
37 | ||
38 | @Init | |
39 | public void gameRegisters(){ | |
40 | GameRegistry.registerBlock(snowstormBlock);} | |
41 | public void LanguageRegistry(){ | |
42 | LanguageRegistry.addName(snowstormBlock, "Blanket"); | |
43 | ||
44 | } | |
45 | ||
46 | } | |
47 | ||
48 | ||
49 | BlockSnowstormBlock.java: | |
50 | ||
51 | package snowstorm; | |
52 | ||
53 | import net.minecraft.block.Block; | |
54 | import net.minecraft.block.material.Material; | |
55 | import net.minecraft.creativetab.CreativeTabs; | |
56 | import snowstorm.Snowstorm; | |
57 | import snowstorm.ClientProxySnowstorm; | |
58 | ||
59 | public class BlockSnowstormBlock extends Block{ | |
60 | ||
61 | public BlockSnowstormBlock(int id, int texture, Material mat) { | |
62 | super(texture, Material.cloth); | |
63 | this.setCreativeTab(CreativeTabs.tabBlock); | |
64 | ||
65 | ||
66 | }} | |
67 | ||
68 | - | public Block setBlockName(String string) { |
68 | + | |
69 | - | // TODO Auto-generated method stub |
69 | + | |
70 | - | return null; |
70 | + | |
71 | ||
72 | ||
73 | package snowstorm; | |
74 | ||
75 | import snowstorm.common.CommonProxySnowstorm; | |
76 | import snowstorm.BlockSnowstormBlock; | |
77 | ||
78 | public class ClientProxySnowstorm extends CommonProxySnowstorm { | |
79 | ||
80 | public void registerRenders(){ | |
81 | ||
82 | } | |
83 | ||
84 | } | |
85 | ||
86 | ||
87 | ||
88 | CommonProxySnowstorm.java: | |
89 | ||
90 | package snowstorm; | |
91 | ||
92 | public class CommonProxySnowstorm { | |
93 | ||
94 | public void registerRenders(){ | |
95 | ||
96 | } | |
97 | } |