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
@@ -8,8 +8,7 @@ import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.crafting.ModifyBuilder;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
|
||||
public class TConstructClientRegistry
|
||||
{
|
||||
public class TConstructClientRegistry {
|
||||
public static ArrayList<StencilGuiElement> stencilButtons = new ArrayList<StencilGuiElement>();
|
||||
public static ArrayList<StencilGuiElement> stencilButtons2 = new ArrayList<StencilGuiElement>();
|
||||
public static ArrayList<ToolGuiElement> toolButtons = new ArrayList<ToolGuiElement>(20);
|
||||
@@ -17,16 +16,13 @@ public class TConstructClientRegistry
|
||||
public static Map<String, ItemStack> manualIcons = new HashMap<String, ItemStack>();
|
||||
public static ItemStack defaultStack = new ItemStack(Items.iron_ingot);
|
||||
|
||||
public static void addMaterialRenderMapping (int materialID, String domain, String renderName, boolean useDefaultFolder)
|
||||
{
|
||||
for (ToolCore tool : TConstructRegistry.getToolMapping())
|
||||
{
|
||||
public static void addMaterialRenderMapping(
|
||||
int materialID, String domain, String renderName, boolean useDefaultFolder) {
|
||||
for (ToolCore tool : TConstructRegistry.getToolMapping()) {
|
||||
String[] toolIcons = new String[tool.getPartAmount() + 1];
|
||||
for (int i = 0; i < tool.getPartAmount() + 1; i++)
|
||||
{
|
||||
for (int i = 0; i < tool.getPartAmount() + 1; i++) {
|
||||
String icon = domain + ":";
|
||||
if (useDefaultFolder)
|
||||
icon += tool.getDefaultFolder() + "/";
|
||||
if (useDefaultFolder) icon += tool.getDefaultFolder() + "/";
|
||||
icon += renderName + tool.getIconSuffix(i);
|
||||
toolIcons[i] = icon;
|
||||
}
|
||||
@@ -34,73 +30,67 @@ public class TConstructClientRegistry
|
||||
}
|
||||
}
|
||||
|
||||
public static void addAlternateMaterialRenderMapping (ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder)
|
||||
{
|
||||
public static void addAlternateMaterialRenderMapping(
|
||||
ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder) {
|
||||
String[] toolIcons = new String[tool.getPartAmount() + 1];
|
||||
for (int i = 0; i < tool.getPartAmount() + 1; i++)
|
||||
{
|
||||
for (int i = 0; i < tool.getPartAmount() + 1; i++) {
|
||||
String icon = domain + ":";
|
||||
if (useDefaultFolder)
|
||||
icon += tool.getDefaultFolder() + "/";
|
||||
if (useDefaultFolder) icon += tool.getDefaultFolder() + "/";
|
||||
icon += renderName + tool.getIconSuffix(i);
|
||||
toolIcons[i] = icon;
|
||||
}
|
||||
tool.registerAlternatePartPaths(materialID, toolIcons);
|
||||
}
|
||||
|
||||
public static void addEffectRenderMapping (ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder)
|
||||
{
|
||||
public static void addEffectRenderMapping(
|
||||
ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder) {
|
||||
String icon = domain + ":";
|
||||
if (useDefaultFolder)
|
||||
icon += tool.getDefaultFolder() + "/";
|
||||
if (useDefaultFolder) icon += tool.getDefaultFolder() + "/";
|
||||
icon += renderName + tool.getEffectSuffix();
|
||||
tool.registerEffectPath(materialID, icon);
|
||||
}
|
||||
|
||||
public static void addEffectRenderMapping (int materialID, String domain, String renderName, boolean useDefaultFolder)
|
||||
{
|
||||
for (ToolCore tool : TConstructRegistry.getToolMapping())
|
||||
{
|
||||
public static void addEffectRenderMapping(
|
||||
int materialID, String domain, String renderName, boolean useDefaultFolder) {
|
||||
for (ToolCore tool : TConstructRegistry.getToolMapping()) {
|
||||
String icon = domain + ":";
|
||||
if (useDefaultFolder)
|
||||
icon += tool.getDefaultFolder() + "/";
|
||||
if (useDefaultFolder) icon += tool.getDefaultFolder() + "/";
|
||||
icon += renderName + tool.getEffectSuffix();
|
||||
tool.registerEffectPath(materialID, icon);
|
||||
}
|
||||
}
|
||||
|
||||
public static void addSingleEffectRenderMapping (ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder)
|
||||
{
|
||||
public static void addSingleEffectRenderMapping(
|
||||
ToolCore tool, int materialID, String domain, String renderName, boolean useDefaultFolder) {
|
||||
String icon = domain + ":";
|
||||
if (useDefaultFolder)
|
||||
icon += tool.getDefaultFolder() + "/";
|
||||
if (useDefaultFolder) icon += tool.getDefaultFolder() + "/";
|
||||
icon += renderName + tool.getEffectSuffix();
|
||||
tool.registerEffectPath(materialID, icon);
|
||||
}
|
||||
|
||||
public static void registerManualModifier (String name, ItemStack output, ItemStack topinput)
|
||||
{
|
||||
public static void registerManualModifier(String name, ItemStack output, ItemStack topinput) {
|
||||
registerManualModifier(name, output, topinput, null);
|
||||
}
|
||||
|
||||
public static void registerManualModifier (String name, ItemStack output, ItemStack topinput, ItemStack bottominput)
|
||||
{
|
||||
public static void registerManualModifier(
|
||||
String name, ItemStack output, ItemStack topinput, ItemStack bottominput) {
|
||||
ItemStack[] recipe = new ItemStack[3];
|
||||
recipe[0] = ModifyBuilder.instance.modifyItem(output, new ItemStack[] { topinput, bottominput });//ToolBuilder.instance.buildTool(output, topinput, bottominput, "");
|
||||
recipe[0] = ModifyBuilder.instance.modifyItem(output, new ItemStack[] {topinput, bottominput
|
||||
}); // ToolBuilder.instance.buildTool(output, topinput, bottominput, "");
|
||||
recipe[1] = topinput;
|
||||
recipe[2] = bottominput;
|
||||
MantleClientRegistry.recipeIcons.put(name, recipe);
|
||||
}
|
||||
|
||||
public static void registerManualModifier (String name, ItemStack output, ItemStack input1, ItemStack input2, ItemStack input3)
|
||||
{
|
||||
public static void registerManualModifier(
|
||||
String name, ItemStack output, ItemStack input1, ItemStack input2, ItemStack input3) {
|
||||
registerManualModifier(name, output, input1, input2, input3, null);
|
||||
}
|
||||
|
||||
public static void registerManualModifier (String name, ItemStack output, ItemStack input1, ItemStack input2, ItemStack input3, ItemStack input4)
|
||||
{
|
||||
public static void registerManualModifier(
|
||||
String name, ItemStack output, ItemStack input1, ItemStack input2, ItemStack input3, ItemStack input4) {
|
||||
ItemStack[] recipe = new ItemStack[5];
|
||||
recipe[0] = ModifyBuilder.instance.modifyItem(output, new ItemStack[] { input1, input2, input3, input4 });
|
||||
recipe[0] = ModifyBuilder.instance.modifyItem(output, new ItemStack[] {input1, input2, input3, input4});
|
||||
recipe[1] = input1;
|
||||
recipe[2] = input2;
|
||||
recipe[3] = input3;
|
||||
@@ -108,8 +98,7 @@ public class TConstructClientRegistry
|
||||
MantleClientRegistry.recipeIcons.put(name, recipe);
|
||||
}
|
||||
|
||||
public static void registerManualSmeltery (String name, ItemStack output, ItemStack liquid, ItemStack cast)
|
||||
{
|
||||
public static void registerManualSmeltery(String name, ItemStack output, ItemStack liquid, ItemStack cast) {
|
||||
ItemStack[] recipe = new ItemStack[3];
|
||||
recipe[0] = output;
|
||||
recipe[1] = liquid;
|
||||
@@ -117,50 +106,60 @@ public class TConstructClientRegistry
|
||||
MantleClientRegistry.recipeIcons.put(name, recipe);
|
||||
}
|
||||
|
||||
//Gui
|
||||
public static void addStencilButton (StencilGuiElement element)
|
||||
{
|
||||
// Gui
|
||||
public static void addStencilButton(StencilGuiElement element) {
|
||||
stencilButtons.add(element);
|
||||
}
|
||||
|
||||
public static void addStencilButton (int xButton, int yButton, int index, String domain, String texture)
|
||||
{
|
||||
public static void addStencilButton(int xButton, int yButton, int index, String domain, String texture) {
|
||||
stencilButtons.add(new StencilGuiElement(xButton, yButton, index, domain, texture));
|
||||
}
|
||||
|
||||
public static void addStencilButton2 (StencilGuiElement element)
|
||||
{
|
||||
public static void addStencilButton2(StencilGuiElement element) {
|
||||
stencilButtons.add(element);
|
||||
}
|
||||
|
||||
// adds a button to the right side of the stencil table
|
||||
public static void addStencilButton2 (int xButton, int yButton, int index, String domain, String texture)
|
||||
{
|
||||
public static void addStencilButton2(int xButton, int yButton, int index, String domain, String texture) {
|
||||
stencilButtons2.add(new StencilGuiElement(xButton, yButton, index, domain, texture));
|
||||
}
|
||||
|
||||
public static void addToolButton (ToolGuiElement element)
|
||||
{
|
||||
public static void addToolButton(ToolGuiElement element) {
|
||||
toolButtons.add(element);
|
||||
}
|
||||
|
||||
public static void addToolButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body, String domain, String texture)
|
||||
{
|
||||
public static void addToolButton(
|
||||
int slotType,
|
||||
int xButton,
|
||||
int yButton,
|
||||
int[] xIcons,
|
||||
int[] yIcons,
|
||||
String title,
|
||||
String body,
|
||||
String domain,
|
||||
String texture) {
|
||||
toolButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, domain, texture));
|
||||
}
|
||||
|
||||
public static void addTierTwoButton (ToolGuiElement element)
|
||||
{
|
||||
public static void addTierTwoButton(ToolGuiElement element) {
|
||||
tierTwoButtons.add(element);
|
||||
}
|
||||
|
||||
public static void addTierTwoButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body, String domain, String texture)
|
||||
{
|
||||
tierTwoButtons.add(new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, domain, texture));
|
||||
public static void addTierTwoButton(
|
||||
int slotType,
|
||||
int xButton,
|
||||
int yButton,
|
||||
int[] xIcons,
|
||||
int[] yIcons,
|
||||
String title,
|
||||
String body,
|
||||
String domain,
|
||||
String texture) {
|
||||
tierTwoButtons.add(
|
||||
new ToolGuiElement(slotType, xButton, yButton, xIcons, yIcons, title, body, domain, texture));
|
||||
}
|
||||
|
||||
public static ArrayList<ToolGuiElement> getToolButtons ()
|
||||
{
|
||||
public static ArrayList<ToolGuiElement> getToolButtons() {
|
||||
return toolButtons;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user