mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 20:52:26 +00:00
Fix some bugs :).
This commit is contained in:
1 parent
02059d7325
commit
b70ed14631
20 files changed
+45
-34
No files matched your search
@@ -18,6 +18,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
@@ -70,9 +71,9 @@ public class EquipBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped (int par1, Random par2Random, int par3)
|
||||
public Item func_149650_a (int par1, Random par2Random, int par3)
|
||||
{
|
||||
return 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -71,7 +71,7 @@ public class GlassBlockConnected extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBlockTexture (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
public IIcon func_149673_e (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
return par1IBlockAccess.getBlockMetadata(par2, par3, par4) == 15 ? icons[0] : getConnectedBlockTexture(par1IBlockAccess, par2, par3, par4, par5, icons);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class GlassBlockConnectedMeta extends GlassBlockConnected
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBlockTexture (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
public IIcon func_149673_e (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
int meta = par1IBlockAccess.getBlockMetadata(par2, par3, par4);
|
||||
if (meta < icons.length)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBlockTexture (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
public IIcon func_149673_e (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
if (par5 == 0 || par5 == 1)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.getBlockTexture(par1IBlockAccess, par2, par3, par4, par5);
|
||||
return super.func_149673_e(par1IBlockAccess, par2, par3, par4, par5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ToolForgeBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
public TileEntity func_149915_a (World world, int metadata)
|
||||
{
|
||||
return new ToolForgeLogic();
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ public class WoodRail extends BlockRailBase
|
||||
|
||||
protected void func_94358_a (World par1World, int par2, int par3, int par4, int par5, int par6, Block par7)
|
||||
{
|
||||
if (par7 != Blocks.air && par7.func_149744_f() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).getNumberOfAdjacentTracks() == 3)
|
||||
if (par7 != Blocks.air && par7.func_149744_f() && (new Rail(par1World, par2, par3, par4)).func_150650_a() == 3)
|
||||
{
|
||||
this.refreshTrackShape(par1World, par2, par3, par4, false);
|
||||
this.func_150052_a(par1World, par2, par3, par4, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class SlimeSapling extends BlockSapling
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markOrGrowMarked (World world, int x, int y, int z, Random random)
|
||||
public void func_149879_c (World world, int x, int y, int z, Random random)
|
||||
{
|
||||
boneFertilize(world, x, y, z, random, null);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Landmine extends MantleBlock
|
||||
Block block = world.func_147439_a(x, y - 1, z);
|
||||
if (block != null)
|
||||
{
|
||||
return block.getBlockTexture(world, x, y - 1, z, side);
|
||||
return block.func_149673_e(world, x, y - 1, z, side);
|
||||
}
|
||||
return Blocks.sponge.func_149691_a(side, world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ public class TClientTickHandler
|
||||
|
||||
if (event.phase.equals(Phase.END) && event.type.equals(Type.RENDER))
|
||||
{
|
||||
TRepo.oreBerry.setGraphicsLevel(Blocks.leaves.graphicsLevel);
|
||||
TRepo.oreBerrySecond.setGraphicsLevel(Blocks.leaves.graphicsLevel);
|
||||
TRepo.slimeLeaves.setGraphicsLevel(Blocks.leaves.graphicsLevel);
|
||||
TRepo.oreBerry.func_150122_b(Blocks.leaves.field_150121_P);
|
||||
TRepo.oreBerrySecond.func_150122_b(Blocks.leaves.field_150121_P);
|
||||
TRepo.slimeLeaves.func_150122_b(Blocks.leaves.field_150121_P);
|
||||
/*if (mc.thePlayer != null && !mc.thePlayer.isAirBorne)
|
||||
controlInstance.landOnGround();*/
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RenderArmorCast implements IItemRenderer
|
||||
@Override
|
||||
public void renderItem (ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
RenderBlocks renderer = Minecraft.getMinecraft().renderGlobal.globalRenderBlocks;
|
||||
RenderBlocks renderer = Minecraft.getMinecraft().renderGlobal.field_147592_B;
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon baseIcon = item.getItem() instanceof ArmorPattern ? ((ArmorPattern) item.getItem()).getBaseIcon() : item.getIconIndex();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
@@ -27,9 +27,9 @@ public class SlimeRender extends RenderLiving
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderLiving (EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
|
||||
public void doRender (EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
super.doRenderLiving(par1EntityLiving, par2, par4, par6, par8, par9);
|
||||
super.doRender(par1EntityLiving, par2, par4, par6, par8, par9);
|
||||
renderBossHealth((BlueSlime) par1EntityLiving);
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
if (inventoryplayer.getItemStack() == null && this.mainSlot != null && this.mainSlot.getHasStack())
|
||||
{
|
||||
ItemStack itemstack1 = this.mainSlot.getStack();
|
||||
this.drawItemStackTooltip(itemstack1, mouseX, mouseY);
|
||||
this.func_146285_a(itemstack1, mouseX, mouseY);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
@@ -237,7 +237,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
}
|
||||
|
||||
protected void drawItemStackTooltip (ItemStack par1ItemStack, int par2, int par3)
|
||||
protected void func_146285_a (ItemStack par1ItemStack, int par2, int par3)
|
||||
{
|
||||
List list = par1ItemStack.getTooltip(this.field_146297_k.thePlayer, this.field_146297_k.gameSettings.advancedItemTooltips);
|
||||
|
||||
@@ -245,7 +245,7 @@ public abstract class NewContainerGui extends GuiScreen
|
||||
{
|
||||
if (k == 0)
|
||||
{
|
||||
list.set(k, "\u00a7" + Integer.toHexString(par1ItemStack.getRarity().rarityColor) + (String) list.get(k));
|
||||
list.set(k, par1ItemStack.getRarity().rarityColor + (String)list.get(k));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -415,7 +415,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
|
||||
if (entityFollowing != null)
|
||||
moveTowardsEntity(entityFollowing);
|
||||
|
||||
this.doBlockCollisions();
|
||||
this.func_145775_I();
|
||||
this.rotationPitch = 0.0F;
|
||||
double var49 = this.prevPosX - this.posX;
|
||||
double var50 = this.prevPosZ - this.posZ;
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ContainerLandmine extends Container
|
||||
{
|
||||
ItemStack itemstack = null;
|
||||
InventoryPlayer inventoryplayer = par4EntityPlayer.inventory;
|
||||
Item l;
|
||||
int l;
|
||||
ItemStack itemstack1;
|
||||
|
||||
if (par3 == 5)
|
||||
@@ -238,6 +238,8 @@ public class ContainerLandmine extends Container
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Object localObject2;
|
||||
|
||||
slot2 = (Slot) this.inventorySlots.get(par1);
|
||||
|
||||
@@ -247,10 +249,10 @@ public class ContainerLandmine extends Container
|
||||
|
||||
if (itemstack1 != null)
|
||||
{
|
||||
l = itemstack1.getItem();
|
||||
localObject2 = ((ItemStack)itemstack1).getItem();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if (slot2 != null && slot2.getStack() != null && slot2.getStack().getItem() == l)
|
||||
if (slot2 != null && slot2.getStack() != null && slot2.getStack().getItem() == localObject2)
|
||||
{
|
||||
this.retrySlotClick(par1, par2, true, par4EntityPlayer);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -77,7 +76,7 @@ public class FilledBucket extends ItemBucket
|
||||
return stack;
|
||||
}*/
|
||||
|
||||
if (position.typeOfHit == EnumMovingObjectType.TILE)
|
||||
if (position.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int clickX = position.blockX;
|
||||
int clickY = position.blockY;
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MetalPattern extends Pattern
|
||||
@@ -28,10 +29,10 @@ public class MetalPattern extends Pattern
|
||||
private static final String[] patternName = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign",
|
||||
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead", "gem" };
|
||||
|
||||
public void getSubItems (Block b)
|
||||
public void func_150895_a(Item p_150895_1_, CreativeTabs p_150895_2_, List p_150895_3_)
|
||||
{
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
if (!(patternName[i].equals("")))
|
||||
this.list.add(new ItemStack(b, 1, i));
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, i));
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class Battleaxe extends HarvestTool
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, b, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A, Material.pumpkin };
|
||||
static Material[] materials = { Material.field_151575_d, Material.field_151582_l, Material.field_151594_q, Material.field_151570_A, Material.field_151572_C };
|
||||
|
||||
@Override
|
||||
public Item getHeadItem ()
|
||||
|
||||
@@ -3,11 +3,11 @@ package tconstruct.library.armor;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.command.IEntitySelector;
|
||||
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||
import net.minecraft.dispenser.IBlockSource;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EntitySelectorArmoredMob;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -25,7 +25,7 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem
|
||||
int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY();
|
||||
int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ();
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1));
|
||||
List list = par1IBlockSource.getWorld().selectEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb, new EntitySelectorArmoredMob(par2ItemStack));
|
||||
List list = par1IBlockSource.getWorld().selectEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb, new IEntitySelector.ArmoredMob(par2ItemStack));
|
||||
|
||||
if (list.size() > 0)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public class TActiveOmniMod extends ActiveToolMod
|
||||
|
||||
if (tags.getBoolean("Lava") && block.quantityDropped(meta, 0, random) != 0)
|
||||
{
|
||||
ItemStack smeltStack = new ItemStack(block.IDropped(meta, random, 0), block.quantityDropped(meta, 0, random), block.func_149692_a(meta));
|
||||
ItemStack smeltStack = new ItemStack(block.func_149650_a(meta, random, 0), block.quantityDropped(meta, 0, random), block.func_149692_a(meta));
|
||||
if (smeltStack.getItem() == null)
|
||||
return false;
|
||||
ItemStack result = FurnaceRecipes.smelting().func_151395_a(smeltStack);
|
||||
@@ -75,7 +75,7 @@ public class TActiveOmniMod extends ActiveToolMod
|
||||
{
|
||||
WorldHelper.setBlockToAir(world, x, y, z);
|
||||
if (entity instanceof EntityPlayer && !((EntityPlayer) entity).capabilities.isCreativeMode)
|
||||
tool.onBlockDestroyed(stack, world, block, x, y, z, entity);
|
||||
tool.func_150894_a(stack, world, block, x, y, z, entity);
|
||||
if (!world.isRemote)
|
||||
{
|
||||
ItemStack spawnme = result.copy();
|
||||
@@ -94,7 +94,7 @@ public class TActiveOmniMod extends ActiveToolMod
|
||||
world.playAuxSFX(2001, x, y, z, Block.func_149682_b(block) + (meta << 12));
|
||||
|
||||
int i = spawnme.stackSize;
|
||||
float f = FurnaceRecipes.smelting().getExperience(spawnme);
|
||||
float f = FurnaceRecipes.smelting().func_151398_b(spawnme);
|
||||
int j;
|
||||
|
||||
if (f == 0.0F)
|
||||
|
||||
Reference in new issue
Block a user