mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 14:34:22 +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
@@ -1,15 +1,14 @@
|
||||
package tconstruct.weaponry.items;
|
||||
|
||||
import tconstruct.util.Reference;
|
||||
import java.util.List;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.tools.items.Pattern;
|
||||
|
||||
import java.util.List;
|
||||
import tconstruct.util.Reference;
|
||||
|
||||
public class WeaponryPatternClay extends Pattern {
|
||||
private static final String[] patternName = new String[] { "", "", "", "bowlimb" };
|
||||
private static final String[] patternName = new String[] {"", "", "", "bowlimb"};
|
||||
|
||||
public WeaponryPatternClay(String patternType, String name) {
|
||||
super(patternName, getPatternNames(patternName, patternType), "patterns/");
|
||||
@@ -17,37 +16,33 @@ public class WeaponryPatternClay extends Pattern {
|
||||
this.setUnlocalizedName(Reference.prefix(name));
|
||||
}
|
||||
|
||||
public static String[] getPatternNames (String[] patternName, String partType)
|
||||
{
|
||||
public static String[] getPatternNames(String[] patternName, String partType) {
|
||||
String[] names = new String[patternName.length];
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
if (!(patternName[i].equals("")))
|
||||
names[i] = partType + patternName[i];
|
||||
else
|
||||
names[i] = "";
|
||||
if (!(patternName[i].equals(""))) names[i] = partType + patternName[i];
|
||||
else names[i] = "";
|
||||
return names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
{
|
||||
public void getSubItems(Item b, CreativeTabs tab, List list) {
|
||||
for (int i = 0; i < patternName.length; i++) {
|
||||
// if (i != 23)
|
||||
if (!(patternName[i].equals("")))
|
||||
list.add(new ItemStack(b, 1, i));
|
||||
if (!(patternName[i].equals(""))) list.add(new ItemStack(b, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getPatternCost(ItemStack pattern) {
|
||||
switch(pattern.getItemDamage())
|
||||
{
|
||||
case 0: return 1; // shuriken
|
||||
case 1: return 8; // crossbow limb
|
||||
case 2: return 10; // crossbow body
|
||||
case 3: return 3; // bowlimb
|
||||
switch (pattern.getItemDamage()) {
|
||||
case 0:
|
||||
return 1; // shuriken
|
||||
case 1:
|
||||
return 8; // crossbow limb
|
||||
case 2:
|
||||
return 10; // crossbow body
|
||||
case 3:
|
||||
return 3; // bowlimb
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user