v4.0.0 Beta #2 (Build 3)

Removed BlockProxy implementation on all Block classes.
Removed setRenderManager() methods on all Render classes.
Added more Javadocs to open up possibilities for the future. *cough*
api *ahem*
Removed ObsidianUtils.addName, thanks to Calclavia's FML pull request.
Touched up on comments, removed the junky ones
This commit is contained in:
Aidan Brady 2012-08-15 17:27:24 -04:00
parent 37dbadc0a5
commit 17ed14190f
14 changed files with 129 additions and 132 deletions

View file

@ -6,7 +6,7 @@ import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockBase extends Block implements BlockProxy public class BlockBase extends Block
{ {
public BlockBase(int i, int j) public BlockBase(int i, int j)
{ {

View file

@ -6,7 +6,7 @@ import java.util.Random;
import cpw.mods.fml.common.registry.BlockProxy; import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockCombiner extends BlockContainer implements BlockProxy public class BlockCombiner extends BlockContainer
{ {
private Random combinerRand = new Random(); private Random combinerRand = new Random();

View file

@ -6,7 +6,7 @@ import java.util.Random;
import cpw.mods.fml.common.registry.BlockProxy; import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockCrusher extends BlockObsidianContainer implements BlockProxy public class BlockCrusher extends BlockObsidianContainer
{ {
private Random crusherRand = new Random(); private Random crusherRand = new Random();

View file

@ -6,7 +6,7 @@ import java.util.Random;
import cpw.mods.fml.common.registry.BlockProxy; import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockEnrichmentChamber extends BlockObsidianContainer implements BlockProxy public class BlockEnrichmentChamber extends BlockObsidianContainer
{ {
private Random chamberRand = new Random(); private Random chamberRand = new Random();

View file

@ -7,7 +7,7 @@ import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockLife extends Block implements BlockProxy public class BlockLife extends Block
{ {
private Random lifeRand; private Random lifeRand;

View file

@ -6,7 +6,7 @@ import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockObsidianContainer extends BlockContainer implements BlockProxy public class BlockObsidianContainer extends BlockContainer
{ {
public BlockObsidianContainer(int i, Material material) public BlockObsidianContainer(int i, Material material)
{ {

View file

@ -6,7 +6,7 @@ import java.util.Random;
import cpw.mods.fml.common.registry.BlockProxy; import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockObsidianTNT extends Block implements BlockProxy public class BlockObsidianTNT extends Block
{ {
public BlockObsidianTNT(int par1) public BlockObsidianTNT(int par1)
{ {

View file

@ -6,7 +6,7 @@ import java.util.Random;
import cpw.mods.fml.common.registry.BlockProxy; import cpw.mods.fml.common.registry.BlockProxy;
import net.minecraft.src.*; import net.minecraft.src.*;
public class BlockPlatinumCompressor extends BlockContainer implements BlockProxy public class BlockPlatinumCompressor extends BlockContainer
{ {
private Random compressorRand = new Random(); private Random compressorRand = new Random();

View file

@ -34,36 +34,27 @@ import cpw.mods.fml.common.registry.TickRegistry;
@NetworkMod(channels = { "ObsidianIngots" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) @NetworkMod(channels = { "ObsidianIngots" }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class ObsidianIngots public class ObsidianIngots
{ {
/** /** Obsidian Ingots logger instance */
* Obsidian Ingots logger instance
*/
public static Logger logger = Logger.getLogger("Minecraft"); public static Logger logger = Logger.getLogger("Minecraft");
/** /** Obsidian Ingots proxy instance */
* Obsidian Ingots proxy instance
*/
@SidedProxy(clientSide = "net.uberkat.obsidian.client.ClientProxy", serverSide = "net.uberkat.obsidian.server.ServerProxy") @SidedProxy(clientSide = "net.uberkat.obsidian.client.ClientProxy", serverSide = "net.uberkat.obsidian.server.ServerProxy")
public static CommonProxy proxy; public static CommonProxy proxy;
/** /** Obsidian Ingots mod instance */
* Obsidian Ingots mod instance
*/
public static ObsidianIngots instance; public static ObsidianIngots instance;
/** /** Obsidian Ingots hooks instance */
* Obsidian Ingots hooks instance
*/
public static ObsidianHooks hooks; public static ObsidianHooks hooks;
//Initial Declarations //Initial Declarations
public static Version versionNumber = new Version(4, 0, 0); public static Version versionNumber = new Version(4, 0, 0);
public static String latestVersionNumber; public static String latestVersionNumber;
public static String recentNews; public static String recentNews;
public static String hostIP = "71.56.58.57"; public static String hostIP = "71.56.58.57";
public static int hostPort = 3073; public static int hostPort = 3073;
//Enums
//Tools //Enums: Tools
public static EnumToolMaterial toolOBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", 3, 2500, 20F, 10, 50); public static EnumToolMaterial toolOBSIDIAN = EnumHelper.addToolMaterial("OBSIDIAN", 3, 2500, 20F, 10, 50);
public static EnumToolMaterial toolOBSIDIAN2 = EnumHelper.addToolMaterial("OBSIDIAN2", 3, 3000, 25F, 10, 100); public static EnumToolMaterial toolOBSIDIAN2 = EnumHelper.addToolMaterial("OBSIDIAN2", 3, 3000, 25F, 10, 100);
public static EnumToolMaterial toolLAZULI = EnumHelper.addToolMaterial("LAZULI", 2, 200, 5.0F, 0, 22); public static EnumToolMaterial toolLAZULI = EnumHelper.addToolMaterial("LAZULI", 2, 200, 5.0F, 0, 22);
@ -74,12 +65,14 @@ public class ObsidianIngots
public static EnumToolMaterial toolREDSTONE2 = EnumHelper.addToolMaterial("REDSTONE2", 2, 400, 12F, 6, 60); public static EnumToolMaterial toolREDSTONE2 = EnumHelper.addToolMaterial("REDSTONE2", 2, 400, 12F, 6, 60);
public static EnumToolMaterial toolGLOWSTONE = EnumHelper.addToolMaterial("GLOWSTONE", 2, 300, 14, 5, 80); public static EnumToolMaterial toolGLOWSTONE = EnumHelper.addToolMaterial("GLOWSTONE", 2, 300, 14, 5, 80);
public static EnumToolMaterial toolGLOWSTONE2 = EnumHelper.addToolMaterial("GLOWSTONE2", 2, 450, 18, 5, 100); public static EnumToolMaterial toolGLOWSTONE2 = EnumHelper.addToolMaterial("GLOWSTONE2", 2, 450, 18, 5, 100);
//Armor
//Enums: Armor
public static EnumArmorMaterial armorOBSIDIAN = EnumHelper.addArmorMaterial("OBSIDIAN", 50, new int[]{5, 12, 8, 5}, 50); public static EnumArmorMaterial armorOBSIDIAN = EnumHelper.addArmorMaterial("OBSIDIAN", 50, new int[]{5, 12, 8, 5}, 50);
public static EnumArmorMaterial armorLAZULI = EnumHelper.addArmorMaterial("LAZULI", 13, new int[]{2, 5, 4, 2}, 50); public static EnumArmorMaterial armorLAZULI = EnumHelper.addArmorMaterial("LAZULI", 13, new int[]{2, 5, 4, 2}, 50);
public static EnumArmorMaterial armorPLATINUM = EnumHelper.addArmorMaterial("PLATINUM", 30, new int[]{4, 10, 7, 4}, 50); public static EnumArmorMaterial armorPLATINUM = EnumHelper.addArmorMaterial("PLATINUM", 30, new int[]{4, 10, 7, 4}, 50);
public static EnumArmorMaterial armorREDSTONE = EnumHelper.addArmorMaterial("REDSTONE", 16, new int[]{2, 7, 5, 3}, 50); public static EnumArmorMaterial armorREDSTONE = EnumHelper.addArmorMaterial("REDSTONE", 16, new int[]{2, 7, 5, 3}, 50);
public static EnumArmorMaterial armorGLOWSTONE = EnumHelper.addArmorMaterial("GLOWSTONE", 18, new int[]{3, 7, 6, 3}, 50); public static EnumArmorMaterial armorGLOWSTONE = EnumHelper.addArmorMaterial("GLOWSTONE", 18, new int[]{3, 7, 6, 3}, 50);
//Block IDs //Block IDs
public static int platinumOreID = 200; public static int platinumOreID = 200;
public static int platinumBlockID = 201; public static int platinumBlockID = 201;
@ -494,113 +487,113 @@ public class ObsidianIngots
public void addNames() public void addNames()
{ {
//Base //Base
ObsidianUtils.addName(WoodPaxel, "Wood Paxel"); LanguageRegistry.addName(WoodPaxel, "Wood Paxel");
ObsidianUtils.addName(StonePaxel, "Stone Paxel"); LanguageRegistry.addName(StonePaxel, "Stone Paxel");
ObsidianUtils.addName(IronPaxel, "Iron Paxel"); LanguageRegistry.addName(IronPaxel, "Iron Paxel");
ObsidianUtils.addName(DiamondPaxel, "Diamond Paxel"); LanguageRegistry.addName(DiamondPaxel, "Diamond Paxel");
ObsidianUtils.addName(GoldPaxel, "Gold Paxel"); LanguageRegistry.addName(GoldPaxel, "Gold Paxel");
ObsidianUtils.addName(WoodKnife, "Wood Knife"); LanguageRegistry.addName(WoodKnife, "Wood Knife");
ObsidianUtils.addName(StoneKnife, "Stone Knife"); LanguageRegistry.addName(StoneKnife, "Stone Knife");
ObsidianUtils.addName(IronKnife, "Iron Knife"); LanguageRegistry.addName(IronKnife, "Iron Knife");
ObsidianUtils.addName(DiamondKnife, "Diamond Knife"); LanguageRegistry.addName(DiamondKnife, "Diamond Knife");
ObsidianUtils.addName(GoldKnife, "Gold Knife"); LanguageRegistry.addName(GoldKnife, "Gold Knife");
ObsidianUtils.addName(IronDust, "Iron Dust"); LanguageRegistry.addName(IronDust, "Iron Dust");
ObsidianUtils.addName(GoldDust, "Gold Dust"); LanguageRegistry.addName(GoldDust, "Gold Dust");
//Obsidian //Obsidian
ObsidianUtils.addName(RefinedObsidian, "Refined Obsidian"); LanguageRegistry.addName(RefinedObsidian, "Refined Obsidian");
ObsidianUtils.addName(ObsidianDust, "Obsidian Dust"); LanguageRegistry.addName(ObsidianDust, "Obsidian Dust");
ObsidianUtils.addName(ObsidianHelmet, "Obsidian Helmet"); LanguageRegistry.addName(ObsidianHelmet, "Obsidian Helmet");
ObsidianUtils.addName(ObsidianBody, "Obsidian Chestplate"); LanguageRegistry.addName(ObsidianBody, "Obsidian Chestplate");
ObsidianUtils.addName(ObsidianLegs, "Obsidian Leggings"); LanguageRegistry.addName(ObsidianLegs, "Obsidian Leggings");
ObsidianUtils.addName(ObsidianBoots, "Obsidian Boots"); LanguageRegistry.addName(ObsidianBoots, "Obsidian Boots");
ObsidianUtils.addName(ObsidianIngot, "Obsidian Ingot"); LanguageRegistry.addName(ObsidianIngot, "Obsidian Ingot");
ObsidianUtils.addName(ObsidianPaxel, "Obsidian Paxel"); LanguageRegistry.addName(ObsidianPaxel, "Obsidian Paxel");
ObsidianUtils.addName(ObsidianPickaxe, "Obsidian Pickaxe"); LanguageRegistry.addName(ObsidianPickaxe, "Obsidian Pickaxe");
ObsidianUtils.addName(ObsidianAxe, "Obsidian Axe"); LanguageRegistry.addName(ObsidianAxe, "Obsidian Axe");
ObsidianUtils.addName(ObsidianSpade, "Obsidian Shovel"); LanguageRegistry.addName(ObsidianSpade, "Obsidian Shovel");
ObsidianUtils.addName(ObsidianHoe, "Obsidian Hoe"); LanguageRegistry.addName(ObsidianHoe, "Obsidian Hoe");
ObsidianUtils.addName(ObsidianSword, "Obsidian Sword"); LanguageRegistry.addName(ObsidianSword, "Obsidian Sword");
ObsidianUtils.addName(ObsidianKnife, "Obsidian Knife"); LanguageRegistry.addName(ObsidianKnife, "Obsidian Knife");
//Lazuli //Lazuli
ObsidianUtils.addName(LazuliHelmet, "Lapis Lazuli Helmet"); LanguageRegistry.addName(LazuliHelmet, "Lapis Lazuli Helmet");
ObsidianUtils.addName(LazuliBody, "Lapis Lazuli Chestplate"); LanguageRegistry.addName(LazuliBody, "Lapis Lazuli Chestplate");
ObsidianUtils.addName(LazuliLegs, "Lapis Lazuli Leggings"); LanguageRegistry.addName(LazuliLegs, "Lapis Lazuli Leggings");
ObsidianUtils.addName(LazuliBoots, "Lapis Lazuli Boots"); LanguageRegistry.addName(LazuliBoots, "Lapis Lazuli Boots");
ObsidianUtils.addName(LazuliPaxel, "Lapis Lazuli Paxel"); LanguageRegistry.addName(LazuliPaxel, "Lapis Lazuli Paxel");
ObsidianUtils.addName(LazuliPickaxe, "Lapis Lazuli Pickaxe"); LanguageRegistry.addName(LazuliPickaxe, "Lapis Lazuli Pickaxe");
ObsidianUtils.addName(LazuliAxe, "Lapis Lazuli Axe"); LanguageRegistry.addName(LazuliAxe, "Lapis Lazuli Axe");
ObsidianUtils.addName(LazuliSpade, "Lapis Lazuli Shovel"); LanguageRegistry.addName(LazuliSpade, "Lapis Lazuli Shovel");
ObsidianUtils.addName(LazuliHoe, "Lapis Lazuli Hoe"); LanguageRegistry.addName(LazuliHoe, "Lapis Lazuli Hoe");
ObsidianUtils.addName(LazuliSword, "Lapis Lazuli Sword"); LanguageRegistry.addName(LazuliSword, "Lapis Lazuli Sword");
ObsidianUtils.addName(LazuliKnife, "Lazuli Knife"); LanguageRegistry.addName(LazuliKnife, "Lazuli Knife");
//Platinum //Platinum
ObsidianUtils.addName(PlatinumOre, "Platinum Ore"); LanguageRegistry.addName(PlatinumOre, "Platinum Ore");
ObsidianUtils.addName(PlatinumBlock, "Platinum Block"); LanguageRegistry.addName(PlatinumBlock, "Platinum Block");
ObsidianUtils.addName(PlatinumDust, "Platinum Dust"); LanguageRegistry.addName(PlatinumDust, "Platinum Dust");
ObsidianUtils.addName(PlatinumHelmet, "Platinum Helmet"); LanguageRegistry.addName(PlatinumHelmet, "Platinum Helmet");
ObsidianUtils.addName(PlatinumBody, "Platinum Chestplate"); LanguageRegistry.addName(PlatinumBody, "Platinum Chestplate");
ObsidianUtils.addName(PlatinumLegs, "Platinum Leggings"); LanguageRegistry.addName(PlatinumLegs, "Platinum Leggings");
ObsidianUtils.addName(PlatinumBoots, "Platinum Boots"); LanguageRegistry.addName(PlatinumBoots, "Platinum Boots");
ObsidianUtils.addName(PlatinumIngot, "Platinum Ingot"); LanguageRegistry.addName(PlatinumIngot, "Platinum Ingot");
ObsidianUtils.addName(PlatinumPaxel, "Platinum Paxel"); LanguageRegistry.addName(PlatinumPaxel, "Platinum Paxel");
ObsidianUtils.addName(PlatinumPickaxe, "Platinum Pickaxe"); LanguageRegistry.addName(PlatinumPickaxe, "Platinum Pickaxe");
ObsidianUtils.addName(PlatinumAxe, "Platinum Axe"); LanguageRegistry.addName(PlatinumAxe, "Platinum Axe");
ObsidianUtils.addName(PlatinumSpade, "Platinum Shovel"); LanguageRegistry.addName(PlatinumSpade, "Platinum Shovel");
ObsidianUtils.addName(PlatinumHoe, "Platinum Hoe"); LanguageRegistry.addName(PlatinumHoe, "Platinum Hoe");
ObsidianUtils.addName(PlatinumSword, "Platinum Sword"); LanguageRegistry.addName(PlatinumSword, "Platinum Sword");
ObsidianUtils.addName(PlatinumKnife, "Platinum Knife"); LanguageRegistry.addName(PlatinumKnife, "Platinum Knife");
//Redstone //Redstone
ObsidianUtils.addName(RedstoneBlock, "Redstone Block"); LanguageRegistry.addName(RedstoneBlock, "Redstone Block");
ObsidianUtils.addName(RedstoneBlock, "Redstone Block"); LanguageRegistry.addName(RedstoneBlock, "Redstone Block");
ObsidianUtils.addName(RedstoneHelmet, "Redstone Helmet"); LanguageRegistry.addName(RedstoneHelmet, "Redstone Helmet");
ObsidianUtils.addName(RedstoneBody, "Redstone Chestplate"); LanguageRegistry.addName(RedstoneBody, "Redstone Chestplate");
ObsidianUtils.addName(RedstoneLegs, "Redstone Leggings"); LanguageRegistry.addName(RedstoneLegs, "Redstone Leggings");
ObsidianUtils.addName(RedstoneBoots, "Redstone Boots"); LanguageRegistry.addName(RedstoneBoots, "Redstone Boots");
ObsidianUtils.addName(RedstoneIngot, "Redstone Ingot"); LanguageRegistry.addName(RedstoneIngot, "Redstone Ingot");
ObsidianUtils.addName(RedstonePaxel, "Redstone Paxel"); LanguageRegistry.addName(RedstonePaxel, "Redstone Paxel");
ObsidianUtils.addName(RedstonePickaxe, "Redstone Pickaxe"); LanguageRegistry.addName(RedstonePickaxe, "Redstone Pickaxe");
ObsidianUtils.addName(RedstoneAxe, "Redstone Axe"); LanguageRegistry.addName(RedstoneAxe, "Redstone Axe");
ObsidianUtils.addName(RedstoneSpade, "Redstone Shovel"); LanguageRegistry.addName(RedstoneSpade, "Redstone Shovel");
ObsidianUtils.addName(RedstoneHoe, "Redstone Hoe"); LanguageRegistry.addName(RedstoneHoe, "Redstone Hoe");
ObsidianUtils.addName(RedstoneSword, "Redstone Sword"); LanguageRegistry.addName(RedstoneSword, "Redstone Sword");
ObsidianUtils.addName(RedstoneBlock, "Redstone Block"); LanguageRegistry.addName(RedstoneBlock, "Redstone Block");
ObsidianUtils.addName(RedstoneKnife, "Redstone Knife"); LanguageRegistry.addName(RedstoneKnife, "Redstone Knife");
//Glowstone //Glowstone
ObsidianUtils.addName(RefinedGlowstone, "Refined Glowstone Block"); LanguageRegistry.addName(RefinedGlowstone, "Refined Glowstone Block");
ObsidianUtils.addName(GlowstoneIngot, "Glowstone Ingot"); LanguageRegistry.addName(GlowstoneIngot, "Glowstone Ingot");
ObsidianUtils.addName(GlowstonePaxel, "Glowstone Paxel"); LanguageRegistry.addName(GlowstonePaxel, "Glowstone Paxel");
ObsidianUtils.addName(GlowstonePickaxe, "Glowstone Pickaxe"); LanguageRegistry.addName(GlowstonePickaxe, "Glowstone Pickaxe");
ObsidianUtils.addName(GlowstoneAxe, "Glowstone Axe"); LanguageRegistry.addName(GlowstoneAxe, "Glowstone Axe");
ObsidianUtils.addName(GlowstoneSpade, "Glowstone Shovel"); LanguageRegistry.addName(GlowstoneSpade, "Glowstone Shovel");
ObsidianUtils.addName(GlowstoneHoe, "Glowstone Hoe"); LanguageRegistry.addName(GlowstoneHoe, "Glowstone Hoe");
ObsidianUtils.addName(GlowstoneSword, "Glowstone Sword"); LanguageRegistry.addName(GlowstoneSword, "Glowstone Sword");
ObsidianUtils.addName(GlowstoneHelmet, "Glowstone Helmet"); LanguageRegistry.addName(GlowstoneHelmet, "Glowstone Helmet");
ObsidianUtils.addName(GlowstoneBody, "Glowstone Chestplate"); LanguageRegistry.addName(GlowstoneBody, "Glowstone Chestplate");
ObsidianUtils.addName(GlowstoneLegs, "Glowstone Leggings"); LanguageRegistry.addName(GlowstoneLegs, "Glowstone Leggings");
ObsidianUtils.addName(GlowstoneBoots, "Glowstone Boots"); LanguageRegistry.addName(GlowstoneBoots, "Glowstone Boots");
ObsidianUtils.addName(GlowstoneKnife, "Glowstone Knife"); LanguageRegistry.addName(GlowstoneKnife, "Glowstone Knife");
//Extras //Extras
ObsidianUtils.addName(ObsidianArrow, "Obsidian Arrow"); LanguageRegistry.addName(ObsidianArrow, "Obsidian Arrow");
ObsidianUtils.addName(ObsidianBow, "Obsidian Bow"); LanguageRegistry.addName(ObsidianBow, "Obsidian Bow");
ObsidianUtils.addName(ObsidianTNT, "Obsidian TNT"); LanguageRegistry.addName(ObsidianTNT, "Obsidian TNT");
if(extrasEnabled) if(extrasEnabled)
{ {
ObsidianUtils.addName(LightningRod, "Lightning Rod"); LanguageRegistry.addName(LightningRod, "Lightning Rod");
ObsidianUtils.addName(Stopwatch, "Steve's Stopwatch"); LanguageRegistry.addName(Stopwatch, "Steve's Stopwatch");
ObsidianUtils.addName(LifeBlock, "Block of Life"); LanguageRegistry.addName(LifeBlock, "Block of Life");
ObsidianUtils.addName(WeatherOrb, "Weather Orb"); LanguageRegistry.addName(WeatherOrb, "Weather Orb");
} }
ObsidianUtils.addName(EnrichmentChamber, "Enrichment Chamber"); LanguageRegistry.addName(EnrichmentChamber, "Enrichment Chamber");
ObsidianUtils.addName(PlatinumCompressor, "Platinum Compressor"); LanguageRegistry.addName(PlatinumCompressor, "Platinum Compressor");
ObsidianUtils.addName(Combiner, "Combiner"); LanguageRegistry.addName(Combiner, "Combiner");
ObsidianUtils.addName(Crusher, "Crusher"); LanguageRegistry.addName(Crusher, "Crusher");
ObsidianUtils.addName(CoalBlock, "Coal Block"); LanguageRegistry.addName(CoalBlock, "Coal Block");
} }
/** /**
* Adds all item textures from the sprite sheet. * Adds all item textures from the sprite sheet.
@ -860,7 +853,7 @@ public class ObsidianIngots
NetworkRegistry.instance().registerGuiHandler(this, new CommonGuiHandler()); NetworkRegistry.instance().registerGuiHandler(this, new CommonGuiHandler());
//Set the mod's instance //Set the mod's instance
instance = this; instance = this;
System.out.println("[Obsidian Ingots] Version " + versionNumber + " initializing..."); System.out.println("[ObsidianIngots] Version " + versionNumber + " initializing...");
proxy.registerRenderInformation(); proxy.registerRenderInformation();
proxy.setProperties(); proxy.setProperties();
proxy.loadUtilities(); proxy.loadUtilities();

View file

@ -26,16 +26,6 @@ import net.minecraft.src.*;
*/ */
public class ObsidianUtils public class ObsidianUtils
{ {
/**
* Registers a name for the specified object.
* @param obj - block/item to name
* @param name - name for the block/item
*/
public static void addName(Object obj, String name)
{
LanguageRegistry.instance().addNameForObject(obj, "en_US", name);
}
/** /**
* Checks for a new version of Obsidian Ingots. * Checks for a new version of Obsidian Ingots.
*/ */

View file

@ -1,11 +1,25 @@
package net.uberkat.obsidian.common; package net.uberkat.obsidian.common;
public class Version { /**
* Version class. Simple version handling for Obsidian Ingots.
* @author AidanBrady
*
*/
public class Version
{
/** Major number for version */
public int major; public int major;
/** Minor number for version */
public int minor; public int minor;
/** Build number for version */
public int build; public int build;
/**
* Creates a version number with 3 digits.
* @param majorNum - major version
* @param minorNum - minor version
* @param buildNum - build version
*/
public Version(int majorNum, int minorNum, int buildNum) public Version(int majorNum, int minorNum, int buildNum)
{ {
major = majorNum; major = majorNum;
@ -13,6 +27,9 @@ public class Version {
build = buildNum; build = buildNum;
} }
/**
* Resets the version number to "0.0.0."
*/
public void reset() public void reset()
{ {
major = 0; major = 0;

View file

@ -17,7 +17,6 @@ public class RenderKnife extends Render
public void renderKnife(EntityKnife entityknife, double d, double d1, double d2, float f, float f1) public void renderKnife(EntityKnife entityknife, double d, double d1, double d2, float f, float f1)
{ {
this.setRenderManager(RenderManager.instance);
loadTexture("/obsidian/Knife.png"); loadTexture("/obsidian/Knife.png");
if (entityknife.prevRotationYaw == 0.0F && entityknife.prevRotationPitch == 0.0F) if (entityknife.prevRotationYaw == 0.0F && entityknife.prevRotationPitch == 0.0F)
{ {

View file

@ -10,7 +10,6 @@ public class RenderObsidianArrow extends Render
{ {
public void renderArrow(EntityObsidianArrow par1EntityArrow, double par2, double par4, double par6, float par8, float par9) public void renderArrow(EntityObsidianArrow par1EntityArrow, double par2, double par4, double par6, float par8, float par9)
{ {
this.setRenderManager(RenderManager.instance);
this.loadTexture("/obsidian/ObsidianArrows.png"); this.loadTexture("/obsidian/ObsidianArrows.png");
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float)par2, (float)par4, (float)par6); GL11.glTranslatef((float)par2, (float)par4, (float)par6);

View file

@ -18,7 +18,6 @@ public class RenderObsidianTNT extends Render
public void renderObsidianTNT(EntityObsidianTNT entityobsidiantnt, double d, double d1, double d2, float f, float f1) public void renderObsidianTNT(EntityObsidianTNT entityobsidiantnt, double d, double d1, double d2, float f, float f1)
{ {
this.setRenderManager(RenderManager.instance);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float)d, (float)d1, (float)d2); GL11.glTranslatef((float)d, (float)d1, (float)d2);