mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
some more fixes
This commit is contained in:
1 parent
86cf32c297
commit
dc968ae355
6 files changed
+28
-27
No files matched your search
@@ -108,7 +108,7 @@ public class ContainerLandmine extends Container
|
||||
{
|
||||
ItemStack itemstack = null;
|
||||
InventoryPlayer inventoryplayer = par4EntityPlayer.inventory;
|
||||
int l;
|
||||
Item l;
|
||||
ItemStack itemstack1;
|
||||
|
||||
if (par3 == 5)
|
||||
@@ -247,7 +247,7 @@ public class ContainerLandmine extends Container
|
||||
|
||||
if (itemstack1 != null)
|
||||
{
|
||||
l = itemstack1.itemID;
|
||||
l = itemstack1.getItem();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if (slot2 != null && slot2.getStack() != null && slot2.getStack().itemID == l)
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BarricadeItem extends ItemBlock
|
||||
|
||||
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
Block b = world.getBlock(x, y, z);
|
||||
Block b = world.func_147439_a(x, y, z);
|
||||
|
||||
if (b == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SlimeTallGrassItem extends MultiItemBlock
|
||||
public IIcon getIconFromDamage (int meta)
|
||||
{
|
||||
int arr = MathHelper.clamp_int(meta, 0, this.blockType.length);
|
||||
return TRepo.slimeTallGrass.getIcon(0, arr);
|
||||
return TRepo.slimeTallGrass.func_149691_a(0, arr);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import tconstruct.common.TRepo;
|
||||
import tconstruct.library.crafting.Detailing.DetailInput;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -94,13 +95,13 @@ public class Chisel extends ToolCore
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
int blockID = world.getBlockId(x, y, z);
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
DetailInput details = TConstruct.chiselDetailing.getDetailing(blockID, meta);
|
||||
DetailInput details = TConstruct.chiselDetailing.getDetailing(block, meta);
|
||||
if (details != null && details.outputID < 4096)
|
||||
{
|
||||
world.setBlock(x, y, z, details.outputID, details.outputMeta, 3);
|
||||
world.setBlock(x, y, z, details.output, details.outputMeta, 3);
|
||||
if (!(entityplayer.capabilities.isCreativeMode))
|
||||
{
|
||||
int reinforced = 0;
|
||||
|
||||
@@ -17,28 +17,28 @@ public class Detailing
|
||||
|
||||
public void addDetailing (Object input, int inputMeta, Object output, int outputMeta, ToolCore tool)
|
||||
{
|
||||
int iID, iMeta = inputMeta, oID, oMeta = outputMeta;
|
||||
ItemStack iID, oID;
|
||||
int iMeta = inputMeta, oMeta = outputMeta;
|
||||
|
||||
if (input instanceof Block)
|
||||
iID = ((Block) input).blockID;
|
||||
iID = new ItemStack(((Block) input));
|
||||
|
||||
else if (input instanceof Item)
|
||||
iID = ((Item) input).itemID;
|
||||
|
||||
else if (input instanceof Integer)
|
||||
iID = (Integer) input;
|
||||
iID = new ItemStack(((Item) input));
|
||||
else if (input instanceof ItemStack)
|
||||
iID = ((ItemStack) input);
|
||||
|
||||
else
|
||||
throw new RuntimeException("Invalid detail input!");
|
||||
|
||||
if (output instanceof Block)
|
||||
oID = ((Block) output).blockID;
|
||||
oID = new ItemStack((Block) output);
|
||||
|
||||
else if (output instanceof Item)
|
||||
oID = ((Item) output).itemID;
|
||||
oID = new ItemStack((Item) output);
|
||||
|
||||
else if (output instanceof Integer)
|
||||
oID = (Integer) output;
|
||||
else if (output instanceof ItemStack)
|
||||
oID = (ItemStack) output;
|
||||
|
||||
else
|
||||
throw new RuntimeException("Invalid detail output!");
|
||||
@@ -60,7 +60,7 @@ public class Detailing
|
||||
toolTag.setInteger("TotalDurability", 100);
|
||||
compound.setTag("InfiTool", toolTag);
|
||||
toolstack.setTagCompound(compound);
|
||||
addShapelessToolRecipe(new ItemStack(details.output, 1, details.outputMeta), toolstack, new ItemStack(details.input, 1, details.inputMeta));
|
||||
addShapelessToolRecipe(new ItemStack(details.output.getItem(), 1, details.outputMeta), toolstack, new ItemStack(details.input.getItem(), 1, details.inputMeta));
|
||||
}
|
||||
|
||||
public void addShapelessToolRecipe (ItemStack par1ItemStack, Object... par2ArrayOfObj)
|
||||
@@ -95,12 +95,12 @@ public class Detailing
|
||||
GameRegistry.addRecipe(new ShapelessToolRecipe(par1ItemStack, arraylist));
|
||||
}
|
||||
|
||||
public DetailInput getDetailing (int inputID, int inputMeta)
|
||||
public DetailInput getDetailing (Block block, int inputMeta)
|
||||
{
|
||||
for (int i = 0; i < detailing.size(); i++)
|
||||
{
|
||||
DetailInput detail = (DetailInput) detailing.get(i);
|
||||
if (inputID == detail.inputID && inputMeta == detail.inputMeta)
|
||||
if (new ItemStack(block) == detail.input && inputMeta == detail.inputMeta)
|
||||
{
|
||||
return detail;
|
||||
}
|
||||
@@ -110,16 +110,16 @@ public class Detailing
|
||||
|
||||
public class DetailInput
|
||||
{
|
||||
public int inputID;
|
||||
public ItemStack input;
|
||||
public int inputMeta;
|
||||
public int outputID;
|
||||
public ItemStack output;
|
||||
public int outputMeta;
|
||||
|
||||
public DetailInput(int inputID, int inputMeta, int outputID, int outputMeta)
|
||||
public DetailInput(ItemStack input, int inputMeta, ItemStack output, int outputMeta)
|
||||
{
|
||||
this.inputID = inputID;
|
||||
this.input = input;
|
||||
this.inputMeta = inputMeta;
|
||||
this.outputID = outputID;
|
||||
this.output = output;
|
||||
this.outputMeta = outputMeta;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class EnvironmentGui extends GuiScreen
|
||||
{
|
||||
count++;
|
||||
if (count >= mods.size())
|
||||
this.field_146297_k.displayGuiScreen(this.parentGuiScreen);
|
||||
this.field_146297_k.func_147108_a(this.parentGuiScreen);
|
||||
}
|
||||
if (button.field_146127_k == 1)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ public class EnvironmentGui extends GuiScreen
|
||||
public void drawScreen (int par1, int par2, float par3)
|
||||
{
|
||||
builder.setLength(0);
|
||||
this.drawDefaultBackground();
|
||||
this.func_146276_q_();
|
||||
String mod = mods.get(count);
|
||||
this.drawCenteredString(this.field_146289_q, I18n.getStringParams("Tinkers' Construct is not compatible with "+mod), this.field_146294_l / 2, 20, 0xFFFFFF);
|
||||
this.drawCenteredString(this.field_146289_q, I18n.getStringParams("The following reasons are given:"), this.field_146294_l / 2, 32, 0xFFFFFF);
|
||||
|
||||
Reference in new issue
Block a user