mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -10,8 +10,7 @@ import tconstruct.library.tools.ToolCore;
|
||||
* Small class for checking if a particular tool combination is this one
|
||||
*/
|
||||
|
||||
public class ToolRecipe
|
||||
{
|
||||
public class ToolRecipe {
|
||||
protected LinkedList<Item> headList = new LinkedList<Item>();
|
||||
protected LinkedList<Item> handleList = new LinkedList<Item>();
|
||||
protected LinkedList<Item> accessoryList = new LinkedList<Item>();
|
||||
@@ -24,107 +23,78 @@ public class ToolRecipe
|
||||
* TContent.toolRod, null, null, tool); }
|
||||
*/
|
||||
|
||||
public ToolRecipe(Item head, Item handle, ToolCore tool)
|
||||
{
|
||||
public ToolRecipe(Item head, Item handle, ToolCore tool) {
|
||||
this(head, handle, null, null, tool);
|
||||
}
|
||||
|
||||
public ToolRecipe(Item head, Item handle, Item accessory, ToolCore tool)
|
||||
{
|
||||
public ToolRecipe(Item head, Item handle, Item accessory, ToolCore tool) {
|
||||
this(head, handle, accessory, null, tool);
|
||||
}
|
||||
|
||||
public ToolRecipe(Item head, Item handle, Item accessory, Item extra, ToolCore tool)
|
||||
{
|
||||
public ToolRecipe(Item head, Item handle, Item accessory, Item extra, ToolCore tool) {
|
||||
this.headList.add(head);
|
||||
this.handleList.add(handle);
|
||||
if (accessory != null)
|
||||
this.accessoryList.add(accessory);
|
||||
if (extra != null)
|
||||
this.extraList.add(extra);
|
||||
if (accessory != null) this.accessoryList.add(accessory);
|
||||
if (extra != null) this.extraList.add(extra);
|
||||
result = tool;
|
||||
}
|
||||
|
||||
public void addHeadItem (Item head)
|
||||
{
|
||||
public void addHeadItem(Item head) {
|
||||
this.headList.add(head);
|
||||
}
|
||||
|
||||
public void addHandleItem (Item head)
|
||||
{
|
||||
public void addHandleItem(Item head) {
|
||||
this.handleList.add(head);
|
||||
}
|
||||
|
||||
public void addAccessoryItem (Item head)
|
||||
{
|
||||
public void addAccessoryItem(Item head) {
|
||||
this.accessoryList.add(head);
|
||||
}
|
||||
|
||||
public void addExtraItem (Item head)
|
||||
{
|
||||
public void addExtraItem(Item head) {
|
||||
this.extraList.add(head);
|
||||
}
|
||||
|
||||
public boolean validHead (Item input)
|
||||
{
|
||||
for (Item part : headList)
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
public boolean validHead(Item input) {
|
||||
for (Item part : headList) {
|
||||
if (part == input) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean validHandle (Item input)
|
||||
{
|
||||
for (Item part : handleList)
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
if (toolRod != null && part == toolRod && (input == Items.stick || input == Items.bone))
|
||||
return true;
|
||||
public boolean validHandle(Item input) {
|
||||
for (Item part : handleList) {
|
||||
if (part == input) return true;
|
||||
if (toolRod != null && part == toolRod && (input == Items.stick || input == Items.bone)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean validAccessory (Item input)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
if (accessoryList.size() < 1)
|
||||
return true;
|
||||
public boolean validAccessory(Item input) {
|
||||
if (input == null) {
|
||||
if (accessoryList.size() < 1) return true;
|
||||
return false;
|
||||
}
|
||||
for (Item part : accessoryList)
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
if (toolRod != null && part == toolRod && (input == Items.stick || input == Items.bone))
|
||||
return true;
|
||||
for (Item part : accessoryList) {
|
||||
if (part == input) return true;
|
||||
if (toolRod != null && part == toolRod && (input == Items.stick || input == Items.bone)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean validExtra (Item input)
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
if (extraList.size() < 1)
|
||||
return true;
|
||||
public boolean validExtra(Item input) {
|
||||
if (input == null) {
|
||||
if (extraList.size() < 1) return true;
|
||||
return false;
|
||||
}
|
||||
for (Item part : extraList)
|
||||
{
|
||||
if (part == input)
|
||||
return true;
|
||||
if (toolRod != null && part == toolRod && (input == Items.stick || input == Items.bone))
|
||||
return true;
|
||||
for (Item part : extraList) {
|
||||
if (part == input) return true;
|
||||
if (toolRod != null && part == toolRod && (input == Items.stick || input == Items.bone)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public ToolCore getType ()
|
||||
{
|
||||
public ToolCore getType() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user