diff --git a/mods/tinker/resources/lang/en_US.xml b/mods/tinker/resources/lang/en_US.xml
index 676822cb..8a1f25e6 100644
--- a/mods/tinker/resources/lang/en_US.xml
+++ b/mods/tinker/resources/lang/en_US.xml
@@ -80,7 +80,7 @@
Manyullyn Ingot
Ball of Moss
Lava Crystal
- Necrotic Bone"
+ Necrotic Bone
Copper Ingot
Tin Ingot
Aluminum Ingot
diff --git a/mods/tinker/tconstruct/TConstruct.java b/mods/tinker/tconstruct/TConstruct.java
index e1d5d25c..0886febd 100644
--- a/mods/tinker/tconstruct/TConstruct.java
+++ b/mods/tinker/tconstruct/TConstruct.java
@@ -37,7 +37,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
* @dependencies: IC2 API
*/
-@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.2.15", dependencies = "required-after:Forge@[7.7.1.675,)")
+@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.3.6", dependencies = "required-after:Forge@[7.7.1.675,)")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.util.network.TPacketHandler.class)
public class TConstruct
{
@@ -72,7 +72,7 @@ public class TConstruct
content.oreRegistry();
proxy.registerRenderer();
- //proxy.registerTickHandler();
+ proxy.registerTickHandler();
proxy.addNames();
proxy.readManuals();
proxy.registerKeys();
@@ -89,9 +89,6 @@ public class TConstruct
VillagerRegistry.instance().registerVillageCreationHandler(new VillageToolStationHandler());
VillagerRegistry.instance().registerVillageCreationHandler(new VillageSmelteryHandler());
}
-
- DimensionManager.unregisterProviderType(0);
- DimensionManager.registerProviderType(0, OverworldProvider.class, true);
}
@Init
diff --git a/mods/tinker/tconstruct/blocks/LiquidMetalBase.java b/mods/tinker/tconstruct/blocks/LiquidMetalBase.java
index b205426f..852ee4f8 100644
--- a/mods/tinker/tconstruct/blocks/LiquidMetalBase.java
+++ b/mods/tinker/tconstruct/blocks/LiquidMetalBase.java
@@ -11,9 +11,12 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
@@ -24,639 +27,650 @@ import cpw.mods.fml.relauncher.SideOnly;
public abstract class LiquidMetalBase extends Block
{
- public String[] textureNames;
- public Icon[] stillInoms;
- public Icon[] flowInoms;
-
- protected LiquidMetalBase(int par1, Material par2Material)
- {
- super(par1, par2Material);
- textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel" };
- setLightValue(0.625F);
- }
-
- @Override
- public void registerIcons (IconRegister iconRegister)
- {
- this.stillInoms = new Icon[textureNames.length];
- this.flowInoms = new Icon[textureNames.length];
-
- for (int i = 0; i < this.stillInoms.length; ++i)
- {
- this.stillInoms[i] = iconRegister.registerIcon("tinker:liquid_" + textureNames[i]);
- this.flowInoms[i] = iconRegister.registerIcon("tinker:liquid_" + textureNames[i] + "_flow");
- }
- }
-
- @Override
- public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
- {
- TileEntity logic = world.getBlockTileEntity(x, y, z);
- if (logic != null && logic instanceof LiquidTextureLogic)
- {
- if (side == 1 || side == 0)
- return stillInoms[((LiquidTextureLogic) logic).getLiquidType()];
- else
- return flowInoms[((LiquidTextureLogic) logic).getLiquidType()];
- }
-
- int meta = world.getBlockMetadata(x, y, z);
- return getIcon(side, meta);
- }
-
- @Override
- public Icon getIcon (int side, int meta)
- {
- int pos = MathHelper.clamp_int(meta, 0, stillInoms.length-1);
- if (side == 0 || side == 1)
- return (stillInoms[pos]);
- return flowInoms[pos];
- }
-
- @Override
- public int getRenderType ()
- {
- return FluidRender.fluidModel;
- }
-
- @SideOnly(Side.CLIENT)
- public static double getFlowDirection (IBlockAccess par0IBlockAccess, int par1, int par2, int par3, Material par4Material)
- {
- Vec3 var5 = ((LiquidMetalBase) TContent.liquidMetalFlowing).getFlowVector(par0IBlockAccess, par1, par2, par3);
-
- /*if (par4Material == Material.water)
- {
- var5 = ((BlockFluid)Block.waterMoving).getFlowVector(par0IBlockAccess, par1, par2, par3);
- }
-
- if (par4Material == Material.lava)
- {
- var5 = ((BlockFluid)Block.lavaMoving).getFlowVector(par0IBlockAccess, par1, par2, par3);
- }*/
-
- return var5.xCoord == 0.0D && var5.zCoord == 0.0D ? -1000.0D : Math.atan2(var5.zCoord, var5.xCoord) - (Math.PI / 2D);
- }
-
- private Vec3 getFlowVector (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- Vec3 var5 = par1IBlockAccess.getWorldVec3Pool().getVecFromPool(0.0D, 0.0D, 0.0D);
- int var6 = this.getEffectiveFlowDecay(par1IBlockAccess, par2, par3, par4);
-
- for (int var7 = 0; var7 < 4; ++var7)
- {
- int var8 = par2;
- int var10 = par4;
-
- if (var7 == 0)
- {
- var8 = par2 - 1;
- }
-
- if (var7 == 1)
- {
- var10 = par4 - 1;
- }
-
- if (var7 == 2)
- {
- ++var8;
- }
-
- if (var7 == 3)
- {
- ++var10;
- }
-
- int var11 = this.getEffectiveFlowDecay(par1IBlockAccess, var8, par3, var10);
- int var12;
-
- if (var11 < 0)
- {
- if (!par1IBlockAccess.getBlockMaterial(var8, par3, var10).blocksMovement())
- {
- var11 = this.getEffectiveFlowDecay(par1IBlockAccess, var8, par3 - 1, var10);
-
- if (var11 >= 0)
- {
- var12 = var11 - (var6 - 8);
- var5 = var5.addVector((double) ((var8 - par2) * var12), (double) ((par3 - par3) * var12), (double) ((var10 - par4) * var12));
- }
- }
- }
- else if (var11 >= 0)
- {
- var12 = var11 - var6;
- var5 = var5.addVector((double) ((var8 - par2) * var12), (double) ((par3 - par3) * var12), (double) ((var10 - par4) * var12));
- }
- }
-
- if (par1IBlockAccess.getBlockMetadata(par2, par3, par4) >= 8)
- {
- boolean var13 = false;
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3, par4 - 1, 2))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3, par4 + 1, 3))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2 - 1, par3, par4, 4))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2 + 1, par3, par4, 5))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3 + 1, par4 - 1, 2))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3 + 1, par4 + 1, 3))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2 - 1, par3 + 1, par4, 4))
- {
- var13 = true;
- }
-
- if (var13 || this.isBlockSolid(par1IBlockAccess, par2 + 1, par3 + 1, par4, 5))
- {
- var13 = true;
- }
-
- if (var13)
- {
- var5 = var5.normalize().addVector(0.0D, -6.0D, 0.0D);
- }
- }
-
- var5 = var5.normalize();
- return var5;
- }
-
- public boolean getBlocksMovement (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- return this.blockMaterial != Material.lava;
- }
-
- @SideOnly(Side.CLIENT)
- public int getBlockColor ()
- {
- return 16777215;
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
- * when first determining what to render.
- */
- public int colorMultiplier (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- if (this.blockMaterial != Material.water)
- {
- return 16777215;
- }
- else
- {
- int var5 = 0;
- int var6 = 0;
- int var7 = 0;
-
- for (int var8 = -1; var8 <= 1; ++var8)
- {
- for (int var9 = -1; var9 <= 1; ++var9)
- {
- int var10 = par1IBlockAccess.getBiomeGenForCoords(par2 + var9, par4 + var8).getWaterColorMultiplier();
- var5 += (var10 & 16711680) >> 16;
- var6 += (var10 & 65280) >> 8;
- var7 += var10 & 255;
- }
- }
-
- return (var5 / 9 & 255) << 16 | (var6 / 9 & 255) << 8 | var7 / 9 & 255;
- }
- }
-
- /**
- * Returns the percentage of the fluid block that is air, based on the given flow decay of the fluid.
- */
- public static float getFluidHeightPercent (int par0)
- {
- if (par0 >= 8)
- {
- par0 = 0;
- }
-
- return (float) (par0 + 1) / 9.0F;
- }
-
- /**
- * Returns the block texture based on the side being looked at. Args: side
- */
- /*public int getBlockTextureFromSide(int par1)
- {
- return par1 != 0 && par1 != 1 ? this.blockIndexInTexture + 1 : this.blockIndexInTexture;
- }*/
-
- /**
- * Returns the amount of fluid decay at the coordinates, or -1 if the block at the coordinates is not the same
- * material as the fluid.
- */
- protected int getFlowDecay (World par1World, int par2, int par3, int par4)
- {
- return par1World.getBlockMaterial(par2, par3, par4) == this.blockMaterial ? par1World.getBlockMetadata(par2, par3, par4) : -1;
- }
-
- /**
- * Returns the flow decay but converts values indicating falling liquid (values >=8) to their effective source block
- * value of zero.
- */
- protected int getEffectiveFlowDecay (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- if (par1IBlockAccess.getBlockMaterial(par2, par3, par4) != this.blockMaterial)
- {
- return -1;
- }
- else
- {
- int var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
-
- if (var5 >= 8)
- {
- var5 = 0;
- }
-
- return var5;
- }
- }
-
- /**
- * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
- */
- public boolean renderAsNormalBlock ()
- {
- return false;
- }
-
- /**
- * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
- * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
- */
- public boolean isOpaqueCube ()
- {
- return false;
- }
-
- /**
- * Returns whether this block is collideable based on the arguments passed in Args: blockMetaData, unknownFlag
- */
- public boolean canCollideCheck (int par1, boolean par2)
- {
- return par2 && par1 == 0;
- }
-
- /**
- * Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the
- * adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
- */
- public boolean isBlockSolid (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
- {
- Material var6 = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
- return var6 == this.blockMaterial ? false : (par5 == 1 ? true : (var6 == Material.ice ? false : super.isBlockSolid(par1IBlockAccess, par2, par3, par4, par5)));
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
- * coordinates. Args: blockAccess, x, y, z, side
- */
- public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
- {
- Material var6 = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
- return var6 == this.blockMaterial ? false : (par5 == 1 ? true : (var6 == Material.ice ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5)));
- }
-
- /**
- * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
- * cleared to be reused)
- */
- public AxisAlignedBB getCollisionBoundingBoxFromPool (World par1World, int par2, int par3, int par4)
- {
- return null;
- }
-
- /**
- * Returns the ID of the items to drop on destruction.
- */
- public int idDropped (int par1, Random par2Random, int par3)
- {
- return 0;
- }
-
- /**
- * Returns the quantity of items to drop on block destruction.
- */
- public int quantityDropped (Random par1Random)
- {
- return 0;
- }
-
- /**
- * Can add to the passed in vector for a movement vector to be applied to the entity. Args: x, y, z, entity, Vec3
- */
- public void velocityToAddToEntity (World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3)
- {
- Vec3 var7 = this.getFlowVector(par1World, par2, par3, par4);
- par6Vec3.xCoord += var7.xCoord;
- par6Vec3.yCoord += var7.yCoord;
- par6Vec3.zCoord += var7.zCoord;
- }
-
- /**
- * How many world ticks before ticking
- */
- public int tickRate ()
- {
- return 30;
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
- */
- public int getMixedBrightnessForBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- int var5 = par1IBlockAccess.getLightBrightnessForSkyBlocks(par2, par3, par4, 0);
- int var6 = par1IBlockAccess.getLightBrightnessForSkyBlocks(par2, par3 + 1, par4, 0);
- int var7 = var5 & 255;
- int var8 = var6 & 255;
- int var9 = var5 >> 16 & 255;
- int var10 = var6 >> 16 & 255;
- return (var7 > var8 ? var7 : var8) | (var9 > var10 ? var9 : var10) << 16;
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z
- */
- public float getBlockBrightness (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
- {
- return 1f;
- /*float var5 = par1IBlockAccess.getLightBrightness(par2, par3, par4);
- float var6 = par1IBlockAccess.getLightBrightness(par2, par3 + 1, par4);
- return var5 > var6 ? var5 : var6;*/
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
- */
- public int getRenderBlockPass ()
- {
- return this.blockMaterial == Material.water ? 1 : 0;
- }
-
- @SideOnly(Side.CLIENT)
- /**
- * A randomly called display update to be able to add particles or other items for display
- */
- public void randomDisplayTick (World par1World, int par2, int par3, int par4, Random par5Random)
- {
- int var6;
-
- if (this.blockMaterial == Material.water)
- {
- if (par5Random.nextInt(10) == 0)
- {
- var6 = par1World.getBlockMetadata(par2, par3, par4);
-
- if (var6 <= 0 || var6 >= 8)
- {
- par1World.spawnParticle("suspended", (double) ((float) par2 + par5Random.nextFloat()), (double) ((float) par3 + par5Random.nextFloat()),
- (double) ((float) par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
- }
- }
-
- for (var6 = 0; var6 < 0; ++var6)
- {
- int var7 = par5Random.nextInt(4);
- int var8 = par2;
- int var9 = par4;
-
- if (var7 == 0)
- {
- var8 = par2 - 1;
- }
-
- if (var7 == 1)
- {
- ++var8;
- }
-
- if (var7 == 2)
- {
- var9 = par4 - 1;
- }
-
- if (var7 == 3)
- {
- ++var9;
- }
-
- if (par1World.getBlockMaterial(var8, par3, var9) == Material.air
- && (par1World.getBlockMaterial(var8, par3 - 1, var9).blocksMovement() || par1World.getBlockMaterial(var8, par3 - 1, var9).isLiquid()))
- {
- float var10 = 0.0625F;
- double var11 = (double) ((float) par2 + par5Random.nextFloat());
- double var13 = (double) ((float) par3 + par5Random.nextFloat());
- double var15 = (double) ((float) par4 + par5Random.nextFloat());
-
- if (var7 == 0)
- {
- var11 = (double) ((float) par2 - var10);
- }
-
- if (var7 == 1)
- {
- var11 = (double) ((float) (par2 + 1) + var10);
- }
-
- if (var7 == 2)
- {
- var15 = (double) ((float) par4 - var10);
- }
-
- if (var7 == 3)
- {
- var15 = (double) ((float) (par4 + 1) + var10);
- }
-
- double var17 = 0.0D;
- double var19 = 0.0D;
-
- if (var7 == 0)
- {
- var17 = (double) (-var10);
- }
-
- if (var7 == 1)
- {
- var17 = (double) var10;
- }
-
- if (var7 == 2)
- {
- var19 = (double) (-var10);
- }
-
- if (var7 == 3)
- {
- var19 = (double) var10;
- }
-
- par1World.spawnParticle("splash", var11, var13, var15, var17, 0.0D, var19);
- }
- }
- }
-
- if (this.blockMaterial == Material.water && par5Random.nextInt(64) == 0)
- {
- var6 = par1World.getBlockMetadata(par2, par3, par4);
-
- if (var6 > 0 && var6 < 8)
- {
- par1World.playSound((double) ((float) par2 + 0.5F), (double) ((float) par3 + 0.5F), (double) ((float) par4 + 0.5F), "liquid.water", par5Random.nextFloat() * 0.25F + 0.75F,
- par5Random.nextFloat() * 1.0F + 0.5F, false);
- }
- }
-
- double var21;
- double var23;
- double var22;
-
- if (this.blockMaterial == Material.lava && par1World.getBlockMaterial(par2, par3 + 1, par4) == Material.air && !par1World.isBlockOpaqueCube(par2, par3 + 1, par4))
- {
- if (par5Random.nextInt(100) == 0)
- {
- var21 = (double) ((float) par2 + par5Random.nextFloat());
- var22 = (double) par3 + this.maxY;
- var23 = (double) ((float) par4 + par5Random.nextFloat());
- par1World.spawnParticle("lava", var21, var22, var23, 0.0D, 0.0D, 0.0D);
- par1World.playSound(var21, var22, var23, "liquid.lavapop", 0.2F + par5Random.nextFloat() * 0.2F, 0.9F + par5Random.nextFloat() * 0.15F, false);
- }
-
- if (par5Random.nextInt(200) == 0)
- {
- par1World.playSound((double) par2, (double) par3, (double) par4, "liquid.lava", 0.2F + par5Random.nextFloat() * 0.2F, 0.9F + par5Random.nextFloat() * 0.15F, false);
- }
- }
-
- if (par5Random.nextInt(10) == 0 && par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !par1World.getBlockMaterial(par2, par3 - 2, par4).blocksMovement())
- {
- var21 = (double) ((float) par2 + par5Random.nextFloat());
- var22 = (double) par3 - 1.05D;
- var23 = (double) ((float) par4 + par5Random.nextFloat());
-
- par1World.spawnParticle("dripLava", var21, var22, var23, 0.0D, 0.0D, 0.0D);
- }
- }
-
- public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
+ public String[] textureNames;
+ public Icon[] stillInoms;
+ public Icon[] flowInoms;
+
+ protected LiquidMetalBase(int par1, Material par2Material)
+ {
+ super(par1, par2Material);
+ textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel" };
+ setLightValue(0.625F);
+ }
+
+ @Override
+ public void registerIcons (IconRegister iconRegister)
+ {
+ this.stillInoms = new Icon[textureNames.length];
+ this.flowInoms = new Icon[textureNames.length];
+
+ for (int i = 0; i < this.stillInoms.length; ++i)
+ {
+ this.stillInoms[i] = iconRegister.registerIcon("tinker:liquid_" + textureNames[i]);
+ this.flowInoms[i] = iconRegister.registerIcon("tinker:liquid_" + textureNames[i] + "_flow");
+ }
+ }
+
+ @Override
+ public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
+ {
+ TileEntity logic = world.getBlockTileEntity(x, y, z);
+ if (logic != null && logic instanceof LiquidTextureLogic)
+ {
+ if (side == 1 || side == 0)
+ return stillInoms[((LiquidTextureLogic) logic).getLiquidType()];
+ else
+ return flowInoms[((LiquidTextureLogic) logic).getLiquidType()];
+ }
+
+ int meta = world.getBlockMetadata(x, y, z);
+ return getIcon(side, meta);
+ }
+
+ @Override
+ public Icon getIcon (int side, int meta)
+ {
+ int pos = MathHelper.clamp_int(meta, 0, stillInoms.length - 1);
+ if (side == 0 || side == 1)
+ return (stillInoms[pos]);
+ return flowInoms[pos];
+ }
+
+ @Override
+ public int getRenderType ()
+ {
+ return FluidRender.fluidModel;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public static double getFlowDirection (IBlockAccess par0IBlockAccess, int par1, int par2, int par3, Material par4Material)
+ {
+ Vec3 var5 = ((LiquidMetalBase) TContent.liquidMetalFlowing).getFlowVector(par0IBlockAccess, par1, par2, par3);
+
+ /*if (par4Material == Material.water)
+ {
+ var5 = ((BlockFluid)Block.waterMoving).getFlowVector(par0IBlockAccess, par1, par2, par3);
+ }
+
+ if (par4Material == Material.lava)
+ {
+ var5 = ((BlockFluid)Block.lavaMoving).getFlowVector(par0IBlockAccess, par1, par2, par3);
+ }*/
+
+ return var5.xCoord == 0.0D && var5.zCoord == 0.0D ? -1000.0D : Math.atan2(var5.zCoord, var5.xCoord) - (Math.PI / 2D);
+ }
+
+ private Vec3 getFlowVector (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ Vec3 var5 = par1IBlockAccess.getWorldVec3Pool().getVecFromPool(0.0D, 0.0D, 0.0D);
+ int var6 = this.getEffectiveFlowDecay(par1IBlockAccess, par2, par3, par4);
+
+ for (int var7 = 0; var7 < 4; ++var7)
+ {
+ int var8 = par2;
+ int var10 = par4;
+
+ if (var7 == 0)
+ {
+ var8 = par2 - 1;
+ }
+
+ if (var7 == 1)
+ {
+ var10 = par4 - 1;
+ }
+
+ if (var7 == 2)
+ {
+ ++var8;
+ }
+
+ if (var7 == 3)
+ {
+ ++var10;
+ }
+
+ int var11 = this.getEffectiveFlowDecay(par1IBlockAccess, var8, par3, var10);
+ int var12;
+
+ if (var11 < 0)
+ {
+ if (!par1IBlockAccess.getBlockMaterial(var8, par3, var10).blocksMovement())
+ {
+ var11 = this.getEffectiveFlowDecay(par1IBlockAccess, var8, par3 - 1, var10);
+
+ if (var11 >= 0)
+ {
+ var12 = var11 - (var6 - 8);
+ var5 = var5.addVector((double) ((var8 - par2) * var12), (double) ((par3 - par3) * var12), (double) ((var10 - par4) * var12));
+ }
+ }
+ }
+ else if (var11 >= 0)
+ {
+ var12 = var11 - var6;
+ var5 = var5.addVector((double) ((var8 - par2) * var12), (double) ((par3 - par3) * var12), (double) ((var10 - par4) * var12));
+ }
+ }
+
+ if (par1IBlockAccess.getBlockMetadata(par2, par3, par4) >= 8)
+ {
+ boolean var13 = false;
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3, par4 - 1, 2))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3, par4 + 1, 3))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2 - 1, par3, par4, 4))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2 + 1, par3, par4, 5))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3 + 1, par4 - 1, 2))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2, par3 + 1, par4 + 1, 3))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2 - 1, par3 + 1, par4, 4))
+ {
+ var13 = true;
+ }
+
+ if (var13 || this.isBlockSolid(par1IBlockAccess, par2 + 1, par3 + 1, par4, 5))
+ {
+ var13 = true;
+ }
+
+ if (var13)
+ {
+ var5 = var5.normalize().addVector(0.0D, -6.0D, 0.0D);
+ }
+ }
+
+ var5 = var5.normalize();
+ return var5;
+ }
+
+ public boolean getBlocksMovement (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ return this.blockMaterial != Material.lava;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getBlockColor ()
+ {
+ return 16777215;
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
+ * when first determining what to render.
+ */
+ public int colorMultiplier (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ if (this.blockMaterial != Material.water)
+ {
+ return 16777215;
+ }
+ else
+ {
+ int var5 = 0;
+ int var6 = 0;
+ int var7 = 0;
+
+ for (int var8 = -1; var8 <= 1; ++var8)
+ {
+ for (int var9 = -1; var9 <= 1; ++var9)
+ {
+ int var10 = par1IBlockAccess.getBiomeGenForCoords(par2 + var9, par4 + var8).getWaterColorMultiplier();
+ var5 += (var10 & 16711680) >> 16;
+ var6 += (var10 & 65280) >> 8;
+ var7 += var10 & 255;
+ }
+ }
+
+ return (var5 / 9 & 255) << 16 | (var6 / 9 & 255) << 8 | var7 / 9 & 255;
+ }
+ }
+
+ /**
+ * Returns the percentage of the fluid block that is air, based on the given flow decay of the fluid.
+ */
+ public static float getFluidHeightPercent (int par0)
+ {
+ if (par0 >= 8)
+ {
+ par0 = 0;
+ }
+
+ return (float) (par0 + 1) / 9.0F;
+ }
+
+ /**
+ * Returns the block texture based on the side being looked at. Args: side
+ */
+ /*public int getBlockTextureFromSide(int par1)
+ {
+ return par1 != 0 && par1 != 1 ? this.blockIndexInTexture + 1 : this.blockIndexInTexture;
+ }*/
+
+ /**
+ * Returns the amount of fluid decay at the coordinates, or -1 if the block at the coordinates is not the same
+ * material as the fluid.
+ */
+ protected int getFlowDecay (World par1World, int par2, int par3, int par4)
+ {
+ return par1World.getBlockMaterial(par2, par3, par4) == this.blockMaterial ? par1World.getBlockMetadata(par2, par3, par4) : -1;
+ }
+
+ /**
+ * Returns the flow decay but converts values indicating falling liquid (values >=8) to their effective source block
+ * value of zero.
+ */
+ protected int getEffectiveFlowDecay (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ if (par1IBlockAccess.getBlockMaterial(par2, par3, par4) != this.blockMaterial)
+ {
+ return -1;
+ }
+ else
+ {
+ int var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
+
+ if (var5 >= 8)
+ {
+ var5 = 0;
+ }
+
+ return var5;
+ }
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock ()
+ {
+ return false;
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube ()
+ {
+ return false;
+ }
+
+ /**
+ * Returns whether this block is collideable based on the arguments passed in Args: blockMetaData, unknownFlag
+ */
+ public boolean canCollideCheck (int par1, boolean par2)
+ {
+ return par2 && par1 == 0;
+ }
+
+ /**
+ * Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the
+ * adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean isBlockSolid (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
+ {
+ Material var6 = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
+ return var6 == this.blockMaterial ? false : (par5 == 1 ? true : (var6 == Material.ice ? false : super.isBlockSolid(par1IBlockAccess, par2, par3, par4, par5)));
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
+ * coordinates. Args: blockAccess, x, y, z, side
+ */
+ public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
+ {
+ Material var6 = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
+ return var6 == this.blockMaterial ? false : (par5 == 1 ? true : (var6 == Material.ice ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5)));
+ }
+
+ /**
+ * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
+ * cleared to be reused)
+ */
+ public AxisAlignedBB getCollisionBoundingBoxFromPool (World par1World, int par2, int par3, int par4)
+ {
+ return null;
+ }
+
+ public void onEntityCollidedWithBlock (World par1World, int x, int y, int z, Entity entity)
+ {
+ entity.motionX *= 0.4D;
+ entity.motionZ *= 0.4D;
+ if (!(entity instanceof EntityItem) && !entity.isImmuneToFire())
+ {
+ entity.attackEntityFrom(DamageSource.lava, 4);
+ entity.setFire(15);
+ }
+ }
+
+ /**
+ * Returns the ID of the items to drop on destruction.
+ */
+ public int idDropped (int par1, Random par2Random, int par3)
+ {
+ return 0;
+ }
+
+ /**
+ * Returns the quantity of items to drop on block destruction.
+ */
+ public int quantityDropped (Random par1Random)
+ {
+ return 0;
+ }
+
+ /**
+ * Can add to the passed in vector for a movement vector to be applied to the entity. Args: x, y, z, entity, Vec3
+ */
+ public void velocityToAddToEntity (World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3)
+ {
+ Vec3 var7 = this.getFlowVector(par1World, par2, par3, par4);
+ par6Vec3.xCoord += var7.xCoord;
+ par6Vec3.yCoord += var7.yCoord;
+ par6Vec3.zCoord += var7.zCoord;
+ }
+
+ /**
+ * How many world ticks before ticking
+ */
+ public int tickRate ()
+ {
+ return 30;
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids
+ */
+ public int getMixedBrightnessForBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ int var5 = par1IBlockAccess.getLightBrightnessForSkyBlocks(par2, par3, par4, 0);
+ int var6 = par1IBlockAccess.getLightBrightnessForSkyBlocks(par2, par3 + 1, par4, 0);
+ int var7 = var5 & 255;
+ int var8 = var6 & 255;
+ int var9 = var5 >> 16 & 255;
+ int var10 = var6 >> 16 & 255;
+ return (var7 > var8 ? var7 : var8) | (var9 > var10 ? var9 : var10) << 16;
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z
+ */
+ public float getBlockBrightness (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
+ {
+ return 1f;
+ /*float var5 = par1IBlockAccess.getLightBrightness(par2, par3, par4);
+ float var6 = par1IBlockAccess.getLightBrightness(par2, par3 + 1, par4);
+ return var5 > var6 ? var5 : var6;*/
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
+ */
+ public int getRenderBlockPass ()
+ {
+ return this.blockMaterial == Material.water ? 1 : 0;
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * A randomly called display update to be able to add particles or other items for display
+ */
+ public void randomDisplayTick (World par1World, int par2, int par3, int par4, Random par5Random)
+ {
+ int var6;
+
+ if (this.blockMaterial == Material.water)
+ {
+ if (par5Random.nextInt(10) == 0)
+ {
+ var6 = par1World.getBlockMetadata(par2, par3, par4);
+
+ if (var6 <= 0 || var6 >= 8)
+ {
+ par1World.spawnParticle("suspended", (double) ((float) par2 + par5Random.nextFloat()), (double) ((float) par3 + par5Random.nextFloat()),
+ (double) ((float) par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ for (var6 = 0; var6 < 0; ++var6)
+ {
+ int var7 = par5Random.nextInt(4);
+ int var8 = par2;
+ int var9 = par4;
+
+ if (var7 == 0)
+ {
+ var8 = par2 - 1;
+ }
+
+ if (var7 == 1)
+ {
+ ++var8;
+ }
+
+ if (var7 == 2)
+ {
+ var9 = par4 - 1;
+ }
+
+ if (var7 == 3)
+ {
+ ++var9;
+ }
+
+ if (par1World.getBlockMaterial(var8, par3, var9) == Material.air
+ && (par1World.getBlockMaterial(var8, par3 - 1, var9).blocksMovement() || par1World.getBlockMaterial(var8, par3 - 1, var9).isLiquid()))
+ {
+ float var10 = 0.0625F;
+ double var11 = (double) ((float) par2 + par5Random.nextFloat());
+ double var13 = (double) ((float) par3 + par5Random.nextFloat());
+ double var15 = (double) ((float) par4 + par5Random.nextFloat());
+
+ if (var7 == 0)
+ {
+ var11 = (double) ((float) par2 - var10);
+ }
+
+ if (var7 == 1)
+ {
+ var11 = (double) ((float) (par2 + 1) + var10);
+ }
+
+ if (var7 == 2)
+ {
+ var15 = (double) ((float) par4 - var10);
+ }
+
+ if (var7 == 3)
+ {
+ var15 = (double) ((float) (par4 + 1) + var10);
+ }
+
+ double var17 = 0.0D;
+ double var19 = 0.0D;
+
+ if (var7 == 0)
+ {
+ var17 = (double) (-var10);
+ }
+
+ if (var7 == 1)
+ {
+ var17 = (double) var10;
+ }
+
+ if (var7 == 2)
+ {
+ var19 = (double) (-var10);
+ }
+
+ if (var7 == 3)
+ {
+ var19 = (double) var10;
+ }
+
+ par1World.spawnParticle("splash", var11, var13, var15, var17, 0.0D, var19);
+ }
+ }
+ }
+
+ if (this.blockMaterial == Material.water && par5Random.nextInt(64) == 0)
+ {
+ var6 = par1World.getBlockMetadata(par2, par3, par4);
+
+ if (var6 > 0 && var6 < 8)
+ {
+ par1World.playSound((double) ((float) par2 + 0.5F), (double) ((float) par3 + 0.5F), (double) ((float) par4 + 0.5F), "liquid.water", par5Random.nextFloat() * 0.25F + 0.75F,
+ par5Random.nextFloat() * 1.0F + 0.5F, false);
+ }
+ }
+
+ double var21;
+ double var23;
+ double var22;
+
+ if (this.blockMaterial == Material.lava && par1World.getBlockMaterial(par2, par3 + 1, par4) == Material.air && !par1World.isBlockOpaqueCube(par2, par3 + 1, par4))
+ {
+ if (par5Random.nextInt(100) == 0)
+ {
+ var21 = (double) ((float) par2 + par5Random.nextFloat());
+ var22 = (double) par3 + this.maxY;
+ var23 = (double) ((float) par4 + par5Random.nextFloat());
+ par1World.spawnParticle("lava", var21, var22, var23, 0.0D, 0.0D, 0.0D);
+ par1World.playSound(var21, var22, var23, "liquid.lavapop", 0.2F + par5Random.nextFloat() * 0.2F, 0.9F + par5Random.nextFloat() * 0.15F, false);
+ }
+
+ if (par5Random.nextInt(200) == 0)
+ {
+ par1World.playSound((double) par2, (double) par3, (double) par4, "liquid.lava", 0.2F + par5Random.nextFloat() * 0.2F, 0.9F + par5Random.nextFloat() * 0.15F, false);
+ }
+ }
+
+ if (par5Random.nextInt(10) == 0 && par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !par1World.getBlockMaterial(par2, par3 - 2, par4).blocksMovement())
+ {
+ var21 = (double) ((float) par2 + par5Random.nextFloat());
+ var22 = (double) par3 - 1.05D;
+ var23 = (double) ((float) par4 + par5Random.nextFloat());
+
+ par1World.spawnParticle("dripLava", var21, var22, var23, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
{
}
- /**
- * Called whenever the block is added into the world. Args: world, x, y, z
- */
- /*public void onBlockAdded(World par1World, int par2, int par3, int par4)
- {
- this.checkForHarden(par1World, par2, par3, par4);
- }*/
+ /**
+ * Called whenever the block is added into the world. Args: world, x, y, z
+ */
+ /*public void onBlockAdded(World par1World, int par2, int par3, int par4)
+ {
+ this.checkForHarden(par1World, par2, par3, par4);
+ }*/
- /**
- * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
- * their own) Args: x, y, z, neighbor blockID
- */
- /*public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
- {
- this.checkForHarden(par1World, par2, par3, par4);
- }*/
+ /**
+ * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
+ * their own) Args: x, y, z, neighbor blockID
+ */
+ /*public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5)
+ {
+ this.checkForHarden(par1World, par2, par3, par4);
+ }*/
- /**
- * Forces lava to check to see if it is colliding with water, and then decide what it should harden to.
- */
- /*private void checkForHarden(World par1World, int par2, int par3, int par4)
- {
- if (par1World.getBlockId(par2, par3, par4) == this.blockID)
- {
- if (this.blockMaterial == Material.lava)
- {
- boolean var5 = false;
+ /**
+ * Forces lava to check to see if it is colliding with water, and then decide what it should harden to.
+ */
+ /*private void checkForHarden(World par1World, int par2, int par3, int par4)
+ {
+ if (par1World.getBlockId(par2, par3, par4) == this.blockID)
+ {
+ if (this.blockMaterial == Material.lava)
+ {
+ boolean var5 = false;
- if (var5 || par1World.getBlockMaterial(par2, par3, par4 - 1) == Material.water)
- {
- var5 = true;
- }
+ if (var5 || par1World.getBlockMaterial(par2, par3, par4 - 1) == Material.water)
+ {
+ var5 = true;
+ }
- if (var5 || par1World.getBlockMaterial(par2, par3, par4 + 1) == Material.water)
- {
- var5 = true;
- }
+ if (var5 || par1World.getBlockMaterial(par2, par3, par4 + 1) == Material.water)
+ {
+ var5 = true;
+ }
- if (var5 || par1World.getBlockMaterial(par2 - 1, par3, par4) == Material.water)
- {
- var5 = true;
- }
+ if (var5 || par1World.getBlockMaterial(par2 - 1, par3, par4) == Material.water)
+ {
+ var5 = true;
+ }
- if (var5 || par1World.getBlockMaterial(par2 + 1, par3, par4) == Material.water)
- {
- var5 = true;
- }
+ if (var5 || par1World.getBlockMaterial(par2 + 1, par3, par4) == Material.water)
+ {
+ var5 = true;
+ }
- if (var5 || par1World.getBlockMaterial(par2, par3 + 1, par4) == Material.water)
- {
- var5 = true;
- }
+ if (var5 || par1World.getBlockMaterial(par2, par3 + 1, par4) == Material.water)
+ {
+ var5 = true;
+ }
- if (var5)
- {
- int var6 = par1World.getBlockMetadata(par2, par3, par4);
+ if (var5)
+ {
+ int var6 = par1World.getBlockMetadata(par2, par3, par4);
- if (var6 == 0)
- {
- par1World.setBlock(par2, par3, par4, Block.obsidian.blockID);
- }
- else if (var6 <= 4)
- {
- par1World.setBlock(par2, par3, par4, Block.cobblestone.blockID);
- }
+ if (var6 == 0)
+ {
+ par1World.setBlock(par2, par3, par4, Block.obsidian.blockID);
+ }
+ else if (var6 <= 4)
+ {
+ par1World.setBlock(par2, par3, par4, Block.cobblestone.blockID);
+ }
- this.triggerLavaMixEffects(par1World, par2, par3, par4);
- }
- }
- }
- }*/
+ this.triggerLavaMixEffects(par1World, par2, par3, par4);
+ }
+ }
+ }
+ }*/
- /**
- * Creates fizzing sound and smoke. Used when lava flows over block or mixes with water.
- */
- /*protected void triggerLavaMixEffects(World par1World, int par2, int par3, int par4)
- {
- par1World.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F);
+ /**
+ * Creates fizzing sound and smoke. Used when lava flows over block or mixes with water.
+ */
+ /*protected void triggerLavaMixEffects(World par1World, int par2, int par3, int par4)
+ {
+ par1World.playSoundEffect((double)((float)par2 + 0.5F), (double)((float)par3 + 0.5F), (double)((float)par4 + 0.5F), "random.fizz", 0.5F, 2.6F + (par1World.rand.nextFloat() - par1World.rand.nextFloat()) * 0.8F);
- for (int var5 = 0; var5 < 8; ++var5)
- {
- par1World.spawnParticle("largesmoke", (double)par2 + Math.random(), (double)par3 + 1.2D, (double)par4 + Math.random(), 0.0D, 0.0D, 0.0D);
- }
- }*/
+ for (int var5 = 0; var5 < 8; ++var5)
+ {
+ par1World.spawnParticle("largesmoke", (double)par2 + Math.random(), (double)par3 + 1.2D, (double)par4 + Math.random(), 0.0D, 0.0D, 0.0D);
+ }
+ }*/
}
diff --git a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java
index 38e7f0ec..8471202f 100644
--- a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java
+++ b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java
@@ -529,24 +529,24 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public void checkValidStructure (int x, int y, int z)
{
- int capacity = 0;
+ int checkLayers = 0;
tempValidStructure = false;
if (checkSameLevel(x, y, z))
{
- capacity++;
- capacity += recurseStructureUp(x, y + 1, z, 0);
- capacity += recurseStructureDown(x, y - 1, z, 0);
+ checkLayers++;
+ checkLayers += recurseStructureUp(x, y + 1, z, 0);
+ checkLayers += recurseStructureDown(x, y - 1, z, 0);
}
//maxLiquid = capacity * 20000;
- if (tempValidStructure != validStructure)
+ if (tempValidStructure != validStructure || checkLayers != this.layers)
{
if (tempValidStructure)
{
internalTemp = 800;
activeLavaTank = lavaTanks.get(0);
- adjustLayers(capacity, false);
+ adjustLayers(checkLayers, false);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
validStructure = true;
}
diff --git a/mods/tinker/tconstruct/client/TClientTickHandler.java b/mods/tinker/tconstruct/client/TClientTickHandler.java
index 5692c521..ef86736b 100644
--- a/mods/tinker/tconstruct/client/TClientTickHandler.java
+++ b/mods/tinker/tconstruct/client/TClientTickHandler.java
@@ -24,17 +24,10 @@ public class TClientTickHandler implements ITickHandler
TContent.oreBerry.setGraphicsLevel(Block.leaves.graphicsLevel);
TContent.oreBerrySecond.setGraphicsLevel(Block.leaves.graphicsLevel);
- player = mc.thePlayer;
+ /*player = mc.thePlayer;
if (player == null || player.capabilities.isCreativeMode)
return;
- /*ticks++;
- if (ticks >= 200)
- {
- player.setEntityHealth(50);
- ticks = 0;
- }*/
-
ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
int scaledWidth = scaledresolution.getScaledWidth();
int scaledHeight = scaledresolution.getScaledHeight();
@@ -56,7 +49,7 @@ public class TClientTickHandler implements ITickHandler
{
this.drawTexturedModalRect(xBasePos + 8*renderHearts, yBasePos, 9 + 18*iter, 0, 8, 8);
}
- }
+ }*/
}
@Override
diff --git a/mods/tinker/tconstruct/client/TProxyClient.java b/mods/tinker/tconstruct/client/TProxyClient.java
index 82dfd2aa..c4d88277 100644
--- a/mods/tinker/tconstruct/client/TProxyClient.java
+++ b/mods/tinker/tconstruct/client/TProxyClient.java
@@ -25,6 +25,7 @@ import mods.tinker.tconstruct.library.crafting.*;
import mods.tinker.tconstruct.library.tools.*;
import mods.tinker.tconstruct.util.PHConstruct;
import mods.tinker.tconstruct.util.player.*;
+import mods.tinker.tconstruct.worldgen.OverworldProvider;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
@@ -65,6 +66,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
+import net.minecraftforge.common.DimensionManager;
import org.w3c.dom.Document;
@@ -114,15 +116,15 @@ public class TProxyClient extends TProxyCommon
public static void openInventoryGui ()
{
- if (mc == null)
+ /*if (mc == null)
mc = Minecraft.getMinecraft();
mc.displayGuiScreen(new GuiInventory(mc.thePlayer));
- addTabsToInventory();
+ addTabsToInventory();*/
}
public static void addTabsToInventory ()
{
- if (mc == null)
+ /*if (mc == null)
mc = Minecraft.getMinecraft();
if (mc.currentScreen.getClass() == GuiInventory.class)
{
@@ -136,12 +138,12 @@ public class TProxyClient extends TProxyCommon
gui.buttonList.add(repairButton);
repairButton = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
gui.buttonList.add(repairButton);
- }
+ }*/
}
public void registerTickHandler ()
{
- //TickRegistry.registerTickHandler(new TClientTickHandler(), Side.CLIENT);
+ TickRegistry.registerTickHandler(new TClientTickHandler(), Side.CLIENT);
//TickRegistry.registerTickHandler(new TCommonTickHandler(), Side.CLIENT);
}
@@ -188,6 +190,15 @@ public class TProxyClient extends TProxyCommon
RenderingRegistry.registerEntityRenderingHandler(LaunchedPotion.class, new LaunchedItemRender(Item.potion, 16384));
//RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo!
+ if (PHConstruct.clearWater)
+ {
+ Block.waterMoving.setLightOpacity(1);
+ Block.waterStill.setLightOpacity(1);
+ }
+
+ DimensionManager.unregisterProviderType(0);
+ DimensionManager.registerProviderType(0, OverworldProvider.class, true);
+
addRenderMappings();
addToolButtons();
}
diff --git a/mods/tinker/tconstruct/common/TContent.java b/mods/tinker/tconstruct/common/TContent.java
index 7fcd15c1..bce2a964 100644
--- a/mods/tinker/tconstruct/common/TContent.java
+++ b/mods/tinker/tconstruct/common/TContent.java
@@ -370,11 +370,6 @@ public class TContent implements IFuelHandler
Item.minecartCrate.setMaxStackSize(3);
Item.minecartPowered.setMaxStackSize(3);
Block.torchWood.setTickRandomly(false);
- if (PHConstruct.clearWater)
- {
- Block.waterMoving.setLightOpacity(1);
- Block.waterStill.setLightOpacity(1);
- }
}
void registerMaterials ()
diff --git a/mods/tinker/tconstruct/items/tools/Chisel.java b/mods/tinker/tconstruct/items/tools/Chisel.java
index b347ef3e..73b54af9 100644
--- a/mods/tinker/tconstruct/items/tools/Chisel.java
+++ b/mods/tinker/tconstruct/items/tools/Chisel.java
@@ -107,7 +107,7 @@ public class Chisel extends ToolCore
@Override
public EnumAction getItemUseAction (ItemStack itemstack)
{
- return EnumAction.eat;
+ return EnumAction.bow;
}
@Override
diff --git a/mods/tinker/tconstruct/library/tools/AbilityHelper.java b/mods/tinker/tconstruct/library/tools/AbilityHelper.java
index 56e3366a..374bc7d8 100644
--- a/mods/tinker/tconstruct/library/tools/AbilityHelper.java
+++ b/mods/tinker/tconstruct/library/tools/AbilityHelper.java
@@ -487,7 +487,10 @@ public class AbilityHelper
public static void spawnItemAtPlayer (EntityPlayer player, ItemStack stack)
{
- if (!player.inventory.addItemStackToInventory(stack))
+ EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack);
+ player.worldObj.spawnEntityInWorld(entityitem);
+ entityitem.onCollideWithPlayer(player);
+ /*if (!player.inventory.addItemStackToInventory(stack))
{
if (!player.worldObj.isRemote)
{
@@ -499,7 +502,7 @@ public class AbilityHelper
else
{
player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 2.0F);
- }
+ }*/
}
/* Ranged weapons */
diff --git a/mods/tinker/tconstruct/library/tools/ToolCore.java b/mods/tinker/tconstruct/library/tools/ToolCore.java
index 7e7d64ec..f2c78418 100644
--- a/mods/tinker/tconstruct/library/tools/ToolCore.java
+++ b/mods/tinker/tconstruct/library/tools/ToolCore.java
@@ -464,7 +464,7 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
if (tags.hasKey("Moss"))
{
int chance = tags.getInteger("Moss");
- int check = world.canBlockSeeTheSky((int) entity.posX, (int) entity.posY, (int) entity.posZ) ? 350 : 1150;
+ int check = world.canBlockSeeTheSky((int) entity.posX, (int) entity.posY, (int) entity.posZ) ? 750 : 1500;
if (random.nextInt(check) < chance)
{
AbilityHelper.healTool(stack, 1, (EntityLiving) entity, true, !((EntityLiving) entity).isSwingInProgress);
@@ -597,6 +597,46 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
//Right-click
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float clickX, float clickY, float clickZ)
{
+ int posX = x;
+ int posY = y;
+ int posZ = z;
+ int playerPosX = (int) Math.floor(player.posX);
+ int playerPosY = (int) Math.floor(player.posY);
+ int playerPosZ = (int) Math.floor(player.posZ);
+ if (side == 0)
+ {
+ --posY;
+ }
+
+ if (side == 1)
+ {
+ ++posY;
+ }
+
+ if (side == 2)
+ {
+ --posZ;
+ }
+
+ if (side == 3)
+ {
+ ++posZ;
+ }
+
+ if (side == 4)
+ {
+ --posX;
+ }
+
+ if (side == 5)
+ {
+ ++posX;
+ }
+ if (posX == playerPosX && (posY == playerPosY || posY == playerPosY + 1 || posY == playerPosY - 1) && posZ == playerPosZ)
+ {
+ return false;
+ }
+
int hotbarSlot = player.inventory.currentItem;
if (hotbarSlot == 0)
{
diff --git a/mods/tinker/tconstruct/modifiers/ModRepair.java b/mods/tinker/tconstruct/modifiers/ModRepair.java
index 706680bf..311526c8 100644
--- a/mods/tinker/tconstruct/modifiers/ModRepair.java
+++ b/mods/tinker/tconstruct/modifiers/ModRepair.java
@@ -1,6 +1,7 @@
package mods.tinker.tconstruct.modifiers;
import mods.tinker.tconstruct.library.crafting.PatternBuilder;
+import mods.tinker.tconstruct.library.tools.AbilityHelper;
import mods.tinker.tconstruct.library.tools.ToolMod;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -58,16 +59,38 @@ public class ModRepair extends ToolMod
materialValue = PatternBuilder.instance.getPartValue(input[1]);
int increase = (int) (50 + (dur * 0.4f * materialValue));
+ //System.out.println("Increase: "+increase);
+
+ int modifiers = tags.getInteger("Modifiers");
+ float mods = 1.0f;
+ if (modifiers == 2)
+ mods = 0.8f;
+ else if (modifiers == 1)
+ mods = 0.6f;
+ else if (modifiers == 0)
+ mods = 0.4f;
+
+ increase *= mods;
+
+ int repair = tags.getInteger("RepairCount");
+ repair += 1;
+ tags.setInteger("RepairCount", repair);
+
+ float repairCount = (100 - repair) / 100f;
+ if (repairCount < 0.5f)
+ repairCount = 0.5f;
+ increase *= repairCount;
+
+ //System.out.println("Modified increase: "+increase);
+
damage -= increase;
if (damage < 0)
damage = 0;
tags.setInteger("Damage", damage);
- tool.setItemDamage(damage * 100 / dur);
+ AbilityHelper.damageTool(tool, 0, null, true);
+ //tool.setItemDamage(damage * 100 / dur);
- int repair = tags.getInteger("RepairCount");
- repair += 1;
- tags.setInteger("RepairCount", repair);
}
@Override
diff --git a/mods/tinker/tconstruct/util/PHConstruct.java b/mods/tinker/tconstruct/util/PHConstruct.java
index c4d8fa12..cc9b2928 100644
--- a/mods/tinker/tconstruct/util/PHConstruct.java
+++ b/mods/tinker/tconstruct/util/PHConstruct.java
@@ -46,6 +46,8 @@ public class PHConstruct
keepLevels = config.get("Difficulty Changes", "Keep levels on death", true).getBoolean(true);
clearWater = config.get("Difficulty Changes", "Turn water clear", true).getBoolean(true);
voidFog = config.get("Difficulty Changes", "Remove Overworld void fog", true).getBoolean(true);
+
+ superfunWorld = config.get("Superfun", "All the world is Superfun", false).getBoolean(false);
/*disableWoodTools = config.get("Difficulty Changes", "Disable vanilla wooden tools", false).getBoolean(false);
disableStoneTools = config.get("Difficulty Changes", "Disable vanilla stone tools", true).getBoolean(true);
@@ -418,4 +420,7 @@ public class PHConstruct
public static boolean enableTStone;
public static boolean enableTCactus;
public static boolean enableTBone;
+
+ //Superfun
+ public static boolean superfunWorld;
}
\ No newline at end of file
diff --git a/mods/tinker/tconstruct/util/TEventHandler.java b/mods/tinker/tconstruct/util/TEventHandler.java
index a59d2d30..8cb2edf9 100644
--- a/mods/tinker/tconstruct/util/TEventHandler.java
+++ b/mods/tinker/tconstruct/util/TEventHandler.java
@@ -112,7 +112,7 @@ public class TEventHandler
}
}
- else if (event.recentlyHit && event.entityLiving.getClass() == EntitySkeleton.class)
+ if (event.recentlyHit && event.entityLiving.getClass() == EntitySkeleton.class)
{
EntitySkeleton skeleton = (EntitySkeleton) event.entityLiving;
if (skeleton.getSkeletonType() == 1 && random.nextInt(Math.max(1, 5 - event.lootingLevel)) == 0)
diff --git a/mods/tinker/tconstruct/worldgen/OreberryBushGen.java b/mods/tinker/tconstruct/worldgen/OreberryBushGen.java
index fb081c9a..616b61e6 100644
--- a/mods/tinker/tconstruct/worldgen/OreberryBushGen.java
+++ b/mods/tinker/tconstruct/worldgen/OreberryBushGen.java
@@ -87,10 +87,10 @@ public class OreberryBushGen extends WorldGenerator
void generateBerryBlock (World world, int x, int y, int z, Random random)
{
- if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)])
+ /*if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)])
{
setBlockAndMetadata(world, x, y, z, blockID, metadata);
- }
+ }*/
Block block = Block.blocksList[world.getBlockId(x, y, z)];
if (block == null || (block != Block.endPortalFrame && !Block.opaqueCubeLookup[world.getBlockId(x, y, z)]))
diff --git a/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java b/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
index f26e34c6..d3120ba5 100644
--- a/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
+++ b/mods/tinker/tconstruct/worldgen/TBaseWorldGenerator.java
@@ -6,6 +6,7 @@ import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.library.util.CoordTuple;
import mods.tinker.tconstruct.util.PHConstruct;
import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import net.minecraft.world.WorldType;
import net.minecraft.world.chunk.IChunkProvider;
@@ -51,6 +52,11 @@ public class TBaseWorldGenerator implements IWorldGenerator
if (world.provider.dimensionId == 0)
generateOreBushes(random, chunkX * 16, chunkZ * 16, world);
}
+
+ if (PHConstruct.superfunWorld && world.provider.dimensionId == 0)
+ {
+ superfunGenerate(random, chunkX * 16, chunkZ * 16, world);
+ }
}
void generateSurface (Random random, int xChunk, int zChunk, World world)
@@ -305,6 +311,38 @@ public class TBaseWorldGenerator implements IWorldGenerator
return -1;
}
+ void superfunGenerate (Random random, int chunkX, int chunkZ, World world)
+ {
+ /*for (int x = 0; x < 16; x++)
+ for (int z = 0; z < 16; z++)
+ world.setBlock(x+chunkX, 192, z+chunkZ, Block.glowStone.blockID);*/
+
+ for (int x = 0; x < 16; x++)
+ {
+ for (int z = 0; z < 16; z++)
+ {
+ for (int y = 0; y < 128; y++)
+ {
+ int blockID = world.getBlockId(x + chunkX, y, z + chunkZ);
+ Block block = Block.blocksList[blockID];
+ if (block != null)
+ {
+ if (block.blockMaterial == Material.leaves)
+ world.setBlock(x + chunkX, y, z + chunkZ, Block.lavaStill.blockID, 0, 0);
+ if (block.blockMaterial == Material.wood)
+ world.setBlock(x + chunkX, y, z + chunkZ, Block.netherrack.blockID, 0, 0);
+ if (block.blockID == Block.stone.blockID)
+ world.setBlock(x + chunkX, y, z + chunkZ, Block.whiteStone.blockID, 0, 0);
+ if (y > 40 && (block.blockMaterial == Material.ground || block.blockMaterial == Material.grass))
+ world.setBlock(x + chunkX, y, z + chunkZ, Block.slowSand.blockID, 0, 0);
+ if (block.blockMaterial == Material.sand)
+ world.setBlock(x + chunkX, y, z + chunkZ, Block.silverfish.blockID, 0, 0);
+ }
+ }
+ }
+ }
+ }
+
WorldGenMinable copper;
WorldGenMinable tin;
WorldGenMinable aluminum;
diff --git a/mods/tinker/tconstruct/worldgen/village/VillageSmelteryHandler.java b/mods/tinker/tconstruct/worldgen/village/VillageSmelteryHandler.java
index e1afe509..3ab6fec2 100644
--- a/mods/tinker/tconstruct/worldgen/village/VillageSmelteryHandler.java
+++ b/mods/tinker/tconstruct/worldgen/village/VillageSmelteryHandler.java
@@ -13,7 +13,7 @@ public class VillageSmelteryHandler implements IVillageCreationHandler
@Override
public StructureVillagePieceWeight getVillagePieceWeight (Random random, int i)
{
- return new StructureVillagePieceWeight(ComponentSmeltery.class, 18, i + 1);
+ return new StructureVillagePieceWeight(ComponentSmeltery.class, 9, i + 1);
}
@Override