Renamed variables to Java standards
This commit is contained in:
parent
29c98b8fa4
commit
b04dccd673
9 changed files with 42 additions and 90 deletions
|
|
@ -6,6 +6,6 @@ public class ItemPlanks extends ItemBlockMulti {
|
|||
public static final String[] PLANK_TYPE = new String[] { "Purple Planks", "Green Planks", "Black Planks", "Orange Planks", "Red Planks", "Blue Planks", "Yellow Planks" };
|
||||
|
||||
public ItemPlanks(int par1) {
|
||||
super(par1, MysticStones.Planks, PLANK_TYPE);
|
||||
super(par1, MysticStones.planks, PLANK_TYPE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class ItemReinforced extends ItemBlockMulti {
|
|||
"Agate Bricks" };
|
||||
|
||||
public ItemReinforced(int par1) {
|
||||
super(par1, MysticStones.ReinforcedBricks, BRICK_TYPE);
|
||||
super(par1, MysticStones.reinforcedBricks, BRICK_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ public class ItemStoneBricks extends ItemBlockMulti {
|
|||
"Travertine Bricks" };
|
||||
|
||||
public ItemStoneBricks(int par1) {
|
||||
super(par1, MysticStones.StoneBricks, STONEBRICK_TYPES);
|
||||
super(par1, MysticStones.stoneBricks, STONEBRICK_TYPES);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ public class ItemStones extends ItemBlockMulti {
|
|||
"Smooth Orthogneiss", "Orthogneiss", "Smooth Slate", "Slate", "Smooth Travertine", "Travertine" };
|
||||
|
||||
public ItemStones(int par1) {
|
||||
super(par1, MysticStones.Stones, STONE_TYPES);
|
||||
super(par1, MysticStones.stones, STONE_TYPES);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,30 +22,30 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "Mystic Stones", name = "Mystic Stones", version = "0.1")
|
||||
@Mod(modid = "MysticStones", name = "Mystic Stones", version = "0.1")
|
||||
@NetworkMod(clientSideRequired = true)
|
||||
public class MysticStones {
|
||||
@Instance("Mystic Stones")
|
||||
@Instance("MysticStones")
|
||||
public static MysticStones instance;
|
||||
public static Block Planks, Stones, StoneBricks, ReinforcedBricks;
|
||||
public static Block planks, stones, stoneBricks, reinforcedBricks;
|
||||
public static final CreativeTabs MysticStonesTab = new TabMysticStones("MysticStonesTab");
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.initialize(event.getSuggestedConfigurationFile());
|
||||
Planks = new BlockPlanks(Config.PlanksID);
|
||||
Stones = new BlockStones(Config.StonesID);
|
||||
StoneBricks = new BlockStoneBricks(Config.StoneBricksID);
|
||||
ReinforcedBricks = new BlockReinforced(Config.ReinforcedBricksID);
|
||||
GameRegistry.registerBlock(Planks, ItemPlanks.class, "Planks");
|
||||
GameRegistry.registerBlock(Stones, ItemStones.class, "Stones");
|
||||
GameRegistry.registerBlock(StoneBricks, ItemStoneBricks.class, "StoneBricks");
|
||||
GameRegistry.registerBlock(ReinforcedBricks, ItemReinforced.class, "Reinforcedbricks");
|
||||
planks = new BlockPlanks(Config.planksID);
|
||||
stones = new BlockStones(Config.stonesID);
|
||||
stoneBricks = new BlockStoneBricks(Config.stoneBricksID);
|
||||
reinforcedBricks = new BlockReinforced(Config.reinforcedBricksID);
|
||||
GameRegistry.registerBlock(planks, ItemPlanks.class, "Planks");
|
||||
GameRegistry.registerBlock(stones, ItemStones.class, "Stones");
|
||||
GameRegistry.registerBlock(stoneBricks, ItemStoneBricks.class, "StoneBricks");
|
||||
GameRegistry.registerBlock(reinforcedBricks, ItemReinforced.class, "Reinforcedbricks");
|
||||
Localizations.Initialize();
|
||||
RecipeHandler.CraftPlanks();
|
||||
RecipeHandler.CraftStoneBricks();
|
||||
RecipeHandler.CraftReinforced();
|
||||
RecipeHandler.CraftElse();
|
||||
RecipeHandler.craftPlanks();
|
||||
RecipeHandler.craftStoneBricks();
|
||||
RecipeHandler.craftReinforced();
|
||||
RecipeHandler.craftElse();
|
||||
GameRegistry.registerWorldGenerator(new WorldGeneratorStones());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,35 +14,35 @@ public class RecipeHandler {
|
|||
public static final String[] STONES = { "anorthositeSmooth", "Anorthosite", "limestoneSmooth", "limestone", "marbleSmooth", "marble", "migmatiteSmooth", "migmatite", "orthogneissSmooth",
|
||||
"orthogneiss", "slateSmooth", "slate", "travertineSmooth", "travertine" };
|
||||
|
||||
public static void CraftElse() {
|
||||
public static void craftElse() {
|
||||
//smelting
|
||||
for (int i = 1; i < 14; i += 2) {
|
||||
FurnaceRecipes.smelting().addSmelting(MysticStones.Stones.blockID, i, new ItemStack(MysticStones.Stones, 1, i - 1), 0.1F);
|
||||
FurnaceRecipes.smelting().addSmelting(MysticStones.stones.blockID, i, new ItemStack(MysticStones.stones, 1, i - 1), 0.1F);
|
||||
}
|
||||
}
|
||||
|
||||
public static void CraftPlanks() {
|
||||
public static void craftPlanks() {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
ItemStack stack = new ItemStack(MysticStones.Planks, 1, i);
|
||||
ItemStack stack = new ItemStack(MysticStones.planks, 1, i);
|
||||
OreDictionary.registerOre("plankWood", stack);
|
||||
OreDictionary.registerOre(STONES[2 * i], new ItemStack(MysticStones.Stones, 1, 2 * i));
|
||||
OreDictionary.registerOre(STONES[2 * i + 1], new ItemStack(MysticStones.Stones, 1, 2 * i + 1));
|
||||
OreDictionary.registerOre(STONES[2 * i], new ItemStack(MysticStones.stones, 1, 2 * i));
|
||||
OreDictionary.registerOre(STONES[2 * i + 1], new ItemStack(MysticStones.stones, 1, 2 * i + 1));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(stack, "plankWood", STONES[2 * i]));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(stack, "plankWood", STONES[2 * i + 1]));
|
||||
}
|
||||
}
|
||||
|
||||
public static void CraftReinforced() {
|
||||
public static void craftReinforced() {
|
||||
if (Loader.isModLoaded("MysticOres")) {
|
||||
for (int i = 0; i < MATERIALS.length; i++) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MysticStones.ReinforcedBricks, 1, i), true, "#$#", "$$$", "#$#", '$', MATERIALS[i], '#', "stone"));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MysticStones.reinforcedBricks, 1, i), true, "#$#", "$$$", "#$#", '$', MATERIALS[i], '#', "stone"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void CraftStoneBricks() {
|
||||
public static void craftStoneBricks() {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MysticStones.StoneBricks, 4, i), "##", "##", '#', STONES[2 * i]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(MysticStones.stoneBricks, 4, i), "##", "##", '#', STONES[2 * i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ public class TabMysticStones extends CreativeTabs {
|
|||
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(MysticStones.ReinforcedBricks, 1, 4);
|
||||
return new ItemStack(MysticStones.reinforcedBricks, 1, 4);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue