Liquid Content

This commit is contained in:
mDiyo 2013-02-28 18:24:12 -08:00
parent 6b98bbb707
commit 361a5bf603
96 changed files with 732 additions and 386 deletions

View File

@ -36,4 +36,18 @@
<entry key="LavaTank.Gague.name">Hardened Glass</entry>
<entry key="LavaTank.Window.name">Hardened Window</entry>
<entry key="StorageMetals.Cobalt.name">Block of Cobalt</entry>
<entry key="StorageMetals.Ardite.name">Block of Ardite</entry>
<entry key="StorageMetals.Manyullyn.name">Block of Manyullyn</entry>
<entry key="StorageMetals.Copper.name">Block of Copper</entry>
<entry key="StorageMetals.Bronze.name">Block of Bronze</entry>
<entry key="StorageMetals.Tin.name">Block of Tin</entry>
<entry key="StorageMetals.Aluminum.name">Block of Aluminum</entry>
<entry key="StorageMetals.AlBrass.name">Block of Aluminum Brass</entry>
<entry key="StorageMetals.Alumite.name">Block of Alumite</entry>
<entry key="StorageMetals.Steel.name">Block of Steel</entry>
<entry key="item.tconstruct.blankpattern.pattern.name">Blank Pattern</entry>
<entry key="item.tconstruct.blankpattern.cast.name">Blank Cast</entry>
</properties>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

