mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 23:13:07 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
83698cb73c
commit
84c2239244
561 files changed
+8872
-9300
No files matched your search
@@ -4,14 +4,17 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import tconstruct.library.crafting.*;
|
||||
import tconstruct.library.modifier.IModifyable;
|
||||
import tconstruct.tools.inventory.ToolForgeContainer;
|
||||
|
||||
/* Simple class for storing items in the block
|
||||
/*
|
||||
* Simple class for storing items in the block
|
||||
*/
|
||||
|
||||
public class ToolForgeLogic extends ToolStationLogic implements ISidedInventory {
|
||||
|
||||
ItemStack previousTool;
|
||||
String toolName;
|
||||
|
||||
@@ -38,15 +41,15 @@ public class ToolForgeLogic extends ToolStationLogic implements ISidedInventory
|
||||
{
|
||||
if (inventory[2] == null && inventory[3] == null && inventory[4] == null) output = inventory[1].copy();
|
||||
else {
|
||||
output = ModifyBuilder.instance.modifyItem(
|
||||
inventory[1], new ItemStack[] {inventory[2], inventory[3], inventory[4]});
|
||||
output = ModifyBuilder.instance
|
||||
.modifyItem(inventory[1], new ItemStack[] { inventory[2], inventory[3], inventory[4] });
|
||||
}
|
||||
} else
|
||||
// Build new item
|
||||
{
|
||||
toolName = name;
|
||||
ItemStack tool =
|
||||
ToolBuilder.instance.buildTool(inventory[1], inventory[2], inventory[3], inventory[4], name);
|
||||
ItemStack tool = ToolBuilder.instance
|
||||
.buildTool(inventory[1], inventory[2], inventory[3], inventory[4], name);
|
||||
if (inventory[0] == null) output = tool;
|
||||
else if (tool != null) {
|
||||
// NBTTagCompound tags = tool.getTagCompound();
|
||||
@@ -57,23 +60,14 @@ public class ToolForgeLogic extends ToolStationLogic implements ISidedInventory
|
||||
}
|
||||
}
|
||||
if (!name.equals("")) // Name item
|
||||
output = tryRenameTool(output, name);
|
||||
output = tryRenameTool(output, name);
|
||||
}
|
||||
inventory[0] = output;
|
||||
}
|
||||
/*public void buildTool (String name)
|
||||
{
|
||||
toolName = name;
|
||||
ItemStack tool = ToolBuilder.instance.buildTool(inventory[1], inventory[2], inventory[3], inventory[4], name);
|
||||
if (inventory[0] == null)
|
||||
inventory[0] = tool;
|
||||
else
|
||||
{
|
||||
NBTTagCompound tags = inventory[0].getTagCompound();
|
||||
if (!tags.getCompoundTag("InfiTool").hasKey("Built"))
|
||||
{
|
||||
inventory[0] = tool;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/*
|
||||
* public void buildTool (String name) { toolName = name; ItemStack tool =
|
||||
* ToolBuilder.instance.buildTool(inventory[1], inventory[2], inventory[3], inventory[4], name); if (inventory[0] ==
|
||||
* null) inventory[0] = tool; else { NBTTagCompound tags = inventory[0].getTagCompound(); if
|
||||
* (!tags.getCompoundTag("InfiTool").hasKey("Built")) { inventory[0] = tool; } } }
|
||||
*/
|
||||
}
|
||||
Reference in new issue
Block a user