pre 1.1.13

This commit is contained in:
mDiyo committed 2013-03-02 10:25:24 -08:00
1 parent b913622dda
commit 207de8184a
16 files changed
+303 -165

No files matched your search

+101 -8
View File
@@ -18,6 +18,7 @@ import tinker.common.fancyitem.FancyEntityItem;
import tinker.common.fancyitem.FancyItemRender;
import tinker.tconstruct.*;
import tinker.tconstruct.client.entityrender.*;
import tinker.tconstruct.client.gui.ToolGuiElement;
import tinker.tconstruct.client.liquidrender.*;
import tinker.tconstruct.entity.*;
import tinker.tconstruct.logic.*;
@@ -72,6 +73,16 @@ public class TProxyClient extends TProxyCommon
renderEngine.registerTextureFX(new LiquidSteelFX());
renderEngine.registerTextureFX(new LiquidSteelFlowFX());
//Metallurgy
renderEngine.registerTextureFX(new LiquidManganeseFX());
renderEngine.registerTextureFX(new LiquidManganeseFlowFX());
renderEngine.registerTextureFX(new LiquidHeptazionFX());
renderEngine.registerTextureFX(new LiquidHeptazionFlowFX());
renderEngine.registerTextureFX(new LiquidDamascusSteelFX());
renderEngine.registerTextureFX(new LiquidDamascusSteelFlowFX());
renderEngine.registerTextureFX(new LiquidAngmallenFX());
renderEngine.registerTextureFX(new LiquidAngmallenFlowFX());
//Tools
MinecraftForgeClient.preloadTexture(TContent.blockTexture);
IItemRenderer render = new SuperCustomToolRenderer();
@@ -88,6 +99,8 @@ public class TProxyClient extends TProxyCommon
RenderingRegistry.registerEntityRenderingHandler(Skyla.class, new SkylaRender());
RenderingRegistry.registerEntityRenderingHandler(FancyEntityItem.class, new FancyItemRender());
//RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo!
addRenderMappings();
}
/* Ties an internal name to a visible one. */
@@ -99,8 +112,7 @@ public class TProxyClient extends TProxyCommon
LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructBlocks", "TConstruct Blocks");*/
String langDir = "/tinkerlang/";
String[] langFiles =
{ "en_US.xml" };
String[] langFiles = { "en_US.xml" };
for (String langFile : langFiles)
{
@@ -218,17 +230,15 @@ public class TProxyClient extends TProxyCommon
LanguageRegistry.addName(TContent.obsidianStill, "Liquid Obsidian");
LanguageRegistry.addName(TContent.steelFlowing, "Liquid Steel");
LanguageRegistry.addName(TContent.steelStill, "Liquid Steel");*/
addToolButtons ();
}
public static final String[] shardNames = new String[] { "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard", "Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk" };
public static final String[] materialItemInternalNames = new String[] {
"PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot" };
public static final String[] materialItemInternalNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot" };
public static final String[] materialItemNames = new String[] {
"Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone",
"Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum", "Bronze Ingot", "Aluminum Brass Ingot", "Alumite Ingot", "Steel Ingot" };
public static final String[] materialItemNames = new String[] { "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone", "Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum", "Bronze Ingot", "Aluminum Brass Ingot", "Alumite Ingot", "Steel Ingot" };
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
@@ -285,4 +295,87 @@ public class TProxyClient extends TProxyCommon
{
return Minecraft.getMinecraftDir();
}
static int[][] slotTypes = { new int[] { 0, 3, 0 }, //Repair
new int[] { 1, 4, 0 }, //Pickaxe
new int[] { 2, 5, 0 }, //Shovel
new int[] { 2, 6, 0 }, //Axe
//new int[] {2, 9, 0}, //Lumber Axe
//new int[] {1, 7, 0}, //Ice Axe
new int[] { 3, 8, 0 }, //Mattock
new int[] { 1, 0, 1 }, //Broadsword
new int[] { 1, 1, 1 }, //Longsword
new int[] { 1, 2, 1 }, //Rapier
new int[] { 2, 3, 1 }, //Frying pan
new int[] { 2, 4, 1 } //Battlesign
};
static int[][] iconCoords = { new int[] { 0, 1, 2 }, new int[] { 13, 13, 13 }, //Repair
new int[] { 0, 0, 1 }, new int[] { 2, 3, 3 }, //Pickaxe
new int[] { 3, 0, 13 }, new int[] { 2, 3, 13 }, //Shovel
new int[] { 2, 0, 13 }, new int[] { 2, 3, 13 }, //Axe
//new int[] { 6, 0, 13 }, new int[] { 2, 3, 13 }, //Lumber Axe
//new int[] { 0, 0, 5 }, new int[] { 2, 3, 3 }, //Ice Axe
new int[] { 2, 0, 3 }, new int[] { 2, 3, 2 }, //Mattock
new int[] { 1, 0, 2 }, new int[] { 2, 3, 3 }, //Broadsword
new int[] { 1, 0, 3 }, new int[] { 2, 3, 3 }, //Longsword
new int[] { 1, 0, 4 }, new int[] { 2, 3, 3 }, //Rapier
new int[] { 4, 0, 13 }, new int[] { 2, 3, 13 }, //Frying Pan
new int[] { 5, 0, 13 }, new int[] { 2, 3, 13 } //Battlesign
};
static String[] toolNames = { "Repair and Modification", "Pickaxe", "Shovel", "Axe",
//"Lumber Axe",
//"Ice Axe",
"Mattock", "Broadsword", "Longsword", "Rapier", "Frying Pan", "Battlesign" };
static String[] toolDescriptions = { "The main way to repair or change your tools. Place a tool and a material on the left to get started.", "The Pickaxe is a basic mining tool. It is effective on stone and ores.\n\nRequired parts:\n- Pickaxe Head\n- Tool Binding\n- Handle", "The Shovel is a basic digging tool. It is effective on dirt, sand, and snow.\n\nRequired parts:\n- Shovel Head\n- Handle", "The Axe is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle",
//"The Lumber Axe is a broad chopping tool. It harvests wood in a wide range and can fell entire trees.\n\nRequired parts:\n- Broad Axe Head\n- Handle",
//"The Ice Axe is a tool for harvesting ice, mining, and attacking foes.\n\nSpecial Ability:\n- Wall Climb\nNatural Ability:\n- Ice Harvest\nDamage: Moderate\n\nRequired parts:\n- Pickaxe Head\n- Spike\n- Handle",
"The Cutter Mattock is a versatile farming tool. It is effective on wood, dirt, and plants.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle", "The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle", "The Longsword is a balanced weapon. It is useful for knocking enemies away or getting in and out of battle quickly.\n\nNatural Ability:\n- Charge Boost\nDamage: Moderate\nDurability: Moderate\n\nRequired parts:\n- Sword Blade\n- Hand Guard\n- Handle", "The Rapier is an offensive weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\n- Charge Boost\nDamage: High\nDurability: Low\n\nRequired parts:\n- Sword Blade\n- Crossbar\n- Handle", "The Frying is a heavy weapon that uses sheer weight to stun foes.\n\nSpecial Ability: Block\nNatural Ability: Bash\nShift+rClick: Place Frying Pan\nDamage: Low\nDurability: High\n\nRequired parts:\n- Pan\n- Handle",
//"The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nShift-rClick: Place sign\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Board\n- Handle"
"The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Sign Board\n- Handle" };
void addToolButtons ()
{
for (int i = 0; i < toolNames.length; i++)
{
addToolButton(slotTypes[i][0], slotTypes[i][1], slotTypes[i][2], iconCoords[i * 2], iconCoords[i * 2 + 1], toolNames[i], toolDescriptions[i]);
}
}
void addToolButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body)
{
TConstructRegistry.toolButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body));
}
void addRenderMappings ()
{
String[] partTypes = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze", "alumite", "steel" };
String[] effectTypes = { "diamond", "emerald", "redstone", "glowstone", "moss", "ice", "lava", "blaze", "necrotic", "electric", "lapis" };
for (int partIter = 0; partIter < partTypes.length; partIter++)
{
materialRenderMap(partIter, partTypes[partIter]);
}
for (int effectIter = 0; effectIter < effectTypes.length; effectIter++)
{
effectRenderMap(effectIter, effectTypes[effectIter]);
}
}
void materialRenderMap (int materialID, String partialLocation)
{
for (ToolCore tool : TConstructRegistry.getToolMapping())
{
tool.partTextures.put(materialID, tool.getToolTextureFile() + partialLocation);
}
}
void effectRenderMap (int materialID, String partialLocation)
{
for (ToolCore tool : TConstructRegistry.getToolMapping())
{
tool.effectTextures.put(materialID, tool.getToolTextureFile() + partialLocation);
}
}
}