Worldgen Change
No files matched your search
@@ -30,6 +30,27 @@
|
||||
<entry key="MetalOre.Aluminum.name">Aluminum Ore</entry>
|
||||
<entry key="MetalOre.Slag.name">Stone Slag</entry>
|
||||
|
||||
<entry key="block.oreberry.iron.name">Iron Oreberry Bush</entry>
|
||||
<entry key="block.oreberry.gold.name">Gold Oreberry Bush</entry>
|
||||
<entry key="block.oreberry.copper.name">Copper Oreberry Bush</entry>
|
||||
<entry key="block.oreberry.tin.name">Tin Oreberry Bush</entry>
|
||||
<entry key="block.oreberry.aluminum.name">Aluminum Oreberry Bush</entry>
|
||||
<entry key="block.oreberry.silver.name">Silver Oreberry Bush</entry>
|
||||
|
||||
<entry key="block.ore.gravel.iron.name">Iron Ore</entry>
|
||||
<entry key="block.ore.gravel.gold.name">Gold Ore</entry>
|
||||
<entry key="block.ore.gravel.copper.name">Copper Ore</entry>
|
||||
<entry key="block.ore.gravel.tin.name">Tin Ore</entry>
|
||||
<entry key="block.ore.gravel.aluminum.name">Aluminum Ore</entry>
|
||||
<entry key="block.ore.gravel.cobalt.name">Cobalt Ore</entry>
|
||||
|
||||
<entry key="item.oreberry.iron.name">Iron Oreberry</entry>
|
||||
<entry key="item.oreberry.gold.name">Gold Oreberry</entry>
|
||||
<entry key="item.oreberry.copper.name">Copper Oreberry</entry>
|
||||
<entry key="item.oreberry.tin.name">Tin Oreberry</entry>
|
||||
<entry key="item.oreberry.aluminum.name">Aluminum Oreberry</entry>
|
||||
<entry key="item.oreberry.silver.name">Silver Oreberry</entry>
|
||||
|
||||
<entry key="Smeltery.Controller.name">Smeltery Controller</entry>
|
||||
<entry key="Smeltery.Drain.name">Smeltery Drain</entry>
|
||||
<entry key="Smeltery.Brick.name">Seared Bricks</entry>
|
||||
|
||||
@@ -72,12 +72,16 @@ public class PHConstruct
|
||||
metalStill = config.getBlock("Liquid Metal Still", 1480).getInt(1480);
|
||||
//landmine = config.getBlock("Landmine", 1481).getInt(1481);
|
||||
|
||||
golemCore = config.getBlock("Golem Core", 1481).getInt(1481);
|
||||
golemHead = config.getBlock("Golem Head", 1482).getInt(1482);
|
||||
/*golemCore = config.getBlock("Golem Core", 1481).getInt(1481);
|
||||
golemHead = config.getBlock("Golem Head", 1482).getInt(1482);*/
|
||||
//golemPedestal = config.getBlock("Golem Pedestal", 1483).getInt(1483);
|
||||
//redstoneBallRepeater = config.getBlock("Redstone Ball Repeater", 1483).getInt(1483);
|
||||
|
||||
stoneTorch = config.getBlock("Stone Torch", 1484).getInt(1484);
|
||||
oreBerry = config.getBlock("Ore Berry One", 1485).getInt(1485);
|
||||
oreBerrySecond = config.getBlock("Ore Berry Two", 1486).getInt(1486);
|
||||
//netherOreBerry = config.getBlock("Ore Berry Nether", 1487).getInt(1487);
|
||||
oreGravel = config.getBlock("Ores Gravel", 1488).getInt(1488);
|
||||
|
||||
manual = config.getItem("Patterns and Misc", "Tinker's Manual", 14018).getInt(14018);
|
||||
blankPattern = config.getItem("Patterns and Misc", "Blank Patterns", 14019).getInt(14019);
|
||||
@@ -123,6 +127,7 @@ public class PHConstruct
|
||||
buckets = config.getItem("Patterns and Misc", "Buckets", 14101).getInt(14101);
|
||||
uselessItem = config.getItem("Patterns and Misc", "Title Icon", 14102).getInt(14102);
|
||||
slimefood = config.getItem("Patterns and Misc", "Strange Food", 14103).getInt(14103);
|
||||
oreChunks = config.getItem("Patterns and Misc", "Ore Chunks", 14104).getInt(14104);
|
||||
|
||||
boolean ic2 = true;
|
||||
boolean xycraft = true;
|
||||
@@ -143,22 +148,51 @@ public class PHConstruct
|
||||
{
|
||||
}
|
||||
|
||||
generateCopper = config.get("Worldgen", "Generate Copper", ic2).getBoolean(ic2);
|
||||
generateTin = config.get("Worldgen", "Generate Tin", ic2).getBoolean(ic2);
|
||||
generateAluminum = config.get("Worldgen", "Generate Aluminum", xycraft).getBoolean(xycraft);
|
||||
generateCobalt = config.get("Worldgen", "Generate Cobalt", true).getBoolean(true);
|
||||
generateArdite = config.get("Worldgen", "Generate Ardite", true).getBoolean(true);
|
||||
generateCopper = config.get("Worldgen Disabler", "Generate Copper", ic2).getBoolean(ic2);
|
||||
generateTin = config.get("Worldgen Disabler", "Generate Tin", ic2).getBoolean(ic2);
|
||||
generateAluminum = config.get("Worldgen Disabler", "Generate Aluminum", xycraft).getBoolean(xycraft);
|
||||
generateNetherOres = config.get("Worldgen Disabler", "Generate Cobalt and Ardite", true).getBoolean(true);
|
||||
|
||||
copperDensity = config.get("Worldgen", "Copper Density", 8).getInt(8);
|
||||
copperHeight = config.get("Worldgen", "Copper Height", 20).getInt(20);
|
||||
copperRange = config.get("Worldgen", "Copper Range", 40).getInt(40);
|
||||
tinDensity = config.get("Worldgen", "Tin Density", 8).getInt(8);
|
||||
tinHeight = config.get("Worldgen", "Tin Height", 0).getInt(0);
|
||||
tinRange = config.get("Worldgen", "Tin Range", 40).getInt(40);
|
||||
aluminumDensity = config.get("Worldgen", "Aluminum Density", 5).getInt(5);
|
||||
aluminumHeight = config.get("Worldgen", "Aluminum Height", 0).getInt(0);
|
||||
aluminumRange = config.get("Worldgen", "Aluminum Range", 64).getInt(64);
|
||||
generateIronSurface = config.get("Worldgen Disabler", "Generate Surface Iron", true).getBoolean(true);
|
||||
generateGoldSurface = config.get("Worldgen Disabler", "Generate Surface Gold", true).getBoolean(true);
|
||||
generateCopperSurface = config.get("Worldgen Disabler", "Generate Surface Copper", true).getBoolean(true);
|
||||
generateTinSurface = config.get("Worldgen Disabler", "Generate Surface Tin", true).getBoolean(true);
|
||||
generateAluminumSurface = config.get("Worldgen Disabler", "Generate Surface Aluminum", true).getBoolean(true);
|
||||
|
||||
generateIronBush = config.get("Worldgen Disabler", "Generate Iron Bushes", true).getBoolean(true);
|
||||
generateGoldBush = config.get("Worldgen Disabler", "Generate Gold Bushes", true).getBoolean(true);
|
||||
generateCopperBush = config.get("Worldgen Disabler", "Generate Copper Bushes", true).getBoolean(true);
|
||||
generateTinBush = config.get("Worldgen Disabler", "Generate Tin Bushes", true).getBoolean(true);
|
||||
generateAluminumBush = config.get("Worldgen Disabler", "Generate Aluminum Bushes", true).getBoolean(true);
|
||||
generateSilverBush = config.get("Worldgen Disabler", "Generate Silver Bushes", true).getBoolean(true);
|
||||
|
||||
copperuDensity = config.get("Worldgen", "Copper Underground Density", ic2 ? 1 : 0).getInt(ic2 ? 1 : 0);
|
||||
tinuDensity = config.get("Worldgen", "Tin Underground Density", ic2 ? 1 : 0).getInt(ic2 ? 1 : 0);
|
||||
aluminumuDensity = config.get("Worldgen", "Aluminum Underground Density", xycraft ? 1 : 0).getInt(xycraft ? 1 : 0);
|
||||
netherDensity = config.get("Worldgen", "Nether Ores Density", 8).getInt(8);
|
||||
|
||||
copperuHeight = config.get("Worldgen", "Copper Underground Min Y", 20).getInt(20);
|
||||
copperuRange = config.get("Worldgen", "Copper Underground Max Y", 60).getInt(60);
|
||||
tinuHeight = config.get("Worldgen", "Tin Underground Min Y", 0).getInt(0);
|
||||
tinuRange = config.get("Worldgen", "Tin Underground Max Y", 40).getInt(40);
|
||||
aluminumuHeight = config.get("Worldgen", "Aluminum Underground Min Y", 0).getInt(0);
|
||||
aluminumuRange = config.get("Worldgen", "Aluminum Underground Max Y", 64).getInt(64);
|
||||
|
||||
ironsRarity = config.get("Worldgen", "Iron Surface Rarity", 38).getInt(38);
|
||||
goldsRarity = config.get("Worldgen", "Gold Surface Rarity", 100).getInt(100);
|
||||
coppersRarity = config.get("Worldgen", "Copper Surface Rarity", 26).getInt(26);
|
||||
tinsRarity = config.get("Worldgen", "Tin Surface Rarity", 26).getInt(26);
|
||||
aluminumsRarity = config.get("Worldgen", "Aluminum Surface Rarity", 32).getInt(32);
|
||||
cobaltsRarity = config.get("Worldgen", "Aluminum Surface Rarity", 400).getInt(400);
|
||||
|
||||
ironbRarity = config.get("Worldgen", "Iron Bush Rarity", 28).getInt(28);
|
||||
goldbRarity = config.get("Worldgen", "Gold Bush Rarity", 125).getInt(125);
|
||||
copperbRarity = config.get("Worldgen", "Copper Bush Rarity", 20).getInt(20);
|
||||
tinbRarity = config.get("Worldgen", "Tin Bush Rarity", 20).getInt(20);
|
||||
aluminumbRarity = config.get("Worldgen", "Aluminum Bush Rarity", 20).getInt(20);
|
||||
silverbRarity = config.get("Worldgen", "Silver Bush Rarity", 100).getInt(100);
|
||||
|
||||
seaLevel = config.get("general", "Sea level", 64).getInt(64);
|
||||
|
||||
/* Save the configuration file */
|
||||
config.save();
|
||||
@@ -173,12 +207,18 @@ public class PHConstruct
|
||||
public static int searedTable;
|
||||
public static int craftedSoil;
|
||||
public static int oreSlag;
|
||||
public static int oreGravel;
|
||||
public static int metalBlock;
|
||||
//public static int axle;
|
||||
|
||||
public static int golemCore;
|
||||
public static int golemHead;
|
||||
public static int golemPedestal;
|
||||
|
||||
//Crops
|
||||
public static int oreBerry;
|
||||
public static int oreBerrySecond;
|
||||
public static int netherOreBerry;
|
||||
|
||||
//Traps
|
||||
//public static int landmine;
|
||||
@@ -202,6 +242,7 @@ public class PHConstruct
|
||||
public static int manual;
|
||||
public static int buckets;
|
||||
public static int uselessItem;
|
||||
public static int oreChunks;
|
||||
|
||||
//Food
|
||||
public static int slimefood;
|
||||
@@ -247,19 +288,51 @@ public class PHConstruct
|
||||
public static boolean generateCopper;
|
||||
public static boolean generateTin;
|
||||
public static boolean generateAluminum;
|
||||
public static boolean generateCobalt;
|
||||
public static boolean generateArdite;
|
||||
|
||||
public static int copperDensity;
|
||||
public static int copperHeight;
|
||||
public static int copperRange;
|
||||
public static int tinDensity;
|
||||
public static int tinHeight;
|
||||
public static int tinRange;
|
||||
public static int aluminumDensity;
|
||||
public static int aluminumHeight;
|
||||
public static int aluminumRange;
|
||||
public static boolean generateNetherOres;
|
||||
|
||||
public static boolean generateIronSurface;
|
||||
public static boolean generateGoldSurface;
|
||||
public static boolean generateCopperSurface;
|
||||
public static boolean generateTinSurface;
|
||||
public static boolean generateAluminumSurface;
|
||||
public static boolean generateCobaltSurface;
|
||||
|
||||
public static boolean generateIronBush;
|
||||
public static boolean generateGoldBush;
|
||||
public static boolean generateCopperBush;
|
||||
public static boolean generateTinBush;
|
||||
public static boolean generateAluminumBush;
|
||||
public static boolean generateSilverBush;
|
||||
|
||||
public static int copperuDensity;
|
||||
public static int tinuDensity;
|
||||
public static int aluminumuDensity;
|
||||
public static int netherDensity;
|
||||
|
||||
public static int ironsRarity;
|
||||
public static int goldsRarity;
|
||||
public static int coppersRarity;
|
||||
public static int tinsRarity;
|
||||
public static int aluminumsRarity;
|
||||
public static int cobaltsRarity;
|
||||
|
||||
public static int ironbRarity;
|
||||
public static int goldbRarity;
|
||||
public static int copperbRarity;
|
||||
public static int tinbRarity;
|
||||
public static int aluminumbRarity;
|
||||
public static int silverbRarity;
|
||||
|
||||
public static int copperuHeight;
|
||||
public static int copperuRange;
|
||||
|
||||
public static int tinuHeight;
|
||||
public static int tinuRange;
|
||||
|
||||
public static int aluminumuHeight;
|
||||
public static int aluminumuRange;
|
||||
|
||||
public static int seaLevel;
|
||||
|
||||
//Mobs
|
||||
public static boolean redCreeper;
|
||||
|
||||
@@ -25,7 +25,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
* @dependencies: IC2 API, EBXL API
|
||||
*/
|
||||
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.2f2.1", dependencies = "required-after:Forge@[7.7.1.659,)")
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3pre.6", dependencies = "required-after:Forge@[7.7.1.659,)")
|
||||
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class)
|
||||
public class TConstruct
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ import mods.tinker.tconstruct.blocks.*;
|
||||
import mods.tinker.tconstruct.crafting.*;
|
||||
import mods.tinker.tconstruct.entity.*;
|
||||
import mods.tinker.tconstruct.items.*;
|
||||
import mods.tinker.tconstruct.items.blocks.*;
|
||||
import mods.tinker.tconstruct.library.*;
|
||||
import mods.tinker.tconstruct.library.client.*;
|
||||
import mods.tinker.tconstruct.logic.*;
|
||||
@@ -17,6 +18,8 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.material.MaterialLiquid;
|
||||
import net.minecraft.entity.EntityEggInfo;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -93,7 +96,6 @@ public class TContent implements IFuelHandler
|
||||
public static Block smeltery;
|
||||
public static Block lavaTank;
|
||||
public static Block searedBlock;
|
||||
public static Block oreSlag;
|
||||
public static Block metalBlock;
|
||||
|
||||
//Decoration
|
||||
@@ -106,8 +108,13 @@ public class TContent implements IFuelHandler
|
||||
public static Block liquidMetalFlowing;
|
||||
public static Block liquidMetalStill;
|
||||
public static Material liquidMetal;
|
||||
|
||||
//public static Block axle;
|
||||
|
||||
//Ores
|
||||
public static Block oreSlag;
|
||||
public static Block oreGravel;
|
||||
public static OreberryBush oreBerry;
|
||||
public static OreberryBush oreBerrySecond;
|
||||
public static Item oreBerries;
|
||||
|
||||
//Tool modifiers
|
||||
public static ModElectric modE;
|
||||
@@ -146,8 +153,8 @@ public class TContent implements IFuelHandler
|
||||
void createEntities ()
|
||||
{
|
||||
EntityRegistry.registerModEntity(FancyEntityItem.class, "Fancy Item", 0, TConstruct.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(LaunchedPotion.class, "Launched Potion", 1, TConstruct.instance, 32, 3, true);
|
||||
EntityRegistry.registerModEntity(GolemBase.class, "Golembase", 2, TConstruct.instance, 32, 5, true);
|
||||
//EntityRegistry.registerModEntity(LaunchedPotion.class, "Launched Potion", 1, TConstruct.instance, 32, 3, true);
|
||||
//EntityRegistry.registerModEntity(GolemBase.class, "Golembase", 2, TConstruct.instance, 32, 5, true);
|
||||
//EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1, TConstruct.instance, 32, 5, true);
|
||||
//EntityRegistry.registerModEntity(Crystal.class, "Crystal", 2, TConstruct.instance, 32, 5, true);
|
||||
|
||||
@@ -156,6 +163,11 @@ public class TContent implements IFuelHandler
|
||||
EntityRegistry.registerModEntity(BlueSlime.class, "EdibleSlime", 12, TConstruct.instance, 64, 5, true);
|
||||
//EntityRegistry.registerModEntity(MetalSlime.class, "MetalSlime", 13, TConstruct.instance, 64, 5, true);
|
||||
|
||||
EntityList.IDtoClassMapping.put(7789011, NitroCreeper.class);
|
||||
EntityList.entityEggs.put(Integer.valueOf(7789011), new EntityEggInfo(7789011, 0xff7050, 0x555555));
|
||||
EntityList.IDtoClassMapping.put(7789012, BlueSlime.class);
|
||||
EntityList.entityEggs.put(Integer.valueOf(7789012), new EntityEggInfo(7789012, 0x9977ff, 0x004499));
|
||||
|
||||
BiomeGenBase[] overworldBiomes = new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.plains, BiomeGenBase.desert, BiomeGenBase.extremeHills, BiomeGenBase.forest, BiomeGenBase.taiga,
|
||||
BiomeGenBase.swampland, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.icePlains, BiomeGenBase.iceMountains, BiomeGenBase.beach,
|
||||
BiomeGenBase.desertHills, BiomeGenBase.forestHills, BiomeGenBase.taigaHills, BiomeGenBase.extremeHillsEdge, BiomeGenBase.jungle, BiomeGenBase.jungleHills };
|
||||
@@ -208,16 +220,6 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.registerTileEntity(CastingTableLogic.class, "CastingTable");
|
||||
GameRegistry.registerTileEntity(FaucetLogic.class, "Faucet");
|
||||
|
||||
String[] oreTypes = new String[] { "nether_slag", "nether_cobalt", "nether_ardite", "ore_copper", "ore_tin", "ore_aluminum", "ore_slag" };
|
||||
oreSlag = new MetalOre(PHConstruct.oreSlag, Material.iron, 10.0F, oreTypes);
|
||||
GameRegistry.registerBlock(oreSlag, MetalOreItemBlock.class, "SearedBrick");
|
||||
//MinecraftForge.setBlockHarvestLevel(oreSlag, 0, "pickaxe", 0);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 1, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 2, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 3, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 4, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 5, "pickaxe", 1);
|
||||
|
||||
//Traps
|
||||
/*landmine = new Landmine(PHConstruct.landmine, 0, EnumMobType.mobs, Material.cactus).setUnlocalizedName("landmine");
|
||||
GameRegistry.registerBlock(landmine, "landmine");*/
|
||||
@@ -234,6 +236,33 @@ public class TContent implements IFuelHandler
|
||||
stoneTorch = new StoneTorch(PHConstruct.stoneTorch).setUnlocalizedName("decoration.stonetorch");
|
||||
GameRegistry.registerBlock(stoneTorch, "decoration.stonetorch");
|
||||
|
||||
//Ores
|
||||
String[] berryOres = new String[] { "berry_iron", "berry_gold", "berry_copper", "berry_tin", "berry_iron_ripe", "berry_gold_ripe", "berry_copper_ripe", "berry_tin_ripe" };
|
||||
oreBerry = (OreberryBush) new OreberryBush(PHConstruct.oreBerry, berryOres, 0, 4).setUnlocalizedName("ore.berries.one");
|
||||
GameRegistry.registerBlock(oreBerry, OreberryBushItem.class, "ore.berries.one");
|
||||
String[] berryOresTwo = new String[] { "berry_aluminum", "berry_silver", "", "", "berry_aluminum_ripe", "berry_silver_ripe", "", "" };
|
||||
oreBerrySecond = (OreberryBush) new OreberryBush(PHConstruct.oreBerrySecond, berryOresTwo, 4, 2).setUnlocalizedName("ore.berries.two");
|
||||
GameRegistry.registerBlock(oreBerrySecond, OreberryBushSecondItem.class, "ore.berries.two");
|
||||
|
||||
String[] oreTypes = new String[] { "nether_slag", "nether_cobalt", "nether_ardite", "ore_copper", "ore_tin", "ore_aluminum", "ore_slag" };
|
||||
oreSlag = new MetalOre(PHConstruct.oreSlag, Material.iron, 10.0F, oreTypes);
|
||||
GameRegistry.registerBlock(oreSlag, MetalOreItemBlock .class, "SearedBrick");
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 1, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 2, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 3, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 4, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 5, "pickaxe", 1);
|
||||
|
||||
oreGravel = new GravelOre(PHConstruct.oreGravel);
|
||||
GameRegistry.registerBlock(oreGravel, GravelOreItem.class, "GravelOre");
|
||||
|
||||
MinecraftForge.setBlockHarvestLevel(oreGravel, 0, "shovel", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreGravel, 1, "shovel", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(oreGravel, 2, "shovel", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreGravel, 3, "shovel", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreGravel, 4, "shovel", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreGravel, 5, "shovel", 4);
|
||||
|
||||
/*redstoneBallRepeater = new RedstoneBallRepeater(PHConstruct.redstoneBallRepeater, false).setUnlocalizedName("decoration.redstoneballrepeater");
|
||||
GameRegistry.registerBlock(redstoneBallRepeater, "decoration.redstoneballrepeater");
|
||||
Item.itemsList[PHConstruct.redstoneBallRepeater] = null;
|
||||
@@ -259,10 +288,12 @@ public class TContent implements IFuelHandler
|
||||
blankPattern = new CraftingItem(PHConstruct.blankPattern, blanks, blanks, "materials/").setUnlocalizedName("tconstruct.Pattern");
|
||||
|
||||
String[] craftingMaterials = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
|
||||
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot" };
|
||||
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot", "IronNugget",
|
||||
"CopperNugget", "TinNugget", "AluminumNugget", "SilverNugget" };
|
||||
String[] craftingTextures = new String[] { "material_paperstack", "material_slimecrystal", "material_searedbrick", "material_cobaltingot", "material_arditeingot", "material_manyullyningot",
|
||||
"material_mossball", "material_lavacrystal", "material_necroticbone", "material_copperingot", "material_tiningot", "material_aluminumingot", "material_aluminumraw",
|
||||
"material_bronzeingot", "material_alubrassingot", "material_alumiteingot", "material_steelingot", "material_blueslimecrystal", "material_obsidianingot" };
|
||||
"material_bronzeingot", "material_alubrassingot", "material_alumiteingot", "material_steelingot", "material_blueslimecrystal", "material_obsidianingot",
|
||||
"material_nugget_iron", "material_nugget_copper", "material_nugget_tin", "material_nugget_aluminum", "material_nugget_silver" };
|
||||
|
||||
materials = new CraftingItem(PHConstruct.materials, craftingMaterials, craftingTextures, "materials/").setUnlocalizedName("tconstruct.Materials");
|
||||
toolRod = new ToolPart(PHConstruct.toolRod, "ToolRod", "_rod").setUnlocalizedName("tconstruct.ToolRod");
|
||||
@@ -302,6 +333,7 @@ public class TContent implements IFuelHandler
|
||||
signHead = new ToolPart(PHConstruct.signHead, "SignHead", "_battlesign_head").setUnlocalizedName("tconstruct.SignHead");
|
||||
|
||||
strangeFood = new StrangeFood(PHConstruct.slimefood).setUnlocalizedName("tconstruct.strangefood");
|
||||
oreBerries = new OreBerries(PHConstruct.oreChunks).setUnlocalizedName("oreberry");
|
||||
//lumberHead = new ToolPart(PHConstruct.lumberHead, 0, broadheads).setUnlocalizedName("tconstruct.LumberHead");
|
||||
Item.doorWood.setMaxStackSize(16);
|
||||
Item.doorIron.setMaxStackSize(16);
|
||||
@@ -578,7 +610,6 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addMelting(Block.blockIron, 0, 600, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 0));
|
||||
Smeltery.addMelting(Block.blockGold, 0, 550, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 1));
|
||||
Smeltery.addMelting(Block.obsidian, 0, 800, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 11));
|
||||
|
||||
Smeltery.addMelting(Block.ice, 0, 75, new LiquidStack(Block.waterStill.blockID, 1000, 0));
|
||||
|
||||
//Alloys
|
||||
@@ -587,6 +618,13 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 1, 9), new LiquidStack(liquidMetalStill.blockID, 2, 5), new LiquidStack(liquidMetalStill.blockID, 2, 6)); //Manyullyn
|
||||
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 3, 10), new LiquidStack(liquidMetalStill.blockID, 5, 4), new LiquidStack(liquidMetalStill.blockID, 2, 0), new LiquidStack(
|
||||
liquidMetalStill.blockID, 2, 11)); //Alumite
|
||||
|
||||
//Oreberries
|
||||
Smeltery.addMelting(new ItemStack(oreBerries, 4, 0), Block.blockIron.blockID, 0, 100, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 0)); //Iron
|
||||
Smeltery.addMelting(new ItemStack(oreBerries, 4, 1), Block.blockGold.blockID, 0, 100, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 0)); //Gold
|
||||
Smeltery.addMelting(new ItemStack(oreBerries, 4, 2), metalBlock.blockID, 3, 100, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 0)); //Copper
|
||||
Smeltery.addMelting(new ItemStack(oreBerries, 4, 3), metalBlock.blockID, 5, 100, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 0)); //Tin
|
||||
Smeltery.addMelting(new ItemStack(oreBerries, 4, 4), metalBlock.blockID, 6, 100, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 0)); //Aluminum
|
||||
}
|
||||
|
||||
void addCraftingRecipes ()
|
||||
@@ -606,6 +644,11 @@ 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.addShapelessRecipe(new ItemStack(manualBook, 2, 0), new ItemStack(manualBook, 1, 0), Item.book);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 1, 1), new ItemStack(manualBook, 1, 0));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 2, 1), new ItemStack(manualBook, 1, 1), Item.book);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 1, 2), new ItemStack(manualBook, 1, 1));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(manualBook, 2, 2), new ItemStack(manualBook, 1, 2), Item.book);
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(materials, 1, 0), "pp", "pp", 'p', Item.paper); //Paper stack
|
||||
OreDictionary.registerOre("mossystone", new ItemStack(Block.stoneBrick, 1, 1));
|
||||
@@ -625,11 +668,24 @@ public class TContent implements IFuelHandler
|
||||
FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 2, new ItemStack(materials, 1, 17), 2f); //Blue Slime
|
||||
//GameRegistry.addRecipe(new ItemStack(oreSlag, 1, 0), "pp", "pp", 'p', new ItemStack(materials, 1, 2)); //Seared brick block
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 1, new ItemStack(materials, 1, 3), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 2, new ItemStack(materials, 1, 4), 3f);
|
||||
//FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 1, new ItemStack(materials, 1, 3), 3f);
|
||||
//FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 2, new ItemStack(materials, 1, 4), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 3, new ItemStack(materials, 1, 9), 0.5f);
|
||||
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);
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(oreBerries.itemID, 0, new ItemStack(materials, 1, 19), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreBerries.itemID, 1, new ItemStack(Item.goldNugget), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreBerries.itemID, 2, new ItemStack(materials, 1, 20), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreBerries.itemID, 3, new ItemStack(materials, 1, 21), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreBerries.itemID, 4, new ItemStack(materials, 1, 22), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreBerries.itemID, 5, new ItemStack(materials, 1, 23), 0.2f);
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(oreGravel.blockID, 0, new ItemStack(Item.ingotIron), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreGravel.blockID, 1, new ItemStack(Item.ingotGold), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreGravel.blockID, 2, new ItemStack(materials, 1, 9), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreGravel.blockID, 3, new ItemStack(materials, 1, 10), 0.2f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreGravel.blockID, 4, new ItemStack(materials, 1, 12), 0.2f);
|
||||
|
||||
//Smeltery
|
||||
ItemStack searedBrick = new ItemStack(materials, 1, 2);
|
||||
@@ -647,6 +703,10 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.addRecipe(new ItemStack(stoneTorch, 4), "p", "w", 'p', new ItemStack(Item.coal, 1, Short.MAX_VALUE), 'w', new ItemStack(toolRod, 1, 1));
|
||||
GameRegistry.addRecipe(new ItemStack(toolRod, 4, 1), "c", "c", 'c', new ItemStack(Block.stone));
|
||||
GameRegistry.addRecipe(new ItemStack(toolRod, 2, 1), "c", "c", 'c', new ItemStack(Block.cobblestone));
|
||||
|
||||
ItemStack aluBrass = new ItemStack(materials, 1, 14);
|
||||
GameRegistry.addRecipe(new ItemStack(Item.pocketSundial), " i ", "iri", " i ", 'i', aluBrass, 'r', new ItemStack(Item.redstone));
|
||||
GameRegistry.addRecipe(new ItemStack(Block.pressurePlateGold), "ii", 'i', aluBrass);
|
||||
}
|
||||
|
||||
void setupToolTabs ()
|
||||
@@ -676,7 +736,12 @@ public class TContent implements IFuelHandler
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(oreSlag, 1, 3));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(oreSlag, 1, 4));
|
||||
OreDictionary.registerOre("oreNaturalAluminum", new ItemStack(oreSlag, 1, 5));
|
||||
|
||||
|
||||
OreDictionary.registerOre("oreCobalt", new ItemStack(oreGravel, 1, 5));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(oreGravel, 1, 2));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(oreGravel, 1, 3));
|
||||
OreDictionary.registerOre("oreNaturalAluminum", new ItemStack(oreGravel, 1, 4));
|
||||
|
||||
OreDictionary.registerOre("ingotCobalt", new ItemStack(materials, 1, 3));
|
||||
OreDictionary.registerOre("ingotArdite", new ItemStack(materials, 1, 4));
|
||||
OreDictionary.registerOre("ingotManyullyn", new ItemStack(materials, 1, 5));
|
||||
@@ -699,6 +764,12 @@ public class TContent implements IFuelHandler
|
||||
OreDictionary.registerOre("blockAluminumBrass", new ItemStack(metalBlock, 1, 7));
|
||||
OreDictionary.registerOre("blockAlumite", new ItemStack(metalBlock, 1, 8));
|
||||
OreDictionary.registerOre("blockSteel", new ItemStack(metalBlock, 1, 9));
|
||||
|
||||
OreDictionary.registerOre("nuggetIron", new ItemStack(metalBlock, 1, 19));
|
||||
OreDictionary.registerOre("nuggetCopper", new ItemStack(metalBlock, 1, 20));
|
||||
OreDictionary.registerOre("nuggetTin", new ItemStack(metalBlock, 1, 21));
|
||||
OreDictionary.registerOre("nuggetNaturalAluminum", new ItemStack(metalBlock, 1, 22));
|
||||
OreDictionary.registerOre("nuggetSilver", new ItemStack(metalBlock, 1, 23));
|
||||
|
||||
String[] names = new String[] { "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "Brass", "Manyullyn", "Alumite", "Obsidian", "Steel" };
|
||||
liquidIcons = new LiquidStack[names.length];
|
||||
|
||||
@@ -5,8 +5,10 @@ import java.util.Random;
|
||||
|
||||
import mods.tinker.tconstruct.crafting.PatternBuilder;
|
||||
import mods.tinker.tconstruct.crafting.Smeltery;
|
||||
import mods.tinker.tconstruct.crafting.ToolBuilder;
|
||||
import mods.tinker.tconstruct.entity.NitroCreeper;
|
||||
import mods.tinker.tconstruct.logic.LiquidTextureLogic;
|
||||
import mods.tinker.tconstruct.modifiers.ModAttack;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -53,6 +55,7 @@ public class TEventHandler
|
||||
for (int i = 0; i < TContent.liquidIcons.length; i++)
|
||||
{
|
||||
TContent.liquidIcons[i].setRenderingIcon(TContent.liquidMetalStill.getIcon(0, i));
|
||||
TContent.liquidIcons[i].canonical().setRenderingIcon(TContent.liquidMetalStill.getIcon(0, i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,68 +109,78 @@ public class TEventHandler
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Wood");
|
||||
}
|
||||
|
||||
else if (evt.Name == "crystalQuartz")
|
||||
{
|
||||
ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 16));
|
||||
}
|
||||
|
||||
else if (evt.Name == "crystalCerusQuartz")
|
||||
{
|
||||
ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 72));
|
||||
}
|
||||
|
||||
//Ingots
|
||||
else if (evt.Name == "ingotCopper")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Copper");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotTin")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotBronze")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Bronze");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotCobalt")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Cobalt");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotArdite")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Ardite");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotManyullyn")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Manyullyn");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotNaturalAluminum")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
else if (evt.Name == "naturalAluminum")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotAluminumBrass")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotAlumite")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Alumite");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
}
|
||||
|
||||
else if (evt.Name == "ingotSteel")
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Steel");
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
}
|
||||
|
||||
//Ores
|
||||
@@ -250,57 +263,57 @@ public class TEventHandler
|
||||
//Dust
|
||||
else if (evt.Name == "dustCopper")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustTin")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustBronze")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustCobalt")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustArdite")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustManyullyn")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustAluminum")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustNaturalAluminum")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustAluminumBrass")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustAlumite")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
}
|
||||
|
||||
else if (evt.Name == "dustSteel")
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 4, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,73 +323,73 @@ public class TEventHandler
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Copper");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotTin");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotBronze");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Bronze");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotCobalt");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Cobalt");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotArdite");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Ardite");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotManyullyn");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Manyullyn");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("naturalAluminum");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotNaturalAluminum");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotAluminumBrass");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotAlumite");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Alumite");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("ingotSteel");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
PatternBuilder.instance.registerMaterial(ore, 2, "Steel");
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("oreCopper");
|
||||
@@ -472,62 +485,86 @@ public class TEventHandler
|
||||
ores = OreDictionary.getOres("dustCopper");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 2));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustTin");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 3));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustBronze");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 7));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustCobalt");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 5));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustArdite");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 6));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustManyullyn");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 9));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustNaturalAluminum");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 4));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustAluminumBrass");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustAlumite");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 10));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("dustSteel");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 4, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 12));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("nuggetIron");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 2));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("nuggetCopper");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 2));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("nuggetTin");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 3));
|
||||
}
|
||||
|
||||
ores = OreDictionary.getOres("nuggetNaturalAluminum");
|
||||
for (ItemStack ore : ores)
|
||||
{
|
||||
Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue/9, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
|
||||
@@ -109,10 +109,12 @@ public class TProxyCommon
|
||||
"Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk", "Alumite Chunk", "Steel Chunk", "Slime Crystal Fragment" };
|
||||
|
||||
public static final String[] materialItemInternalNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal",
|
||||
"NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot" };
|
||||
"NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot", "IronNugget",
|
||||
"CopperNugget", "TinNugget", "AluminumNugget", "SilverNugget" };
|
||||
|
||||
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", "Slime Crystal", "Obsidian Ingot" };
|
||||
"Necrotic Bone", "Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum", "Bronze Ingot", "Aluminum Brass Ingot", "Alumite Ingot", "Steel Ingot", "Slime Crystal", "Obsidian Ingot", "Iron Nugget",
|
||||
"Copper Nugget", "Tin Nugget", "Aluminum Nugget", "Silver Nugget" };
|
||||
|
||||
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn",
|
||||
"Copper", "Bronze", "Alumite", "Steel", "Blue Slime" };
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package mods.tinker.tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mods.tinker.tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GravelOre extends BlockSand
|
||||
{
|
||||
public String[] textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt" };
|
||||
public Icon[] icons;
|
||||
|
||||
public GravelOre(int id)
|
||||
{
|
||||
super(id);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
this.setStepSound(soundGravelFootstep);
|
||||
}
|
||||
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
this.icons[i] = iconRegister.registerIcon("tinker:ore_"+textureNames[i]+"_gravel");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int meta)
|
||||
{
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
|
||||
public float getBlockHardness (World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 5)
|
||||
return 12f;
|
||||
else
|
||||
return 5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 6; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package mods.tinker.tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MetalOre extends TConstructBlock
|
||||
@@ -19,4 +23,13 @@ public class MetalOre extends TConstructBlock
|
||||
return 3f;
|
||||
//return this.blockHardness;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 1; iter < 6; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,328 @@
|
||||
package mods.tinker.tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import mods.tinker.tconstruct.client.blockrender.OreberryRender;
|
||||
import mods.tinker.tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeavesBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
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.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
{
|
||||
Random random;
|
||||
public Icon[] fastIcons;
|
||||
public Icon[] fancyIcons;
|
||||
public String[] textureNames;
|
||||
public int itemMeat;
|
||||
private int subitems;
|
||||
|
||||
public OreberryBush(int id, String[] textureNames, int meta, int sub)
|
||||
{
|
||||
super(id, Material.leaves, false);
|
||||
this.textureNames = textureNames;
|
||||
this.itemMeat = meta;
|
||||
this.subitems = sub;
|
||||
this.setTickRandomly(true);
|
||||
random = new Random();
|
||||
this.setHardness(0.3F);
|
||||
this.setStepSound(Block.soundMetalFootstep);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
/* Berries show up at meta 12-15 */
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
{
|
||||
this.fastIcons = new Icon[textureNames.length];
|
||||
this.fancyIcons = new Icon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.fastIcons.length; i++)
|
||||
{
|
||||
this.fastIcons[i] = iconRegister.registerIcon("tinker:berries/" + textureNames[i] + "_fast");
|
||||
this.fancyIcons[i] = iconRegister.registerIcon("tinker:berries/" + textureNames[i] + "_fancy");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int metadata)
|
||||
{
|
||||
if (graphicsLevel)
|
||||
{
|
||||
if (metadata < 12)
|
||||
{
|
||||
return fancyIcons[metadata % 4];
|
||||
}
|
||||
else
|
||||
{
|
||||
return fancyIcons[metadata % 4 + 4];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (metadata < 12)
|
||||
{
|
||||
return fastIcons[metadata % 4];
|
||||
}
|
||||
else
|
||||
{
|
||||
return fastIcons[metadata % 4 + 4];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Bushes are stored by size then type */
|
||||
@Override
|
||||
public int damageDropped (int metadata)
|
||||
{
|
||||
return metadata % 4;
|
||||
}
|
||||
|
||||
/* The following methods define a berry bush's size depending on metadata */
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
{
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
if (l < 4)
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox((double) x + 0.25D, y, (double) z + 0.25D, (double) x + 0.75D, (double) y + 0.5D, (double) z + 0.75D);
|
||||
}
|
||||
else if (l < 8)
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox((double) x + 0.125D, y, (double) z + 0.125D, (double) x + 0.875D, (double) y + 0.75D, (double) z + 0.875D);
|
||||
}
|
||||
else
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, (double) x + 1.0D, (double) y + 1.0D, (double) z + 1.0D);
|
||||
}
|
||||
}
|
||||
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
{
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
if (l < 4)
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox((double) x + 0.25D, y, (double) z + 0.25D, (double) x + 0.75D, (double) y + 0.5D, (double) z + 0.75D);
|
||||
}
|
||||
else if (l < 8)
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox((double) x + 0.125D, y, (double) z + 0.125D, (double) x + 0.875D, (double) y + 0.75D, (double) z + 0.875D);
|
||||
}
|
||||
else
|
||||
{
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, (double) x + 1.0D, (double) y + 1.0D, (double) z + 1.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState (IBlockAccess iblockaccess, int x, int y, int z)
|
||||
{
|
||||
int md = iblockaccess.getBlockMetadata(x, y, z);
|
||||
|
||||
float minX;
|
||||
float minY = 0F;
|
||||
float minZ;
|
||||
float maxX;
|
||||
float maxY;
|
||||
float maxZ;
|
||||
|
||||
if (md < 4)
|
||||
{
|
||||
minX = minZ = 0.25F;
|
||||
maxX = maxZ = 0.75F;
|
||||
maxY = 0.5F;
|
||||
}
|
||||
else
|
||||
|
||||
if (md < 8)
|
||||
{
|
||||
minX = minZ = 0.125F;
|
||||
maxX = maxZ = 0.875F;
|
||||
maxY = 0.75F;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
minX = minZ = 0.0F;
|
||||
maxX = maxZ = 1.0F;
|
||||
maxY = 1.0F;
|
||||
}
|
||||
setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
}
|
||||
|
||||
/* Left-click harvests berries */
|
||||
@Override
|
||||
public void onBlockClicked (World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta >= 12)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, meta - 4, 3);
|
||||
EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat));
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Right-click harvests berries */
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
/*if (world.isRemote)
|
||||
return false;*/
|
||||
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta >= 12)
|
||||
{
|
||||
if (world.isRemote)
|
||||
return true;
|
||||
|
||||
world.setBlock(x, y, z, blockID, meta - 4, 3);
|
||||
EntityItem entityitem = new EntityItem(world, player.posX, player.posY - 1.0D, player.posZ, new ItemStack(TContent.oreBerries, 1, meta % 4 + itemMeat));
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Render logic */
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setGraphicsLevel (boolean flag)
|
||||
{
|
||||
graphicsLevel = flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getRenderType ()
|
||||
{
|
||||
return OreberryRender.model;
|
||||
}
|
||||
|
||||
public boolean shouldSideBeRendered (IBlockAccess iblockaccess, int x, int y, int z, int meta)
|
||||
{
|
||||
if (meta > 7 || graphicsLevel)
|
||||
{
|
||||
return super.shouldSideBeRendered(iblockaccess, x, y, z, meta);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Bush growth */
|
||||
|
||||
@Override
|
||||
public void updateTick (World world, int x, int y, int z, Random random1)
|
||||
{
|
||||
if (world.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int height;
|
||||
|
||||
for (height = 1; world.getBlockId(x, y - height, z) == this.blockID; ++height)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
if (random1.nextInt(20) == 0 && world.getBlockLightValue(x, y, z) >= 8)
|
||||
{
|
||||
int md = world.getBlockMetadata(x, y, z);
|
||||
if (md < 12)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, md + 4, 3);
|
||||
}
|
||||
/*if (random1.nextInt(3) == 0 && height < 3 && world.getBlockId(x, y + 1, z) == 0 && md >= 8)
|
||||
{
|
||||
world.setBlock(x, y + 1, z, blockID, md % 4, 3);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
/* Resistance to fire */
|
||||
|
||||
@Override
|
||||
public int getFlammability (IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable (IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed (World world, int x, int y, int z, int metadata, ForgeDirection face)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int var4 = 12; var4 < 12+subitems; ++var4)
|
||||
{
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPlantType getPlantType (World world, int x, int y, int z)
|
||||
{
|
||||
return EnumPlantType.Cave;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlantID (World world, int x, int y, int z)
|
||||
{
|
||||
return this.blockID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlantMetadata (World world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z) - 4;
|
||||
}
|
||||
}
|
||||
@@ -65,6 +65,7 @@ public class TProxyClient extends TProxyCommon
|
||||
RenderingRegistry.registerBlockHandler(new SearedRender());
|
||||
RenderingRegistry.registerBlockHandler(new FluidRender());
|
||||
RenderingRegistry.registerBlockHandler(new GolemCoreRender());
|
||||
RenderingRegistry.registerBlockHandler(new OreberryRender());
|
||||
//RenderingRegistry.registerBlockHandler(new BallRepeaterRender());
|
||||
|
||||
//Tools
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
package mods.tinker.tconstruct.client.blockrender;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class OreberryRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public static int model = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
if (modelId == model)
|
||||
{
|
||||
int md = world.getBlockMetadata(x, y, z);
|
||||
if (md < 4)
|
||||
{
|
||||
renderer.setRenderBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else if (md < 8)
|
||||
{
|
||||
renderer.setRenderBounds(0.125F, 0.0F, 0.125F, 0.875F, 0.75F, 0.875F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (modelID == model)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
if (metadata < 4)
|
||||
{
|
||||
renderer.setRenderBounds(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F);
|
||||
renderInvBlock(renderer, block, metadata);
|
||||
}
|
||||
else if (metadata < 8)
|
||||
{
|
||||
renderer.setRenderBounds(0.125F, 0.0F, 0.125F, 0.875F, 0.75F, 0.875F);
|
||||
renderInvBlock(renderer, block, metadata);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
renderInvBlock(renderer, block, metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId ()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
private void renderInvBlock (RenderBlocks renderblocks, Block block, int meta)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, meta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, meta));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package mods.tinker.tconstruct.container;
|
||||
|
||||
import mods.tinker.common.IPattern;
|
||||
import mods.tinker.tconstruct.player.TPlayerStats;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ArmorExtended extends ActiveContainer
|
||||
{
|
||||
public InventoryPlayer invPlayer;
|
||||
public TPlayerStats armor;
|
||||
|
||||
public ArmorExtended(InventoryPlayer inventoryplayer, TPlayerStats partLogic)
|
||||
{
|
||||
invPlayer = inventoryplayer;
|
||||
armor = partLogic;
|
||||
|
||||
/*inventory = new Slot[] { new SlotPattern(partLogic, 0, 40, 27), new SlotPattern(partLogic, 1, 40, 45), new Slot(partLogic, 2, 58, 27), new Slot(partLogic, 3, 58, 45),
|
||||
new SlotOnlyTake(partLogic, 4, 102, 27), new SlotOnlyTake(partLogic, 5, 120, 27), new SlotOnlyTake(partLogic, 6, 102, 45), new SlotOnlyTake(partLogic, 7, 120, 45) };
|
||||
for (int iter = 0; iter < inventory.length; iter ++)
|
||||
this.addSlotToContainer(inventory[iter]);*/
|
||||
|
||||
/* Player inventory */
|
||||
/*for (int armor = 0; armor < 4; ++armor)
|
||||
{
|
||||
this.addSlotToContainer(new SlotArmor(this, par1InventoryPlayer, par1InventoryPlayer.getSizeInventory() - 1 - armor, 8, 8 + armor * 18, armor));
|
||||
}*/
|
||||
|
||||
for (int column = 0; column < 3; column++)
|
||||
{
|
||||
for (int row = 0; row < 9; row++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 8 + row * 18, 84 + column * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for (int column = 0; column < 9; column++)
|
||||
{
|
||||
this.addSlotToContainer(new Slot(inventoryplayer, column, 8 + column * 18, 142));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer var1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slotID)
|
||||
{
|
||||
ItemStack stack = null;
|
||||
Slot slot = (Slot)this.inventorySlots.get(slotID);
|
||||
|
||||
if (slot != null && slot.getHasStack())
|
||||
{
|
||||
ItemStack slotStack = slot.getStack();
|
||||
stack = slotStack.copy();
|
||||
|
||||
if (slotID < armor.getSizeInventory())
|
||||
{
|
||||
if (!this.mergeItemStack(slotStack, armor.getSizeInventory(), this.inventorySlots.size(), true))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (slotStack.getItem() instanceof IPattern)
|
||||
{
|
||||
if (!this.mergeItemStack(slotStack, 0, 2, false))
|
||||
return null;
|
||||
}
|
||||
else if (!this.mergeItemStack(slotStack, 2, 4, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
/*if (slotStack.stackSize == 0)
|
||||
{
|
||||
slot.putStack((ItemStack)null);
|
||||
armor.tryBuildPart(slotID);
|
||||
}*/
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,6 @@ public class PartCrafterContainer extends ActiveContainer
|
||||
}
|
||||
slot.onSlotChanged();
|
||||
}
|
||||
System.out.println("Returning stack");
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
@@ -18,15 +18,15 @@ public class CraftingItem extends Item
|
||||
public String[] unlocalizedNames;
|
||||
public String folder;
|
||||
public Icon[] icons;
|
||||
public CraftingItem(int id, String[] names, String[] tex, String f)
|
||||
public CraftingItem(int id, String[] names, String[] tex, String folder)
|
||||
{
|
||||
super(id);
|
||||
this.setCreativeTab(TConstructRegistry.materialTab);
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
textureNames = tex;
|
||||
unlocalizedNames = names;
|
||||
folder = f;
|
||||
this.textureNames = tex;
|
||||
this.unlocalizedNames = names;
|
||||
this.folder = folder;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
|
||||
public class OreBerries extends CraftingItem
|
||||
{
|
||||
static String[] names = new String[] { "iron", "gold", "copper", "tin", "aluminum", "silver" };
|
||||
static String[] tex = new String[] { "oreberry_iron", "oreberry_gold", "oreberry_copper", "oreberry_tin", "oreberry_aluminum", "oreberry_silver" };
|
||||
|
||||
public OreBerries(int id)
|
||||
{
|
||||
super(id, names, tex, "oreberries/");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class CraftedSoilItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class CraftedSoilItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("CraftedSoil.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("CraftedSoil.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class GravelOreItem extends ItemBlock
|
||||
{
|
||||
public static final String blockType[] =
|
||||
{
|
||||
"iron", "gold", "copper", "tin", "aluminum", "cobalt"
|
||||
};
|
||||
|
||||
public GravelOreItem(int id)
|
||||
{
|
||||
super(id);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("block.ore.gravel.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class LavaTankItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class LavaTankItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("LavaTank.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("LavaTank.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class LiquidItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -22,6 +23,7 @@ public class LiquidItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("LiquidMetal.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("LiquidMetal.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class MetalItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class MetalItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("StorageMetals.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("StorageMetals.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class MetalOreItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class MetalOreItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("MetalOre.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("MetalOre.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mods.natura.common.NaturaContent;
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
public class OreberryBushItem extends ItemBlock
|
||||
{
|
||||
public int blockID;
|
||||
public OreberryBushItem(int id)
|
||||
{
|
||||
super(id);
|
||||
blockID = id+256;
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta % 4;
|
||||
}
|
||||
|
||||
/* Place bushes on dirt, grass, or other bushes only */
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float par8, float par9, float par10)
|
||||
{
|
||||
if (side != 1)
|
||||
return false;
|
||||
|
||||
else if (player.canPlayerEdit(x, y, z, side, stack) && player.canPlayerEdit(x, y + 1, z, side, stack))
|
||||
{
|
||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TContent.oreBerry) && world.isAirBlock(x, y + 1, z))
|
||||
{
|
||||
world.setBlock(x, y + 1, z, blockID, stack.getItemDamage() % 4, 3);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
stack.stackSize--;
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, blockID);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Block name in inventory */
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("block.oreberry.").append(blockType[pos]).toString();
|
||||
}
|
||||
public static final String blockType[] =
|
||||
{
|
||||
"iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin",
|
||||
"iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin"
|
||||
};
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
switch (stack.getItemDamage() % 4)
|
||||
{
|
||||
case 0:
|
||||
list.add("Sweet Irony");
|
||||
break;
|
||||
case 1:
|
||||
list.add("Pure Luster");
|
||||
break;
|
||||
case 2:
|
||||
list.add("Tastes like metal");
|
||||
break;
|
||||
case 3:
|
||||
list.add("Tin Man");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mods.natura.common.NaturaContent;
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
public class OreberryBushSecondItem extends ItemBlock
|
||||
{
|
||||
public int blockID;
|
||||
public OreberryBushSecondItem(int id)
|
||||
{
|
||||
super(id);
|
||||
blockID = id+256;
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta % 4;
|
||||
}
|
||||
|
||||
/* Place bushes on dirt, grass, or other bushes only */
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float par8, float par9, float par10)
|
||||
{
|
||||
if (side != 1)
|
||||
return false;
|
||||
|
||||
else if (player.canPlayerEdit(x, y, z, side, stack) && player.canPlayerEdit(x, y + 1, z, side, stack))
|
||||
{
|
||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
|
||||
if (block != null && block.canSustainPlant(world, x, y, z, ForgeDirection.UP, (IPlantable) TContent.oreBerrySecond) && world.isAirBlock(x, y + 1, z))
|
||||
{
|
||||
world.setBlock(x, y + 1, z, blockID, stack.getItemDamage() % 4, 3);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
stack.stackSize--;
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, blockID);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Block name in inventory */
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("block.oreberry.").append(blockType[pos]).toString();
|
||||
}
|
||||
public static final String blockType[] =
|
||||
{
|
||||
"aluminum", "silver", "", "", "aluminum", "silver", "", "",
|
||||
"aluminum", "silver", "", "", "aluminum", "silver", "", ""
|
||||
};
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
switch (stack.getItemDamage() % 4)
|
||||
{
|
||||
case 0:
|
||||
list.add("White Chocolate");
|
||||
break;
|
||||
case 1:
|
||||
list.add("Somewhat precious");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class SearedTableItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class SearedTableItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("SearedBlock.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("SearedBlock.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class SmelteryItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -24,6 +25,7 @@ public class SmelteryItemBlock extends ItemBlock
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("Smeltery.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("Smeltery.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package mods.tinker.tconstruct.items;
|
||||
package mods.tinker.tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ToolStationItemBlock extends ItemBlock
|
||||
{
|
||||
@@ -26,6 +27,7 @@ public class ToolStationItemBlock extends ItemBlock
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("ToolStation.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
|
||||
return (new StringBuilder()).append("ToolStation.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
@@ -11,10 +11,11 @@ import net.minecraft.network.packet.Packet132TileEntityData;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
|
||||
public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogic
|
||||
public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogic, ITankContainer
|
||||
{
|
||||
byte direction;
|
||||
boolean active;
|
||||
@@ -201,4 +202,40 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill (int tankIndex, LiquidStack resource, boolean doFill)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILiquidTank[] getTanks (ForgeDirection direction)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -220,7 +220,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
public void setActive (boolean flag)
|
||||
{
|
||||
needsUpdate = true;
|
||||
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
public int getScaledFuelGague (int scale)
|
||||
@@ -446,8 +446,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
updateTemperatures();
|
||||
super.onInventoryChanged();
|
||||
needsUpdate = true;
|
||||
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
//worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
/* Multiblock */
|
||||
|
||||
@@ -2,6 +2,8 @@ package mods.tinker.tconstruct.player;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -19,6 +21,9 @@ public class TClientTickHandler implements ITickHandler
|
||||
@Override
|
||||
public void tickEnd (EnumSet<TickType> type, Object... tickData)
|
||||
{
|
||||
TContent.oreBerry.setGraphicsLevel(Block.leaves.graphicsLevel);
|
||||
TContent.oreBerrySecond.setGraphicsLevel(Block.leaves.graphicsLevel);
|
||||
|
||||
player = mc.thePlayer;
|
||||
if (player == null || player.capabilities.isCreativeMode)
|
||||
return;
|
||||
|
||||
@@ -3,8 +3,10 @@ package mods.tinker.tconstruct.player;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TPlayerStats
|
||||
public class TPlayerStats implements IInventory
|
||||
{
|
||||
public WeakReference<EntityPlayer> player;
|
||||
public int level;
|
||||
@@ -14,6 +16,83 @@ public class TPlayerStats
|
||||
public boolean materialManual;
|
||||
public boolean smelteryManual;
|
||||
|
||||
//public boolean prevOnGround;
|
||||
//public double prevMotionY;
|
||||
public ItemStack[] armor = new ItemStack[7];
|
||||
|
||||
@Override
|
||||
public int getSizeInventory ()
|
||||
{
|
||||
return armor.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot (int slot)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize (int slot, int quantity)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing (int slot)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents (int slot, ItemStack itemstack)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInventoryChanged ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer (EntityPlayer entityplayer)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChest ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot (int slot, ItemStack itemstack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
package mods.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.setBlock(var38, var41, var44, this.minableBlockId, minableBlockMeta, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
package mods.tinker.tconstruct.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mods.tinker.tconstruct.PHConstruct;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class OreberryBushGen extends WorldGenerator
|
||||
{
|
||||
private int blockID;
|
||||
private int metadata;
|
||||
private int spawnHeight;
|
||||
|
||||
public OreberryBushGen(Block block, int meta)
|
||||
{
|
||||
this(block.blockID, meta);
|
||||
}
|
||||
|
||||
public OreberryBushGen(int blockID, int meta)
|
||||
{
|
||||
this.blockID = blockID;
|
||||
metadata = meta;
|
||||
spawnHeight = PHConstruct.seaLevel + 64;
|
||||
}
|
||||
|
||||
public boolean generate (World world, Random random, int x, int y, int z)
|
||||
{
|
||||
int height = findGround(world, x, y, z);
|
||||
if (height != -1)
|
||||
{
|
||||
int type = random.nextInt(10);
|
||||
if (type == 9)
|
||||
generateShrub(world, random, x, height, z);
|
||||
else if (type >= 3)
|
||||
generateSmallNode(world, random, x, height, z);
|
||||
else
|
||||
generateTinyNode(world, random, x, height, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int findGround (World world, int x, int y, int z)
|
||||
{
|
||||
int returnHeight = -1;
|
||||
int blockID = world.getBlockId(x, y - 1, z);
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)] && (blockID == Block.dirt.blockID || blockID == Block.grass.blockID))
|
||||
{
|
||||
return y;
|
||||
}
|
||||
int height = spawnHeight;
|
||||
do
|
||||
{
|
||||
if (height < PHConstruct.seaLevel)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int j1 = world.getBlockId(x, height, z);
|
||||
if (j1 == Block.dirt.blockID || j1 == Block.grass.blockID)
|
||||
{
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, height + 1, z)])
|
||||
{
|
||||
returnHeight = height + 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
height--;
|
||||
} while (height > 0);
|
||||
return returnHeight;
|
||||
}
|
||||
|
||||
/*public void generateLargeNode (World world, Random random, int x, int y, int z)
|
||||
{
|
||||
for (int iterX = x - 2; iterX <= x + 2; iterX++)
|
||||
{
|
||||
for (int iterZ = z - 1; iterZ <= z + 1; iterZ++)
|
||||
{
|
||||
for (int iterY = y - 1; iterY <= y; iterY++)
|
||||
{
|
||||
generateBerryBlock(world, iterX, iterY, iterZ, random);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int iterX = x - 1; iterX <= x + 1; iterX++)
|
||||
{
|
||||
for (int iterZ = z - 2; iterZ <= z - 2; iterZ++)
|
||||
{
|
||||
for (int iterY = y - 1; iterY <= y; iterY++)
|
||||
{
|
||||
generateBerryBlock(world, iterX, iterY, iterZ, random);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int iterX = x - 1; iterX <= x + 1; iterX++)
|
||||
{
|
||||
for (int iterZ = z + 2; iterZ <= z + 2; iterZ++)
|
||||
{
|
||||
for (int iterY = y - 1; iterY <= y; iterY++)
|
||||
{
|
||||
generateBerryBlock(world, iterX, iterY, iterZ, random);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int iterX = x - 1; iterX <= x + 1; iterX++)
|
||||
{
|
||||
for (int iterZ = z - 1; iterZ <= z + 1; iterZ++)
|
||||
{
|
||||
int yPos = y + 1;
|
||||
generateBerryBlock(world, iterX, yPos, iterZ, random);
|
||||
yPos = y - 2;
|
||||
generateBerryBlock(world, iterX, yPos, iterZ, random);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
public void generateShrub (World world, Random random, int x, int y, int z)
|
||||
{
|
||||
int l;
|
||||
|
||||
Block block = null;
|
||||
do
|
||||
{
|
||||
block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
if (block != null && !block.isLeaves(world, x, y, z))
|
||||
{
|
||||
break;
|
||||
}
|
||||
y--;
|
||||
} while (y > 0);
|
||||
|
||||
int i1 = world.getBlockId(x, y, z);
|
||||
|
||||
if (i1 == Block.dirt.blockID || i1 == Block.grass.blockID)
|
||||
{
|
||||
++y;
|
||||
|
||||
for (int yPos = y; yPos <= y + 2; ++yPos)
|
||||
{
|
||||
int k1 = yPos - y;
|
||||
int l1 = 2 - k1;
|
||||
|
||||
for (int xPos = x - l1; xPos <= x + l1; ++xPos)
|
||||
{
|
||||
int j2 = xPos - x;
|
||||
|
||||
for (int zPos = z - l1; zPos <= z + l1; ++zPos)
|
||||
{
|
||||
int l2 = zPos - z;
|
||||
|
||||
block = Block.blocksList[world.getBlockId(xPos, yPos, zPos)];
|
||||
|
||||
if ((Math.abs(j2) != l1 || Math.abs(l2) != l1 || random.nextInt(2) != 0) && (block == null || block.canBeReplacedByLeaves(world, xPos, yPos, zPos)))
|
||||
{
|
||||
//this.setBlockAndMetadata(world, i2, j1, k2, Block.leaves.blockID, this.field_76527_a);
|
||||
generateBerryBlock(world, xPos, yPos, zPos, random);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void generateSmallNode (World world, Random random, int x, int y, int z)
|
||||
{
|
||||
generateBerryBlock(world, x, y, z, random);
|
||||
if (random.nextBoolean())
|
||||
generateBerryBush(world, x + 1, y, z, random);
|
||||
if (random.nextBoolean())
|
||||
generateBerryBush(world, x - 1, y, z, random);
|
||||
if (random.nextBoolean())
|
||||
generateBerryBush(world, x, y, z + 1, random);
|
||||
if (random.nextBoolean())
|
||||
generateBerryBush(world, x, y, z - 1, random);
|
||||
}
|
||||
|
||||
public void generateTinyNode (World world, Random random, int x, int y, int z)
|
||||
{
|
||||
generateBerryBush(world, x, y, z, random);
|
||||
}
|
||||
|
||||
void generateBerryBlock (World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)])
|
||||
{
|
||||
int metaOffset = random.nextInt(5) == 0 ? 1 : 0;
|
||||
setBlockAndMetadata(world, x, y, z, blockID, metadata + 8 + metaOffset * 4);
|
||||
}
|
||||
}
|
||||
|
||||
void generateBerryBush (World world, int x, int y, int z, Random random)
|
||||
{
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)])
|
||||
{
|
||||
int metaOffset = random.nextInt(4);
|
||||
setBlockAndMetadata(world, x, y, z, blockID, metadata + metaOffset * 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package mods.tinker.tconstruct.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mods.tinker.tconstruct.PHConstruct;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class SurfaceOreGen 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;
|
||||
private int[] replaceBlocks;
|
||||
|
||||
public SurfaceOreGen(int id, int meta, int number)
|
||||
{
|
||||
this(id, meta, number, Block.grass.blockID, Block.dirt.blockID, Block.waterStill.blockID, Block.sand.blockID, Block.gravel.blockID, Block.snow.blockID);
|
||||
}
|
||||
|
||||
public SurfaceOreGen(int id, int meta, int number, int... target)
|
||||
{
|
||||
this.minableBlockId = id;
|
||||
this.numberOfBlocks = number;
|
||||
this.replaceBlocks = target;
|
||||
minableBlockMeta = meta;
|
||||
}
|
||||
|
||||
int findGround (World world, int x, int y, int z)
|
||||
{
|
||||
int returnHeight = -1;
|
||||
int blockID = world.getBlockId(x, y - 1, z);
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)] && (blockID == Block.dirt.blockID || blockID == Block.grass.blockID))
|
||||
{
|
||||
return y;
|
||||
}
|
||||
int height = PHConstruct.seaLevel + 64;
|
||||
do
|
||||
{
|
||||
if (height < PHConstruct.seaLevel - 30)
|
||||
{
|
||||
break;
|
||||
}
|
||||
int j1 = world.getBlockId(x, height, z);
|
||||
if (j1 == Block.dirt.blockID || j1 == Block.grass.blockID)
|
||||
{
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, height + 1, z)])
|
||||
{
|
||||
returnHeight = height + 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
height--;
|
||||
} while (height > 0);
|
||||
return returnHeight;
|
||||
}
|
||||
|
||||
public boolean generate(World world, Random random, int startX, int startY, int startZ)
|
||||
{
|
||||
startY = findGround(world, startX, startY, startZ);
|
||||
|
||||
float f = random.nextFloat() * (float)Math.PI;
|
||||
int blockNumber = numberOfBlocks / 2 + random.nextInt(numberOfBlocks/2);
|
||||
double d0 = (double)((float)(startX + 8) + MathHelper.sin(f) * (float)blockNumber / 8.0F);
|
||||
double d1 = (double)((float)(startX + 8) - MathHelper.sin(f) * (float)blockNumber / 8.0F);
|
||||
double d2 = (double)((float)(startZ + 8) + MathHelper.cos(f) * (float)blockNumber / 8.0F);
|
||||
double d3 = (double)((float)(startZ + 8) - MathHelper.cos(f) * (float)blockNumber / 8.0F);
|
||||
double d4 = (double)(startY + random.nextInt(3) - 2);
|
||||
double d5 = (double)(startY + random.nextInt(3) - 2);
|
||||
|
||||
for (int l = 0; l <= blockNumber; ++l)
|
||||
{
|
||||
double d6 = d0 + (d1 - d0) * (double)l / (double)blockNumber;
|
||||
double d7 = d4 + (d5 - d4) * (double)l / (double)blockNumber;
|
||||
double d8 = d2 + (d3 - d2) * (double)l / (double)blockNumber;
|
||||
double d9 = random.nextDouble() * (double)blockNumber / 16.0D;
|
||||
double d10 = (double)(MathHelper.sin((float)l * (float)Math.PI / (float)blockNumber) + 1.0F) * d9 + 1.0D;
|
||||
double d11 = (double)(MathHelper.sin((float)l * (float)Math.PI / (float)blockNumber) + 1.0F) * d9 + 1.0D;
|
||||
int i1 = MathHelper.floor_double(d6 - d10 / 2.0D);
|
||||
int j1 = MathHelper.floor_double(d7 - d11 / 2.0D);
|
||||
int k1 = MathHelper.floor_double(d8 - d10 / 2.0D);
|
||||
int l1 = MathHelper.floor_double(d6 + d10 / 2.0D);
|
||||
int i2 = MathHelper.floor_double(d7 + d11 / 2.0D);
|
||||
int j2 = MathHelper.floor_double(d8 + d10 / 2.0D);
|
||||
|
||||
for (int k2 = i1; k2 <= l1; ++k2)
|
||||
{
|
||||
double d12 = ((double)k2 + 0.5D - d6) / (d10 / 2.0D);
|
||||
|
||||
if (d12 * d12 < 1.0D)
|
||||
{
|
||||
for (int l2 = j1; l2 <= i2; ++l2)
|
||||
{
|
||||
double d13 = ((double)l2 + 0.5D - d7) / (d11 / 2.0D);
|
||||
|
||||
if (d12 * d12 + d13 * d13 < 1.0D)
|
||||
{
|
||||
for (int i3 = k1; i3 <= j2; ++i3)
|
||||
{
|
||||
double d14 = ((double)i3 + 0.5D - d8) / (d10 / 2.0D);
|
||||
|
||||
Block block = Block.blocksList[world.getBlockId(k2, l2, i3)];
|
||||
if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D)// && (block != null && block.isGenMineableReplaceable(par1World, k2, l2, i3, replaceBlocks)))
|
||||
{
|
||||
if (block == null || !Block.opaqueCubeLookup[world.getBlockId(k2, l2, i3)])
|
||||
world.setBlock(k2, l2, i3, this.minableBlockId, minableBlockMeta, 2);
|
||||
else
|
||||
{
|
||||
for (int iter = 0; iter < replaceBlocks.length; iter++)
|
||||
{
|
||||
if (block.isGenMineableReplaceable(world, k2, l2, i3, replaceBlocks[iter]))
|
||||
{
|
||||
world.setBlock(k2, l2, i3, this.minableBlockId, minableBlockMeta, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package mods.tinker.tconstruct.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mods.natura.common.PHNatura;
|
||||
import mods.tinker.tconstruct.PHConstruct;
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -10,98 +11,236 @@ import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class TBaseWorldGenerator
|
||||
implements IWorldGenerator
|
||||
public class TBaseWorldGenerator implements IWorldGenerator
|
||||
{
|
||||
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);
|
||||
|
||||
//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, Block.stone.blockID);
|
||||
tin = new WorldGenMinable(TContent.oreSlag.blockID, 4, 9, Block.stone.blockID);
|
||||
aluminum = new WorldGenMinable(TContent.oreSlag.blockID, 5, 16, Block.stone.blockID);
|
||||
|
||||
cobalt = new WorldGenMinable(TContent.oreSlag.blockID, 1, 3, Block.netherrack.blockID);
|
||||
ardite = new WorldGenMinable(TContent.oreSlag.blockID, 2, 3, Block.netherrack.blockID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
if (world.provider.dimensionId == -1)
|
||||
generateNether(random, chunkX*16, chunkZ*16, world);
|
||||
else
|
||||
generateSurface(random, chunkX*16, chunkZ*16, world);
|
||||
}
|
||||
|
||||
void generateSurface(Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int heightBand;
|
||||
int xPos, yPos, zPos;
|
||||
if (PHConstruct.generateCopper)
|
||||
{
|
||||
for (int q = 0; q < PHConstruct.copperDensity; q++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = PHConstruct.copperHeight + random.nextInt(PHConstruct.copperRange); zPos = zChunk + random.nextInt(16);
|
||||
copper.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
if (PHConstruct.generateTin)
|
||||
{
|
||||
for (int q = 0; q < PHConstruct.tinDensity; q++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = PHConstruct.tinHeight + random.nextInt(PHConstruct.tinRange); zPos = zChunk + random.nextInt(16);
|
||||
tin.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
if (PHConstruct.generateAluminum)
|
||||
{
|
||||
for (int q = 0; q < PHConstruct.aluminumDensity; q++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = PHConstruct.aluminumHeight + random.nextInt(PHConstruct.aluminumRange); zPos = zChunk + random.nextInt(16);
|
||||
aluminum.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void generateNether(Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int xPos, yPos, zPos;
|
||||
for (int i = 0; i < PHConstruct.netherDensity; i++)
|
||||
{
|
||||
if (PHConstruct.generateCobalt)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = random.nextInt(64)+32; zPos = zChunk + random.nextInt(16);
|
||||
cobalt.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateArdite)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = random.nextInt(64)+32; zPos = zChunk + random.nextInt(16);
|
||||
ardite.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < PHConstruct.netherDensity; i++)
|
||||
{
|
||||
if (PHConstruct.generateCobalt)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = random.nextInt(128); zPos = zChunk + random.nextInt(16);
|
||||
cobalt.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateArdite)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16); yPos = random.nextInt(128); zPos = zChunk + random.nextInt(16);
|
||||
ardite.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WorldGenMinable copper;
|
||||
WorldGenMinable tin;
|
||||
WorldGenMinable aluminum;
|
||||
WorldGenMinable cobalt;
|
||||
WorldGenMinable ardite;
|
||||
public TBaseWorldGenerator()
|
||||
{
|
||||
copper = new WorldGenMinable(TContent.oreSlag.blockID, 3, 8, Block.stone.blockID);
|
||||
tin = new WorldGenMinable(TContent.oreSlag.blockID, 4, 8, Block.stone.blockID);
|
||||
aluminum = new WorldGenMinable(TContent.oreSlag.blockID, 5, 6, Block.stone.blockID);
|
||||
|
||||
cobalt = new WorldGenMinable(TContent.oreSlag.blockID, 1, 3, Block.netherrack.blockID);
|
||||
ardite = new WorldGenMinable(TContent.oreSlag.blockID, 2, 3, Block.netherrack.blockID);
|
||||
|
||||
ironSurface = new SurfaceOreGen(TContent.oreGravel.blockID, 0, 12);
|
||||
goldSurface = new SurfaceOreGen(TContent.oreGravel.blockID, 1, 12);
|
||||
copperSurface = new SurfaceOreGen(TContent.oreGravel.blockID, 2, 12);
|
||||
tinSurface = new SurfaceOreGen(TContent.oreGravel.blockID, 3, 12);
|
||||
aluminumSurface = new SurfaceOreGen(TContent.oreGravel.blockID, 4, 12);
|
||||
cobaltSurface = new SurfaceOreGen(TContent.oreGravel.blockID, 4, 20);
|
||||
|
||||
ironBush = new OreberryBushGen(TContent.oreBerry, 0);
|
||||
goldBush = new OreberryBushGen(TContent.oreBerry, 1);
|
||||
copperBush = new OreberryBushGen(TContent.oreBerry, 2);
|
||||
tinBush = new OreberryBushGen(TContent.oreBerry, 3);
|
||||
aluminumBush = new OreberryBushGen(TContent.oreBerrySecond, 0);
|
||||
silverBush = new OreberryBushGen(TContent.oreBerrySecond, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
if (world.provider.isHellWorld)
|
||||
generateNether(random, chunkX * 16, chunkZ * 16, world);
|
||||
else
|
||||
generateSurface(random, chunkX * 16, chunkZ * 16, world);
|
||||
}
|
||||
|
||||
void generateSurface (Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int xPos, yPos, zPos;
|
||||
String biomeName = world.getWorldChunkManager().getBiomeGenAt(xChunk, zChunk).biomeName;
|
||||
|
||||
generateUndergroundOres(random, xChunk, zChunk, world);
|
||||
generateSurfaceOres(random, xChunk, zChunk, world);
|
||||
generateOreBushes(random, xChunk, zChunk, world);
|
||||
|
||||
if (biomeName == "Extreme Hills Edge" || biomeName == "Extreme Hills")
|
||||
{
|
||||
generateUndergroundOres(random, xChunk, zChunk, world);
|
||||
generateSurfaceOres(random, xChunk, zChunk, world);
|
||||
}
|
||||
}
|
||||
|
||||
void generateUndergroundOres(Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int xPos, yPos, zPos;
|
||||
if (PHConstruct.generateCopper)
|
||||
{
|
||||
for (int q = 0; q <= PHConstruct.copperuDensity; q++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = PHConstruct.copperuHeight + random.nextInt(PHConstruct.copperuRange - PHConstruct.copperuHeight);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
copper.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
if (PHConstruct.generateTin)
|
||||
{
|
||||
for (int q = 0; q <= PHConstruct.tinuDensity; q++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = PHConstruct.tinuHeight + random.nextInt(PHConstruct.tinuRange - PHConstruct.tinuHeight);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
tin.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
if (PHConstruct.generateAluminum)
|
||||
{
|
||||
for (int q = 0; q <= PHConstruct.aluminumuDensity; q++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = PHConstruct.aluminumuHeight + random.nextInt(PHConstruct.aluminumuRange - PHConstruct.aluminumuHeight);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
aluminum.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void generateSurfaceOres(Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int xPos, yPos, zPos;
|
||||
if (PHConstruct.generateIronSurface && random.nextInt(PHConstruct.ironsRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
ironSurface.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateGoldSurface && random.nextInt(PHConstruct.goldsRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
goldSurface.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateCopperSurface && random.nextInt(PHConstruct.coppersRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
copperSurface.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateTinSurface && random.nextInt(PHConstruct.tinsRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
tinSurface.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateAluminumSurface && random.nextInt(PHConstruct.aluminumsRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
aluminumSurface.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateCobaltSurface && random.nextInt(PHConstruct.cobaltsRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
cobaltSurface.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
|
||||
void generateOreBushes(Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int xPos, yPos, zPos;
|
||||
if (PHConstruct.generateIronBush && random.nextInt(PHConstruct.ironbRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
ironBush.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateGoldBush && random.nextInt(PHConstruct.goldbRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
goldBush.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateCopperBush && random.nextInt(PHConstruct.copperbRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
copperBush.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateTinBush && random.nextInt(PHConstruct.tinbRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
tinBush.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateAluminumBush && random.nextInt(PHConstruct.aluminumbRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
aluminumBush.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
if (PHConstruct.generateSilverBush && random.nextInt(PHConstruct.silverbRarity) == 0)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 64 + PHConstruct.seaLevel;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
silverBush.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
|
||||
void generateNether (Random random, int xChunk, int zChunk, World world)
|
||||
{
|
||||
int xPos, yPos, zPos;
|
||||
if (PHConstruct.generateNetherOres)
|
||||
{
|
||||
for (int i = 0; i < PHConstruct.netherDensity; i++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = random.nextInt(64) + 32;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
cobalt.generate(world, random, xPos, yPos, zPos);
|
||||
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = random.nextInt(64) + 32;
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
ardite.generate(world, random, xPos, yPos, zPos);
|
||||
|
||||
}
|
||||
for (int i = 0; i < PHConstruct.netherDensity; i++)
|
||||
{
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = random.nextInt(128);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
cobalt.generate(world, random, xPos, yPos, zPos);
|
||||
|
||||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = random.nextInt(128);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
ardite.generate(world, random, xPos, yPos, zPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WorldGenMinable copper;
|
||||
WorldGenMinable tin;
|
||||
WorldGenMinable aluminum;
|
||||
WorldGenMinable cobalt;
|
||||
WorldGenMinable ardite;
|
||||
|
||||
SurfaceOreGen ironSurface;
|
||||
SurfaceOreGen goldSurface;
|
||||
SurfaceOreGen copperSurface;
|
||||
SurfaceOreGen tinSurface;
|
||||
SurfaceOreGen aluminumSurface;
|
||||
SurfaceOreGen cobaltSurface;
|
||||
|
||||
OreberryBushGen ironBush;
|
||||
OreberryBushGen goldBush;
|
||||
OreberryBushGen copperBush;
|
||||
OreberryBushGen tinBush;
|
||||
OreberryBushGen aluminumBush;
|
||||
OreberryBushGen silverBush;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 426 B |
|
After Width: | Height: | Size: 312 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 347 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 313 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 399 B |
|
After Width: | Height: | Size: 723 B |
|
After Width: | Height: | Size: 775 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 397 B |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 390 B |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 390 B |
|
After Width: | Height: | Size: 613 B |
|
After Width: | Height: | Size: 850 B |
|
After Width: | Height: | Size: 670 B |
|
After Width: | Height: | Size: 772 B |
|
After Width: | Height: | Size: 311 B |
|
After Width: | Height: | Size: 393 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 392 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 926 B |
|
After Width: | Height: | Size: 527 B |
|
After Width: | Height: | Size: 519 B |
|
After Width: | Height: | Size: 174 B |
|
After Width: | Height: | Size: 335 B |
|
After Width: | Height: | Size: 791 B |
|
After Width: | Height: | Size: 833 B |
|
After Width: | Height: | Size: 729 B |
|
After Width: | Height: | Size: 461 B |
|
After Width: | Height: | Size: 446 B |
|
After Width: | Height: | Size: 729 B |
|
After Width: | Height: | Size: 588 B |
|
After Width: | Height: | Size: 473 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 846 B |
|
After Width: | Height: | Size: 746 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 401 B |
|
After Width: | Height: | Size: 364 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 413 B |
|
After Width: | Height: | Size: 411 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 197 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 876 B |
|
After Width: | Height: | Size: 693 B |
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 694 B |
|
After Width: | Height: | Size: 392 B |
|
After Width: | Height: | Size: 616 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 373 B |