View File

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -47,10 +47,11 @@ public class PHConstruct {
oreSlag = config.getBlock("Ores Slag", 1475).getInt(1475);
craftedSoil = config.getBlock("Special Soil", 1476).getInt(1476);
searedTable = config.getBlock("Seared Table", 1477).getInt(1477);
//landmine = config.getBlock("Landmine", 1477).getInt(1477);
metalBlock = config.getBlock("Metal Storage", 1478).getInt(1478);
//landmine = config.getBlock("Landmine", 1481).getInt(1481);
ironFlowing = config.getBlock("Liquid Iron Flowing", 1478).getInt(1478);
ironStill = config.getBlock("Liquid Iron Still", 1479).getInt(1479);
ironFlowing = config.getBlock("Liquid Iron Flowing", 1504).getInt(1504);
ironStill = config.getBlock("Liquid Iron Still", 1505).getInt(1505);
goldFlowing = config.getBlock("Liquid Gold Flowing", 1480).getInt(1480);
goldStill = config.getBlock("Liquid Gold Still", 1481).getInt(1481);
copperFlowing = config.getBlock("Liquid Copper Flowing", 1482).getInt(1482);
@ -82,6 +83,7 @@ public class PHConstruct {
toolRod = config.getItem("Patterns and Misc", "Tool Rod", 14021).getInt(14021);
toolShard = config.getItem("Patterns and Misc", "Tool Shard", 14022).getInt(14022);
woodPattern = config.getItem("Patterns and Misc", "Wood Pattern", 14023).getInt(14023);
metalPattern = config.getItem("Patterns and Misc", "Metal Pattern", 14024).getInt(14024);
pickaxeHead = config.getItem("Tool Parts", "Pickaxe Head", 14026).getInt(14026);
shovelHead = config.getItem("Tool Parts", "Shovel Head", 14027).getInt(14027);
@ -161,12 +163,13 @@ public class PHConstruct {
public static int searedTable;
public static int craftedSoil;
public static int oreSlag;
public static int metalBlock;
//public static int axle;
//Traps
//public static int landmine;
//Liquids
//Liquids TODO: Redux
public static int ironFlowing;
public static int ironStill;
public static int goldFlowing;
@ -202,6 +205,7 @@ public class PHConstruct {
public static int toolRod;
public static int toolShard;
public static int woodPattern;
public static int metalPattern;
public static int manual;
public static int buckets;

View File

@ -34,7 +34,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
* @author: mDiyo
*/
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.5")
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.4.7_1.1.10")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tinker.tconstruct.TPacketHandler.class)
public class TConstruct
{

View File

@ -38,6 +38,7 @@ public class TContent implements IFuelHandler
public static Item toolRod;
public static Item toolShard;
public static Item woodPattern;
public static Item metalPattern;
public static Item manualBook;
public static Item buckets;
@ -83,6 +84,7 @@ public class TContent implements IFuelHandler
public static Block lavaTank;
public static Block searedBlock;
public static Block oreSlag;
public static Block metalBlock;
//Traps
public static Block landmine;
@ -126,7 +128,7 @@ public class TContent implements IFuelHandler
{
createEntities();
registerBlocks();
createItems();
registerItems();
addRenderMappings();
registerMaterials();
addToolRecipes();
@ -162,6 +164,10 @@ public class TContent implements IFuelHandler
craftedSoil.stepSound = Block.soundGravelFootstep;
GameRegistry.registerBlock(craftedSoil, tinker.tconstruct.items.CraftedSoilItemBlock.class, "CraftedSoil");
metalBlock = new TConstructBlock(PHConstruct.metalBlock, 128, Material.iron, 10.0F, 10);
metalBlock.stepSound = Block.soundMetalFootstep;
GameRegistry.registerBlock(metalBlock, tinker.tconstruct.items.MetalItemBlock.class, "MetalBlock");
//Smeltery
smeltery = new SmelteryBlock(PHConstruct.smeltery).setBlockName("Smeltery");
GameRegistry.registerBlock(smeltery, SmelteryItemBlock.class, "Smeltery");
@ -247,13 +253,14 @@ public class TContent implements IFuelHandler
GameRegistry.registerBlock(steelStill, "Liquid steel Still");
}
void createItems ()
void registerItems ()
{
blankPattern = new CraftingItem(PHConstruct.blankPattern, 96, craftingTexture).setItemName("tconstruct.BlankPattern");
blankPattern = new BlankPattern(PHConstruct.blankPattern, 96, craftingTexture).setItemName("tconstruct.blankpattern");
materials = new Materials(PHConstruct.materials, 128, craftingTexture).setItemName("tconstruct.Materials");
toolRod = new ToolPart(PHConstruct.toolRod, 0, craftingTexture).setItemName("tconstruct.ToolRod");
toolShard = new ToolShard(PHConstruct.toolShard, 64, craftingTexture).setItemName("tconstruct.ToolShard");
woodPattern = new Pattern(PHConstruct.woodPattern, 0, patternTexture).setItemName("tconstruct.Pattern");
metalPattern = new MetalPattern(PHConstruct.metalPattern, 64, patternTexture).setItemName("tconstruct.MetalPattern");
//stonePattern = new Pattern(PHTools.stonePattern, 64, patternTexture).setItemName("tconstruct.Pattern");
//netherPattern = new Pattern(PHTools.netherPattern, 128, patternTexture).setItemName("tconstruct.Pattern");
@ -290,7 +297,7 @@ public class TContent implements IFuelHandler
void addRenderMappings ()
{
String[] partTypes = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze" };
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++)
{
@ -330,11 +337,13 @@ public class TContent implements IFuelHandler
TConstructRegistry.addToolMaterial(7, "Netherrack", 1, 2, 131, 400, 1, 1.2F, 0, 1f);
TConstructRegistry.addToolMaterial(8, "Slime", 1, 3, 1500, 150, 0, 5.0F, 0, 0f);
TConstructRegistry.addToolMaterial(9, "Paper", 1, 0, 131, 200, 0, 0.1F, 0, 0f);
TConstructRegistry.addToolMaterial(10, "Cobalt", 2, 4, 800, 800, 3, 1.8F, 2, 0f);
TConstructRegistry.addToolMaterial(11, "Ardite", 2, 4, 800, 800, 3, 1.8F, 0, 0f);
TConstructRegistry.addToolMaterial(10, "Cobalt", 2, 4, 800, 800, 3, 1.75F, 2, 0f);
TConstructRegistry.addToolMaterial(11, "Ardite", 2, 4, 600, 800, 3, 2.0F, 0, 0f);
TConstructRegistry.addToolMaterial(12, "Manyullyn", 2, 5, 1200, 1000, 4, 2.5F, 0, 0f);
TConstructRegistry.addToolMaterial(13, "Copper", 1, 1, 180, 500, 2, 1.15F, 0, 0f);
TConstructRegistry.addToolMaterial(14, "Bronze", 1, 2, 250, 600, 2, 1.3F, 1, 0f);
TConstructRegistry.addToolMaterial(15, "Alumite", 2, 4, 550, 800, 3, 1.3F, 2, 0f);
TConstructRegistry.addToolMaterial(16, "Steel", 2, 3, 750, 800, 3, 1.3F, 2, 0f);
//Thaumcraft
TConstructRegistry.addToolMaterial(21, "Thaumium", 2, 2, 250, 600, 2, 1.3F, 1, 0f);
@ -342,24 +351,23 @@ public class TContent implements IFuelHandler
TConstructRegistry.addToolMaterial(22, "Heptazion", 2, 2, 300, 800, 1, 1.0F, 0, 0f);
TConstructRegistry.addToolMaterial(23, "Damascus Steel", 2, 3, 500, 600, 2, 1.35F, 1, 0f);
TConstructRegistry.addToolMaterial(24, "Angmallen", 2, 2, 300, 800, 2, 0.8F, 0, 0f);
TConstructRegistry.addToolMaterial(25, "Steel", 2, 3, 750, 800, 3, 1.3F, 2, 0f);
TConstructRegistry.addToolMaterial(26, "Promethium", 1, 1, 200, 400, 1, 1.0F, 0, 0.5f);
TConstructRegistry.addToolMaterial(27, "Deep Iron", 1, 2, 250, 600, 2, 1.3F, 1, 0f);
TConstructRegistry.addToolMaterial(28, "Oureclase", 2, 3, 750, 800, 2, 1.2F, 0, 0f);
TConstructRegistry.addToolMaterial(29, "Aredrite", 2, 3, 1000, 400, 2, 1.5F, 0, 1.0f);
TConstructRegistry.addToolMaterial(30, "Astral Silver", 1, 4, 35, 1200, 1, 0.5F, 0, 0f);
TConstructRegistry.addToolMaterial(31, "Carmot", 1, 4, 50, 1200, 1, 0.5F, 0, 0f);
TConstructRegistry.addToolMaterial(32, "Mithril", 2, 4, 1000, 900, 3, 1.25F, 3, 0f);
TConstructRegistry.addToolMaterial(33, "Orichalcum", 2, 5, 1350, 900, 3, 1.25F, 0, 0f);
TConstructRegistry.addToolMaterial(34, "Adamantine", 3, 6, 1550, 1000, 4, 1.5F, 1, 0f);
TConstructRegistry.addToolMaterial(35, "Atlarus", 3, 6, 1750, 1000, 4, 1.6F, 2, 0f);
TConstructRegistry.addToolMaterial(25, "Promethium", 1, 1, 200, 400, 1, 1.0F, 0, 0.5f);
TConstructRegistry.addToolMaterial(26, "Deep Iron", 1, 2, 250, 600, 2, 1.3F, 1, 0f);
TConstructRegistry.addToolMaterial(27, "Oureclase", 2, 3, 750, 800, 2, 1.2F, 0, 0f);
TConstructRegistry.addToolMaterial(28, "Aredrite", 2, 3, 1000, 400, 2, 1.5F, 0, 1.0f);
TConstructRegistry.addToolMaterial(29, "Astral Silver", 1, 4, 35, 1200, 1, 0.5F, 0, 0f);
TConstructRegistry.addToolMaterial(30, "Carmot", 1, 4, 50, 1200, 1, 0.5F, 0, 0f);
TConstructRegistry.addToolMaterial(31, "Mithril", 2, 4, 1000, 900, 3, 1.25F, 3, 0f);
TConstructRegistry.addToolMaterial(32, "Orichalcum", 2, 5, 1350, 900, 3, 1.25F, 0, 0f);
TConstructRegistry.addToolMaterial(33, "Adamantine", 3, 6, 1550, 1000, 4, 1.5F, 1, 0f);
TConstructRegistry.addToolMaterial(34, "Atlarus", 3, 6, 1750, 1000, 4, 1.6F, 2, 0f);
TConstructRegistry.addToolMaterial(36, "Black Steel", 2, 2, 500, 800, 2, 1.3F, 2, 0f);
TConstructRegistry.addToolMaterial(37, "Quicksilver", 2, 4, 1100, 1400, 3, 1.0F, 1, 0f);
TConstructRegistry.addToolMaterial(38, "Haderoth", 2, 4, 1250, 1200, 3, 1.0F, 2, 0f);
TConstructRegistry.addToolMaterial(39, "Celenegil", 3, 5, 1600, 1400, 3, 1.0F, 2, 0f);
TConstructRegistry.addToolMaterial(40, "Tartarite", 3, 7, 3000, 1400, 5, 1.6667F, 4, 0f);
TConstructRegistry.addToolMaterial(35, "Black Steel", 2, 2, 500, 800, 2, 1.3F, 2, 0f);
TConstructRegistry.addToolMaterial(36, "Quicksilver", 2, 4, 1100, 1400, 3, 1.0F, 1, 0f);
TConstructRegistry.addToolMaterial(37, "Haderoth", 2, 4, 1250, 1200, 3, 1.0F, 2, 0f);
TConstructRegistry.addToolMaterial(38, "Celenegil", 3, 5, 1600, 1400, 3, 1.0F, 2, 0f);
TConstructRegistry.addToolMaterial(39, "Tartarite", 3, 7, 3000, 1400, 5, 1.6667F, 4, 0f);
PatternBuilder pb = PatternBuilder.instance;
pb.registerFullMaterial(Block.planks, 2, "Wood", new ItemStack(Item.stick), new ItemStack(Item.stick), 0);
@ -380,10 +388,10 @@ public class TContent implements IFuelHandler
}
public static Item[] patternOutputs;
public static LiquidStack[] liquids;
void addToolRecipes ()
{
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, largeGuard, medGuard, crossbar, binding, frypanHead, signHead };
ToolBuilder tb = ToolBuilder.instance;
@ -417,20 +425,67 @@ public class TContent implements IFuelHandler
tb.registerToolMod(new ModBlaze(new ItemStack[] { new ItemStack(Item.blazePowder), new ItemStack(Item.blazePowder) }, 7, 2));
tb.registerToolMod(new ModBoolean(new ItemStack[] { new ItemStack(materials, 1, 7) }, 6, "Lava", "\u00a74", "Auto-Smelt"));
tb.registerToolMod(new ModInteger(new ItemStack[] { new ItemStack(materials, 1, 8) }, 8, "Necrotic", 1, "\u00a78", "Life Steal"));
ItemStack ingotcast = new ItemStack(metalPattern, 1, 0);
LiquidCasting lc = LiquidCasting.instance;
//Blank
lc.addCastingRecipe(new ItemStack(blankPattern, 1, 1), new LiquidStack(alBrassStill.blockID, 1, 0), 50);
//Ingots
lc.addCastingRecipe(new ItemStack(Item.ingotIron), new LiquidStack(ironStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(Item.ingotGold), new LiquidStack(goldStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 9), new LiquidStack(copperStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 10), new LiquidStack(tinStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 11), new LiquidStack(aluminumStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 3), new LiquidStack(cobaltStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 4), new LiquidStack(arditeStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 5), new LiquidStack(manyullynStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 13), new LiquidStack(bronzeStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 14), new LiquidStack(alBrassStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 15), new LiquidStack(alumiteStill.blockID, 1, 0), ingotcast, 50);
lc.addCastingRecipe(new ItemStack(materials, 1, 16), new LiquidStack(steelStill.blockID, 1, 0), ingotcast, 50);
liquids = new LiquidStack[] {
new LiquidStack(ironStill, 1),
new LiquidStack(copperStill, 1),
new LiquidStack(cobaltStill, 1),
new LiquidStack(arditeStill, 1),
new LiquidStack(manyullynStill, 1),
new LiquidStack(bronzeStill, 1),
new LiquidStack(alumiteStill, 1),
new LiquidStack(steelStill, 1)
};
int[] liquidDamage = new int[] {
2, 13, 10, 11, 12, 14, 15, 16
};
for (int iter = 0; iter < patternOutputs.length; iter++)
{
ItemStack cast = new ItemStack(metalPattern, 1, iter+1);
for (int iterTwo = 0; iterTwo < liquids.length; iterTwo++)
{
lc.addCastingRecipe(new ItemStack(patternOutputs[iter], 1, liquidDamage[iterTwo]), liquids[iterTwo], cast, 50);
}
}
}
void addSmelteryRecipes()
{
Smeltery.addMelting(Block.oreIron, 0, 600, new LiquidStack(ironStill.blockID, 2125, 0));
Smeltery.addMelting(Block.oreGold, 0, 550, new LiquidStack(goldStill.blockID, 2125, 0));
Smeltery.addMelting(new ItemStack(Item.ingotIron, 8), Block.blockSteel.blockID, 0, 500, new LiquidStack(ironStill.blockID, 125, 0));
Smeltery.addMelting(new ItemStack(Item.ingotGold, 8), Block.blockGold.blockID, 0, 450, new LiquidStack(goldStill.blockID, 125, 0));
Smeltery.addMelting(Block.blockSteel, 0, 500, new LiquidStack(ironStill.blockID, 1125, 0));
Smeltery.addMelting(Block.blockGold, 0, 450, new LiquidStack(goldStill.blockID, 1125, 0));
Smeltery.addMelting(oreSlag, 3, 550, new LiquidStack(copperStill.blockID, 2125, 0));
Smeltery.addMelting(oreSlag, 4, 275, new LiquidStack(tinStill.blockID, 2125, 0));
Smeltery.addMelting(oreSlag, 5, 350, new LiquidStack(aluminumStill.blockID, 125, 0));
//Ore
Smeltery.addMelting(Block.oreIron, 0, 600, new LiquidStack(ironStill.blockID, 250, 0));
Smeltery.addMelting(Block.oreGold, 0, 550, new LiquidStack(goldStill.blockID, 250, 0));
//Ingots
Smeltery.addMelting(new ItemStack(Item.ingotIron, 8), Block.blockSteel.blockID, 0, 500, new LiquidStack(ironStill.blockID, 250, 0));
Smeltery.addMelting(new ItemStack(Item.ingotGold, 8), Block.blockGold.blockID, 0, 450, new LiquidStack(goldStill.blockID, 250, 0));
//Blocks
Smeltery.addMelting(Block.blockSteel, 0, 600, new LiquidStack(ironStill.blockID, 2250, 0));
Smeltery.addMelting(Block.blockGold, 0, 550, new LiquidStack(goldStill.blockID, 2250, 0));
Smeltery.addMelting(Block.obsidian, 0, 800, new LiquidStack(obsidianStill.blockID, 250, 0));
//Alloys
Smeltery.addAlloyMixing(new LiquidStack(bronzeStill.blockID, 4, 0), new LiquidStack(copperStill.blockID, 3, 0), new LiquidStack(tinStill.blockID, 1, 0));
Smeltery.addAlloyMixing(new LiquidStack(alBrassStill.blockID, 4, 0), new LiquidStack(aluminumStill.blockID, 3, 0), new LiquidStack(copperStill.blockID, 1, 0));
}
@ -454,9 +509,6 @@ public class TContent implements IFuelHandler
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blankPattern, 1, 0), "ps", "sp", 'p', "plankWood", 's', Item.stick));
GameRegistry.addRecipe(new ItemStack(manualBook), "wp", 'w', new ItemStack(blankPattern, 1, 0), 'p', Item.paper);
/*GameRegistry.addRecipe(new ItemStack(stonePattern, 1, 0), "ps", "sp", 'p', Block.cobblestone, 's', new ItemStack(toolRod, 1, 1));
GameRegistry.addRecipe(new ItemStack(stonePattern, 1, 0), "ps", "sp", 'p', Block.stone, 's', new ItemStack(toolRod, 1, 1));
GameRegistry.addRecipe(new ItemStack(netherPattern, 1, 0), "ps", "sp", 'p', Block.netherrack, 's', new ItemStack(toolRod, 1, 7));*/
GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); //Paper stack
GameRegistry.addRecipe(new ItemStack(materials, 1, 6), "ppp", "ppp", "ppp", 'p', Block.cobblestoneMossy); //Moss ball
@ -475,10 +527,18 @@ public class TContent implements IFuelHandler
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 4, new ItemStack(materials, 1, 10), 0.5f);
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 5, new ItemStack(materials, 1, 12), 0.5f);
/*for (int i = 0; i < 12; i++)
{
GameRegistry.addRecipe(new ItemStack(TConstructContent.woodPattern, 1, i + 1), "s", 's', new ItemStack(TConstructContent.woodPattern, 1, i));
}*/
//Smeltery
ItemStack searedBrick = new ItemStack(materials, 1, 2);
GameRegistry.addRecipe(new ItemStack(smeltery, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick);
GameRegistry.addRecipe(new ItemStack(smeltery, 1, 1), "b b", "b b", "bbb", 'b', searedBrick);
GameRegistry.addRecipe(new ItemStack(smeltery, 1, 2), "bb", "bb", 'b', searedBrick);
GameRegistry.addRecipe(new ItemStack(lavaTank, 1, 0), "bbb", "bgb", "bbb", 'b', searedBrick, 'g', Block.glass);
GameRegistry.addRecipe(new ItemStack(lavaTank, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', Block.glass);
GameRegistry.addRecipe(new ItemStack(lavaTank, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', Block.glass);
GameRegistry.addRecipe(new ItemStack(searedBlock, 1, 0), "bbb", "b b", "b b", 'b', searedBrick);
GameRegistry.addRecipe(new ItemStack(searedBlock, 1, 1), "b b", " b ", 'b', searedBrick);
}
void setupToolTabs ()
@ -530,10 +590,17 @@ public class TContent implements IFuelHandler
//"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",
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: High\nDurability: High\n\nRequired parts:\n- Pan\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" };
@ -565,8 +632,21 @@ public class TContent implements IFuelHandler
OreDictionary.registerOre("ingotTin", new ItemStack(materials, 1, 10));
OreDictionary.registerOre("ingotAluminum", new ItemStack(materials, 1, 11));
OreDictionary.registerOre("naturalAluminum", new ItemStack(materials, 1, 12));
OreDictionary.registerOre("ingotAluminium", new ItemStack(materials, 1, 11));
OreDictionary.registerOre("naturalAluminium", new ItemStack(materials, 1, 12));
OreDictionary.registerOre("ingotBronze", new ItemStack(materials, 1, 13));
OreDictionary.registerOre("ingotAluminumBrass", new ItemStack(materials, 1, 14));
OreDictionary.registerOre("ingotAlumite", new ItemStack(materials, 1, 15));
OreDictionary.registerOre("ingotSteel", new ItemStack(materials, 1, 16));
OreDictionary.registerOre("blockCobalt", new ItemStack(metalBlock, 1, 0));
OreDictionary.registerOre("blockArdite", new ItemStack(metalBlock, 1, 1));
OreDictionary.registerOre("blockManyullyn", new ItemStack(metalBlock, 1, 2));
OreDictionary.registerOre("blockCopper", new ItemStack(metalBlock, 1, 3));
OreDictionary.registerOre("blockBronze", new ItemStack(metalBlock, 1, 4));
OreDictionary.registerOre("blockTin", new ItemStack(metalBlock, 1, 5));
OreDictionary.registerOre("blockAluminum", new ItemStack(metalBlock, 1, 6));
OreDictionary.registerOre("blockAluminumBrass", new ItemStack(metalBlock, 1, 7));
OreDictionary.registerOre("blockAlumite", new ItemStack(metalBlock, 1, 8));
OreDictionary.registerOre("blockSteel", new ItemStack(metalBlock, 1, 9));
}
public void modIntegration ()
@ -587,12 +667,135 @@ public class TContent implements IFuelHandler
for (ItemStack copper : copperIngots)
{
PatternBuilder.instance.registerMaterial(copper, 2, "Copper");
Smeltery.addMelting(copper, metalBlock.blockID, 3, 450, new LiquidStack(copperStill.blockID, 250, 0));
}
ArrayList<ItemStack> tinIngots = OreDictionary.getOres("ingotTin");
for (ItemStack tin : tinIngots)
{
Smeltery.addMelting(tin, metalBlock.blockID, 5, 175, new LiquidStack(tinStill.blockID, 250, 0));
}
ArrayList<ItemStack> bronzeIngots = OreDictionary.getOres("ingotBronze");
for (ItemStack bronze : bronzeIngots)
{
PatternBuilder.instance.registerMaterial(bronze, 2, "Bronze");
Smeltery.addMelting(bronze, metalBlock.blockID, 4, 500, new LiquidStack(bronzeStill.blockID, 250, 0));
}
ArrayList<ItemStack> cobaltIngots = OreDictionary.getOres("ingotCobalt");
for (ItemStack cobalt : cobaltIngots)
{
Smeltery.addMelting(cobalt, metalBlock.blockID, 0, 650, new LiquidStack(cobaltStill.blockID, 250, 0));
}
ArrayList<ItemStack> arditeIngots = OreDictionary.getOres("ingotArdite");
for (ItemStack ardite : arditeIngots)
{
Smeltery.addMelting(ardite, metalBlock.blockID, 1, 650, new LiquidStack(arditeStill.blockID, 250, 0));
}
ArrayList<ItemStack> aluminumIngots = OreDictionary.getOres("ingotAluminum");
for (ItemStack aluminum : aluminumIngots)
{
Smeltery.addMelting(aluminum, metalBlock.blockID, 6, 250, new LiquidStack(aluminumStill.blockID, 250, 0));
}
ArrayList<ItemStack> aluminumRaw = OreDictionary.getOres("naturalAluminum");
for (ItemStack aluminum : aluminumRaw)
{
Smeltery.addMelting(aluminum, metalBlock.blockID, 6, 250, new LiquidStack(aluminumStill.blockID, 250, 0));
}
ArrayList<ItemStack> manyullynIngots = OreDictionary.getOres("ingotManyullyn");
for (ItemStack manyullyn : manyullynIngots)
{
Smeltery.addMelting(manyullyn, metalBlock.blockID, 2, 750, new LiquidStack(manyullynStill.blockID, 250, 0));
}
ArrayList<ItemStack> alBrassIngots = OreDictionary.getOres("ingotAluminumBrass");
for (ItemStack alBrass : alBrassIngots)
{
Smeltery.addMelting(alBrass, metalBlock.blockID, 7, 350, new LiquidStack(alBrassStill.blockID, 250, 0));
}
ArrayList<ItemStack> alumiteIngots = OreDictionary.getOres("ingotAlumite");
for (ItemStack alumite : alumiteIngots)
{
Smeltery.addMelting(alumite, metalBlock.blockID, 8, 500, new LiquidStack(alumiteStill.blockID, 250, 0));
}
ArrayList<ItemStack> steelIngots = OreDictionary.getOres("ingotSteel");
for (ItemStack steel : steelIngots)
{
Smeltery.addMelting(steel, metalBlock.blockID, 9, 500, new LiquidStack(steelStill.blockID, 250, 0));
}
ArrayList<ItemStack> cobaltOres = OreDictionary.getOres("oreCobalt");
for (ItemStack cobalt : cobaltOres)
{
Smeltery.addMelting(cobalt, 750, new LiquidStack(cobaltStill.blockID, 250, 0));
}
ArrayList<ItemStack> arditeOres = OreDictionary.getOres("oreArdite");
for (ItemStack ardite : arditeOres)
{
Smeltery.addMelting(ardite, 750, new LiquidStack(arditeStill.blockID, 250, 0));
}
ArrayList<ItemStack> copperOres = OreDictionary.getOres("oreCopper");
for (ItemStack copper : copperOres)
{
Smeltery.addMelting(copper, 750, new LiquidStack(copperStill.blockID, 250, 0));
}
ArrayList<ItemStack> tinOres = OreDictionary.getOres("oreTin");
for (ItemStack tin : tinOres)
{
Smeltery.addMelting(tin, 750, new LiquidStack(tinStill.blockID, 250, 0));
}
ArrayList<ItemStack> aluminumOres = OreDictionary.getOres("oreAluminum");
for (ItemStack aluminum : aluminumOres)
{
Smeltery.addMelting(aluminum, 750, new LiquidStack(aluminumStill.blockID, 250, 0));
}
ArrayList<ItemStack> copperblocks = OreDictionary.getOres("blockCopper");
for (ItemStack copper : copperblocks)
{
Smeltery.addMelting(copper, 450, new LiquidStack(copperStill.blockID, 2250, 0));
}
ArrayList<ItemStack> tinblocks = OreDictionary.getOres("blockTin");
for (ItemStack tin : tinblocks)
{
Smeltery.addMelting(tin, 175, new LiquidStack(tinStill.blockID, 2250, 0));
}
ArrayList<ItemStack> bronzeblocks = OreDictionary.getOres("blockBronze");
for (ItemStack bronze : bronzeblocks)
{
Smeltery.addMelting(bronze, 500, new LiquidStack(bronzeStill.blockID, 2250, 0));
}
ArrayList<ItemStack> cobaltblocks = OreDictionary.getOres("blockCobalt");
for (ItemStack cobalt : cobaltblocks)
{
Smeltery.addMelting(cobalt, 650, new LiquidStack(cobaltStill.blockID, 2250, 0));
}
ArrayList<ItemStack> arditeblocks = OreDictionary.getOres("blockArdite");
for (ItemStack ardite : arditeblocks)
{
Smeltery.addMelting(ardite, 650, new LiquidStack(arditeStill.blockID, 2250, 0));
}
ArrayList<ItemStack> aluminumblocks = OreDictionary.getOres("blockAluminum");
for (ItemStack aluminum : aluminumblocks)
{
Smeltery.addMelting(aluminum, 250, new LiquidStack(aluminumStill.blockID, 2250, 0));
}
ArrayList<ItemStack> manyullynblocks = OreDictionary.getOres("blockManyullyn");
for (ItemStack manyullyn : manyullynblocks)
{
Smeltery.addMelting(manyullyn, 750, new LiquidStack(manyullynStill.blockID, 2250, 0));
}
ArrayList<ItemStack> alBrassblocks = OreDictionary.getOres("blockAluminumBrass");
for (ItemStack alBrass : alBrassblocks)
{
Smeltery.addMelting(alBrass, 350, new LiquidStack(alBrassStill.blockID, 2250, 0));
}
ArrayList<ItemStack> alumiteblocks = OreDictionary.getOres("blockAlumite");
for (ItemStack alumite : alumiteblocks)
{
Smeltery.addMelting(alumite, 500, new LiquidStack(alumiteStill.blockID, 2250, 0));
}
ArrayList<ItemStack> steelblocks = OreDictionary.getOres("blockSteel");
for (ItemStack steel : steelblocks)
{
Smeltery.addMelting(steel, 500, new LiquidStack(steelStill.blockID, 2250, 0));
}
/* IC2 */
@ -632,7 +835,7 @@ public class TContent implements IFuelHandler
public static String liquidTexture = "/tinkertextures/LiquidWhite.png";
public static String craftingTexture = "/tinkertextures/materials.png";
public static String patternTexture = "/tinkertextures/tools/patterns.png";
public static String patternTexture = "/tinkertextures/patterns.png";
public static String baseHeads = "/tinkertextures/tools/baseheads.png";
public static String baseAccessories = "/tinkertextures/tools/baseaccessories.png";
public static String swordparts = "/tinkertextures/tools/swordparts.png";

View File

@ -4,6 +4,7 @@ import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -84,7 +85,7 @@ public class SearedBlock extends InventoryBlock
{
//System.out.println("Castses");
CastingTableLogic logic = (CastingTableLogic) world.getBlockTileEntity(x, y, z);
if (!logic.isStackInSlot(0))
if (!logic.isStackInSlot(0) && !logic.isStackInSlot(1))
{
ItemStack stack = player.getCurrentEquippedItem();
stack = player.inventory.decrStackSize(player.inventory.currentItem, 1);
@ -92,6 +93,18 @@ public class SearedBlock extends InventoryBlock
}
else
{
if (logic.isStackInSlot(1))
{
ItemStack stack = logic.decrStackSize(1, 1);
if (stack != null)
addItemToInventory(player, world, x, y, z, stack);
}
else if (logic.isStackInSlot(0))
{
ItemStack stack = logic.decrStackSize(0, 1);
if (stack != null)
addItemToInventory(player, world, x, y, z, stack);
}
/*ItemStack insideStack = logic.takeItemInColumn(0);
if (insideStack == null)
@ -110,6 +123,16 @@ public class SearedBlock extends InventoryBlock
return true;
}
protected void addItemToInventory(EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
{
if (!world.isRemote)
{
EntityItem entityitem = new EntityItem(world, (double)x + 0.5D, (double)y + 0.9325D, (double)z + 0.5D, stack);
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
}
}
/* Rendering */
@Override
public int getRenderType ()

View File

@ -14,7 +14,7 @@ public abstract class LiquidMetalStill extends BlockStationary implements ILiqui
public LiquidMetalStill(int id)
{
super(id, Material.lava);
this.setCreativeTab(TConstruct.blockTab);
//this.setCreativeTab(TConstruct.blockTab);
}
@Override

View File

@ -51,6 +51,15 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
ItemStack stack = logic.getStackInSlot(0);
if (stack != null)
renderItem(logic, stack);
stack = logic.getStackInSlot(1);
if (stack != null)
renderItem(logic, stack);
}
void renderItem(CastingTableLogic logic, ItemStack stack)
{
FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
entityitem.func_92014_d().stackSize = 1;
@ -59,71 +68,11 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
GL11.glTranslatef(1F, 1.478F, 0.55F);
GL11.glRotatef(90F, 1, 0F, 0F);
GL11.glScalef(2F, 2F, 2F);
/*GL11.glTranslatef(-0.453125F * (float)Direction.offsetX[logic.hangingDirection], -0.18F, -0.453125F * (float)Direction.offsetZ[logic.hangingDirection]);
GL11.glRotatef(180.0F + logic.rotationYaw, 0.0F, 1.0F, 0.0F);
GL11.glRotatef((float)(-90 * logic.getRotation()), 0.0F, 0.0F, 1.0F);
switch (logic.getRotation())
{
case 1:
GL11.glTranslatef(-0.16F, -0.16F, 0.0F);
break;
case 2:
GL11.glTranslatef(0.0F, -0.32F, 0.0F);
break;
case 3:
GL11.glTranslatef(0.16F, -0.16F, 0.0F);
}*/
/*if (var3.func_92014_d().getItem() == Item.map)
{
this.renderManager.renderEngine.bindTexture(this.renderManager.renderEngine.getTexture("/misc/mapbg.png"));
Tessellator var4 = Tessellator.instance;
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
GL11.glScalef(0.00390625F, 0.00390625F, 0.00390625F);
GL11.glTranslatef(-65.0F, -107.0F, -3.0F);
GL11.glNormal3f(0.0F, 0.0F, -1.0F);
var4.startDrawingQuads();
byte var5 = 7;
var4.addVertexWithUV((double)(0 - var5), (double)(128 + var5), 0.0D, 0.0D, 1.0D);
var4.addVertexWithUV((double)(128 + var5), (double)(128 + var5), 0.0D, 1.0D, 1.0D);
var4.addVertexWithUV((double)(128 + var5), (double)(0 - var5), 0.0D, 1.0D, 0.0D);
var4.addVertexWithUV((double)(0 - var5), (double)(0 - var5), 0.0D, 0.0D, 0.0D);
var4.draw();
MapData var6 = Item.map.getMapData(var3.func_92014_d(), logic.worldObj);
if (var6 != null)
{
this.renderManager.itemRenderer.mapItemRenderer.renderMap((EntityPlayer)null, this.renderManager.renderEngine, var6);
}
}
else*/
//{
/*if (var3.func_92014_d().getItem() == Item.compass)
{
double var8 = TextureCompassFX.field_82391_c.field_76868_i;
double var9 = TextureCompassFX.field_82391_c.field_76866_j;
TextureCompassFX.field_82391_c.field_76868_i = 0.0D;
TextureCompassFX.field_82391_c.field_76866_j = 0.0D;
TextureCompassFX.func_82390_a(logic.xCoord, logic.zCoord, (double)MathHelper.wrapAngleTo180_float((float)(180)), false, true);
TextureCompassFX.field_82391_c.field_76868_i = var8;
TextureCompassFX.field_82391_c.field_76866_j = var9;
this.renderManager.renderEngine.updateDynamicTexture(TextureCompassFX.field_82391_c, -1);
}*/
RenderItem.field_82407_g = true;
RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.field_82407_g = false;
/*if (var3.func_92014_d().getItem() == Item.compass)
{
TextureCompassFX.field_82391_c.onTick();
this.renderManager.renderEngine.updateDynamicTexture(TextureCompassFX.field_82391_c, -1);
}*/
//}
GL11.glPopMatrix();
}
}
}

View File

@ -173,6 +173,9 @@ public class TProxyClient extends TProxyCommon
String internalName = "item.tconstruct.Pattern." + patterns[i] + ".name";
String visibleName = patternNames[i] + " Pattern";
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
internalName = "item.tconstruct.MetalPattern." + patterns[i] + ".name";
visibleName = patternNames[i] + " Cast";
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
@ -219,9 +222,13 @@ public class TProxyClient extends TProxyCommon
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" };
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" };
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" };
@ -229,9 +236,9 @@ public class TProxyClient extends TProxyCommon
public static final String[] materialNames = new String[] { " Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" };
public static final String[] patterns = new String[] { "blank", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
public static final String[] patternNames = new String[] { "Blank", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" };
public static final String[] patternNames = new String[] { "Ingot", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" };
public static Document diary;
public static Document volume1;

View File

@ -23,6 +23,7 @@ public class PatternShaperGui extends GuiContainer
{
PatternShaperLogic logic;
int patternIndex;
public PatternShaperGui(InventoryPlayer inventoryplayer, PatternShaperLogic shaper, World world, int x, int y, int z)
{
super(new PatternShaperContainer(inventoryplayer, shaper));
@ -73,7 +74,6 @@ public class PatternShaperGui extends GuiContainer
//for (int iter = 0; iter < TConstructContent.patternOutputs.length; iter++)
//{
/*ToolGuiElement element = TConstruct.toolButtons.get(iter);
GuiButtonTool button = new GuiButtonTool(iter, cornerX - 110 + 22 * (iter % 5), cornerY + 22 * (iter / 5), element.buttonIconX, element.buttonIconY, element.texture); // Repair
this.controlList.add(button);*/
@ -81,6 +81,12 @@ public class PatternShaperGui extends GuiContainer
}
protected void actionPerformed (GuiButton button)
{
ItemStack pattern = logic.getStackInSlot(0);
if (pattern != null && pattern.getItem() == TContent.blankPattern)
{
int meta = pattern.getItemDamage();
if (meta == 0)
{
if (button.id == 0)
{
@ -94,13 +100,29 @@ public class PatternShaperGui extends GuiContainer
if (patternIndex < 0)
patternIndex = TContent.patternOutputs.length-1;
}
ItemStack pattern = logic.getStackInSlot(0);
if (pattern != null && pattern.getItem() == TContent.blankPattern)
{
ItemStack stack = new ItemStack(TContent.woodPattern, 1, patternIndex + 1);
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}
else if (meta == 1)
{
if (button.id == 0)
{
patternIndex++;
if (patternIndex > TContent.patternOutputs.length)
patternIndex = 0;
}
else if (button.id == 1)
{
patternIndex--;
if (patternIndex < 0)
patternIndex = TContent.patternOutputs.length;
}
ItemStack stack = new ItemStack(TContent.metalPattern, 1, patternIndex);
logic.setInventorySlotContents(1, stack);
updateServer(stack);
}
}
}
void updateServer (ItemStack stack)

View File

@ -1,112 +0,0 @@
package tinker.tconstruct.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
public class PatternShaperInventory implements IInventory
{
/** A list of one item containing the result of the crafting formula */
private ItemStack[] inventory = new ItemStack[2];
/**
* Returns the number of slots in the inventory.
*/
public int getSizeInventory()
{
return inventory.length;
}
/**
* Returns the stack in slot i
*/
public ItemStack getStackInSlot(int slot)
{
return this.inventory[slot];
}
/**
* Returns the name of the inventory.
*/
public String getInvName()
{
return "crafters.PatternShaper";
}
/**
* Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
* new stack.
*/
public ItemStack decrStackSize(int slot, int number)
{
if (this.inventory[slot] != null)
{
ItemStack stack = this.inventory[slot];
this.inventory[slot] = null;
//if (slot == 1)
//decrStackSize(0, 1);
return stack;
}
else
{
return null;
}
}
public boolean isStackInSlot(int slot)
{
return inventory[slot] != null;
}
/**
* When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
* like when you close a workbench GUI.
*/
public ItemStack getStackInSlotOnClosing(int slot)
{
if (this.inventory[0] != null)
{
ItemStack stack = this.inventory[0];
this.inventory[0] = null;
return stack;
}
else
{
return null;
}
}
/**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
*/
public void setInventorySlotContents(int slot, ItemStack stack)
{
this.inventory[slot] = stack;
}
/**
* Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
* this more of a set than a get?*
*/
public int getInventoryStackLimit()
{
return 64;
}
/**
* Called when an the contents of an Inventory change, usually
*/
public void onInventoryChanged() {}
/**
* Do not make give this method the name canInteractWith because it clashes with Container
*/
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
{
return true;
}
public void openChest() {}
public void closeChest() {}
}

View File

@ -5,11 +5,11 @@ import net.minecraftforge.liquids.LiquidStack;
public class CastingRecipe
{
public final ItemStack output;
public final LiquidStack castingMetal;
public final ItemStack cast;
public final boolean consumeCast;
public final int coolTime;
public ItemStack output;
public LiquidStack castingMetal;
public ItemStack cast;
public boolean consumeCast;
public int coolTime;
public CastingRecipe(ItemStack replacement, LiquidStack metal, ItemStack cast, boolean consume, int delay)
{
@ -22,9 +22,14 @@ public class CastingRecipe
public boolean matches(LiquidStack metal, ItemStack cast)
{
if (metal.isLiquidEqual(metal) && metal.amount >= castingMetal.amount && ItemStack.areItemStacksEqual(this.cast, cast))
if (castingMetal.isLiquidEqual(metal) && metal.amount >= castingMetal.amount && ItemStack.areItemStacksEqual(this.cast, cast))
return true;
else
return false;
}
public ItemStack getResult()
{
return output.copy();
}
}

View File

@ -1,6 +1,9 @@
package tinker.tconstruct.crafting;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.liquids.LiquidStack;
@ -10,6 +13,7 @@ public class LiquidCasting
{
public static LiquidCasting instance = new LiquidCasting();
private ArrayList<CastingRecipe> casts = new ArrayList<CastingRecipe>();
private HashMap<List<Integer>, Float> materialReduction = new HashMap<List<Integer>, Float>();
public static void addCastingRecipe(ItemStack replacement, LiquidStack metal, ItemStack cast, boolean consume, int delay)
{
@ -40,4 +44,13 @@ public class LiquidCasting
}
return null;
}
public float getMaterialReduction(LiquidStack metal)
{
if (materialReduction.containsKey(Arrays.asList(metal.itemID, metal.itemMeta)))
{
return materialReduction.get(Arrays.asList(metal.itemID, metal.itemMeta));
}
return 1f;
}
}

View File

@ -19,6 +19,17 @@ public class Smeltery
private HashMap<List<Integer>, ItemStack> renderIndex = new HashMap<List<Integer>, ItemStack>();
private ArrayList<AlloyMix> alloys = new ArrayList<AlloyMix>();
/** Adds mappings between an itemstack and its liquid
*
* @param stack The itemstack to liquify
* @param temperature How hot the block should be before liquifying
* @param liquid The result of the process
*/
public static void addMelting(ItemStack stack, int temperature, LiquidStack liquid)
{
addMelting(stack, stack.itemID, stack.getItemDamage(), temperature, liquid);
}
/** Adds mappings between a block and its liquid
*
* @param blockID The ID of the block to liquify and render

View File

@ -0,0 +1,32 @@
package tinker.tconstruct.items;
import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
public class BlankPattern extends CraftingItem
{
public BlankPattern(int id, int icon, String tex)
{
super(id, icon, tex);
this.setHasSubtypes(true);
this.setMaxDamage(0);
}
public String getItemNameIS(ItemStack stack)
{
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 2);
return getItemName() + "." +patternTypes[arr];
}
public void getSubItems (int id, CreativeTabs tab, List list)
{
for (int i = 0; i < 2; i++)
list.add(new ItemStack(id, 1, i));
}
public static final String[] patternTypes = new String[] {
"pattern", "cast" };
}

View File

@ -30,17 +30,17 @@ public class Materials extends Item
public String getItemNameIS(ItemStack stack)
{
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, 13);
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, materialNames.length);
return getItemName() + "." +materialNames[arr];
}
public void getSubItems(int id, CreativeTabs tab, List list)
{
for (int i = 0; i < 13; i++)
for (int i = 0; i < materialNames.length; i++)
list.add(new ItemStack(id, 1, i));
}
public static final String[] materialNames = new String[] {
"PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum" };
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot" };
}

View File

@ -0,0 +1,29 @@
package tinker.tconstruct.items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class MetalItemBlock extends ItemBlock
{
public static final String blockType[] =
{
"Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Tin", "Aluminum", "AlBrass", "Alumite", "Steel"
};
public MetalItemBlock(int id)
{
super(id);
setMaxDamage(0);
setHasSubtypes(true);
}
public int getMetadata(int meta)
{
return meta;
}
public String getItemNameIS(ItemStack itemstack)
{
return (new StringBuilder()).append("StorageMetals.").append(blockType[itemstack.getItemDamage()]).toString();
}
}

View File

@ -0,0 +1,21 @@
package tinker.tconstruct.items;
import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
public class MetalPattern extends Pattern
{
public MetalPattern(int id, int icon, String tex)
{
super(id, icon, tex);
}
public void getSubItems (int id, CreativeTabs tab, List list)
{
for (int i = 0; i < patternName.length; i++)
list.add(new ItemStack(id, 1, i));
}
}

View File

@ -33,7 +33,7 @@ public class Pattern extends CraftingItem
}
public static final String[] patternName = new String[] {
"blank", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
"ingot", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign" };
public void getSubItems (int id, CreativeTabs tab, List list)
{
@ -64,10 +64,6 @@ public class Pattern extends CraftingItem
else
list.add("Material Cost: "+cost);
}
/*else
{
list.add("Temporary: Craft any pattern to get another");
}*/
}
//2 for full material, 1 for half.
@ -75,6 +71,7 @@ public class Pattern extends CraftingItem
{
switch (meta)
{
case 0: return 2;
case 1: return 1;
case 2: return 2;
case 3: return 2;
@ -91,18 +88,14 @@ public class Pattern extends CraftingItem
}
}
@Override
public ItemStack getPatternOutput (ItemStack stack, MaterialSet set)
{
int type = stack.getItemDamage();
if (type != 0 && type < TContent.patternOutputs.length + 1)
{
System.out.println("Returning type");
return new ItemStack(TContent.patternOutputs[type - 1], 1, set.materialID);
}
System.out.println("Returning null");
return null;
}
}

View File

@ -20,7 +20,7 @@ public class PatternManual extends CraftingItem
public PatternManual(int id)
{
super(id, 192, TContent.craftingTexture);
super(id, 176, TContent.craftingTexture);
setItemName("tconstruct.PatternManual");
}

View File

@ -11,12 +11,15 @@ import net.minecraftforge.liquids.ILiquidTank;
import net.minecraftforge.liquids.LiquidStack;
import tinker.common.IPattern;
import tinker.common.InventoryLogic;
import tinker.tconstruct.crafting.CastingRecipe;
import tinker.tconstruct.crafting.LiquidCasting;
public class CastingTableLogic extends InventoryLogic
implements ILiquidTank
public class CastingTableLogic extends InventoryLogic implements ILiquidTank
{
public LiquidStack liquid;
int baseMax = 125;
int baseMax = 250;
float materialRedux = 0;
int castingDelay = 0;
public CastingTableLogic()
{
@ -38,17 +41,18 @@ public class CastingTableLogic extends InventoryLogic
@Override
public LiquidStack getLiquid ()
{
return null;
return liquid;
}
@Override
public int getCapacity ()
{
int ret = baseMax;
if (inventory[0] != null && inventory[0].getItem() instanceof IPattern)
{
return baseMax * ((IPattern) inventory[0].getItem()).getPatternCost(inventory[0].getItemDamage());
}
return baseMax; //One ingot
ret *= ((IPattern) inventory[0].getItem()).getPatternCost(inventory[0].getItemDamage());
if (materialRedux > 0)
ret *= materialRedux;
return ret;
}
@Override
@ -58,11 +62,18 @@ public class CastingTableLogic extends InventoryLogic
return 0;
if (liquid == null)
{
//System.out.println("Woo");
if (LiquidCasting.instance.getCastingRecipe(resource, inventory[0]) != null)
{
liquid = resource.copy();
materialRedux = LiquidCasting.instance.getMaterialReduction(resource);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
return liquid.amount;
}
else
return 0;
}
else if (resource.itemID != liquid.itemID || resource.itemMeta != liquid.itemMeta)
{
return 0;
@ -75,6 +86,7 @@ public class CastingTableLogic extends InventoryLogic
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
liquid.amount = getCapacity();
castingDelay = LiquidCasting.instance.getCastingDelay(liquid, inventory[0]);
}
return cap;
}
@ -101,28 +113,52 @@ public class CastingTableLogic extends InventoryLogic
return 0;
}
/* NBT */
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
@Override
public void updateEntity ()
{
this.liquid = new LiquidStack(par1NBTTagCompound.getInteger("itemID"), par1NBTTagCompound.getInteger("amount"), par1NBTTagCompound.getInteger("itemMeta"));
super.readFromNBT(par1NBTTagCompound);
if (castingDelay > 0)
{
castingDelay--;
if (castingDelay == 0)
castLiquid();
}
}
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
public void castLiquid ()
{
CastingRecipe recipe = LiquidCasting.instance.getCastingRecipe(liquid, inventory[0]);
if (recipe != null)
{
materialRedux = 0;
inventory[1] = recipe.getResult();
if (recipe.consumeCast)
inventory[0] = null;
liquid = null;
//System.out.println("Casting: " + inventory[1].getItemName());
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
/* NBT */
public void readFromNBT (NBTTagCompound tags)
{
if (tags.getBoolean("hasLiquid"))
this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
else
this.liquid = null;
super.readFromNBT(tags);
}
public void writeToNBT (NBTTagCompound tags)
{
tags.setBoolean("hasLiquid", liquid != null);
if (liquid != null)
{
par1NBTTagCompound.setInteger("itemID", liquid.itemID);
par1NBTTagCompound.setInteger("amount", liquid.amount);
par1NBTTagCompound.setInteger("itemMeta", liquid.itemMeta);
tags.setInteger("itemID", liquid.itemID);
tags.setInteger("amount", liquid.amount);
tags.setInteger("itemMeta", liquid.itemMeta);
}
else
{
par1NBTTagCompound.setInteger("itemID", 0);
par1NBTTagCompound.setInteger("amount", 0);
par1NBTTagCompound.setInteger("itemMeta", 0);
}
super.writeToNBT(par1NBTTagCompound);
super.writeToNBT(tags);
}
/* Packets */

View File

@ -20,7 +20,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
public LiquidStack liquid;
ILiquidTank drain;
ILiquidTank tank;
int drainAmount = 2;
int drainAmount = 5;
public void activateFaucet ()
{
@ -47,7 +47,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
TileEntity tankte = worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord);
if (drainte != null && drainte instanceof ILiquidTank && tankte != null && tankte instanceof ILiquidTank)
{
System.out.println("Activating Faucet");
//System.out.println("Activating Faucet");
liquid = ((ILiquidTank) drainte).drain(drainAmount, true);
drain = (ILiquidTank) drainte;
tank = (ILiquidTank) tankte;
@ -62,7 +62,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
public void deactivateFaucet ()
{
System.out.println("Deactivating Faucet");
//System.out.println("Deactivating Faucet");
drain.fill(liquid, true);
liquid = null;
drain = null;

View File

@ -44,8 +44,13 @@ public class PatternShaperLogic extends InventoryLogic
public void setInventorySlotContents(int slot, ItemStack itemstack)
{
super.setInventorySlotContents(slot, itemstack);
if (slot == 0)
if (slot == 0 && itemstack != null)
{
if (itemstack.getItemDamage() == 0)
setInventorySlotContents(1, new ItemStack(TContent.woodPattern, 1, 1));
else if (itemstack.getItemDamage() == 1)
setInventorySlotContents(1, new ItemStack(TContent.metalPattern, 1, 0));
}
}
@Override

View File

@ -0,0 +1,86 @@
package tinker.tconstruct.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
public class NetherOreGenerator extends WorldGenerator
{
/** The block ID of the ore to be placed using this generator. */
private int minableBlockId;
private int minableBlockMeta = 0;
/** The number of blocks to generate. */
private int numberOfBlocks;
public NetherOreGenerator(int par1, int par2)
{
this.minableBlockId = par1;
this.numberOfBlocks = par2;
}
public NetherOreGenerator(int id, int meta, int number)
{
this(id, number);
minableBlockMeta = meta;
}
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float)Math.PI;
double var7 = (double)((float)(par3 + 8) + MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
double var9 = (double)((float)(par3 + 8) - MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
double var11 = (double)((float)(par5 + 8) + MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
double var13 = (double)((float)(par5 + 8) - MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
double var15 = (double)(par4 + par2Random.nextInt(3) - 2);
double var17 = (double)(par4 + par2Random.nextInt(3) - 2);
for (int var19 = 0; var19 <= this.numberOfBlocks; ++var19)
{
double var20 = var7 + (var9 - var7) * (double)var19 / (double)this.numberOfBlocks;
double var22 = var15 + (var17 - var15) * (double)var19 / (double)this.numberOfBlocks;
double var24 = var11 + (var13 - var11) * (double)var19 / (double)this.numberOfBlocks;
double var26 = par2Random.nextDouble() * (double)this.numberOfBlocks / 16.0D;
double var28 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
double var30 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
for (int var38 = var32; var38 <= var35; ++var38)
{
double var39 = ((double)var38 + 0.5D - var20) / (var28 / 2.0D);
if (var39 * var39 < 1.0D)
{
for (int var41 = var33; var41 <= var36; ++var41)
{
double var42 = ((double)var41 + 0.5D - var22) / (var30 / 2.0D);
if (var39 * var39 + var42 * var42 < 1.0D)
{
for (int var44 = var34; var44 <= var37; ++var44)
{
double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
int genID = par1World.getBlockId(var38, var41, var44);
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && genID == Block.netherrack.blockID)
{
par1World.setBlockAndMetadata(var38, var41, var44, this.minableBlockId, minableBlockMeta);
}
}
}
}
}
}
}
return true;
}
}

View File

@ -2,13 +2,12 @@ package tinker.tconstruct.worldgen;
import java.util.Random;
import tinker.tconstruct.PHConstruct;
import tinker.tconstruct.TContent;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import net.minecraft.world.WorldProviderHell;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import tinker.tconstruct.PHConstruct;
import tinker.tconstruct.TContent;
import cpw.mods.fml.common.IWorldGenerator;
public class TBaseWorldGenerator
@ -16,12 +15,18 @@ public class TBaseWorldGenerator
{
public TBaseWorldGenerator()
{
copper = new ManhattanOreGenerator(TContent.oreSlag.blockID, 3, 5, 10, 100, true, true);
tin = new ManhattanOreGenerator(TContent.oreSlag.blockID, 4, 5, 10, 100, true, true);
aluminum = new ManhattanOreGenerator(TContent.oreSlag.blockID, 5, 8, 20, 100, false, true);
//copper = new ManhattanOreGenerator(TContent.oreSlag.blockID, 3, 5, 10, 100, true, true);
//tin = new ManhattanOreGenerator(TContent.oreSlag.blockID, 4, 5, 10, 100, true, true);
//aluminum = new ManhattanOreGenerator(TContent.oreSlag.blockID, 5, 8, 20, 100, false, true);
cobalt = new ManhattanOreGenerator(TContent.oreSlag.blockID, 1, 2, 4, 100, true, false, Block.netherrack.blockID);
ardite = new ManhattanOreGenerator(TContent.oreSlag.blockID, 2, 2, 4, 100, true, false, Block.netherrack.blockID);
//cobalt = new ManhattanOreGenerator(TContent.oreSlag.blockID, 1, 2, 4, 100, true, false, Block.netherrack.blockID);
//ardite = new ManhattanOreGenerator(TContent.oreSlag.blockID, 2, 2, 4, 100, true, false, Block.netherrack.blockID);
copper = new WorldGenMinable(TContent.oreSlag.blockID, 3, 9);
tin = new WorldGenMinable(TContent.oreSlag.blockID, 4, 9);
aluminum = new WorldGenMinable(TContent.oreSlag.blockID, 5, 16);
cobalt = new NetherOreGenerator(TContent.oreSlag.blockID, 1, 3);
ardite = new NetherOreGenerator(TContent.oreSlag.blockID, 2, 3);
}
@Override
@ -94,9 +99,9 @@ public class TBaseWorldGenerator
}
}
ManhattanOreGenerator copper;
ManhattanOreGenerator tin;
ManhattanOreGenerator aluminum;
ManhattanOreGenerator cobalt;
ManhattanOreGenerator ardite;
WorldGenMinable copper;
WorldGenMinable tin;
WorldGenMinable aluminum;
NetherOreGenerator cobalt;
NetherOreGenerator ardite;
}