mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Merge branch 'master' into weaponry
This commit is contained in:
commit
46059d6913
24 files changed
+125
-70
No files matched your search
@@ -13,8 +13,8 @@ import tconstruct.library.modifier.IModifyable;
|
||||
|
||||
public class ArmorAbilitiesClient
|
||||
{
|
||||
Minecraft mc;
|
||||
ArmorControls controlInstance;
|
||||
private final Minecraft mc;
|
||||
private final ArmorControls controlInstance;
|
||||
|
||||
ItemStack prevFeet;
|
||||
double prevMotionY;
|
||||
|
||||
@@ -47,6 +47,13 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
public static KnapsackInventory knapsack = new KnapsackInventory();
|
||||
public static ArmorExtended armorExtended = new ArmorExtended();
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
controlInstance = new ArmorControls();
|
||||
FMLCommonHandler.instance().bus().register(controlInstance);
|
||||
MinecraftForge.EVENT_BUS.register(new TabRegistry());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize ()
|
||||
{
|
||||
@@ -148,7 +155,6 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
@Override
|
||||
public void registerKeys ()
|
||||
{
|
||||
controlInstance = new ArmorControls();
|
||||
uploadKeyBindingsToGame(Minecraft.getMinecraft().gameSettings, controlInstance);
|
||||
|
||||
TabRegistry.registerTab(new InventoryTabVanilla());
|
||||
|
||||
@@ -13,6 +13,8 @@ public class ArmorProxyCommon implements IGuiHandler
|
||||
public static final int armorGuiID = 101;
|
||||
public static final int knapsackGuiID = 102;
|
||||
|
||||
public void preInit() {}
|
||||
|
||||
public void initialize ()
|
||||
{
|
||||
registerGuiHandler();
|
||||
|
||||
@@ -76,15 +76,11 @@ public class TinkerArmor
|
||||
@Handler
|
||||
public void preInit (FMLPreInitializationEvent event)
|
||||
{
|
||||
proxy.preInit();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents());
|
||||
FMLCommonHandler.instance().bus().register(new ArmorAbilities());
|
||||
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(new ArmorControls());
|
||||
MinecraftForge.EVENT_BUS.register(new TabRegistry());
|
||||
}
|
||||
|
||||
TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
|
||||
GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack");
|
||||
GameRegistry.registerTileEntity(DryingRackLogic.class, "Armor.DryingRack");
|
||||
|
||||
@@ -22,7 +22,7 @@ public class TPlayerStats implements IExtendedEntityProperties, IPlayerExtendedI
|
||||
public int previousDimension;
|
||||
|
||||
public boolean climbWalls;
|
||||
public boolean activeGoggles = true;
|
||||
public boolean activeGoggles = false;
|
||||
|
||||
public boolean beginnerManual;
|
||||
public boolean materialManual;
|
||||
|
||||
@@ -107,6 +107,7 @@ public class ArmorControls extends TKeyHandler
|
||||
if (goggles != null && goggles.getItem() instanceof TravelGear) //TODO: Genericize this
|
||||
{
|
||||
activeGoggles = !activeGoggles;
|
||||
PlayerAbilityHelper.toggleGoggles(mc.thePlayer, activeGoggles);
|
||||
toggleGoggles();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -86,7 +88,7 @@ public class RecipeHandlerAlloying extends RecipeHandlerBase
|
||||
@Override
|
||||
public String getRecipeName ()
|
||||
{
|
||||
return "Smeltery Alloying";
|
||||
return StatCollector.translateToLocal("tconstruct.nei.alloying");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.CastingRecipe;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
@@ -16,7 +18,7 @@ public class RecipeHandlerCastingBasin extends RecipeHandlerCastingBase
|
||||
@Override
|
||||
public String getRecipeName ()
|
||||
{
|
||||
return "Casting Basin";
|
||||
return StatCollector.translateToLocal("tconstruct.nei.castingbasin");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.CastingRecipe;
|
||||
import tconstruct.library.crafting.LiquidCasting;
|
||||
@@ -16,7 +18,7 @@ public class RecipeHandlerCastingTable extends RecipeHandlerCastingBase
|
||||
@Override
|
||||
public String getRecipeName ()
|
||||
{
|
||||
return "Casting Table";
|
||||
return StatCollector.translateToLocal("tconstruct.nei.castingtable");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import tconstruct.library.crafting.DryingRackRecipes;
|
||||
import tconstruct.library.crafting.DryingRackRecipes.DryingRecipe;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
@@ -46,7 +48,7 @@ public class RecipeHandlerDryingRack extends RecipeHandlerBase
|
||||
@Override
|
||||
public String getRecipeName ()
|
||||
{
|
||||
return "Drying Rack";
|
||||
return StatCollector.translateToLocal("tconstruct.nei.dryingrack");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,8 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import tconstruct.library.crafting.Smeltery;
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
@@ -59,7 +61,7 @@ public class RecipeHandlerMelting extends RecipeHandlerBase
|
||||
@Override
|
||||
public String getRecipeName ()
|
||||
{
|
||||
return "Smeltery Melting";
|
||||
return StatCollector.translateToLocal("tconstruct.nei.melting");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -59,7 +60,7 @@ public class RecipeHandlerToolMaterials extends RecipeHandlerBase
|
||||
@Override
|
||||
public String getRecipeName ()
|
||||
{
|
||||
return "Tool Materials";
|
||||
return StatCollector.translateToLocal("tconstruct.nei.toolmaterials");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,19 +102,19 @@ public class RecipeHandlerToolMaterials extends RecipeHandlerBase
|
||||
if (crecipe.material != null)
|
||||
{
|
||||
GuiDraw.drawString(EnumChatFormatting.BOLD + crecipe.material.localizedName(), 35, 10, 0x404040, false);
|
||||
GuiDraw.drawString("Base Durability: " + crecipe.material.durability, 35, 20, 0x404040, false);
|
||||
GuiDraw.drawString("Handle Modifier: " + crecipe.material.handleModifier + "x", 35, 30, 0x404040, false);
|
||||
GuiDraw.drawString("Full Durability: " + Math.round(crecipe.material.durability * crecipe.material.handleModifier), 35, 40, 0x404040, false);
|
||||
GuiDraw.drawString("Mining Speed: " + crecipe.material.miningspeed / 100F, 35, 50, 0x404040, false);
|
||||
GuiDraw.drawString("Mining Level: " + HarvestLevels.getHarvestLevelName(crecipe.material.harvestLevel), 35, 60, 0x404040, false);
|
||||
String heart = crecipe.material.attack == 2 ? " Heart" : " Hearts";
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter4") + crecipe.material.durability, 35, 20, 0x404040, false);
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter5") + crecipe.material.handleModifier + "x", 35, 30, 0x404040, false);
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter11") + Math.round(crecipe.material.durability * crecipe.material.handleModifier), 35, 40, 0x404040, false);
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter6") + crecipe.material.miningspeed / 100F, 35, 50, 0x404040, false);
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter7") + HarvestLevels.getHarvestLevelName(crecipe.material.harvestLevel), 35, 60, 0x404040, false);
|
||||
String heart = crecipe.material.attack == 2 ? StatCollector.translateToLocal("gui.partcrafter8") : StatCollector.translateToLocal("gui.partcrafter9");
|
||||
if (crecipe.material.attack() % 2 == 0)
|
||||
{
|
||||
GuiDraw.drawString("Attack: " + crecipe.material.attack / 2 + heart, 35, 70, 0x404040, false);
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter10") + crecipe.material.attack / 2 + heart, 35, 70, 0x404040, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
GuiDraw.drawString("Attack: " + crecipe.material.attack / 2F + heart, 35, 70, 0x404040, false);
|
||||
GuiDraw.drawString(StatCollector.translateToLocal("gui.partcrafter11") + crecipe.material.attack / 2F + heart, 35, 70, 0x404040, false);
|
||||
}
|
||||
int abilityY = 85;
|
||||
if (crecipe.material.reinforced > 0)
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.plugins.waila;
|
||||
import java.util.List;
|
||||
import mcp.mobius.waila.api.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.smeltery.logic.CastingBasinLogic;
|
||||
|
||||
@@ -34,18 +35,18 @@ public class BasinDataProvider implements IWailaDataProvider
|
||||
if (te.getFluidAmount() != 0)
|
||||
{
|
||||
FluidStack fs = te.getFluid();
|
||||
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add("Amount: " + fs.amount + "/" + te.getCapacity());
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag") + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount + "/" + te.getCapacity());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (te.getStackInSlot(0) != null)
|
||||
{
|
||||
currenttip.add("Contains: " + te.getStackInSlot(0).getDisplayName());
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.contains") + te.getStackInSlot(0).getDisplayName());
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add(SpecialChars.ITALIC + "Empty");
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CastingChannelDataProvider implements IWailaDataProvider
|
||||
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.subtanks"));
|
||||
String s1, s2, s3, s4;
|
||||
s1 = s2 = s3 = s4 = SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty");
|
||||
s1 = s2 = s3 = s4 = StatCollector.translateToLocal("tconstruct.waila.empty");
|
||||
|
||||
if (northTank.fluid != null)
|
||||
s1 = northTank.fluid.amount + " / " + northTank.capacity;
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.plugins.waila;
|
||||
import java.util.List;
|
||||
import mcp.mobius.waila.api.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.smeltery.logic.LavaTankLogic;
|
||||
|
||||
@@ -30,12 +31,12 @@ public class SearedTankDataProvider implements IWailaDataProvider
|
||||
if (te.containsFluid())
|
||||
{
|
||||
FluidStack fs = te.tank.getFluid();
|
||||
currenttip.add("Liquid: " + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add("Amount: " + fs.amount + "/" + te.tank.getCapacity());
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag") + WailaRegistrar.fluidNameHelper(fs));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + fs.amount + "/" + te.tank.getCapacity());
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add(SpecialChars.ITALIC + "Empty");
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty"));
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.plugins.waila;
|
||||
import java.util.List;
|
||||
import mcp.mobius.waila.api.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import tconstruct.smeltery.logic.SmelteryLogic;
|
||||
|
||||
@@ -32,7 +33,7 @@ public class SmelteryDataProvider implements IWailaDataProvider
|
||||
List<FluidStack> fls = te.moltenMetal;
|
||||
if (fls.size() <= 0)
|
||||
{
|
||||
currenttip.add(SpecialChars.ITALIC + "Empty");
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.empty"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -45,7 +46,7 @@ public class SmelteryDataProvider implements IWailaDataProvider
|
||||
}
|
||||
else
|
||||
{
|
||||
currenttip.add(SpecialChars.ITALIC + "Invalid structure");
|
||||
currenttip.add(SpecialChars.ITALIC + StatCollector.translateToLocal("tconstruct.waila.invalidstructure"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.plugins.waila;
|
||||
import java.util.List;
|
||||
import mcp.mobius.waila.api.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import tconstruct.smeltery.logic.CastingTableLogic;
|
||||
|
||||
public class TableDataProvider implements IWailaDataProvider
|
||||
@@ -33,12 +34,12 @@ public class TableDataProvider implements IWailaDataProvider
|
||||
CastingTableLogic te = (CastingTableLogic) accessor.getTileEntity();
|
||||
if (te.getStackInSlot(1) != null)
|
||||
{
|
||||
currenttip.add("Contains: " + te.getStackInSlot(1).getDisplayName());
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.contains") + te.getStackInSlot(1).getDisplayName());
|
||||
}
|
||||
if (te.getFluid() != null)
|
||||
{
|
||||
currenttip.add("Fluid: " + WailaRegistrar.fluidNameHelper(te.getFluid()));
|
||||
currenttip.add("Amount: " + te.getFluidAmount() + "/" + te.getCapacity());
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.liquidtag") + WailaRegistrar.fluidNameHelper(te.getFluid()));
|
||||
currenttip.add(StatCollector.translateToLocal("tconstruct.waila.amounttag") + te.getFluidAmount() + "/" + te.getCapacity());
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.client.event.sound.SoundLoadEvent;
|
||||
@@ -396,12 +397,7 @@ public class ToolProxyClient extends ToolProxyCommon
|
||||
new int[] { 7, 0, 13, 13 }, new int[] { 3, 3, 13, 13 } // Chisel
|
||||
};
|
||||
|
||||
static String[] toolNames = { "Repair and Modification", "Pickaxe", "Shovel", "Hatchet",
|
||||
// "Lumber Axe",
|
||||
// "Ice Axe",
|
||||
"Mattock", "Broadsword", "Longsword", "Rapier", "Dagger", "Frying Pan", "Battlesign", "Chisel" };
|
||||
|
||||
static String[] toolDescriptions = { "The main way to repair or change your tools. Place a tool and a material on the left to get started.", "The Pickaxe is a precise mining tool. It is effective on stone and ores.\n\nRequired parts:\n- Pickaxe Head\n- Tool Binding\n- Handle", "The Shovel is a precise digging tool. It is effective on dirt, sand, and snow.\n\nRequired parts:\n- Shovel Head\n- Handle", "The Hatchet is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle",
|
||||
static String[] toolDescriptions = { "gui.toolstation.repair.desc", "gui.toolstation.pickaxe.desc", "The Shovel is a precise digging tool. It is effective on dirt, sand, and snow.\n\nRequired parts:\n- Shovel Head\n- Handle", "The Hatchet is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle",
|
||||
// "The Lumber Axe is a broad chopping tool. It harvests wood in a wide range and can fell entire trees.\n\nRequired parts:\n- Broad Axe Head\n- Handle",
|
||||
// "The Ice Axe is a tool for harvesting ice, mining, and attacking foes.\n\nSpecial Ability:\n- Wall Climb\nNatural Ability:\n- Ice Harvest\nDamage: Moderate\n\nRequired parts:\n- Pickaxe Head\n- Spike\n- Handle",
|
||||
"The Cutter Mattock is a versatile farming tool. It is effective on wood, dirt, and plants.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle", "The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle", "The Longsword is an offensive weapon. It is often used for charging into battle at full speed.\n\nNatural Ability:\n- Charge Boost\nSpecial Ability: Lunge\n\nDamage: Moderate\nDurability: Moderate", "The Rapier is a special weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\n- Charge Boost\nSpecial Ability:\n- Backpedal\n\nDamage: Low\nDurability: Low", "The Dagger is a short blade that can be thrown.\n\nSpecial Ability:\n- Throw Item\n\nDamage: Low\nDurability: Moderate\n\nRequired parts:\n- Knife Blade\n- Crossbar\n- Handle", "The Frying is a heavy weapon that uses sheer weight to stun foes.\n\nSpecial Ability: Block\nNatural Ability: Heavy\nShift+rClick: Place Frying Pan\nDamage: Low\nDurability: High\n\nRequired parts:\n- Pan\n- Handle",
|
||||
@@ -410,6 +406,12 @@ public class ToolProxyClient extends ToolProxyCommon
|
||||
|
||||
void addToolButtons ()
|
||||
{
|
||||
// has to be in here so TinkerTools.tool is already initialized
|
||||
final String[] toolNames = {StatCollector.translateToLocal("gui.toolstation.repair.title"), TinkerTools.pickaxe.getLocalizedToolName(), "Shovel", "Hatchet",
|
||||
// "Lumber Axe",
|
||||
// "Ice Axe",
|
||||
"Mattock", "Broadsword", "Longsword", "Rapier", "Dagger", "Frying Pan", "Battlesign", "Chisel" };
|
||||
|
||||
for (int i = 0; i < toolNames.length; i++)
|
||||
{
|
||||
addToolButton(itemIcons[i][0], itemIcons[i][1], itemIcons[i][2], iconCoords[i * 2], iconCoords[i * 2 + 1], toolNames[i], toolDescriptions[i]);
|
||||
|
||||
@@ -120,7 +120,15 @@ public class ToolStationGui extends GuiContainer implements INEIGuiHandler
|
||||
iconX = element.iconsX;
|
||||
iconY = element.iconsY;
|
||||
title = "\u00A7n" + element.title;
|
||||
body = element.body;
|
||||
body = StatCollector.translateToLocal(element.body);
|
||||
if(body != null) {
|
||||
int i;
|
||||
// for some really weird reason replaceAll doesn't find "\\n", but indexOf does. We have to replace manually.
|
||||
while((i = body.indexOf("\\n")) >= 0)
|
||||
{
|
||||
body = body.substring(0, i) + '\n' + body.substring(i+2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setSlotType (int type)
|
||||
|
||||
@@ -233,25 +233,6 @@ public class CraftingStationContainer extends Container
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
protected void craftTool (ItemStack stack)
|
||||
{
|
||||
if (stack.getItem() instanceof IModifyable)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag(((IModifyable) stack.getItem()).getBaseTagName());
|
||||
Boolean full = (logic.getStackInSlot(2) != null || logic.getStackInSlot(3) != null);
|
||||
/*for (int i = 1; i <= 4; i++)
|
||||
logic.decrStackSize(i, 1);
|
||||
for (int i = 6; i <= 9; i++)
|
||||
logic.decrStackSize(i, 1);*/
|
||||
ItemStack compare = logic.getStackInSlot(5);
|
||||
int amount = compare.getItem() instanceof IModifyable ? compare.stackSize : 1;
|
||||
logic.decrStackSize(5, amount);
|
||||
if (!player.worldObj.isRemote && full)
|
||||
worldObj.playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (AbilityHelper.random.nextFloat() - AbilityHelper.random.nextFloat()) * 0.2F + 1.0F);
|
||||
MinecraftForge.EVENT_BUS.post(new ToolCraftedEvent(this.logic, player, stack));
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean mergeCraftedStack (ItemStack stack, int slotsStart, int slotsTotal, boolean playerInventory, EntityPlayer player)
|
||||
{
|
||||
boolean failedToMerge = false;
|
||||
@@ -283,7 +264,6 @@ public class CraftingStationContainer extends Container
|
||||
|
||||
if (copyStack == null)
|
||||
{
|
||||
craftTool(stack);
|
||||
otherInventorySlot.putStack(stack.copy());
|
||||
otherInventorySlot.onSlotChanged();
|
||||
stack.stackSize = 0;
|
||||
|
||||
@@ -129,6 +129,9 @@ public class PacketPipeline extends MessageToMessageCodec<FMLProxyPacket, Abstra
|
||||
registerPacket(ToolStationPacket.class);
|
||||
registerPacket(PacketUpdateTE.class);
|
||||
registerPacket(SignDataPacket.class);
|
||||
|
||||
registerPacket(BeltPacket.class);
|
||||
registerPacket(GogglePacket.class);
|
||||
}
|
||||
|
||||
// Method to call from FMLPostInitializationEvent
|
||||
|
||||
@@ -462,7 +462,15 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
|
||||
final ItemStack handleStack = new ItemStack(tool.getHandleItem(), 1, 17);
|
||||
final ItemStack accessoryStack = tool.getAccessoryItem() != null ? new ItemStack(tool.getAccessoryItem(), 1, 17) : null;
|
||||
final ItemStack extraStack = tool.getExtraItem() != null ? new ItemStack(tool.getExtraItem(), 1, 17) : null;
|
||||
ItemStack toolStack = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, extraStack, "King Slime " + tool.getLocalizedToolName());
|
||||
|
||||
String loc = "tool." + tool.getToolName().toLowerCase() + ".kingslime"; // special localization the same way as materials
|
||||
String name;
|
||||
if(StatCollector.canTranslate(loc))
|
||||
name = StatCollector.translateToLocal(loc);
|
||||
else
|
||||
name = StatCollector.translateToLocal("tool.kingslimeprefix") + " " + tool.getLocalizedToolName();
|
||||
|
||||
ItemStack toolStack = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, extraStack, name);
|
||||
|
||||
if (toolStack != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user