Fix some bugs, and format code (Commented out woolslabs for now)

This commit is contained in:
Alexander committed 2014-04-03 22:28:37 -04:00
1 parent 0241e5273c
commit b6ba8700ad
28 files changed
+216 -1877

No files matched your search

+1 -1
View File
@@ -109,7 +109,7 @@ public class TConstruct
PHConstruct.initProps(event.getSuggestedConfigurationFile());
TConstructRegistry.materialTab = new TabTools("TConstructMaterials");
TConstructRegistry.toolTab = new TabTools("TConstructTools");
TConstructRegistry.partTab = new TabTools("TConstructParts");
TConstructRegistry.partTab = new TabTools("TConstructParts");
TConstructRegistry.blockTab = new TabTools("TConstructBlocks");
tableCasting = new LiquidCasting();
+4 -10
View File
@@ -3,6 +3,8 @@ package tconstruct.blocks;
import java.util.List;
import java.util.Random;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import net.minecraft.block.BlockSand;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -11,10 +13,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class GravelOre extends BlockSand
{
@@ -24,12 +22,11 @@ public class GravelOre extends BlockSand
public GravelOre()
{
//super(Material.craftedSnow);
this.blockMaterial = Material.craftedSnow;
//this.blockMaterial = Material.craftedSnow;
this.setCreativeTab(TConstructRegistry.blockTab);
this.setStepSound(soundTypeGravel);
}
@Override
public void registerBlockIcons (IIconRegister iconRegister)
{
this.icons = new IIcon[textureNames.length];
@@ -41,13 +38,11 @@ public class GravelOre extends BlockSand
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
{
return icons[meta];
}
@Override
public float getBlockHardness (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
@@ -65,8 +60,7 @@ public class GravelOre extends BlockSand
return meta;
}
@Override
public Item getItemDropped (int p_149650_1_, Random p_149650_2_, int p_149650_3_)
public Item getItemDropped (int par1, Random par2Random, int par3)
{
/*if (par1 == 1)
return Item.goldNugget.itemID;*/
@@ -1,5 +1,7 @@
package tconstruct.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@@ -40,6 +42,7 @@ public class LiquidMetalFinite extends BlockFluidFinite
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
{
if (side == 0 || side == 1)
@@ -2,14 +2,14 @@ package tconstruct.blocks;
import java.util.List;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -17,7 +17,6 @@ public class SearedSlab extends SlabBase
{
public SearedSlab()
{
// TODO material.rock
super(Material.rock);
this.setCreativeTab(TConstructRegistry.blockTab);
setHardness(12F);
@@ -43,11 +42,11 @@ public class SearedSlab extends SlabBase
}
@Override
public void getSubBlocks (Item b, CreativeTabs tab, List list)
public void getSubBlocks (Item id, CreativeTabs tab, List list)
{
for (int iter = 0; iter < 8; iter++)
{
list.add(new ItemStack(b, 1, iter));
list.add(new ItemStack(id, 1, iter));
}
}
}
}
@@ -46,13 +46,11 @@ public class SlabBase extends MantleBlock
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
}
@Override
public void setBlockBoundsForItemRender ()
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
}
@Override
public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z) / 8;
@@ -61,7 +59,6 @@ public class SlabBase extends MantleBlock
setBlockBounds(0.0F, minY, 0F, 1.0F, maxY, 1.0F);
}
@Override
public int onBlockPlaced (World par1World, int blockX, int blockY, int blockZ, int side, float clickX, float clickY, float clickZ, int metadata)
{
if (side == 1)
@@ -72,13 +69,11 @@ public class SlabBase extends MantleBlock
return metadata;
}
@Override
public boolean isOpaqueCube ()
{
return false;
}
@Override
public boolean renderAsNormalBlock ()
{
return false;
@@ -99,17 +94,16 @@ public class SlabBase extends MantleBlock
}
@Override
public void getSubBlocks (Item b, CreativeTabs tab, List list)
public void getSubBlocks (Item id, CreativeTabs tab, List list)
{
for (int iter = 0; iter < totalSize; iter++)
{
list.add(new ItemStack(b, 1, iter));
list.add(new ItemStack(id, 1, iter));
}
}
@Override
public int damageDropped (int meta)
{
return meta % 8;
}
}
}
+10 -13
View File
@@ -89,14 +89,11 @@ public class StoneTorch extends MantleBlock
* Checks to see if its valid to put this block at the specified
* coordinates. Args: world, x, y, z
*/
@Override
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
@Override
public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
{
return par1World.isSideSolid(par2 - 1, par3, par4, EAST, true) ||
par1World.isSideSolid(par2 + 1, par3, par4, WEST, true) ||
par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true) ||
par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true) ||
canPlaceTorchOn(par1World, par2, par3 - 1, par4);
return par1World.isSideSolid(par2 - 1, par3, par4, EAST, true) || par1World.isSideSolid(par2 + 1, par3, par4, WEST, true) || par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true)
|| par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true) || canPlaceTorchOn(par1World, par2, par3 - 1, par4);
}
/**
@@ -104,7 +101,7 @@ public class StoneTorch extends MantleBlock
* side, hitX, hitY, hitZ, block metadata
*/
@Override
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
public int onBlockPlaced (World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
int j1 = par9;
@@ -135,8 +132,8 @@ public class StoneTorch extends MantleBlock
return j1;
}
public void updateTick(World par1World, int par2, int par3, int par4, Random random)
public void updateTick (World par1World, int par2, int par3, int par4, Random random)
{
super.updateTick(par1World, par2, par3, par4, random);
@@ -147,7 +144,7 @@ public class StoneTorch extends MantleBlock
}
// JAVADOC METHOD $$ func_149726_b
public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
public void onBlockAdded (World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
{
if (p_149726_1_.getBlockMetadata(p_149726_2_, p_149726_3_, p_149726_4_) == 0)
{
@@ -193,8 +190,8 @@ public class StoneTorch extends MantleBlock
{
this.func_94397_d(par1World, par2, par3, par4, par5);
}
protected boolean func_94397_d(World par1World, int par2, int par3, int par4, Block par5)
protected boolean func_94397_d (World par1World, int par2, int par3, int par4, Block par5)
{
if (this.dropTorchIfCantStay(par1World, par2, par3, par4))
{
@@ -1,5 +1,7 @@
package tconstruct.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
@@ -41,6 +43,7 @@ public class TConstructFluid extends BlockFluidClassic
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
{
if (side == 0 || side == 1)
@@ -53,18 +53,18 @@ public class BattlesignLogic extends EquipLogic
}
@Override
public String getInventoryName()
public String getInventoryName ()
{
return null;
}
@Override
public void openInventory()
public void openInventory ()
{
}
@Override
public void closeInventory()
public void closeInventory ()
{
}
}
@@ -120,7 +120,7 @@ public class TControls extends TKeyHandler
onStilts = false;
}
void resetFallDamage()
void resetFallDamage ()
{
AbstractPacket packet = new PacketDoubleJump();
updateServer(packet);
@@ -13,7 +13,6 @@ public class BlockSkinRenderHelper
{
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
// TODO CHECK THESE!!!!
int var5 = block.colorMultiplier(world, x, y, z);
float var6 = (float) (var5 >> 16 & 255) / 255.0F;
float var7 = (float) (var5 >> 8 & 255) / 255.0F;
@@ -233,12 +232,12 @@ public class BlockSkinRenderHelper
if (!flag5 && !flag3)
{
render.aoLightValueScratchXZNN = render.aoLightValueScratchXYPP;
render.aoLightValueScratchXYZPPP = render.aoLightValueScratchXYPP;
render.aoBrightnessXYZPPP = render.aoBrightnessXYPP;
}
else
{
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos, zPos + 1);
render.aoLightValueScratchXYZPPP = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos, zPos + 1);
render.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(render.blockAccess, xPos + 1, yPos, zPos + 1);
}
@@ -256,7 +255,7 @@ public class BlockSkinRenderHelper
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos);
f6 = (render.aoLightValueScratchXYZNPP + render.aoLightValueScratchXYNP + render.aoLightValueScratchYZPP + f7) / 4.0F;
f3 = (render.aoLightValueScratchYZPP + f7 + render.aoLightValueScratchXZNN + render.aoLightValueScratchXYPP) / 4.0F;
f3 = (render.aoLightValueScratchYZPP + f7 + render.aoLightValueScratchXYZPPP + render.aoLightValueScratchXYPP) / 4.0F;
f4 = (f7 + render.aoLightValueScratchYZPN + render.aoLightValueScratchXYPP + render.aoLightValueScratchXYZPPN) / 4.0F;
f5 = (render.aoLightValueScratchXYNP + render.aoLightValueScratchXYZNPN + f7 + render.aoLightValueScratchYZPN) / 4.0F;
render.brightnessTopRight = render.getAoBrightness(render.aoBrightnessXYZNPP, render.aoBrightnessXYNP, render.aoBrightnessYZPP, i1);
@@ -291,7 +290,7 @@ public class BlockSkinRenderHelper
--zPos;
}
render.aoLightValueScratchXZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos - 1, yPos, zPos);
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos - 1, yPos, zPos);
render.aoLightValueScratchYZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos - 1, zPos);
render.aoLightValueScratchYZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos);
render.aoLightValueScratchXZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos, zPos);
@@ -306,7 +305,7 @@ public class BlockSkinRenderHelper
if (!flag2 && !flag4)
{
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNNN = render.aoBrightnessXZNN;
}
else
@@ -317,7 +316,7 @@ public class BlockSkinRenderHelper
if (!flag2 && !flag5)
{
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNPN = render.aoBrightnessXZNN;
}
else
@@ -361,10 +360,10 @@ public class BlockSkinRenderHelper
}
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos - 1);
f3 = (render.aoLightValueScratchXZPN + render.aoLightValueScratchXYZNPN + f7 + render.aoLightValueScratchYZPN) / 4.0F;
f3 = (render.aoLightValueScratchXZNN + render.aoLightValueScratchXYZNPN + f7 + render.aoLightValueScratchYZPN) / 4.0F;
f4 = (f7 + render.aoLightValueScratchYZPN + render.aoLightValueScratchXZPN + render.aoLightValueScratchXYZPPN) / 4.0F;
f5 = (render.aoLightValueScratchYZNN + f7 + render.aoLightValueScratchXYZPNN + render.aoLightValueScratchXZPN) / 4.0F;
f6 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXZPN + render.aoLightValueScratchYZNN + f7) / 4.0F;
f6 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXZNN + render.aoLightValueScratchYZNN + f7) / 4.0F;
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXZNN, render.aoBrightnessXYZNPN, render.aoBrightnessYZPN, i1);
render.brightnessBottomLeft = render.getAoBrightness(render.aoBrightnessYZPN, render.aoBrightnessXZPN, render.aoBrightnessXYZPPN, i1);
render.brightnessBottomRight = render.getAoBrightness(render.aoBrightnessYZNN, render.aoBrightnessXYZPNN, render.aoBrightnessXZPN, i1);
@@ -456,12 +455,12 @@ public class BlockSkinRenderHelper
if (!flag3 && !flag5)
{
render.aoLightValueScratchXZNN = render.aoLightValueScratchXZPP;
render.aoLightValueScratchXYZPPP = render.aoLightValueScratchXZPP;
render.aoBrightnessXYZPPP = render.aoBrightnessXZPP;
}
else
{
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos + 1, zPos);
render.aoLightValueScratchXYZPPP = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos + 1, zPos);
render.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(render.blockAccess, xPos + 1, yPos + 1, zPos);
}
@@ -479,7 +478,7 @@ public class BlockSkinRenderHelper
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos + 1);
f3 = (render.aoLightValueScratchXZNP + render.aoLightValueScratchXYZNPP + f7 + render.aoLightValueScratchYZPP) / 4.0F;
f6 = (f7 + render.aoLightValueScratchYZPP + render.aoLightValueScratchXZPP + render.aoLightValueScratchXZNN) / 4.0F;
f6 = (f7 + render.aoLightValueScratchYZPP + render.aoLightValueScratchXZPP + render.aoLightValueScratchXYZPPP) / 4.0F;
f5 = (render.aoLightValueScratchYZNP + f7 + render.aoLightValueScratchXYZPNP + render.aoLightValueScratchXZPP) / 4.0F;
f4 = (render.aoLightValueScratchXYZNNP + render.aoLightValueScratchXZNP + render.aoLightValueScratchYZNP + f7) / 4.0F;
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXZNP, render.aoBrightnessXYZNPP, render.aoBrightnessYZPP, i1);
@@ -526,7 +525,7 @@ public class BlockSkinRenderHelper
}
render.aoLightValueScratchXYNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos - 1, zPos);
render.aoLightValueScratchXZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos - 1);
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos - 1);
render.aoLightValueScratchXZNP = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos + 1);
render.aoLightValueScratchXYNP = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos);
render.aoBrightnessXYNN = block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos - 1, zPos);
@@ -540,7 +539,7 @@ public class BlockSkinRenderHelper
if (!flag5 && !flag2)
{
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNNN = render.aoBrightnessXZNN;
}
else
@@ -562,7 +561,7 @@ public class BlockSkinRenderHelper
if (!flag5 && !flag3)
{
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNPN = render.aoBrightnessXZNN;
}
else
@@ -597,8 +596,8 @@ public class BlockSkinRenderHelper
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos - 1, yPos, zPos);
f6 = (render.aoLightValueScratchXYNN + render.aoLightValueScratchXYZNNP + f7 + render.aoLightValueScratchXZNP) / 4.0F;
f3 = (f7 + render.aoLightValueScratchXZNP + render.aoLightValueScratchXYNP + render.aoLightValueScratchXYZNPP) / 4.0F;
f4 = (render.aoLightValueScratchXZPN + f7 + render.aoLightValueScratchXYZNPN + render.aoLightValueScratchXYNP) / 4.0F;
f5 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXYNN + render.aoLightValueScratchXZPN + f7) / 4.0F;
f4 = (render.aoLightValueScratchXZNN + f7 + render.aoLightValueScratchXYZNPN + render.aoLightValueScratchXYNP) / 4.0F;
f5 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXYNN + render.aoLightValueScratchXZNN + f7) / 4.0F;
render.brightnessTopRight = render.getAoBrightness(render.aoBrightnessXYNN, render.aoBrightnessXYZNNP, render.aoBrightnessXZNP, i1);
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXZNP, render.aoBrightnessXYNP, render.aoBrightnessXYZNPP, i1);
render.brightnessBottomLeft = render.getAoBrightness(render.aoBrightnessXZNN, render.aoBrightnessXYZNPN, render.aoBrightnessXYNP, i1);
@@ -690,12 +689,12 @@ public class BlockSkinRenderHelper
if (!flag3 && !flag5)
{
render.aoLightValueScratchXZNN = render.aoLightValueScratchXZPP;
render.aoLightValueScratchXYZPPP = render.aoLightValueScratchXZPP;
render.aoBrightnessXYZPPP = render.aoBrightnessXZPP;
}
else
{
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos + 1);
render.aoLightValueScratchXYZPPP = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos + 1);
render.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos + 1, zPos + 1);
}
@@ -715,7 +714,7 @@ public class BlockSkinRenderHelper
f3 = (render.aoLightValueScratchXYPN + render.aoLightValueScratchXYZPNP + f7 + render.aoLightValueScratchXZPP) / 4.0F;
f4 = (render.aoLightValueScratchXYZPNN + render.aoLightValueScratchXYPN + render.aoLightValueScratchXZPN + f7) / 4.0F;
f5 = (render.aoLightValueScratchXZPN + f7 + render.aoLightValueScratchXYZPPN + render.aoLightValueScratchXYPP) / 4.0F;
f6 = (f7 + render.aoLightValueScratchXZPP + render.aoLightValueScratchXYPP + render.aoLightValueScratchXZNN) / 4.0F;
f6 = (f7 + render.aoLightValueScratchXZPP + render.aoLightValueScratchXYPP + render.aoLightValueScratchXYZPPP) / 4.0F;
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXYPN, render.aoBrightnessXYZPNP, render.aoBrightnessXZPP, i1);
render.brightnessTopRight = render.getAoBrightness(render.aoBrightnessXZPP, render.aoBrightnessXYPP, render.aoBrightnessXYZPPP, i1);
render.brightnessBottomRight = render.getAoBrightness(render.aoBrightnessXZPN, render.aoBrightnessXYZPPN, render.aoBrightnessXYPP, i1);
@@ -1074,12 +1073,12 @@ public class BlockSkinRenderHelper
if (!flag5 && !flag3)
{
render.aoLightValueScratchXZNN = render.aoLightValueScratchXYPP;
render.aoLightValueScratchXYZPPP = render.aoLightValueScratchXYPP;
render.aoBrightnessXYZPPP = render.aoBrightnessXYPP;
}
else
{
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos, zPos + 1);
render.aoLightValueScratchXYZPPP = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos, zPos + 1);
render.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(render.blockAccess, xPos + 1, yPos, zPos + 1);
}
@@ -1097,7 +1096,7 @@ public class BlockSkinRenderHelper
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos);
f6 = (render.aoLightValueScratchXYZNPP + render.aoLightValueScratchXYNP + render.aoLightValueScratchYZPP + f7) / 4.0F;
f3 = (render.aoLightValueScratchYZPP + f7 + render.aoLightValueScratchXZNN + render.aoLightValueScratchXYPP) / 4.0F;
f3 = (render.aoLightValueScratchYZPP + f7 + render.aoLightValueScratchXYZPPP + render.aoLightValueScratchXYPP) / 4.0F;
f4 = (f7 + render.aoLightValueScratchYZPN + render.aoLightValueScratchXYPP + render.aoLightValueScratchXYZPPN) / 4.0F;
f5 = (render.aoLightValueScratchXYNP + render.aoLightValueScratchXYZNPN + f7 + render.aoLightValueScratchYZPN) / 4.0F;
render.brightnessTopRight = render.getAoBrightness(render.aoBrightnessXYZNPP, render.aoBrightnessXYNP, render.aoBrightnessYZPP, i1);
@@ -1130,7 +1129,7 @@ public class BlockSkinRenderHelper
--zPos;
}
render.aoLightValueScratchXZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos - 1, yPos, zPos);
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos - 1, yPos, zPos);
render.aoLightValueScratchYZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos - 1, zPos);
render.aoLightValueScratchYZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos);
render.aoLightValueScratchXZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos, zPos);
@@ -1145,7 +1144,7 @@ public class BlockSkinRenderHelper
if (!flag2 && !flag4)
{
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNNN = render.aoBrightnessXZNN;
}
else
@@ -1156,7 +1155,7 @@ public class BlockSkinRenderHelper
if (!flag2 && !flag5)
{
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNPN = render.aoBrightnessXZNN;
}
else
@@ -1200,10 +1199,10 @@ public class BlockSkinRenderHelper
}
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos - 1);
f3 = (render.aoLightValueScratchXZPN + render.aoLightValueScratchXYZNPN + f7 + render.aoLightValueScratchYZPN) / 4.0F;
f3 = (render.aoLightValueScratchXZNN + render.aoLightValueScratchXYZNPN + f7 + render.aoLightValueScratchYZPN) / 4.0F;
f4 = (f7 + render.aoLightValueScratchYZPN + render.aoLightValueScratchXZPN + render.aoLightValueScratchXYZPPN) / 4.0F;
f5 = (render.aoLightValueScratchYZNN + f7 + render.aoLightValueScratchXYZPNN + render.aoLightValueScratchXZPN) / 4.0F;
f6 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXZPN + render.aoLightValueScratchYZNN + f7) / 4.0F;
f6 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXZNN + render.aoLightValueScratchYZNN + f7) / 4.0F;
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXZNN, render.aoBrightnessXYZNPN, render.aoBrightnessYZPN, i1);
render.brightnessBottomLeft = render.getAoBrightness(render.aoBrightnessYZPN, render.aoBrightnessXZPN, render.aoBrightnessXYZPPN, i1);
render.brightnessBottomRight = render.getAoBrightness(render.aoBrightnessYZNN, render.aoBrightnessXYZPNN, render.aoBrightnessXZPN, i1);
@@ -1294,12 +1293,12 @@ public class BlockSkinRenderHelper
if (!flag3 && !flag5)
{
render.aoLightValueScratchXZNN = render.aoLightValueScratchXZPP;
render.aoLightValueScratchXYZPPP = render.aoLightValueScratchXZPP;
render.aoBrightnessXYZPPP = render.aoBrightnessXZPP;
}
else
{
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos + 1, zPos);
render.aoLightValueScratchXYZPPP = getAmbientOcclusionLightValue(render.blockAccess, xPos + 1, yPos + 1, zPos);
render.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(render.blockAccess, xPos + 1, yPos + 1, zPos);
}
@@ -1317,7 +1316,7 @@ public class BlockSkinRenderHelper
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos + 1);
f3 = (render.aoLightValueScratchXZNP + render.aoLightValueScratchXYZNPP + f7 + render.aoLightValueScratchYZPP) / 4.0F;
f6 = (f7 + render.aoLightValueScratchYZPP + render.aoLightValueScratchXZPP + render.aoLightValueScratchXZNN) / 4.0F;
f6 = (f7 + render.aoLightValueScratchYZPP + render.aoLightValueScratchXZPP + render.aoLightValueScratchXYZPPP) / 4.0F;
f5 = (render.aoLightValueScratchYZNP + f7 + render.aoLightValueScratchXYZPNP + render.aoLightValueScratchXZPP) / 4.0F;
f4 = (render.aoLightValueScratchXYZNNP + render.aoLightValueScratchXZNP + render.aoLightValueScratchYZNP + f7) / 4.0F;
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXZNP, render.aoBrightnessXYZNPP, render.aoBrightnessYZPP, i1);
@@ -1363,7 +1362,7 @@ public class BlockSkinRenderHelper
}
render.aoLightValueScratchXYNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos - 1, zPos);
render.aoLightValueScratchXZPN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos - 1);
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos - 1);
render.aoLightValueScratchXZNP = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos, zPos + 1);
render.aoLightValueScratchXYNP = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos);
render.aoBrightnessXYNN = block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos - 1, zPos);
@@ -1377,7 +1376,7 @@ public class BlockSkinRenderHelper
if (!flag5 && !flag2)
{
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNNN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNNN = render.aoBrightnessXZNN;
}
else
@@ -1399,7 +1398,7 @@ public class BlockSkinRenderHelper
if (!flag5 && !flag3)
{
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZPN;
render.aoLightValueScratchXYZNPN = render.aoLightValueScratchXZNN;
render.aoBrightnessXYZNPN = render.aoBrightnessXZNN;
}
else
@@ -1434,8 +1433,8 @@ public class BlockSkinRenderHelper
f7 = getAmbientOcclusionLightValue(render.blockAccess, xPos - 1, yPos, zPos);
f6 = (render.aoLightValueScratchXYNN + render.aoLightValueScratchXYZNNP + f7 + render.aoLightValueScratchXZNP) / 4.0F;
f3 = (f7 + render.aoLightValueScratchXZNP + render.aoLightValueScratchXYNP + render.aoLightValueScratchXYZNPP) / 4.0F;
f4 = (render.aoLightValueScratchXZPN + f7 + render.aoLightValueScratchXYZNPN + render.aoLightValueScratchXYNP) / 4.0F;
f5 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXYNN + render.aoLightValueScratchXZPN + f7) / 4.0F;
f4 = (render.aoLightValueScratchXZNN + f7 + render.aoLightValueScratchXYZNPN + render.aoLightValueScratchXYNP) / 4.0F;
f5 = (render.aoLightValueScratchXYZNNN + render.aoLightValueScratchXYNN + render.aoLightValueScratchXZNN + f7) / 4.0F;
render.brightnessTopRight = render.getAoBrightness(render.aoBrightnessXYNN, render.aoBrightnessXYZNNP, render.aoBrightnessXZNP, i1);
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXZNP, render.aoBrightnessXYNP, render.aoBrightnessXYZNPP, i1);
render.brightnessBottomLeft = render.getAoBrightness(render.aoBrightnessXZNN, render.aoBrightnessXYZNPN, render.aoBrightnessXYNP, i1);
@@ -1526,12 +1525,12 @@ public class BlockSkinRenderHelper
if (!flag3 && !flag5)
{
render.aoLightValueScratchXZNN = render.aoLightValueScratchXZPP;
render.aoLightValueScratchXYZPPP = render.aoLightValueScratchXZPP;
render.aoBrightnessXYZPPP = render.aoBrightnessXZPP;
}
else
{
render.aoLightValueScratchXZNN = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos + 1);
render.aoLightValueScratchXYZPPP = getAmbientOcclusionLightValue(render.blockAccess, xPos, yPos + 1, zPos + 1);
render.aoBrightnessXYZPPP = block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos + 1, zPos + 1);
}
@@ -1551,7 +1550,7 @@ public class BlockSkinRenderHelper
f3 = (render.aoLightValueScratchXYPN + render.aoLightValueScratchXYZPNP + f7 + render.aoLightValueScratchXZPP) / 4.0F;
f4 = (render.aoLightValueScratchXYZPNN + render.aoLightValueScratchXYPN + render.aoLightValueScratchXZPN + f7) / 4.0F;
f5 = (render.aoLightValueScratchXZPN + f7 + render.aoLightValueScratchXYZPPN + render.aoLightValueScratchXYPP) / 4.0F;
f6 = (f7 + render.aoLightValueScratchXZPP + render.aoLightValueScratchXYPP + render.aoLightValueScratchXZNN) / 4.0F;
f6 = (f7 + render.aoLightValueScratchXZPP + render.aoLightValueScratchXYPP + render.aoLightValueScratchXYZPPP) / 4.0F;
render.brightnessTopLeft = render.getAoBrightness(render.aoBrightnessXYPN, render.aoBrightnessXYZPNP, render.aoBrightnessXZPP, i1);
render.brightnessTopRight = render.getAoBrightness(render.aoBrightnessXZPP, render.aoBrightnessXYPP, render.aoBrightnessXYZPPP, i1);
render.brightnessBottomRight = render.getAoBrightness(render.aoBrightnessXZPN, render.aoBrightnessXYZPPN, render.aoBrightnessXYPP, i1);
@@ -1691,4 +1690,4 @@ public class BlockSkinRenderHelper
{
return access.getBlock(x, y, z).getAmbientOcclusionLightValue();
}
}
}
File diff suppressed because it is too large. Load diff
+18 -12
View File
@@ -185,7 +185,7 @@ public class TContent implements IFuelHandler
TRepo.furnaceSlab = new FurnaceSlab(Material.rock).setBlockName("FurnaceSlab");
TRepo.heldItemBlock = new EquipBlock(Material.wood).setBlockName("Frypan");
/* battlesignBlock = new BattlesignBlock(PHConstruct.battlesignBlock).setUnlocalizedName("Battlesign");
GameRegistry.registerBlock(battlesignBlock, "BattlesignBlock");
ameRegistry.registerTileEntity(BattlesignLogic.class, "BattlesignLogic");*/
@@ -205,10 +205,10 @@ public class TContent implements IFuelHandler
TRepo.meatBlock = new MeatBlock().setBlockName("tconstruct.meatblock");
TRepo.glueBlock = new GlueBlock().setBlockName("GlueBlock").setCreativeTab(TConstructRegistry.blockTab);
TRepo.woolSlab1 = new SlabBase(Material.cloth, Blocks.wool, 0, 8).setBlockName("cloth");
TRepo.woolSlab1.setStepSound(Block.soundTypeCloth).setCreativeTab(CreativeTabs.tabDecorations);
TRepo.woolSlab2 = new SlabBase(Material.cloth, Blocks.wool, 8, 8).setBlockName("cloth");
TRepo.woolSlab2.setStepSound(Block.soundTypeCloth).setCreativeTab(CreativeTabs.tabDecorations);
//TRepo.woolSlab1 = new SlabBase(Material.cloth, Blocks.wool, 0, 8).setBlockName("cloth");
//TRepo.woolSlab1.setStepSound(Block.soundTypeCloth).setCreativeTab(CreativeTabs.tabDecorations);
//TRepo.woolSlab2 = new SlabBase(Material.cloth, Blocks.wool, 8, 8).setBlockName("cloth");
//TRepo.woolSlab2.setStepSound(Block.soundTypeCloth).setCreativeTab(CreativeTabs.tabDecorations);
// Smeltery
TRepo.smeltery = new SmelteryBlock().setBlockName("Smeltery");
@@ -686,7 +686,7 @@ public class TContent implements IFuelHandler
// GameRegistry.registerItem(TRepo.glove, "glove");
GameRegistry.registerItem(TRepo.knapsack, "knapsack");
GameRegistry.registerItem(TRepo.goldHead, "goldHead");
TRepo.creativeModifier = new CreativeModifier().setUnlocalizedName("tconstruct.modifier.creative");
GameRegistry.registerItem(TRepo.creativeModifier, "creativeModifier");
@@ -945,12 +945,18 @@ public class TContent implements IFuelHandler
achievements.put("tconstruct:beginner", new Achievement("tconstruct:beginner", "tconstruct.beginner", 0, 0, TRepo.manualBook, null));// .setIndependent());
achievements.put("tconstruct:pattern", new Achievement("tconstruct:pattern", "tconstruct.pattern", 2, 1, TRepo.blankPattern, achievements.get("tconstruct:beginner")));
achievements.put("tconstruct:tinkerer", new Achievement("tconstruct:tinkerer", "tconstruct.tinkerer", 2, 2, new ItemStack(TRepo.titleIcon, 1, 4096), achievements.get("tconstruct:pattern")));
achievements.put("tconstruct:preparedFight", new Achievement("tconstruct:preparedFight", "tconstruct.preparedFight", 1, 3, new ItemStack(TRepo.titleIcon, 1, 4097), achievements.get("tconstruct:tinkerer")));
achievements.put("tconstruct:proTinkerer", new Achievement("tconstruct:proTinkerer", "tconstruct.proTinkerer", 4, 4, new ItemStack(TRepo.titleIcon, 1, 4098), achievements.get("tconstruct:tinkerer")).setSpecial());
achievements.put("tconstruct:preparedFight",
new Achievement("tconstruct:preparedFight", "tconstruct.preparedFight", 1, 3, new ItemStack(TRepo.titleIcon, 1, 4097), achievements.get("tconstruct:tinkerer")));
achievements.put("tconstruct:proTinkerer",
new Achievement("tconstruct:proTinkerer", "tconstruct.proTinkerer", 4, 4, new ItemStack(TRepo.titleIcon, 1, 4098), achievements.get("tconstruct:tinkerer")).setSpecial());
achievements.put("tconstruct:smelteryMaker", new Achievement("tconstruct:smelteryMaker", "tconstruct.smelteryMaker", -2, -1, TRepo.smeltery, achievements.get("tconstruct:beginner")));
achievements.put("tconstruct:enemySlayer", new Achievement("tconstruct:enemySlayer", "tconstruct.enemySlayer", 0, 5, new ItemStack(TRepo.titleIcon, 1, 4099), achievements.get("tconstruct:preparedFight")));
achievements.put("tconstruct:dualConvenience", new Achievement("tconstruct:dualConvenience", "tconstruct.dualConvenience", 0, 7, new ItemStack(TRepo.titleIcon, 1, 4100), achievements.get("tconstruct:enemySlayer")).setSpecial());
achievements.put("tconstruct:doingItWrong", new Achievement("tconstruct:doingItWrong", "tconstruct.doingItWrong", -2, -3, new ItemStack(TRepo.manualBook, 1, 2), achievements.get("tconstruct:smelteryMaker")));
achievements.put("tconstruct:betterCrafting", new Achievement("tconstruct:betterCrafting", "tconstruct.betterCrafting", -2, 2, TRepo.craftingStationWood, achievements.get("tconstruct:beginner")));
achievements.put("tconstruct:enemySlayer",
new Achievement("tconstruct:enemySlayer", "tconstruct.enemySlayer", 0, 5, new ItemStack(TRepo.titleIcon, 1, 4099), achievements.get("tconstruct:preparedFight")));
achievements.put("tconstruct:dualConvenience",
new Achievement("tconstruct:dualConvenience", "tconstruct.dualConvenience", 0, 7, new ItemStack(TRepo.titleIcon, 1, 4100), achievements.get("tconstruct:enemySlayer")).setSpecial());
achievements.put("tconstruct:doingItWrong",
new Achievement("tconstruct:doingItWrong", "tconstruct.doingItWrong", -2, -3, new ItemStack(TRepo.manualBook, 1, 2), achievements.get("tconstruct:smelteryMaker")));
achievements.put("tconstruct:betterCrafting",
new Achievement("tconstruct:betterCrafting", "tconstruct.betterCrafting", -2, 2, TRepo.craftingStationWood, achievements.get("tconstruct:beginner")));
}
}
@@ -152,8 +152,8 @@ public class TRecipes
GameRegistry.registerBlock(TRepo.glueBlock, "GlueBlock");
OreDictionary.registerOre("blockRubber", new ItemStack(TRepo.glueBlock));
GameRegistry.registerBlock(TRepo.woolSlab1, WoolSlab1Item.class, "WoolSlab1");
GameRegistry.registerBlock(TRepo.woolSlab2, WoolSlab2Item.class, "WoolSlab2");
//GameRegistry.registerBlock(TRepo.woolSlab1, WoolSlab1Item.class, "WoolSlab1");
//GameRegistry.registerBlock(TRepo.woolSlab2, WoolSlab2Item.class, "WoolSlab2");
// Smeltery stuff
GameRegistry.registerBlock(TRepo.smeltery, SmelteryItemBlock.class, "Smeltery");
@@ -678,7 +678,7 @@ public class TRecipes
GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 8), patBlock, '#', new ItemStack(TRepo.materials, 1, 15)); // Alumite
GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 16)); // Steel
GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), "#", '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum raw ->
// ingot
// ingot
GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 9), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 3)); // Copper
GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 10), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 5)); // Tin
@@ -796,7 +796,8 @@ public class TRecipes
GameRegistry.addRecipe(new ItemStack(TRepo.diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Items.diamond), '#', new ItemStack(Items.apple));
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));
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 4), new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.heartCanister, 1, 3), new ItemStack(Items.golden_apple, 1, 1));
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 4), new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.heartCanister, 1, 3), new ItemStack(Items.golden_apple,
1, 1));
//GameRegistry.addShapelessRecipe(new ItemStack(heartCanister, 1, 6), new ItemStack(heartCanister, 1, 0), new ItemStack(heartCanister, 1, 4), new ItemStack(heartCanister, 1, 5));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TRepo.toughRod, 1, 2), 'm',
@@ -832,7 +833,7 @@ public class TRecipes
GameRegistry.addRecipe(new ItemStack(TRepo.searedSlab, 6, 7), "bbb", 'b', new ItemStack(TRepo.smeltery, 1, 11));
// Wool Slab Recipes
for (int sc = 0; sc <= 7; sc++)
/**for (int sc = 0; sc <= 7; sc++)
{
GameRegistry.addRecipe(new ItemStack(TRepo.woolSlab1, 6, sc), "www", 'w', new ItemStack(Blocks.wool, 1, sc));
GameRegistry.addRecipe(new ItemStack(TRepo.woolSlab2, 6, sc), "www", 'w', new ItemStack(Blocks.wool, 1, sc + 8));
@@ -840,7 +841,7 @@ public class TRecipes
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.wool, 1, sc), new ItemStack(TRepo.woolSlab1, 1, sc), new ItemStack(TRepo.woolSlab1, 1, sc));
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.wool, 1, sc + 8), new ItemStack(TRepo.woolSlab2, 1, sc), new ItemStack(TRepo.woolSlab2, 1, sc));
}
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.wool, 1, 0), "slabCloth", "slabCloth"));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.wool, 1, 0), "slabCloth", "slabCloth"));*/
// Trap Recipes
GameRegistry.addRecipe(new ItemStack(TRepo.punji, 5, 0), "b b", " b ", "b b", 'b', new ItemStack(Items.reeds));
GameRegistry.addRecipe(new ItemStack(TRepo.barricadeSpruce, 1, 0), "b", "b", 'b', new ItemStack(Blocks.log, 1, 1));
@@ -1034,8 +1035,8 @@ public class TRecipes
ensureOreIsRegistered("nuggetGold", new ItemStack(Items.gold_nugget));
OreDictionary.registerOre("nuggetPigIron", new ItemStack(TRepo.materials, 1, 35));
OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab1, 1, Short.MAX_VALUE));
OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab2, 1, Short.MAX_VALUE));
//OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab1, 1, Short.MAX_VALUE));
//OreDictionary.registerOre("slabCloth", new ItemStack(TRepo.woolSlab2, 1, Short.MAX_VALUE));
ensureOreIsRegistered("stoneMossy", new ItemStack(Blocks.stonebrick, 1, 1));
ensureOreIsRegistered("stoneMossy", new ItemStack(Blocks.mossy_cobblestone));
+3 -3
View File
@@ -131,8 +131,8 @@ public class TRepo
public static Block speedSlab;
public static Block meatBlock;
public static Block woolSlab1;
public static Block woolSlab2;
//public static Block woolSlab1;
//public static Block woolSlab2;
public static Block glueBlock;
// Traps
@@ -239,7 +239,7 @@ public class TRepo
public static ModFlux modFlux;
public static ModLapis modLapis;
public static ModAttack modAttack;
public static Item creativeModifier;
// Wearables
@@ -28,7 +28,7 @@ public class FancyEntityItem extends EntityItem
this.isImmuneToFire = true;
this.lifespan = 72000;
}
public FancyEntityItem(World world, Entity original, ItemStack stack)
{
this(world, original.posX, original.posY, original.posZ);
@@ -26,7 +26,8 @@ public class ArmorBasic extends ItemArmor
@Override
public String getArmorTexture (ItemStack stack, Entity entity, int slot, String type)
{
return "tinker:textures/armor/" + textureName + "_" + type + ".png";
int suffix = this.armorType == 2 ? 2 : 1;
return "tinker:textures/armor/" + textureName + "_" + suffix + ".png";
}
}
@@ -3,6 +3,7 @@ package tconstruct.items.armor;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import tconstruct.common.TRepo;
import tconstruct.library.armor.ArmorCore;
import tconstruct.library.armor.EnumArmorPart;
@@ -23,7 +24,8 @@ public class ArmorStandard extends ArmorCore
@Override
public String getArmorTexture (ItemStack stack, Entity entity, int slot, String layer)
{
return "tinker:textures/armor/wood_" + layer + ".png";
int suffix = this.armorType == 2 ? 2 : 1;
return "tinker:textures/armor/wood_" + suffix + ".png";
}
}
@@ -48,12 +48,12 @@ public class Mattock extends DualHarvestTool
}
static Material[] axeMaterials = { Material.wood, Material.cactus, Material.plants, Material.vine };// TODO
// find
// this//,
// Material.pumpkin,
// Material.plants,
// Material.vine
// };
// find
// this//,
// Material.pumpkin,
// Material.plants,
// Material.vine
// };
static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay };
@Override
@@ -126,7 +126,7 @@ public abstract class DualHarvestTool extends HarvestTool
}
@Override
public boolean canHarvestBlock(Block block, ItemStack itemStack)
public boolean canHarvestBlock (Block block, ItemStack itemStack)
{
return func_150897_b(block);
}
@@ -189,7 +189,7 @@ public abstract class HarvestTool extends ToolCore
}
@Override
public boolean canHarvestBlock(Block block, ItemStack itemStack)
public boolean canHarvestBlock (Block block, ItemStack itemStack)
{
return func_150897_b(block);
}
@@ -58,8 +58,8 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem
{
// TE power constants -- TODO grab these from the items added
protected int capacity = 400000;
protected int maxReceive = 2000;
protected int maxExtract = 2000;
protected int maxReceive = 80;
protected int maxExtract = 80;
protected Random random = new Random();
protected int damageVsEntity;
@@ -778,13 +778,13 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem
}
return tags.getCompoundTag("InfiTool").getInteger("Damage");
}
/* Prevent tools from dying */
public boolean hasCustomEntity (ItemStack stack)
{
return true;
}
public Entity createEntity (World world, Entity location, ItemStack itemstack)
{
return new FancyEntityItem(world, location, itemstack);
@@ -32,9 +32,9 @@ public class BuildcraftTransport implements ICompatPlugin
{
addFacade(TRepo.smeltery, sc);
}
addFacade(TRepo.searedBlock, 0);
addFacade(TRepo.searedBlockNether, 0);
addFacade(TRepo.searedBlockNether, 0);
}
@Override
@@ -168,7 +168,7 @@ public class TEventHandler
event.overrideResult(arrow);
}
}
if (event.tool == TRepo.battlesign)
{
int modifiers = toolTag.getInteger("Modifiers");
@@ -290,7 +290,7 @@ public class TEventHandler
}
}
}
@SubscribeEvent
public void onAttack (LivingAttackEvent event)
{
@@ -8,58 +8,72 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
public class PacketUpdateTE extends AbstractPacket {
private int x, y, z;
private NBTTagCompound data;
public class PacketUpdateTE extends AbstractPacket
{
private int x, y, z;
private NBTTagCompound data;
public PacketUpdateTE() {
public PacketUpdateTE()
{
}
public PacketUpdateTE(int x, int y, int z, NBTTagCompound data) {
this.x = x;
this.y = y;
this.z = z;
this.data = data;
}
}
@Override
public void encodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
PacketBuffer pbuff = new PacketBuffer(buffer);
pbuff.writeInt(x);
pbuff.writeShort(y);
pbuff.writeInt(z);
try {
pbuff.writeNBTTagCompoundToBuffer(data);
} catch (Exception e) {
e.printStackTrace();
}
}
public PacketUpdateTE(int x, int y, int z, NBTTagCompound data)
{
this.x = x;
this.y = y;
this.z = z;
this.data = data;
}
@Override
public void decodeInto(ChannelHandlerContext ctx, ByteBuf buffer) {
PacketBuffer pbuff = new PacketBuffer(buffer);
x = pbuff.readInt();
y = pbuff.readShort();
z = pbuff.readInt();
try {
data = pbuff.readNBTTagCompoundFromBuffer();
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void encodeInto (ChannelHandlerContext ctx, ByteBuf buffer)
{
PacketBuffer pbuff = new PacketBuffer(buffer);
pbuff.writeInt(x);
pbuff.writeShort(y);
pbuff.writeInt(z);
try
{
pbuff.writeNBTTagCompoundToBuffer(data);
}
catch (Exception e)
{
e.printStackTrace();
}
}
@Override
public void handleClientSide(EntityPlayer player) {
TileEntity te = player.worldObj.getTileEntity(x, y, z);
@Override
public void decodeInto (ChannelHandlerContext ctx, ByteBuf buffer)
{
PacketBuffer pbuff = new PacketBuffer(buffer);
x = pbuff.readInt();
y = pbuff.readShort();
z = pbuff.readInt();
try
{
data = pbuff.readNBTTagCompoundFromBuffer();
}
catch (Exception e)
{
e.printStackTrace();
}
}
if (te != null) {
te.readFromNBT(data);
}
}
@Override
public void handleClientSide (EntityPlayer player)
{
TileEntity te = player.worldObj.getTileEntity(x, y, z);
@Override
public void handleServerSide(EntityPlayer player) {
}
if (te != null)
{
te.readFromNBT(data);
}
}
@Override
public void handleServerSide (EntityPlayer player)
{
}
}
@@ -145,7 +145,8 @@ public class ArmorExtended implements IInventory
{
Side side = FMLCommonHandler.instance().getEffectiveSide();
if (inventory[4] != null || inventory[5] != null || inventory[6] != null) {
if (inventory[4] != null || inventory[5] != null || inventory[6] != null)
{
int bonusHP = 0;
for (int i = 0; i < 3; i++)
{
@@ -246,24 +247,24 @@ public class ArmorExtended implements IInventory
public void readFromNBT (NBTTagCompound tagCompound)
{
if(tagCompound != null)
if (tagCompound != null)
{
NBTTagList tagList = tagCompound.getTagList("Inventory", 10);
for (int i = 0; i < tagList.tagCount(); ++i)
{
NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.getCompoundTagAt(i);
int j = nbttagcompound.getByte("Slot") & 255;
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound);
if (itemstack != null)
NBTTagList tagList = tagCompound.getTagList("Inventory", 10);
for (int i = 0; i < tagList.tagCount(); ++i)
{
this.inventory[j] = itemstack;
NBTTagCompound nbttagcompound = (NBTTagCompound) tagList.getCompoundTagAt(i);
int j = nbttagcompound.getByte("Slot") & 255;
ItemStack itemstack = ItemStack.loadItemStackFromNBT(nbttagcompound);
if (itemstack != null)
{
this.inventory[j] = itemstack;
}
}
}
}
}
public void dropItems(ArrayList<EntityItem> drops)
public void dropItems (ArrayList<EntityItem> drops)
{
EntityPlayer player = parent.get();
for (int i = 0; i < 4; ++i)
@@ -290,7 +291,7 @@ public class ArmorExtended implements IInventory
public void writeInventoryToStream (ByteBuf os) throws IOException
{
for (int i = 0; i < 7; i++)
ByteBufUtils.writeItemStack(os,inventory[i]);
ByteBufUtils.writeItemStack(os, inventory[i]);
}
public void readInventoryFromStream (ByteBuf is) throws IOException
@@ -160,7 +160,7 @@ public class KnapsackInventory implements IInventory
}
}
public void dropItems(ArrayList<EntityItem> drops)
public void dropItems (ArrayList<EntityItem> drops)
{
EntityPlayer player = parent.get();
for (int i = 0; i < inventory.length; ++i)
@@ -49,7 +49,7 @@ public class TPlayerHandler
}
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event)
public void onEntityConstructing (EntityEvent.EntityConstructing event)
{
if (event.entity instanceof EntityPlayer && TPlayerStats.get((EntityPlayer) event.entity) == null)
{
@@ -60,7 +60,7 @@ public class TPlayerHandler
public void onPlayerLogin (EntityPlayer entityplayer)
{
TPlayerStats playerData = playerStats.remove(entityplayer.getPersistentID());
if(playerData != null)
if (playerData != null)
{
playerData.saveNBTData(entityplayer.getEntityData());
}
@@ -71,7 +71,7 @@ public class TPlayerHandler
stats.level = entityplayer.experienceLevel;
stats.hunger = entityplayer.getFoodStats().getFoodLevel();
//stats.battlesignBonus = tags.getCompoundTag("TConstruct").getBoolean("battlesignBonus");
// gamerule naturalRegeneration false
@@ -131,7 +131,7 @@ public class TPlayerHandler
{
stats.battlesignBonus = true;
ItemStack modifier = new ItemStack(TRepo.creativeModifier);
NBTTagCompound compound = new NBTTagCompound();
compound.setTag("display", new NBTTagCompound());
NBTTagList list = new NBTTagList();
@@ -142,7 +142,7 @@ public class TPlayerHandler
modifier.setTagCompound(compound);
AbilityHelper.spawnItemAtPlayer(entityplayer, modifier);
if (entityplayer.getDisplayName().toLowerCase().equals("zisteau"))
{
spawnPigmanModifier(entityplayer);
@@ -161,11 +161,11 @@ public class TPlayerHandler
}
}
}
void spawnPigmanModifier(EntityPlayer entityplayer)
void spawnPigmanModifier (EntityPlayer entityplayer)
{
ItemStack modifier = new ItemStack(TRepo.creativeModifier);
NBTTagCompound compound = new NBTTagCompound();
compound.setTag("display", new NBTTagCompound());
compound.getCompoundTag("display").setString("Name", "Zistonian Bonus Modifier");
@@ -184,7 +184,7 @@ public class TPlayerHandler
// Boom!
TPlayerStats playerData = playerStats.remove(entityplayer.getPersistentID());
TPlayerStats stats = TPlayerStats.get(entityplayer);
if(playerData != null)
if (playerData != null)
{
stats = playerData;
}
@@ -233,7 +233,7 @@ public class TPlayerHandler
*/
@SubscribeEvent
public void playerDeath(LivingDeathEvent event)
public void playerDeath (LivingDeathEvent event)
{
if (!event.entity.worldObj.isRemote && event.entity instanceof EntityPlayer)
{
@@ -40,7 +40,7 @@ public class TPlayerStats implements IExtendedEntityProperties
}
@Override
public void saveNBTData(NBTTagCompound compound)
public void saveNBTData (NBTTagCompound compound)
{
NBTTagCompound tTag = new NBTTagCompound();
armor.saveToNBT(tTag);
@@ -53,9 +53,9 @@ public class TPlayerStats implements IExtendedEntityProperties
}
@Override
public void loadNBTData(NBTTagCompound compound)
public void loadNBTData (NBTTagCompound compound)
{
NBTTagCompound properties = (NBTTagCompound)compound.getTag(PROP_NAME);
NBTTagCompound properties = (NBTTagCompound) compound.getTag(PROP_NAME);
this.armor.readFromNBT(properties);
this.knapsack.readFromNBT(properties);
@@ -66,16 +66,16 @@ public class TPlayerStats implements IExtendedEntityProperties
}
@Override
public void init(Entity entity, World world)
public void init (Entity entity, World world)
{
}
public static final void register(EntityPlayer player)
public static final void register (EntityPlayer player)
{
player.registerExtendedProperties(TPlayerStats.PROP_NAME, new TPlayerStats(player));
}
public static final TPlayerStats get(EntityPlayer player)
public static final TPlayerStats get (EntityPlayer player)
{
return (TPlayerStats) player.getExtendedProperties(PROP_NAME);
}