Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Jan 1, 2014
1 parent 4228b26 commit c5426eb
Show file tree
Hide file tree
Showing 31 changed files with 245 additions and 226 deletions.
3 changes: 1 addition & 2 deletions src/main/java/tconstruct/TConstruct.java
Expand Up @@ -36,7 +36,6 @@

@Mod(modid = "TConstruct", name = "TConstruct", version = "${version}",
dependencies = "required-after:Forge@[9.11,);required-after:Mantle;after:ForgeMultipart;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = tconstruct.util.network.TPacketHandler.class)
public class TConstruct
{
/** The value of one ingot in millibuckets */
Expand Down Expand Up @@ -145,7 +144,7 @@ public void init (FMLInitializationEvent event)
}

DimensionBlacklist.getBadBimensions();
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TRepo.slimePool.blockID, 0));
GameRegistry.registerWorldGenerator(new SlimeIslandGen(TRepo.slimePool, 0));

PluginController.getController().init();

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/blocks/BlockLandmine.java
Expand Up @@ -24,12 +24,14 @@
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.LandmineExplodeLogic;
import tconstruct.blocks.logic.TileEntityLandmine;
import tconstruct.client.block.RenderLandmine;
import tconstruct.common.TProxyCommon;
import tconstruct.util.landmine.Helper;
import static net.minecraftforge.common.util.ForgeDirection.*;

