Skip to content

Commit

Permalink
under 1k finally
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jan 29, 2014
1 parent 9b78521 commit f3bcb13
Show file tree
Hide file tree
Showing 23 changed files with 80 additions and 58 deletions.
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/CastingChannelBlock.java
Expand Up @@ -23,10 +23,10 @@ public class CastingChannelBlock extends BlockContainer

public CastingChannelBlock()
{
super(Material.rock);
super(Material.field_151576_e);
this.func_149711_c(1F);
this.func_149752_b(10);
this.setStepSound(soundStoneFootstep);
this.setStepSound(field_149769_e);
func_149647_a(TConstructRegistry.blockTab);
}

Expand Down
40 changes: 31 additions & 9 deletions src/main/java/tconstruct/blocks/CraftingSlab.java
Expand Up @@ -33,7 +33,7 @@ public CraftingSlab(Material material)
super(material);
this.func_149647_a(TConstructRegistry.blockTab);
this.func_149711_c(2f);
this.setStepSound(Block.soundWoodFootstep);
this.setStepSound(Block.field_149766_f);
}

/* Rendering */
Expand All @@ -48,7 +48,7 @@ public String[] getTextureNames ()
}

@Override
public IIcon getIcon (int side, int meta)
public IIcon func_149691_a (int side, int meta)
{
return icons[(meta % 8) * 3 + getTextureIndex(side)];
}
Expand All @@ -67,9 +67,9 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool (World world, int x, int y,
{
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 5)
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125,
(double) z + this.maxZ);
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.field_149759_B, (double) y + this.field_149760_C, (double) z + this.field_149754_D, (double) x + this.field_149755_E, (double) y + this.field_149756_F - 0.125,
(double) z + this.field_149757_G);
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.field_149759_B, (double) y + this.field_149760_C, (double) z + this.field_149754_D, (double) x + this.field_149755_E, (double) y + this.field_149756_F, (double) z + this.field_149757_G);
}

@Override
Expand Down Expand Up @@ -124,7 +124,7 @@ public Object getModInstance ()
}

@Override
public void getSubBlocks (Item b, CreativeTabs tab, List list)
public void func_149666_a (Item b, CreativeTabs tab, List list)
{
for (int iter = 0; iter < 6; iter++)
{
Expand All @@ -133,21 +133,43 @@ public void getSubBlocks (Item b, CreativeTabs tab, List list)
}

@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
{
if (PHConstruct.freePatterns)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 4)
{
PatternChestLogic logic = (PatternChestLogic) world.getBlockTileEntity(x, y, z);
PatternChestLogic logic = (PatternChestLogic) world.func_147438_o(x, y, z);
for (int i = 1; i <= 13; i++)
{
logic.setInventorySlotContents(i - 1, new ItemStack(TRepo.woodPattern, 1, i));
}
logic.setInventorySlotContents(13, new ItemStack(TRepo.woodPattern, 1, 22));
}
}
super.onBlockPlacedBy(world, x, y, z, entityliving, stack);
super.func_149689_a(world, x, y, z, entityliving, stack);
}

