manual merges of up to 9a578fc

This commit is contained in:
Progwml6 committed 2013-12-11 23:47:07 -05:00
1 parent 655780cc0c
commit 0c9c8100ad
21 files changed
+218 -56

No files matched your search

@@ -20,11 +20,14 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ConveyorBase extends MantleBlock
{
public ConveyorBase(int ID, Material material)
String texturename;
public ConveyorBase(int ID, Material material, String name)
{
super(ID, material);
this.setCreativeTab(TConstructRegistry.blockTab);
setBlockBounds(0f, 0f, 0f, 1f, 0.5f, 1f);
texturename = name;
}
public boolean isBlockReplaceable (World world, int x, int y, int z)
@@ -135,7 +138,7 @@ public class ConveyorBase extends MantleBlock
@Override
public void registerIcons (IconRegister iconRegister)
{
String[] textureNames = new String[] { "greencurrent", "greencurrent_flow" };
String[] textureNames = new String[] { texturename, texturename + "_flow" };
this.icons = new Icon[textureNames.length];
for (int i = 0; i < this.icons.length; ++i)
@@ -29,6 +29,7 @@ import mantle.blocks.iface.IServantLogic;
public class LavaTankBlock extends BlockContainer
{
public Icon[] icons;
String texturePrefix = "";
public LavaTankBlock(int id)
{
@@ -40,10 +41,20 @@ public class LavaTankBlock extends BlockContainer
setStepSound(Block.soundGlassFootstep);
}
public LavaTankBlock(int id, String prefix)
{
this(id);
texturePrefix = prefix;
}
public String[] getTextureNames ()
{
String[] textureNames = { "lavatank_side", "lavatank_top", "searedgague_top", "searedgague_side", "searedgague_bottom", "searedwindow_top", "searedwindow_side", "searedwindow_bottom" };
if (!texturePrefix.equals(""))
for (int i = 0; i < textureNames.length; i++)
textureNames[i] = texturePrefix + "_" + textureNames[i];
return textureNames;
}
@@ -33,6 +33,12 @@ public class SearedBlock extends InventoryBlock
setStepSound(soundMetalFootstep);
}
public SearedBlock(int id, String texture)
{
this(id);
this.texturePrefix = texture;
}
@Override
public TileEntity createTileEntity (World world, int metadata)
{
@@ -181,11 +187,17 @@ public class SearedBlock extends InventoryBlock
return SearedRender.searedModel;
}
String texturePrefix = "";
@Override
public String[] getTextureNames ()
{
String[] textureNames = { "castingtable_top", "castingtable_side", "castingtable_bottom", "faucet", "blockcast_top", "blockcast_side", "blockcast_bottom" };
if (!texturePrefix.equals(""))
for (int i = 0; i < textureNames.length; i++)
textureNames[i] = texturePrefix + "_" + textureNames[i];
return textureNames;
}
@@ -29,6 +29,7 @@ import tconstruct.util.config.PHConstruct;
public class SmelteryBlock extends InventoryBlock
{
Random rand;
String texturePrefix = "";
public SmelteryBlock(int id)
{
@@ -41,6 +42,12 @@ public class SmelteryBlock extends InventoryBlock
this.setUnlocalizedName("tconstruct.Smeltery");
}
public SmelteryBlock(int id, String prefix)
{
this(id);
texturePrefix = prefix;
}
/* Rendering */
@Override
@@ -55,6 +62,10 @@ public class SmelteryBlock extends InventoryBlock
String[] textureNames = { "smeltery_side", "smeltery_inactive", "smeltery_active", "drain_side", "drain_out", "drain_basin", "searedbrick", "searedstone", "searedcobble", "searedpaver",
"searedbrickcracked", "searedroad", "searedbrickfancy", "searedbricksquare", "searedcreeper" };
if (!texturePrefix.equals(""))
for (int i = 0; i < textureNames.length; i++)
textureNames[i] = texturePrefix + "_" + textureNames[i];
return textureNames;
}
@@ -13,7 +13,7 @@ import net.minecraft.world.World;
public class SoilBlock extends TConstructBlock
{
static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue" };
static String[] soilTypes = new String[] { "slimesand", "grout", "slimesandblue", "graveyardsoil", "consecratedsoil", "slimedirt_blue", "nether_grout" };
public SoilBlock(int id)
{
@@ -865,7 +865,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
Block block = Block.blocksList[blockID];
if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos))
{
if (blockID == TRepo.smeltery.blockID)
if (validBlockID(blockID))
return validateBottom(x, y, z, count);
else
return count;
@@ -900,7 +900,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
if (worldObj.getBlockId(xPos, y, zPos) == TRepo.smeltery.blockID && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
if (validBlockID(worldObj.getBlockId(xPos, y, zPos)) && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
@@ -920,7 +920,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
int tempBricks = 0;
int blockID = worldObj.getBlockId(x, y, z);
if (blockID == TRepo.smeltery.blockID || blockID == TRepo.lavaTank.blockID)
if (validBlockID(blockID) || validTankID(blockID))
{
TileEntity te = worldObj.getBlockTileEntity(x, y, z);
if (te == this)
@@ -949,6 +949,16 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return tempBricks;
}
boolean validBlockID (int blockID)
{
return blockID == TRepo.smeltery.blockID || blockID == TRepo.smelteryNether.blockID;
}
boolean validTankID (int blockID)
{
return blockID == TRepo.lavaTank.blockID || blockID == TRepo.lavaTankNether.blockID;
}
public int getCapacity ()
{
return maxLiquid;
@@ -1155,7 +1165,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
// IDebuggable
@Override
public DebugData getDebugInfo(EntityPlayer player) {
public DebugData getDebugInfo (EntityPlayer player)
{
List<String> str = new ArrayList<String>(Arrays.asList(super.getDebugInfo(player).strings));
str.add("layers: " + layers + ", liquid: " + currentLiquid + "/" + maxLiquid + ", direction: " + direction);
str.add("inUse: " + inUse + ", tick: " + tick);
@@ -138,8 +138,8 @@ public class SlimeGrass extends MantleBlock
public int idDropped (int metadata, Random random, int fortune)
{
if (metadata == 1)
return TRepo.craftedSoil.blockID;
else
return Block.dirt.blockID;
else
return TRepo.craftedSoil.blockID;
}
}
@@ -116,6 +116,7 @@ public class TContent implements IFuelHandler
//Smeltery
TRepo.smeltery = new SmelteryBlock(PHConstruct.smeltery).setUnlocalizedName("Smeltery");
TRepo.smelteryNether = new SmelteryBlock(PHConstruct.smelteryNether, "nether").setUnlocalizedName("Smeltery");
TRepo.lavaTank = new LavaTankBlock(PHConstruct.lavaTank).setUnlocalizedName("LavaTank");
TRepo.lavaTank.setStepSound(Block.soundGlassFootstep);
@@ -375,8 +376,10 @@ public class TContent implements IFuelHandler
TRepo.slimeTallGrass = new SlimeTallGrass(PHConstruct.slimeTallGrass).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("slime.grass.tall");
TRepo.slimeLeaves = (SlimeLeaves) new SlimeLeaves(PHConstruct.slimeLeaves).setStepSound(TRepo.slimeStep).setLightOpacity(0).setUnlocalizedName("slime.leaves");
TRepo.slimeSapling = (SlimeSapling) new SlimeSapling(PHConstruct.slimeSapling).setStepSound(TRepo.slimeStep).setUnlocalizedName("slime.sapling");
TRepo.slimeChannel = new ConveyorBase(PHConstruct.slimeChannel, Material.water).setStepSound(TRepo.slimeStep).setUnlocalizedName("slime.channel");
TRepo.slimePad = new SlimePad(PHConstruct.slimePad, Material.cloth).setStepSound(TRepo.slimeStep).setUnlocalizedName("slime.pad");
TRepo.slimeChannel = new ConveyorBase(PHConstruct.slimeChannel, Material.water, "greencurrent").setHardness(0.3f).setStepSound(TRepo.slimeStep).setUnlocalizedName("slime.channel");
TRepo.bloodChannel = new ConveyorBase(PHConstruct.bloodChannel, Material.water, "liquid_cow").setHardness(0.3f).setStepSound(TRepo.slimeStep).setUnlocalizedName("blood.channel");
TRepo.slimePad = new SlimePad(PHConstruct.slimePad, Material.cloth).setStepSound(TRepo.slimeStep).setHardness(0.3f).setUnlocalizedName("slime.pad");
//Decoration
TRepo.stoneTorch = new StoneTorch(PHConstruct.stoneTorch).setUnlocalizedName("decoration.stonetorch");
+40 -8
View File
@@ -75,6 +75,7 @@ public class TRecipes
//Smeltery stuff
GameRegistry.registerBlock(TRepo.smeltery, SmelteryItemBlock.class, "Smeltery");
GameRegistry.registerBlock(TRepo.smelteryNether, SmelteryItemBlock.class, "SmelteryNether");
if (PHConstruct.newSmeltery)
{
GameRegistry.registerTileEntity(AdaptiveSmelteryLogic.class, "TConstruct.Smeltery");
@@ -121,8 +122,10 @@ public class TRecipes
GameRegistry.registerBlock(TRepo.slimeLeaves, SlimeLeavesItemBlock.class, "slime.leaves");
GameRegistry.registerBlock(TRepo.slimeSapling, SlimeSaplingItemBlock.class, "slime.sapling");
GameRegistry.registerBlock(TRepo.slimeChannel, "slime.channel");
GameRegistry.registerBlock(TRepo.bloodChannel, "blood.channel");
GameRegistry.registerBlock(TRepo.slimePad, "slime.pad");
TConstructRegistry.drawbridgeState[TRepo.slimePad.blockID] = 1;
TConstructRegistry.drawbridgeState[TRepo.bloodChannel.blockID] = 1;
//Decoration
GameRegistry.registerBlock(TRepo.stoneTorch, "decoration.stonetorch");
@@ -346,6 +349,7 @@ public class TRecipes
//Misc
tableCasting.addCastingRecipe(new ItemStack(Item.emerald), new FluidStack(TRepo.moltenEmeraldFluid, 640), gemcast, 80);
tableCasting.addCastingRecipe(new ItemStack(TRepo.materials, 1, 36), new FluidStack(TRepo.glueFluid, TConstruct.ingotLiquidValue), null, 50);
tableCasting.addCastingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), new FluidStack(TRepo.bloodFluid, 160), null, 50);
//Buckets
ItemStack bucket = new ItemStack(Item.bucketEmpty);
@@ -387,7 +391,7 @@ public class TRecipes
}
}
ItemStack[] ingotShapes = { new ItemStack(Item.brick), new ItemStack(Item.netherrackBrick), new ItemStack(TRepo.materials, 1, 2) };
ItemStack[] ingotShapes = { new ItemStack(Item.brick), new ItemStack(Item.netherrackBrick), new ItemStack(TRepo.materials, 1, 2), new ItemStack(TRepo.materials, 1, 37) };
for (int i = 0; i < ingotShapes.length; i++)
{
tableCasting.addCastingRecipe(ingotcast, new FluidStack(TRepo.moltenAlubrassFluid, TConstruct.ingotLiquidValue), ingotShapes[i], false, 50);
@@ -421,11 +425,13 @@ public class TRecipes
FurnaceRecipes.smelting().addSmelting(TRepo.craftedSoil.blockID, 0, new ItemStack(TRepo.materials, 1, 1), 2f); //Slime
FurnaceRecipes.smelting().addSmelting(TRepo.craftedSoil.blockID, 1, new ItemStack(TRepo.materials, 1, 2), 2f); //Seared brick item
FurnaceRecipes.smelting().addSmelting(TRepo.craftedSoil.blockID, 2, new ItemStack(TRepo.materials, 1, 17), 2f); //Blue Slime
FurnaceRecipes.smelting().addSmelting(TRepo.craftedSoil.blockID, 6, new ItemStack(TRepo.materials, 1, 37), 2f); //Nether seared brick
//FurnaceRecipes.smelting().addSmelting(TRepo.oreSlag.blockID, 1, new ItemStack(TRepo.materials, 1, 3), 3f);
//FurnaceRecipes.smelting().addSmelting(TRepo.oreSlag.blockID, 2, new ItemStack(TRepo.materials, 1, 4), 3f);
FurnaceRecipes.smelting().addSmelting(TRepo.oreSlag.blockID, 3, new ItemStack(TRepo.materials, 1, 9), 0.5f);
FurnaceRecipes.smelting().addSmelting(TRepo.oreSlag.blockID, 4, new ItemStack(TRepo.materials, 1, 10), 0.5f);
FurnaceRecipes.smelting().addSmelting(TRepo.oreSlag.blockID, 5, new ItemStack(TRepo.materials, 1, 11), 0.5f);
FurnaceRecipes.smelting().addSmelting(TRepo.oreSlag.blockID, 5, new ItemStack(TRepo.materials, 1, 12), 0.5f);
FurnaceRecipes.smelting().addSmelting(TRepo.oreBerries.itemID, 0, new ItemStack(TRepo.materials, 1, 19), 0.2f);
FurnaceRecipes.smelting().addSmelting(TRepo.oreBerries.itemID, 1, new ItemStack(Item.goldNugget), 0.2f);
@@ -505,8 +511,9 @@ public class TRecipes
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 1, 2), TRepo.strangeFood, TRepo.strangeFood, TRepo.strangeFood, TRepo.strangeFood, Block.sand, Block.dirt);
// Grout Recipes
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 1), Item.clay, Block.sand, Block.gravel);
GameRegistry.addRecipe(new ItemStack(TRepo.craftedSoil, 8, 1), "sgs", "gcg", "sgs", 'c', new ItemStack(Block.stainedClay, 1, Short.MAX_VALUE), 's', Block.sand, 'g', Block.gravel);
GameRegistry.addRecipe(new ItemStack(TRepo.craftedSoil, 8, 1), "sgs", "gcg", "sgs", 'c', new ItemStack(Block.blockClay, 1, Short.MAX_VALUE), 's', Block.sand, 'g', Block.gravel);
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 8, 1), new ItemStack(Block.blockClay, 1, Short.MAX_VALUE), Block.sand, Block.sand, Block.sand, Block.sand, Block.gravel,
Block.gravel, Block.gravel, Block.gravel);
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Item.netherStalkSeeds, Block.slowSand, Block.gravel);
// Graveyard Soil Recipes
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 1, 3), Block.dirt, Item.rottenFlesh, new ItemStack(Item.dyePowder, 1, 15));
// Silky Cloth Recipes
@@ -608,6 +615,18 @@ public class TRecipes
GameRegistry.addRecipe(new ItemStack(TRepo.searedBlock, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); //Basin
GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); //Channel
searedBrick = new ItemStack(TRepo.materials, 1, 37);
GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 0), "bbb", "b b", "bbb", 'b', searedBrick); //Controller
GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 1), "b b", "b b", "b b", 'b', searedBrick); //Drain
GameRegistry.addRecipe(new ItemStack(TRepo.smelteryNether, 1, 2), "bb", "bb", 'b', searedBrick); //Bricks
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 0), patSurround, '#', searedBrick, 'm', "glass")); //Tank
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 1), "bgb", "ggg", "bgb", 'b', searedBrick, 'g', "glass")); //Glass
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.lavaTankNether, 1, 2), "bgb", "bgb", "bgb", 'b', searedBrick, 'g', "glass")); //Window
GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 0), "bbb", "b b", "b b", 'b', searedBrick); //Table
GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 1), "b b", " b ", 'b', searedBrick); //Faucet
GameRegistry.addRecipe(new ItemStack(TRepo.searedBlockNether, 1, 2), "b b", "b b", "bbb", 'b', searedBrick); //Basin
GameRegistry.addRecipe(new ItemStack(TRepo.castingChannel, 4, 0), "b b", "bbb", 'b', searedBrick); //Channel
// Jack o'Latern Recipe - Stone Torch
GameRegistry.addRecipe(new ItemStack(Block.pumpkinLantern, 1, 0), "p", "s", 'p', new ItemStack(Block.pumpkin), 's', new ItemStack(TRepo.stoneTorch));
// Stone Torch Recipe
@@ -629,6 +648,8 @@ public class TRecipes
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotAluminum"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotAluminium"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#', "ingotNaturalAluminum"));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.heartCanister, 1, 0), " # ", "#B#", " # ", '#', "ingotTin", 'B', Item.bone));
GameRegistry.addRecipe(new ItemStack(TRepo.diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Item.diamond), '#', new ItemStack(Item.appleRed));
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.diamondApple), new ItemStack(TRepo.materials, 1, 8), new ItemStack(TRepo.heartCanister, 1, 0),
new ItemStack(TRepo.heartCanister, 1, 1));
@@ -710,7 +731,10 @@ public class TRecipes
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimeExplosive, 1, 0), "slimeball", Block.tnt));
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.slimeChannel, 1, 0), new ItemStack(TRepo.slimeGel, 1, Short.MAX_VALUE), new ItemStack(Item.redstone));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimePad, 1, 0), TRepo.slimeChannel, "slimeBall"));
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.bloodChannel, 1, 0), new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(TRepo.strangeFood, 1, 1),
new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(TRepo.strangeFood, 1, 1), new ItemStack(Item.redstone));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimeChannel, 1, 0), "slimeball", "slimeball", "slimeball", "slimeball", new ItemStack(Item.redstone)));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(TRepo.slimePad, 1, 0), TRepo.slimeChannel, "slimeball"));
}
protected static void addRecipesForDryingRack ()
@@ -722,6 +746,8 @@ public class TRecipes
//DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 3));
DryingRackRecipes.addDryingRecipe(Item.fishRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 4));
DryingRackRecipes.addDryingRecipe(Item.rottenFlesh, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 5));
DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 6));
DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 7));
//DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.jerky, 1, 5), 20 * 60 * 10, Item.leather);
}
@@ -878,6 +904,7 @@ public class TRecipes
//Vanilla stuff
OreDictionary.registerOre("slimeball", new ItemStack(Item.slimeBall));
OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 0));
OreDictionary.registerOre("slimeball", new ItemStack(TRepo.strangeFood, 1, 1));
OreDictionary.registerOre("slimeball", new ItemStack(TRepo.materials, 1, 36));
OreDictionary.registerOre("glass", new ItemStack(TRepo.clearGlass));
OreDictionary.registerOre("glass", new ItemStack(Block.glass));
@@ -1083,8 +1110,8 @@ public class TRecipes
TConstruct.ingotLiquidValue * 5), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue * 2), new FluidStack(TRepo.moltenObsidianFluid, TConstruct.ingotLiquidValue * 2)); //Alumite
Smeltery.addAlloyMixing(new FluidStack(TRepo.moltenManyullynFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy)), new FluidStack(TRepo.moltenCobaltFluid,
TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenArditeFluid, TConstruct.ingotLiquidValue)); //Manyullyn
Smeltery.addAlloyMixing(new FluidStack(TRepo.pigIronFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy)), new FluidStack(TRepo.moltenIronFluid, TConstruct.ingotLiquidValue),
new FluidStack(TRepo.moltenEmeraldFluid, 640), new FluidStack(TRepo.bloodFluid, 80)); //Pigiron
Smeltery.addAlloyMixing(new FluidStack(TRepo.pigIronFluid, (int) (TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy)), new FluidStack(TRepo.moltenIronFluid,
TConstruct.ingotLiquidValue), new FluidStack(TRepo.moltenEmeraldFluid, 640), new FluidStack(TRepo.bloodFluid, 80)); //Pigiron
// Stone parts
for (int sc = 0; sc < TRepo.patternOutputs.length; sc++)
@@ -1219,6 +1246,12 @@ public class TRecipes
public static void modIntegration ()
{
/* Natura */
Block taintedSoil = GameRegistry.findBlock("Natura", "soil.tainted");
Block heatSand = GameRegistry.findBlock("Natura", "heatsand");
if (taintedSoil != null && heatSand != null)
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Item.netherStalkSeeds, taintedSoil, heatSand);
ItemStack ironpick = ToolBuilder.instance.buildTool(new ItemStack(TRepo.pickaxeHead, 1, 6), new ItemStack(TRepo.toolRod, 1, 2), new ItemStack(TRepo.binding, 1, 6), "");
/*TE3 Flux*/
ItemStack batHardened = GameRegistry.findItemStack("ThermalExpansion", "capacitorHardened", 1);
@@ -1359,7 +1392,6 @@ public class TRecipes
{
FurnaceRecipes.smelting().addSmelting(TRepo.materials.itemID, 36, ores.get(0), 0.2f);
}
//new ItemStack(TRepo.materials, 1, 36)
}
public static Object getStaticItem (String name, String classPackage)
@@ -113,6 +113,9 @@ public class TRepo
public static Block castingChannel;
public static Block metalBlock;
public static Block tankAir;
public static Block smelteryNether;
public static Block lavaTankNether;
public static Block searedBlockNether;
public static Block dryingRack;
@@ -217,6 +220,7 @@ public class TRepo
public static Block slimeChannel;
public static Block slimePad;
public static Block bloodChannel;
//Glue
public static Fluid glueFluid;
+41 -5
View File
@@ -1,19 +1,26 @@
package tconstruct.items;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class Jerky extends SpecialFood
{
public static String[] textureNames = new String[] { "beef", "chicken", "pork", "mutton", "fish", "monster" };
public static String[] itemNames = new String[] { "jerky.beef", "jerky.chicken", "jerky.pig", "jerky.sheep", "jerky.fish", "jerky.zombie" };
public static int[] hunger = new int[] { 8, 6, 8, 6, 5, 4 };
public static float[] saturation = new float[] { 1.0f, 0.8f, 1.0f, 0.8f, 0.8f, 0.4f };
public static int[] overhaulHunger = new int[] { 1, 1, 1, 1, 1, 1 };
public static String[] textureNames = new String[] { "beef", "chicken", "pork", "mutton", "fish", "monster", "blueslime", "blood" };
public static String[] itemNames = new String[] { "jerky.beef", "jerky.chicken", "jerky.pig", "jerky.sheep", "jerky.fish", "jerky.zombie", "jerky.blueslime", "jerky.blood" };
public static int[] hunger = new int[] { 8, 6, 8, 6, 5, 4, 6, 4 };
public static float[] saturation = new float[] { 1.0f, 0.8f, 1.0f, 0.8f, 0.8f, 0.4f, 1.0f, 0.25f };
public static int[] overhaulHunger = new int[] { 1, 1, 1, 1, 1, 1, 1, 1 };
public Jerky(int id, boolean hungerOverhaul)
{
@@ -38,4 +45,33 @@ public class Jerky extends SpecialFood
int arr = MathHelper.clamp_int(stack.getItemDamage(), 0, unlocalizedNames.length);
return "item.tconstruct." + unlocalizedNames[arr];
}
@Override
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
{
if (stack.getItemDamage() == 7)
{
int duration = 20 * 30;
PotionEffect potion = player.getActivePotionEffect(Potion.regeneration);
if (potion != null)
duration = potion.duration;
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0));
}
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
{
int type = stack.getItemDamage();
switch (type)
{
case 6:
list.add("\u00a7b" + StatCollector.translateToLocal("strangefood5.tooltip"));
break;
case 7:
list.add("\u00a74" + StatCollector.translateToLocal("strangefood6.tooltip"));
break;
}
}
}
@@ -21,13 +21,14 @@ public class MaterialItem extends CraftingItem
return names;
}
static String[] materialNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AluBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot", "IronNugget", "CopperNugget", "TinNugget",
"AluminumNugget", "EssenceCrystal", "AluBrassNugget", "SilkyCloth", "SilkyJewel", "ObsidianNugget", "CobaltNugget", "ArditeNugget", "ManyullynNugget", "BronzeNugget", "AlumiteNugget",
"SteelNugget", "PigIronIngot", "PigIronNugget", "GlueBall" };
"SteelNugget", "PigIronIngot", "PigIronNugget", "GlueBall", "SearedBrick" };
static String[] craftingTextures = new String[] { "paperstack", "slimecrystal", "searedbrick", "cobaltingot", "arditeingot", "manyullyningot", "mossball", "lavacrystal", "necroticbone",
"copperingot", "tiningot", "aluminumingot", "aluminumraw", "bronzeingot", "alubrassingot", "alumiteingot", "steelingot", "blueslimecrystal", "obsidianingot", "nugget_iron",
"nugget_copper", "nugget_tin", "nugget_aluminum", "", "nugget_alubrass", "silkycloth", "silkyjewel", "nugget_obsidian", "nugget_cobalt", "nugget_ardite", "nugget_manyullyn",
"nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball" };
"nugget_bronze", "nugget_alumite", "nugget_steel", "pigironingot", "nugget_pigiron", "glueball", "searedbrick_nether" };
}
@@ -2,7 +2,10 @@ package tconstruct.items;
import java.util.List;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
@@ -12,14 +15,31 @@ public class StrangeFood extends SpecialFood
{
public StrangeFood(int id)
{
super(id, new int[] { 2 }, new float[] { 1f }, new String[] { "edibleslime" }, new String[] { "food/edibleslime" });
super(id, new int[] { 2, 2 }, new float[] { 1f, 1f }, new String[] { "edibleslime", "edibleblood" }, new String[] { "food/edibleslime", "food/edibleblood" });
}
@Override
protected void onFoodEaten (ItemStack stack, World world, EntityPlayer player)
{
if (stack.getItemDamage() == 1)
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 20*15, 0));
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("\u00a7b\u00a7o"+StatCollector.translateToLocal("strangefood1.tooltip"));
list.add("\u00a7b\u00a7o"+StatCollector.translateToLocal("strangefood2.tooltip"));
int type = stack.getItemDamage();
switch (type)
{
case 0:
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood1.tooltip"));
list.add("\u00a7b\u00a7o" + StatCollector.translateToLocal("strangefood2.tooltip"));
break;
case 1:
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood3.tooltip"));
list.add("\u00a74\u00a7o" + StatCollector.translateToLocal("strangefood4.tooltip"));
break;
}
}
}
@@ -12,7 +12,7 @@ import net.minecraft.util.StatCollector;
public class CraftedSoilItemBlock extends ItemBlock
{
public static final String blockType[] = { "Slime", "Grout", "BlueSlime", "GraveyardSoil", "ConsecratedSoil", "blue", "dirt" };
public static final String blockType[] = { "Slime", "Grout", "BlueSlime", "GraveyardSoil", "ConsecratedSoil", "blue", "dirt", "Grout" };
public CraftedSoilItemBlock(int id)
{
@@ -252,7 +252,7 @@ public class TEventHandler
{
if (event.entityLiving == null)
return;
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
@@ -275,7 +275,7 @@ public class TEventHandler
}
}
if (random.nextInt(500) == 0 && event.entityLiving instanceof IMob && event.entityLiving.dimension == 0)
if (random.nextInt(500) == 0 && event.entityLiving instanceof IMob)
{
ItemStack dropStack = new ItemStack(TRepo.heartCanister, 1, 1);
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack);
@@ -532,7 +532,7 @@ public class TEventHandler
@ForgeSubscribe
public void registerOre (OreRegisterEvent evt)
{
if (evt.Name == "crystalQuartz")
{
ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 2));
@@ -23,8 +23,8 @@ public class PHConstruct
/* Define the mod's IDs.
* Avoid values below 4096 for items and in the 250-450 range for blocks
*/
superfunWorld = config.get("Superfun", "All the world is Superfun", false).getBoolean(false);
superfunWorld = config.get("Superfun", "All the world is Superfun", false).getBoolean(false);
keepHunger = config.get("Difficulty Changes", "Keep hunger on death", true).getBoolean(true);
keepLevels = config.get("Difficulty Changes", "Keep levels on death", true).getBoolean(true);
@@ -47,14 +47,14 @@ public class PHConstruct
stencilTableCrafting = config.get("Difficulty Changes", "Craft Stencil Tables", true).getBoolean(true);
miningLevelIncrease = config.get("Difficulty Changes", "Modifiers increase Mining Level", true).getBoolean(true);
denyMattock = config.get("Difficulty Changes", "Deny creation of non-metal mattocks", false).getBoolean(false);
ingotsPerOre = config.get("Smeltery Output Modification", "Ingots per ore", 2, "Number of ingots returned from smelting ores in the smeltery").getDouble(2);
ingotsBronzeAlloy = config.get("Smeltery Output Modification", "Bronze ingot return", 3, "Number of ingots returned from smelting Bronze in the smeltery").getDouble(3);
ingotsAluminumBrassAlloy = config.get("Smeltery Output Modification", "Aluminum Brass ingot return", 4, "Number of ingots returned from smelting Aluminum Brass in the smeltery").getDouble(4);
ingotsAlumiteAlloy = config.get("Smeltery Output Modification", "Alumite ingot return", 3, "Number of ingots returned from smelting Alumite in the smeltery").getDouble(3);
ingotsManyullynAlloy = config.get("Smeltery Output Modification", "Manyullyn ingot return", 1, "Number of ingots returned from smelting Manyullyn in the smeltery").getDouble(1);
ingotsPigironAlloy = config.get("Smeltery Output Modification", "Pig Iron ingot return", 1, "Number of ingots returned from smelting Pig Iron in the smeltery").getDouble(1);
ingotsPerOre = config.get("Smeltery Output Modification", "Ingots per ore", 2, "Number of ingots returned from smelting ores in the smeltery").getDouble(2);
ingotsBronzeAlloy = config.get("Smeltery Output Modification", "Bronze ingot return", 3, "Number of ingots returned from smelting Bronze in the smeltery").getDouble(3);
ingotsAluminumBrassAlloy = config.get("Smeltery Output Modification", "Aluminum Brass ingot return", 4, "Number of ingots returned from smelting Aluminum Brass in the smeltery").getDouble(4);
ingotsAlumiteAlloy = config.get("Smeltery Output Modification", "Alumite ingot return", 3, "Number of ingots returned from smelting Alumite in the smeltery").getDouble(3);
ingotsManyullynAlloy = config.get("Smeltery Output Modification", "Manyullyn ingot return", 1, "Number of ingots returned from smelting Manyullyn in the smeltery").getDouble(1);
ingotsPigironAlloy = config.get("Smeltery Output Modification", "Pig Iron ingot return", 1, "Number of ingots returned from smelting Pig Iron in the smeltery").getDouble(1);
//1467-1489
woodStation = config.getBlock("Wood Tool Station", 1471).getInt(1471);
heldItemBlock = config.getBlock("Held Item Block", 1472).getInt(1472);
@@ -86,6 +86,11 @@ public class PHConstruct
barricadeBirch = config.getBlock("Birch Barricade", 1483).getInt(1483);
barricadeJungle = config.getBlock("Jungle Barricade", 1487).getInt(1487);
lavaTankNether = config.getBlock("Nether Lava Tank", 3186).getInt(3186);
smelteryNether = config.getBlock("Nether Smeltery", 3187).getInt(3187);
searedTableNether = config.getBlock("Nether Seared Block", 3188).getInt(3188);
bloodChannel = config.getBlock("Blood Channel", 3189).getInt(3189);
slimeChannel = config.getBlock("Slime Channel", 3190).getInt(3190);
slimePad = config.getBlock("Slime Pad", 3191).getInt(3191);
@@ -116,16 +121,16 @@ public class PHConstruct
moltenEmerald = config.getBlock("Molten Emerald", 3216).getInt(3216);
blood = config.getBlock("Liquid Cow", 3217).getInt(3217);
moltenEnder = config.getBlock("Molten Ender", 3218).getInt(3218);
glueBlock = config.getBlock("Glue Block", 3219).getInt(3219);
glueFluidBlock = config.getBlock("Glue Fluid Block", 3220).getInt(3220);
// signalBus = config.getBlock("Signal Bus", 3221).getInt(3221);
// signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222);
// signalBus = config.getBlock("Signal Bus", 3221).getInt(3221);
// signalTerminal = config.getBlock("Signal Terminal", 3222).getInt(3222);
glass = config.getBlock("Clear Glass", 3223).getInt(3223);
stainedGlass = config.getBlock("Stained Glass", 3224).getInt(3224);
stainedGlassClear = config.getBlock("Clear Stained Glass", 3225).getInt(3225);
// redstoneMachine = config.getBlock("Redstone Machines", 3226).getInt(3226); // Migrated to TMechworks
// redstoneMachine = config.getBlock("Redstone Machines", 3226).getInt(3226); // Migrated to TMechworks
dryingRack = config.getBlock("Drying Rack", 3227).getInt(3227);
glassPane = config.getBlock("Glass Pane", 3228).getInt(3228);
stainedGlassClearPane = config.getBlock("Clear Stained Glass Pane", 3229).getInt(3229);
@@ -368,7 +373,7 @@ public class PHConstruct
//Achievement Properties
achievementsEnabled = config.get("Achievement Properties", "AchievementsEnabled", true).getBoolean(true);
/* Save the configuration file */
config.save();
@@ -395,6 +400,9 @@ public class PHConstruct
public static int lavaTank;
public static int smeltery;
public static int searedTable;
public static int lavaTankNether;
public static int smelteryNether;
public static int searedTableNether;
public static int castingChannel;
public static int airTank;
@@ -469,6 +477,7 @@ public class PHConstruct
public static int slimeChannel;
public static int slimePad;
public static int bloodChannel;
// Glue
public static int glueFluidBlock;
@@ -575,7 +584,7 @@ public class PHConstruct
public static int knapsack;
public static int heartCanister;
public static int exoGoggles;
public static int exoChest;
public static int exoPants;
@@ -676,12 +685,12 @@ public class PHConstruct
public static boolean miningLevelIncrease;
public static boolean denyMattock;
//Smeltery Output Modification
public static double ingotsPerOre;
public static double ingotsBronzeAlloy;
public static double ingotsAluminumBrassAlloy;
public static double ingotsAlumiteAlloy;
public static double ingotsManyullynAlloy;
//Smeltery Output Modification
public static double ingotsPerOre;
public static double ingotsBronzeAlloy;
public static double ingotsAluminumBrassAlloy;
public static double ingotsAlumiteAlloy;
public static double ingotsManyullynAlloy;
public static double ingotsPigironAlloy;
//Ultra Hardcore modifiers
@@ -721,7 +730,7 @@ public class PHConstruct
//Addon stuff
public static boolean isCleaverTwoHanded;
public static boolean isHatchetWeapon;
//Achievement options
public static boolean achievementsEnabled;
}