mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 22:44:23 +00:00
more fixes
This commit is contained in:
1 parent
4228b26a07
commit
c5426eb992
31 files changed
+244
-225
No files matched your search
@@ -24,12 +24,14 @@ import net.minecraft.util.MathHelper;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -22,29 +22,29 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
{
|
||||
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:
|
||||
@@ -52,13 +52,13 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.block.material.Material;
|
||||
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;
|
||||
@@ -60,13 +61,13 @@ public class SoilBlock extends TConstructBlock
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -5,6 +5,8 @@ import mantle.blocks.iface.IActiveLogic;
|
||||
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;
|
||||
@@ -237,7 +239,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
|
||||
return 150;
|
||||
}
|
||||
|
||||
if (block == Block.wood)
|
||||
if (block == Blocks.log)
|
||||
{
|
||||
return 2400;
|
||||
}
|
||||
@@ -253,15 +255,15 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import net.minecraft.block.Block;
|
||||
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;
|
||||
@@ -211,12 +213,12 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -226,7 +228,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
return 300;
|
||||
}
|
||||
|
||||
if (block == Block.coalBlock)
|
||||
if (block == Blocks.coal_block)
|
||||
{
|
||||
return 16000;
|
||||
}
|
||||
@@ -238,15 +240,15 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class SlimeGrass extends MantleBlock
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ public class SlimeLeaves extends BlockLeaves
|
||||
super();
|
||||
setCreativeTab(TConstructRegistry.blockTab);
|
||||
setLightOpacity(1);
|
||||
this.setHardness(0.3f);
|
||||
this.func_149711_c(0.3f);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.block.BlockSapling;
|
||||
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;
|
||||
@@ -29,7 +30,7 @@ public class SlimeSapling extends BlockSapling
|
||||
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);
|
||||
}
|
||||
@@ -48,7 +49,7 @@ public class SlimeSapling extends BlockSapling
|
||||
|
||||
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)
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BarricadeBlock extends MantleBlock
|
||||
super(Material.wood);
|
||||
this.modelBlock = model;
|
||||
this.modelMeta = meta;
|
||||
setHardness(4.0F);
|
||||
func_149711_c(4.0F);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Punji extends MantleBlock
|
||||
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
|
||||
|
||||
Reference in new issue
Block a user