@Override
public TileEntity func_149915_a (World var1, int metadata)
{
switch (metadata % 8)
{
case 0:
return new CraftingStationLogic();
case 1:
return new ToolStationLogic();
case 2:
return new PartBuilderLogic();
case 3:
return new StencilTableLogic();
case 4:
return new PatternChestLogic();
case 5:
return new ToolForgeLogic();
default:
return null;
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/CraftingStationBlock.java
Expand Up @@ -25,7 +25,7 @@ public CraftingStationBlock(Material material)
super(material);
this.func_149647_a(TConstructRegistry.blockTab);
this.func_149711_c(2f);
this.setStepSound(Block.soundWoodFootstep);
this.setStepSound(Block.field_149766_f);
}

//Block.hasComparatorInputOverride and Block.getComparatorInputOverride
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/DryingRack.java
Expand Up @@ -30,7 +30,7 @@ public DryingRack()
super(Material.field_151575_d);
this.func_149647_a(TConstructRegistry.blockTab);
func_149711_c(2.0f);
setStepSound(soundMetalFootstep);
setStepSound(field_149777_j);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GlassBlockConnected.java
Expand Up @@ -25,7 +25,7 @@ public class GlassBlockConnected extends MantleBlock
public GlassBlockConnected(String location, boolean hasAlpha)
{
super(Material.field_151592_s);
this.setStepSound(soundGlassFootstep);
this.setStepSound(field_149778_k);
folder = location;
renderPass = hasAlpha ? 1 : 0;
func_149711_c(0.3F);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GlassPane.java
Expand Up @@ -11,7 +11,7 @@ public GlassPane()
{
super(Material.field_151592_s, "glass/", blockTextures);
this.func_149711_c(0.3F);
this.setStepSound(soundGlassFootstep);
this.setStepSound(field_149778_k);
this.func_149663_c("tconstruct.glasspane");
this.func_149647_a(TConstructRegistry.blockTab);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GlassPaneStained.java
Expand Up @@ -12,7 +12,7 @@ public GlassPaneStained()
super(Material.field_151592_s, "glass/", assembleBlockTextures());
//TODO setHardness
this.func_149711_c(0.3F);
this.setStepSound(soundGlassFootstep);
this.setStepSound(field_149778_k);
this.func_149663_c("tconstruct.glasspanestained");
this.func_149647_a(TConstructRegistry.blockTab);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GravelOre.java
Expand Up @@ -22,7 +22,7 @@ public GravelOre()
{
super();
this.func_149647_a(TConstructRegistry.blockTab);
this.setStepSound(soundGravelFootstep);
this.setStepSound(field_149767_g);
this.field_149764_J = Material.field_151596_z;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/LavaTankBlock.java
Expand Up @@ -34,12 +34,12 @@ public class LavaTankBlock extends BlockContainer

public LavaTankBlock()
{
super(Material.rock);
super(Material.field_151576_e);
func_149711_c(3F);
func_149752_b(20F);
func_149647_a(TConstructRegistry.blockTab);
func_149663_c("TConstruct.LavaTank");
setStepSound(Block.soundGlassFootstep);
setStepSound(Block.field_149778_k);
}

public LavaTankBlock(String prefix)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/slime/SlimeGel.java
Expand Up @@ -21,7 +21,7 @@ public class SlimeGel extends TConstructBlock
{
public SlimeGel()
{
super(Material.sponge, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" });
super(Material.field_151583_m, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" });
func_149647_a(TConstructRegistry.blockTab);
}

Expand All @@ -48,7 +48,7 @@ public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity
if (entity.motionY < -0.08F)
{
Block var9 = (Block) this;
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume()) / 2.0F, var9.stepSound.getPitch() * 0.65F);
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.field_149762_H.getStepSound(), (var9.field_149762_H.getVolume()) / 2.0F, var9.field_149762_H.getPitch() * 0.65F);
}
entity.motionY *= -1.2F;
if (entity instanceof EntityLivingBase)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/slime/SlimeGrass.java
Expand Up @@ -92,7 +92,7 @@ public void getSubBlocks (Item b, CreativeTabs tab, List list)
public boolean canSustainPlant (World world, int x, int y, int z, ForgeDirection direction, IPlantable plant)
{
EnumPlantType plantType = plant.getPlantType(world, x, y + 1, z);
return plantType == EnumPlantType.Plains && plant.getPlantID(world, x, y + 1, z) != Block.tallGrass.blockID;
return plantType == EnumPlantType.Plains && plant.getPlant(world, x, y + 1, z) != Blocks.tallgrass;
}

public void onPlantGrow (World world, int x, int y, int z, int sourceX, int sourceY, int sourceZ)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/slime/SlimeSapling.java
Expand Up @@ -32,7 +32,7 @@ public SlimeSapling()
float f = 0.4F;
func_149676_a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
this.func_149711_c(0.0F);
this.setStepSound(Block.soundGrassFootstep);
this.setStepSound(Block.field_149779_h);
this.func_149647_a(TConstructRegistry.blockTab);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/traps/BarricadeBlock.java
Expand Up @@ -95,7 +95,7 @@ public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer
this.onPostBlockPlaced(world, x, y, z, meta);

Block var9 = this;
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.stepSound.getStepSound(), (var9.stepSound.getVolume() + 1.0F) / 2.0F, var9.stepSound.getPitch() * 0.8F);
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, var9.field_149762_H.getStepSound(), (var9.field_149762_H.getVolume() + 1.0F) / 2.0F, var9.field_149762_H.getPitch() * 0.8F);
player.swingItem();
if (!player.capabilities.isCreativeMode)
stack.stackSize -= 1;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/blocks/traps/Punji.java
Expand Up @@ -28,7 +28,7 @@ public Punji()
{
super(Material.field_151585_k);
this.func_149676_a(0.125f, 0, 0.125f, 0.875f, 0.375f, 0.875f);
this.setStepSound(Block.soundGrassFootstep);
this.setStepSound(Block.field_149779_h);
this.func_149647_a(TConstructRegistry.blockTab);
this.func_149711_c(3.0f);
}
Expand Down Expand Up @@ -60,8 +60,8 @@ public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer
if (stack != null && stack == new ItemStack(TRepo.punji))
{
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.stepSound.getPlaceSound(),
(this.stepSound.getVolume() + 1.0F) / 2.0F, this.stepSound.getPitch() * 0.8F);
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.field_149762_H.getPlaceSound(),
(this.field_149762_H.getVolume() + 1.0F) / 2.0F, this.field_149762_H.getPitch() * 0.8F);
player.swingItem();
if (!player.capabilities.isCreativeMode)
{
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/client/StepSoundSlime.java
@@ -1,8 +1,8 @@
package tconstruct.client;

import net.minecraft.block.StepSound;
import net.minecraft.block.Block.SoundType;

public class StepSoundSlime extends StepSound
public class StepSoundSlime extends SoundType
{

public StepSoundSlime(String par1Str, float par2, float par3)
Expand All @@ -16,15 +16,15 @@ public StepSoundSlime(String par1Str, float par2, float par3)
*/
public String getBreakSound ()
{
return this.stepSoundName + ".big";
return this.field_150501_a + ".big";
}

/**
* Used when a entity walks over, or otherwise interacts with the block.
*/
public String getStepSound ()
{
return this.stepSoundName + ".small";
return this.field_150501_a + ".small";
}

}
8 changes: 4 additions & 4 deletions src/main/java/tconstruct/client/entity/FancyItemRender.java
Expand Up @@ -78,7 +78,7 @@ public void doRenderItem (EntityItem par1EntityItem, double par2, double par4, d
{
;
}
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(BlockUtils.getBlockFromItem(itemstack.getItem()).getRenderType()))
else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.func_147739_a(BlockUtils.getBlockFromItem(itemstack.getItem()).func_149645_b()))
{
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);

Expand All @@ -90,7 +90,7 @@ else if (itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.r
}

float f7 = 0.25F;
int j = block.getRenderType();
int j = block.func_149645_b();

if (j == 1 || j == 19 || j == 12 || j == 2)
{
Expand Down Expand Up @@ -321,8 +321,8 @@ public void renderItemIntoGUI (FontRenderer par1FontRenderer, TextureManager par
float f1;
float f2;
//TODO make this be the block equivalent to k
Block block = BlockUtils.getBlockFromItem(k];
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.getRenderType()))
Block block = BlockUtils.getBlockFromItem(k);
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.func_147739_a(block.func_149645_b()))
{
par2TextureManager.bindTexture(TextureMap.locationBlocksTexture);
GL11.glPushMatrix();
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/tconstruct/common/TContent.java
Expand Up @@ -99,31 +99,31 @@ void registerBlocks ()
TRepo.heldItemBlock = new EquipBlock(Material.field_151575_d).func_149663_c("Frypan");

TRepo.craftedSoil = new SoilBlock().func_149713_g(0).func_149663_c("TConstruct.Soil");
TRepo.craftedSoil.field_149762_H = Block.soundGravelFootstep;
TRepo.craftedSoil.field_149762_H = Block.field_149767_g;

TRepo.searedSlab = new SearedSlab().func_149663_c("SearedSlab");
TRepo.searedSlab.field_149762_H = Block.soundStoneFootstep;
TRepo.searedSlab.field_149762_H = Block.field_149769_e;

TRepo.speedSlab = new SpeedSlab().func_149663_c("SpeedSlab");
TRepo.speedSlab.field_149762_H = Block.soundStoneFootstep;
TRepo.speedSlab.field_149762_H = Block.field_149769_e;

TRepo.metalBlock = new TMetalBlock(Material.field_151573_f, 10.0F).func_149663_c("tconstruct.metalblock");
TRepo.metalBlock.field_149762_H = Block.soundMetalFootstep;
TRepo.metalBlock.field_149762_H = Block.field_149777_j;

TRepo.meatBlock = new MeatBlock().func_149663_c("tconstruct.meatblock");
TRepo.glueBlock = new GlueBlock().func_149663_c("GlueBlock").func_149647_a(TConstructRegistry.blockTab);

TRepo.woolSlab1 = new SlabBase(Material.field_151580_n, Blocks.wool, 0, 8).func_149663_c("cloth");
TRepo.woolSlab1.func_149672_a(Block.soundClothFootstep).func_149647_a(CreativeTabs.tabDecorations);
TRepo.woolSlab1.func_149672_a(Block.field_149775_l).func_149647_a(CreativeTabs.tabDecorations);
TRepo.woolSlab2 = new SlabBase(Material.field_151580_n, Blocks.wool, 8, 8).func_149663_c("cloth");
TRepo.woolSlab2.func_149672_a(Block.soundClothFootstep).func_149647_a(CreativeTabs.tabDecorations);
TRepo.woolSlab2.func_149672_a(Block.field_149775_l).func_149647_a(CreativeTabs.tabDecorations);

//Smeltery
TRepo.smeltery = new SmelteryBlock().func_149663_c("Smeltery");
TRepo.smelteryNether = new SmelteryBlock("nether").func_149663_c("Smeltery");
TRepo.lavaTank = new LavaTankBlock().func_149663_c("LavaTank");
TRepo.lavaTank.func_149672_a(Block.soundGlassFootstep);
TRepo.lavaTankNether = new LavaTankBlock("nether").func_149672_a(Block.soundGlassFootstep).func_149663_c("LavaTank");
TRepo.lavaTank.func_149672_a(Block.field_149778_k);
TRepo.lavaTankNether = new LavaTankBlock("nether").func_149672_a(Block.field_149778_k).func_149663_c("LavaTank");

TRepo.searedBlock = new SearedBlock().func_149663_c("SearedBlock");
TRepo.searedBlockNether = new SearedBlock("nether").func_149663_c("SearedBlock");
Expand All @@ -133,7 +133,7 @@ void registerBlocks ()
TRepo.tankAir = new TankAirBlock(Material.field_151584_j).setBlockUnbreakable().func_149663_c("tconstruct.tank.air");

//Traps
TRepo.landmine = new BlockLandmine().func_149711_c(0.5F).setResistance(0F).func_149672_a(Block.soundMetalFootstep).func_149647_a(CreativeTabs.tabRedstone)
TRepo.landmine = new BlockLandmine().func_149711_c(0.5F).setResistance(0F).func_149672_a(Block.field_149777_j).func_149647_a(CreativeTabs.tabRedstone)
.func_149663_c("landmine");
TRepo.punji = new Punji().func_149663_c("trap.punji");
TRepo.barricadeOak = new BarricadeBlock(Blocks.log, 0).func_149663_c("trap.barricade.oak");
Expand Down Expand Up @@ -399,7 +399,7 @@ void registerBlocks ()

//Ores
String[] berryOres = new String[] { "berry_iron", "berry_gold", "berry_copper", "berry_tin", "berry_iron_ripe", "berry_gold_ripe", "berry_copper_ripe", "berry_tin_ripe" };
TRepo.oreBerry = (OreberryBush) new OreberryBush(, berryOres, 0, 4, new String[] { "oreIron", "oreGold", "oreCopper", "oreTin" }).func_149663_c("ore.berries.one");
TRepo.oreBerry = (OreberryBush) new OreberryBush(berryOres, 0, 4, new String[] { "oreIron", "oreGold", "oreCopper", "oreTin" }).func_149663_c("ore.berries.one");
String[] berryOresTwo = new String[] { "berry_aluminum", "berry_essence", "", "", "berry_aluminum_ripe", "berry_essence_ripe", "", "" };
TRepo.oreBerrySecond = (OreberryBush) new OreberryBushEssence(berryOresTwo, 4, 2, new String[] { "oreAluminum", "oreSilver" })
.func_149663_c("ore.berries.two");
Expand All @@ -424,15 +424,15 @@ void registerBlocks ()

//Glass
TRepo.clearGlass = new GlassBlockConnected("clear", false).func_149663_c("GlassBlock");
TRepo.clearGlass.field_149762_H = Block.soundGlassFootstep;
TRepo.clearGlass.field_149762_H = Block.field_149778_k;
TRepo.glassPane = new GlassPaneConnected("clear", false);
TRepo.stainedGlassClear = new GlassBlockConnectedMeta("stained", true, "white", "orange", "magenta", "light_blue", "yellow", "lime", "pink", "gray",
"light_gray", "cyan", "purple", "blue", "brown", "green", "red", "black").func_149663_c("GlassBlock.StainedClear");
TRepo.stainedGlassClear.field_149762_H = Block.soundGlassFootstep;
TRepo.stainedGlassClear.field_149762_H = Block.field_149778_k;
TRepo.stainedGlassClearPane = new GlassPaneStained(PHConstruct.stainedGlassClearPane);

//Rail
TRepo.woodenRail = new WoodRail().func_149672_a(Block.soundWoodFootstep).func_149647_a(TConstructRegistry.blockTab).setUnlocalizedName("rail.wood");
TRepo.woodenRail = new WoodRail().func_149672_a(Block.field_149766_f).func_149647_a(TConstructRegistry.blockTab).setUnlocalizedName("rail.wood");

}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/items/blocks/BarricadeItem.java
Expand Up @@ -94,8 +94,8 @@ else if (world.canPlaceEntityOnSide(this.b, x, y, z, false, side, player, stack)

if (placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata))
{
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.stepSound.getPlaceSound(),
(block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), block.field_149762_H.getPlaceSound(),
(block.field_149762_H.getVolume() + 1.0F) / 2.0F, block.field_149762_H.getPitch() * 0.8F);
--stack.stackSize;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/items/blocks/WoolSlab1Item.java
Expand Up @@ -33,8 +33,8 @@ public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int
{
if (world.func_147465_d(x, y, z, Blocks.wool, trueMeta, 3))
{
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.getPlaceSound(),
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.field_149762_H.getPlaceSound(),
(this.block.field_149762_H.getVolume() + 1.0F) / 2.0F, this.block.field_149762_H.getPitch() * 0.8F);
--stack.stackSize;
return true;
}
Expand Down

0 comments on commit f3bcb13

Please sign in to comment.