mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Merge pull request #724 from squeek502/1.7.10-merge-1.6.4
Merge some unmerged pull requests from 1.6.4 branch
This commit is contained in:
commit
1affd6d909
6 files changed
+86
-38
No files matched your search
@@ -136,7 +136,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
// Attack
|
||||
if (categories.contains("weapon"))
|
||||
{
|
||||
int attack = (int) (tags.getInteger("Attack"));
|
||||
int attack = (int) (tags.getInteger("Attack"))+1;
|
||||
float stoneboundDamage = (float) Math.log(durability / 72f + 1) * -2 * stonebound;
|
||||
attack += stoneboundDamage;
|
||||
attack *= tool.getDamageModifier();
|
||||
@@ -152,9 +152,10 @@ public class CraftingStationGui extends GuiContainer
|
||||
|
||||
if (stoneboundDamage != 0)
|
||||
{
|
||||
DecimalFormat df = new DecimalFormat("##.##");
|
||||
heart = stoneboundDamage == 2 ? StatCollector.translateToLocal("gui.partcrafter8") : StatCollector.translateToLocal("gui.partcrafter9");
|
||||
String bloss = stoneboundDamage > 0 ? StatCollector.translateToLocal("gui.toolstation4") : StatCollector.translateToLocal("gui.toolstation5");
|
||||
this.fontRendererObj.drawString(bloss + (int) stoneboundDamage / 2 + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
this.fontRendererObj.drawString(bloss + df.format(stoneboundDamage / 2f) + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
offset++;
|
||||
@@ -217,11 +218,11 @@ public class CraftingStationGui extends GuiContainer
|
||||
{
|
||||
float mineSpeed = tags.getInteger("MiningSpeed") / 100f;
|
||||
float mineSpeed2 = tags.getInteger("MiningSpeed2") / 100f;
|
||||
float stoneboundSpeed = (float) Math.log(durability / 90f + 1) * 2 * stonebound;
|
||||
float stoneboundSpeed = (float) Math.log(durability / 72f + 1) * 2 * stonebound;
|
||||
DecimalFormat df = new DecimalFormat("##.##");
|
||||
df.setRoundingMode(RoundingMode.DOWN);
|
||||
float trueSpeed = mineSpeed + stoneboundSpeed;
|
||||
float trueSpeed2 = mineSpeed + stoneboundSpeed;
|
||||
float trueSpeed2 = mineSpeed2 + stoneboundSpeed;
|
||||
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation12"), xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
@@ -266,7 +267,7 @@ public class CraftingStationGui extends GuiContainer
|
||||
|
||||
float trueSpeed = mineSpeed / (heads * 100f);
|
||||
|
||||
float stoneboundSpeed = (float) Math.log(durability / 90f + 1) * 2 * stonebound;
|
||||
float stoneboundSpeed = (float) Math.log(durability / 72f + 1) * 2 * stonebound;
|
||||
DecimalFormat df = new DecimalFormat("##.##");
|
||||
df.setRoundingMode(RoundingMode.DOWN);
|
||||
trueSpeed += stoneboundSpeed;
|
||||
|
||||
@@ -231,9 +231,10 @@ public class ToolStationGui extends GuiContainer
|
||||
|
||||
if (stoneboundDamage != 0)
|
||||
{
|
||||
DecimalFormat df = new DecimalFormat("##.##");
|
||||
heart = stoneboundDamage == 2 ? StatCollector.translateToLocal("gui.partcrafter8") : StatCollector.translateToLocal("gui.partcrafter9");
|
||||
String bloss = stoneboundDamage > 0 ? StatCollector.translateToLocal("gui.toolstation4") : StatCollector.translateToLocal("gui.toolstation5");
|
||||
this.fontRendererObj.drawString(bloss + (int) stoneboundDamage / 2 + heart, 294, base + offset * 10, 0xffffff);
|
||||
this.fontRendererObj.drawString(bloss + df.format(stoneboundDamage / 2f) + heart, xSize + 8, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
}
|
||||
offset++;
|
||||
@@ -300,7 +301,7 @@ public class ToolStationGui extends GuiContainer
|
||||
DecimalFormat df = new DecimalFormat("##.##");
|
||||
df.setRoundingMode(RoundingMode.DOWN);
|
||||
float trueSpeed = mineSpeed + stoneboundSpeed;
|
||||
float trueSpeed2 = mineSpeed + stoneboundSpeed;
|
||||
float trueSpeed2 = mineSpeed2 + stoneboundSpeed;
|
||||
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation12"), 294, base + offset * 10, 0xffffff);
|
||||
offset++;
|
||||
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
@@ -35,7 +36,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
* 3-16: Chest
|
||||
*/
|
||||
|
||||
public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacingLogic
|
||||
public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacingLogic, ISidedInventory
|
||||
{
|
||||
boolean active;
|
||||
public int fuel;
|
||||
@@ -43,6 +44,9 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
public int progress;
|
||||
public int fuelScale = 200;
|
||||
byte direction;
|
||||
private static final int[] slots_top = new int[] {0};
|
||||
private static final int[] slots_bottom = new int[] {2, 1};
|
||||
private static final int[] slots_sides = new int[] {1};
|
||||
|
||||
public FurnaceLogic()
|
||||
{
|
||||
@@ -373,4 +377,33 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
public void closeInventory ()
|
||||
{
|
||||
}
|
||||
|
||||
public static boolean isItemFuel(ItemStack par0ItemStack)
|
||||
{
|
||||
return getItemBurnTime(par0ItemStack) > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack)
|
||||
{
|
||||
return par1 == 2 ? false : (par1 == 1 ? isItemFuel(par2ItemStack) : true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int par1)
|
||||
{
|
||||
return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3)
|
||||
{
|
||||
return this.isItemValidForSlot(par1, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3)
|
||||
{
|
||||
return par3 != 0 || par1 != 1 || par2ItemStack.getItem() == Items.bucket;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user