Various fixes

Fixed images rendering incorrectly in the books and made the drawbridge
accept only real blocks(and only opaque blocks for camo)
This commit is contained in:
Arthur Uzulin committed 2013-07-27 20:21:29 +10:00
1 parent 81afd9c00e
commit 770c72be39
6 files changed
+22 -12

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ The berries can be melted down into nuggets and ingots, making them an invaluabl
<page type="picture">
<text>Oreberries in their natural environment</text>
<location>/mods/tinker/resources/manuals/oreberries.png</location>
<location>tinker:manuals/oreberries.png</location>
</page>
<page type="crafting">
+2 -2
View File
@@ -104,7 +104,7 @@ Other liquid removal objects will work, but are frowned upon. An example picture
<page type="picture">
<text>Figure 1a</text>
<location>/mods/tinker/resources/manuals/smelterysmall.png</location>
<location>tinker:manuals/smelterysmall.png</location>
</page>
<page type="sidebar">
@@ -135,7 +135,7 @@ Other part casts must be created by pouring metal around existing parts, like a
<page type="picture">
<text>Forming a Cast</text>
<location>/mods/tinker/resources/manuals/casting.png</location>
<location>tinker:manuals/casting.png</location>
</page>
<page type="crafting">
+3 -3
View File
@@ -647,9 +647,9 @@ public class TProxyClient extends TProxyCommon
TConstructClientRegistry.registerManualModifier("tier1free", ironpick.copy(), new ItemStack(Item.diamond), new ItemStack(Block.blockGold));
TConstructClientRegistry.registerManualModifier("tier2free", ironpick.copy(), new ItemStack(Item.netherStar));
/*TConstructClientRegistry.registerManualSmeltery("brownstone", new ItemStack(TContent.speedBlock), new ItemStack(TContent.liquidMetalStill, 1, 3), new ItemStack(Block.gravel));
TConstructClientRegistry.registerManualSmeltery("clearglass", new ItemStack(TContent.glass), new ItemStack(TContent.liquidMetalStill, 1, 13), null);
TConstructClientRegistry.registerManualSmeltery("searedstone", new ItemStack(TContent.smeltery, 1, 4), new ItemStack(TContent.liquidMetalStill, 1, 14), null);*/
TConstructClientRegistry.registerManualSmeltery("brownstone", new ItemStack(TContent.speedBlock), new ItemStack(TContent.moltenTin, 1), new ItemStack(Block.gravel));
TConstructClientRegistry.registerManualSmeltery("clearglass", new ItemStack(TContent.glass), new ItemStack(TContent.moltenGlass, 1), null);
TConstructClientRegistry.registerManualSmeltery("searedstone", new ItemStack(TContent.smeltery, 1, 4), new ItemStack(TContent.moltenStone, 1), null);
}
+4 -2
View File
@@ -20,6 +20,8 @@ public class PicturePage extends BookPage
nodes = element.getElementsByTagName("location");
if (nodes != null)
location = nodes.item(0).getTextContent();
background = new ResourceLocation(location);
}
@Override
@@ -27,8 +29,8 @@ public class PicturePage extends BookPage
{
manual.fonts.drawSplitString(text, localWidth + 8, localHeight, 178, 0);
}
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/bookcrafting.png");
ResourceLocation background;
public void renderBackgroundLayer (int localWidth, int localHeight)
{
manual.getMC().func_110434_K().func_110577_a(background);
@@ -1,6 +1,7 @@
package tconstruct.inventory;
import tconstruct.blocks.logic.DrawbridgeLogic;
import tconstruct.landmine.inventory.SlotOpaqueBlocksOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -19,7 +20,7 @@ public class DrawbridgeContainer extends Container
this.logic = logic;
this.addSlotToContainer(new DrawbridgeSlot(logic, 0, 80, 36, logic));
this.addSlotToContainer(new Slot(logic, 1, 35, 36));
this.addSlotToContainer(new SlotOpaqueBlocksOnly(logic, 1, 35, 36));
/* Player inventory */
for (int column = 0; column < 3; column++)
+10 -3
View File
@@ -1,12 +1,13 @@
package tconstruct.inventory;
import tconstruct.blocks.logic.DrawbridgeLogic;
import tconstruct.landmine.inventory.SlotBlocksOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class DrawbridgeSlot extends Slot
public class DrawbridgeSlot extends SlotBlocksOnly
{
DrawbridgeLogic logic;
public DrawbridgeSlot(IInventory iinventory, int par2, int par3, int par4, DrawbridgeLogic logic)
@@ -15,14 +16,20 @@ public class DrawbridgeSlot extends Slot
this.logic = logic;
}
@Override
public boolean isItemValid(ItemStack par1ItemStack)
{
return !logic.hasExtended();
return !logic.hasExtended() && super.isItemValid(par1ItemStack);
}
@Override
public boolean canTakeStack(EntityPlayer par1EntityPlayer)
{
return !logic.hasExtended();
}
@Override
public int getSlotStackLimit(){
return inventory.getInventoryStackLimit();
}
}