/**
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/GlassPane.java
Expand Up @@ -10,7 +10,7 @@ public class GlassPane extends PaneBase
public GlassPane(int id)
{
super(id, Material.glass, "glass/", blockTextures);
this.setHardness(0.3F);
this.func_149711_c(0.3F);
this.setStepSound(soundGlassFootstep);
this.setUnlocalizedName("tconstruct.glasspane");
this.setCreativeTab(TConstructRegistry.blockTab);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/blocks/GlassPaneStained.java
Expand Up @@ -10,7 +10,8 @@ public class GlassPaneStained extends PaneBase
public GlassPaneStained(int id)
{
super(id, Material.glass, "glass/", assembleBlockTextures());
this.setHardness(0.3F);
//TODO setHardness
this.func_149711_c(0.3F);
this.setStepSound(soundGlassFootstep);
this.setUnlocalizedName("tconstruct.glasspanestained");
this.setCreativeTab(TConstructRegistry.blockTab);
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/tconstruct/blocks/MultiBrickFancy.java
Expand Up @@ -22,43 +22,43 @@ public MultiBrickFancy()
{
super(material.rock, 3f, blockTextures);
}

//TODO func_149712_f
@Override
public float getBlockHardness (World world, int x, int y, int z)
public float func_149712_f (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
switch (meta)
{
case 0:
return Blocks.obsidian.getBlockHardness(world, x, y, z);
return Blocks.obsidian.func_149712_f(world, x, y, z);
case 1:
return Blocks.sandstone.getBlockHardness(world, x, y, z);
return Blocks.sandstone.func_149712_f(world, x, y, z);
case 2:
return Blocks.netherrack.getBlockHardness(world, x, y, z);
return Blocks.netherrack.func_149712_f(world, x, y, z);
case 4:
return Blocks.iron_block.getBlockHardness(world, x, y, z);
return Blocks.iron_block.func_149712_f(world, x, y, z);
case 5:
return Blocks.gold_block.getBlockHardness(world, x, y, z);
return Blocks.gold_block.func_149712_f(world, x, y, z);
case 6:
return Blocks.lapis_block.getBlockHardness(world, x, y, z);
return Blocks.lapis_block.func_149712_f(world, x, y, z);
case 7:
return Blocks.diamond_block.getBlockHardness(world, x, y, z);
return Blocks.diamond_block.func_149712_f(world, x, y, z);
case 8:
return Blocks.redstone_block.getBlockHardness(world, x, y, z);
return Blocks.redstone_block.func_149712_f(world, x, y, z);
case 9:
return 1.0F;
case 10:
return 1.5F;
case 11:
return 1.5F;
case 12:
return Blocks.end_stone.getBlockHardness(world, x, y, z);
return Blocks.end_stone.func_149712_f(world, x, y, z);
case 13:
return Blocks.obsidian.getBlockHardness(world, x, y, z);
return Blocks.obsidian.func_149712_f(world, x, y, z);
case 3:
case 14:
case 15:
return Blocks.stone.getBlockHardness(world, x, y, z);
return Blocks.stone.func_149712_f(world, x, y, z);
default:
return blockHardness;
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tconstruct/blocks/SoilBlock.java
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
Expand Down Expand Up @@ -60,13 +61,13 @@ public float getBlockHardness (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 5)
return Block.dirt.blockHardness;
return Blocks.dirt.blockHardness;
return this.blockHardness;
}

public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
return Block.slowSand.getCollisionBoundingBoxFromPool(world, x, y, z);
return Blocks.soul_sand.getCollisionBoundingBoxFromPool(world, x, y, z);
}

/*public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/tconstruct/blocks/logic/FrypanLogic.java
Expand Up @@ -5,6 +5,8 @@
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
Expand Down Expand Up @@ -237,7 +239,7 @@ public static int getItemBurnTime (ItemStack stack)
return 150;
}

if (block == Block.wood)
if (block == Blocks.log)
{
return 2400;
}
Expand All @@ -253,15 +255,15 @@ public static int getItemBurnTime (ItemStack stack)
return 200;
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
return 200;
if (itemID == Item.stick.itemID)
if (itemID == Items.stick.itemID)
return 100;
if (itemID == Item.coal.itemID)
if (itemID == Items.coal.itemID)
return 800;
if (itemID == Item.bucketLava.itemID)
if (itemID == Items.lava_bucket.itemID)
return 20000;
if (itemID == Block.sapling.blockID)
if (itemID == Blocks.sapling.blockID)
return 100;
if (itemID == Item.blazeRod.itemID)
if (itemID == Items.blaze_rod.itemID)
return 2400;
return GameRegistry.getFuelValue(stack);
}
Expand Down
18 changes: 10 additions & 8 deletions src/main/java/tconstruct/blocks/logic/FurnaceLogic.java
Expand Up @@ -4,6 +4,8 @@
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
Expand Down Expand Up @@ -211,12 +213,12 @@ public static int getItemBurnTime (ItemStack stack)
{
Block block = Block.blocksList[i];

if (block == Block.woodSingleSlab)
if (block == Blocks.wooden_slab)
{
return 150;
}

if (block == Block.wood)
if (block == Blocks.log)
{
return 1200;
}
Expand All @@ -226,7 +228,7 @@ public static int getItemBurnTime (ItemStack stack)
return 300;
}

if (block == Block.coalBlock)
if (block == Blocks.coal_block)
{
return 16000;
}
Expand All @@ -238,15 +240,15 @@ public static int getItemBurnTime (ItemStack stack)
return 200;
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
return 200;
if (i == Item.stick.itemID)
if (i == Items.stick.itemID)
return 100;
if (i == Item.coal.itemID)
if (i == Items.coal.itemID)
return 1600;
if (i == Item.bucketLava.itemID)
if (i == Items.bucketLava.itemID)
return 20000;
if (i == Block.sapling.blockID)
if (i == Blocks.sapling.blockID)
return 100;
if (i == Item.blazeRod.itemID)
if (i == Items.blaze_rod.itemID)
return 2400;
return GameRegistry.getFuelValue(stack);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/blocks/slime/SlimeGrass.java
Expand Up @@ -29,7 +29,7 @@ public class SlimeGrass extends MantleBlock
public SlimeGrass()
{
super(Material.grass);
setHardness(0.6f);
func_149711_c(0.6f);
this.setTickRandomly(true);
this.setCreativeTab(TConstructRegistry.blockTab);
}
Expand Down Expand Up @@ -66,7 +66,7 @@ public IIcon getIcon (int side, int meta)

if (side == 0)
{
return meta % 2 == 1 ? Block.dirt.getIcon(0, 0) : icons[1];
return meta % 2 == 1 ? Blocks.dirt.getIcon(0, 0) : icons[1];
}
else if (side == 1)
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/slime/SlimeLeaves.java
Expand Up @@ -31,7 +31,7 @@ public SlimeLeaves()
super();
setCreativeTab(TConstructRegistry.blockTab);
setLightOpacity(1);
this.setHardness(0.3f);
this.func_149711_c(0.3f);
}

@SideOnly(Side.CLIENT)
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tconstruct/blocks/slime/SlimeSapling.java
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
Expand All @@ -29,7 +30,7 @@ public SlimeSapling()
super();
float f = 0.4F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
this.setHardness(0.0F);
this.func_149711_c(0.0F);
this.setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(TConstructRegistry.blockTab);
}
Expand All @@ -48,7 +49,7 @@ public void registerIcons (IIconRegister iconRegister)

public boolean canThisPlantGrowOnThisBlockID (int id)
{
return id == Block.grass.blockID || id == Block.dirt.blockID || id == TRepo.slimeGrass.blockID || id == TRepo.craftedSoil.blockID;
return id == Blocks.grass.blockID || id == Blocks.dirt.blockID || id == TRepo.slimeGrass.blockID || id == TRepo.craftedSoil.blockID;
}

public void updateTick (World world, int x, int y, int z, Random random)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/traps/BarricadeBlock.java
Expand Up @@ -26,7 +26,7 @@ public BarricadeBlock( Block model, int meta)
super(Material.wood);
this.modelBlock = model;
this.modelMeta = meta;
setHardness(4.0F);
func_149711_c(4.0F);
this.setCreativeTab(TConstructRegistry.blockTab);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tconstruct/blocks/traps/Punji.java
Expand Up @@ -30,7 +30,7 @@ public Punji()
this.setBlockBounds(0.125f, 0, 0.125f, 0.875f, 0.375f, 0.875f);
this.setStepSound(Block.soundGrassFootstep);
this.setCreativeTab(TConstructRegistry.blockTab);
this.setHardness(3.0f);
this.func_149711_c(3.0f);
}

@Override
Expand Down
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;

Expand Down Expand Up @@ -851,7 +852,7 @@ static boolean renderMetadataBlockWithColorMultiplier (Block block, int metadata

public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
Block block = Block.stone;
Block block = Blocks.stone;
int var5 = block.colorMultiplier(world, x, y, z);
float var6 = (float) (var5 >> 16 & 255) / 255.0F;
float var7 = (float) (var5 >> 8 & 255) / 255.0F;
Expand All @@ -874,7 +875,7 @@ public static boolean renderLiquidBlock (IIcon stillIcon, IIcon flowingIcon, int
static boolean renderFakeBlockWithAmbientOcclusion (IIcon stillIcon, IIcon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
IBlockAccess world)
{
Block block = Block.stone;
Block block = Blocks.stone;
render.enableAO = true;
boolean flag = false;
float f3 = 0.0F;
Expand Down Expand Up @@ -1592,7 +1593,7 @@ else if (render.hasOverrideBlockTexture())
static boolean renderFakeBlockWithColorMultiplier (IIcon stillIcon, IIcon flowingIcon, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render,
IBlockAccess world)
{
Block block = Block.stone;
Block block = Blocks.stone;
render.enableAO = false;
Tessellator tessellator = Tessellator.instance;
boolean flag = false;
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/tconstruct/client/block/RenderLiquid.java
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.init.Blocks;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;

Expand Down Expand Up @@ -844,7 +845,7 @@ static boolean renderMetadataBlockWithColorMultiplier (Block block, int metadata

public static boolean renderFakeBlock (IIcon texture, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
Block block = Block.stone;
Block block = Blocks.stone;
int var5 = block.colorMultiplier(world, x, y, z);
float var6 = (var5 >> 16 & 0xFF) / 255.0F;
float var7 = (var5 >> 8 & 0xFF) / 255.0F;
Expand All @@ -866,7 +867,7 @@ public static boolean renderFakeBlock (IIcon texture, int x, int y, int z, Rende

static boolean renderFakeBlockWithAmbientOcclusion (IIcon texture, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render, IBlockAccess world)
{
Block block = Block.stone;
Block block = Blocks.stone;
render.enableAO = true;
boolean flag = false;
float f3 = 0.0F;
Expand Down Expand Up @@ -1576,7 +1577,7 @@ else if (render.hasOverrideBlockTexture())

static boolean renderFakeBlockWithColorMultiplier (IIcon texture, int xPos, int yPos, int zPos, float colorRed, float colorGreen, float colorBlue, RenderBlocks render, IBlockAccess world)
{
Block block = Block.stone;
Block block = Blocks.stone;
render.enableAO = false;
Tessellator tessellator = Tessellator.instance;
boolean flag = false;
Expand Down

0 comments on commit c5426eb

Please sign in to comment.