[ci skip] spotlessApply with the new settings

This commit is contained in:
Jason Mitchell committed 2023-01-28 18:04:28 -08:00
1 parent 83698cb73c
commit 84c2239244
561 files changed
+8872 -9300

No files matched your search

+213 -200
View File
@@ -1,11 +1,9 @@
package tconstruct.armor;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.*;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
import java.util.EnumSet;
import mantle.pulsar.pulse.*;
import net.minecraft.block.Block;
import net.minecraft.init.*;
import net.minecraft.item.*;
@@ -14,6 +12,7 @@ import net.minecraft.util.StatCollector;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.oredict.ShapedOreRecipe;
import tconstruct.TConstruct;
import tconstruct.armor.blocks.DryingRack;
import tconstruct.armor.items.*;
@@ -27,10 +26,15 @@ import tconstruct.modifiers.armor.*;
import tconstruct.modifiers.tools.ModAttack;
import tconstruct.tools.TinkerTools;
import tconstruct.world.TinkerWorld;
import cpw.mods.fml.common.*;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.*;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(TConstruct.modID)
@Pulse(id = "Tinkers' Armory", description = "Modifyable armors, such as the traveller's gear.")
public class TinkerArmor {
@SidedProxy(clientSide = "tconstruct.armor.ArmorProxyClient", serverSide = "tconstruct.armor.ArmorProxyCommon")
public static ArmorProxyCommon proxy;
@@ -41,12 +45,9 @@ public class TinkerArmor {
public static Block dryingRack;
// Wearables
/*
public static Item heavyHelmet;
public static Item heavyChestplate;
public static Item heavyPants;
public static Item heavyBoots;
public static Item glove;
*/
* public static Item heavyHelmet; public static Item heavyChestplate; public static Item heavyPants; public static
* Item heavyBoots; public static Item glove;
*/
public static Item knapsack;
public static Item heartCanister;
// Armor - basic
@@ -99,15 +100,15 @@ public class TinkerArmor {
GameRegistry.registerItem(TinkerArmor.knapsack, "knapsack");
LiquidCasting basinCasting = TConstruct.getBasinCasting();
TinkerArmor.materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] {1, 2, 2, 1}, 3);
TinkerArmor.helmetWood =
new ArmorBasic(TinkerArmor.materialWood, 0, "wood").setUnlocalizedName("tconstruct.helmetWood");
TinkerArmor.chestplateWood =
new ArmorBasic(TinkerArmor.materialWood, 1, "wood").setUnlocalizedName("tconstruct.chestplateWood");
TinkerArmor.leggingsWood =
new ArmorBasic(TinkerArmor.materialWood, 2, "wood").setUnlocalizedName("tconstruct.leggingsWood");
TinkerArmor.bootsWood =
new ArmorBasic(TinkerArmor.materialWood, 3, "wood").setUnlocalizedName("tconstruct.bootsWood");
TinkerArmor.materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] { 1, 2, 2, 1 }, 3);
TinkerArmor.helmetWood = new ArmorBasic(TinkerArmor.materialWood, 0, "wood")
.setUnlocalizedName("tconstruct.helmetWood");
TinkerArmor.chestplateWood = new ArmorBasic(TinkerArmor.materialWood, 1, "wood")
.setUnlocalizedName("tconstruct.chestplateWood");
TinkerArmor.leggingsWood = new ArmorBasic(TinkerArmor.materialWood, 2, "wood")
.setUnlocalizedName("tconstruct.leggingsWood");
TinkerArmor.bootsWood = new ArmorBasic(TinkerArmor.materialWood, 3, "wood")
.setUnlocalizedName("tconstruct.bootsWood");
GameRegistry.registerItem(TinkerArmor.helmetWood, "helmetWood");
GameRegistry.registerItem(TinkerArmor.chestplateWood, "chestplateWood");
GameRegistry.registerItem(TinkerArmor.leggingsWood, "leggingsWood");
@@ -149,10 +150,10 @@ public class TinkerArmor {
private void craftingTableRecipes() {
// Armor Recipes
Object[] helm = new String[] {"www", "w w"};
Object[] chest = new String[] {"w w", "www", "www"};
Object[] pants = new String[] {"www", "w w", "w w"};
Object[] shoes = new String[] {"w w", "w w"};
Object[] helm = new String[] { "www", "w w" };
Object[] chest = new String[] { "w w", "www", "www" };
Object[] pants = new String[] { "www", "w w", "w w" };
Object[] shoes = new String[] { "w w", "w w" };
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.helmetWood, helm, 'w', "logWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.chestplateWood, chest, 'w', "logWood"));
GameRegistry.addRecipe(new ShapedOreRecipe(TinkerArmor.leggingsWood, pants, 'w', "logWood"));
@@ -166,18 +167,27 @@ public class TinkerArmor {
// GameRegistry.addRecipe(new ShapedOreRecipe(new
// ItemStack(TRepo.heartCanister, 1, 0), "##", "##", '#',
// "ingotNaturalAluminum"));
GameRegistry.addRecipe(new ShapedOreRecipe(
new ItemStack(TinkerArmor.heartCanister, 1, 0), " # ", "#B#", " # ", '#', "ingotTin", 'B', Items.bone));
GameRegistry.addRecipe(
new ShapedOreRecipe(
new ItemStack(TinkerArmor.heartCanister, 1, 0),
" # ",
"#B#",
" # ",
'#',
"ingotTin",
'B',
Items.bone));
GameRegistry.addRecipe(new ShapedOreRecipe(
new ItemStack(TinkerArmor.diamondApple),
" d ",
"d#d",
" d ",
'd',
"gemDiamond",
'#',
new ItemStack(Items.apple)));
GameRegistry.addRecipe(
new ShapedOreRecipe(
new ItemStack(TinkerArmor.diamondApple),
" d ",
"d#d",
" d ",
'd',
"gemDiamond",
'#',
new ItemStack(Items.apple)));
GameRegistry.addShapelessRecipe(
new ItemStack(TinkerArmor.heartCanister, 1, 2),
new ItemStack(TinkerArmor.diamondApple),
@@ -185,7 +195,8 @@ public class TinkerArmor {
new ItemStack(TinkerArmor.heartCanister, 1, 0),
new ItemStack(TinkerArmor.heartCanister, 1, 1));
GameRegistry.addShapelessRecipe(
new ItemStack(TinkerArmor.heartCanister, 1, 1), new ItemStack(TinkerArmor.heartCanister, 1, 3));
new ItemStack(TinkerArmor.heartCanister, 1, 1),
new ItemStack(TinkerArmor.heartCanister, 1, 3));
GameRegistry.addShapelessRecipe(
new ItemStack(TinkerArmor.heartCanister, 1, 4),
new ItemStack(TinkerArmor.heartCanister, 1, 2),
@@ -194,17 +205,18 @@ public class TinkerArmor {
// GameRegistry.addShapelessRecipe(new ItemStack(heartCanister, 1, 6), new ItemStack(heartCanister, 1, 0), new
// ItemStack(heartCanister, 1, 4), new ItemStack(heartCanister, 1, 5));
GameRegistry.addRecipe(new ShapedOreRecipe(
new ItemStack(TinkerArmor.knapsack, 1, 0),
"###",
"rmr",
"###",
'#',
new ItemStack(Items.leather),
'r',
new ItemStack(TinkerTools.toughRod, 1, 2),
'm',
"ingotGold"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
new ItemStack(TinkerArmor.knapsack, 1, 0),
"###",
"rmr",
"###",
'#',
new ItemStack(Items.leather),
'r',
new ItemStack(TinkerTools.toughRod, 1, 2),
'm',
"ingotGold"));
ItemStack aluBrass = new ItemStack(TinkerTools.materials, 1, 14);
GameRegistry.addRecipe(
new ItemStack(TinkerArmor.knapsack, 1, 0),
@@ -218,60 +230,74 @@ public class TinkerArmor {
'm',
aluBrass);
// Drying Rack Recipes
GameRegistry.addRecipe(
new ShapedOreRecipe(new ItemStack(TinkerArmor.dryingRack, 1, 0), "bbb", 'b', "slabWood"));
GameRegistry
.addRecipe(new ShapedOreRecipe(new ItemStack(TinkerArmor.dryingRack, 1, 0), "bbb", 'b', "slabWood"));
// Temporary recipes
ItemStack leather = new ItemStack(Items.leather);
ItemStack glass = new ItemStack(Blocks.glass);
ItemStack string = new ItemStack(Items.string);
GameRegistry.addRecipe(new ShapedOreRecipe(
travelGoggles.getDefaultItem(),
"# #",
"q#q",
"g g",
'#',
leather,
'q',
"blockGlass",
'g',
"ingotGold"));
GameRegistry.addRecipe(new ShapedOreRecipe(
travelWings.getDefaultItem(),
"g g",
"i#i",
"i i",
'#',
Items.ender_pearl,
'g',
"ingotGold",
'i',
"ingotBronze"));
GameRegistry.addRecipe(new ShapedOreRecipe(
travelVest.getDefaultItem(),
"#w#",
"#i#",
"#w#",
'#',
leather,
'i',
"ingotAluminum",
'w',
new ItemStack(Blocks.wool, 1, Short.MAX_VALUE)));
GameRegistry.addRecipe(new ShapedOreRecipe(
travelBoots.getDefaultItem(), "#s#", "#i#", "#s#", '#', leather, 's', string, 'i', "ingotAluminum"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
travelGoggles.getDefaultItem(),
"# #",
"q#q",
"g g",
'#',
leather,
'q',
"blockGlass",
'g',
"ingotGold"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
travelWings.getDefaultItem(),
"g g",
"i#i",
"i i",
'#',
Items.ender_pearl,
'g',
"ingotGold",
'i',
"ingotBronze"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
travelVest.getDefaultItem(),
"#w#",
"#i#",
"#w#",
'#',
leather,
'i',
"ingotAluminum",
'w',
new ItemStack(Blocks.wool, 1, Short.MAX_VALUE)));
GameRegistry.addRecipe(
new ShapedOreRecipe(
travelBoots.getDefaultItem(),
"#s#",
"#i#",
"#s#",
'#',
leather,
's',
string,
'i',
"ingotAluminum"));
GameRegistry.addShapedRecipe(travelGlove.getDefaultItem(), " #", "###", " ##", '#', leather);
GameRegistry.addRecipe(new ShapedOreRecipe(
travelBelt.getDefaultItem(),
"###",
"ici",
"###",
'#',
leather,
'c',
"chestWood",
'i',
"ingotAluminum"));
GameRegistry.addRecipe(
new ShapedOreRecipe(
travelBelt.getDefaultItem(),
"###",
"ici",
"###",
'#',
leather,
'c',
"chestWood",
'i',
"ingotAluminum"));
}
protected static void addRecipesForDryingRack() {
@@ -284,9 +310,13 @@ public class TinkerArmor {
DryingRackRecipes.addDryingRecipe(Items.fish, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 4));
DryingRackRecipes.addDryingRecipe(Items.rotten_flesh, 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 5));
DryingRackRecipes.addDryingRecipe(
new ItemStack(TinkerWorld.strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 6));
new ItemStack(TinkerWorld.strangeFood, 1, 0),
20 * 60 * 5,
new ItemStack(TinkerArmor.jerky, 1, 6));
DryingRackRecipes.addDryingRecipe(
new ItemStack(TinkerWorld.strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(TinkerArmor.jerky, 1, 7));
new ItemStack(TinkerWorld.strangeFood, 1, 1),
20 * 60 * 5,
new ItemStack(TinkerArmor.jerky, 1, 7));
// DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.jerky, 1, 5),
// 20 * 60 * 10, Item.leather);
@@ -298,130 +328,113 @@ public class TinkerArmor {
// Travel gear modifiers
// MultiType
ModifyBuilder.registerModifier(
new TravelModDoubleJump(EnumSet.of(ArmorPart.Legs, ArmorPart.Feet), new ItemStack[] {
new ItemStack(Items.ghast_tear),
new ItemStack(TinkerWorld.slimeGel, 1, 0),
new ItemStack(Blocks.piston)
}));
new TravelModDoubleJump(
EnumSet.of(ArmorPart.Legs, ArmorPart.Feet),
new ItemStack[] { new ItemStack(Items.ghast_tear), new ItemStack(TinkerWorld.slimeGel, 1, 0),
new ItemStack(Blocks.piston) }));
ModifyBuilder.registerModifier(
new TravelModDoubleJump(EnumSet.of(ArmorPart.Legs, ArmorPart.Feet), new ItemStack[] {
new ItemStack(Items.ghast_tear),
new ItemStack(TinkerWorld.slimeGel, 1, 1),
new ItemStack(Blocks.piston)
}));
ModifyBuilder.registerModifier(new AModInteger(
4,
"Moss",
EnumSet.of(ArmorPart.Legs, ArmorPart.Feet, ArmorPart.Chest, ArmorPart.Head),
new ItemStack[] {new ItemStack(TinkerTools.materials, 1, 6)},
3,
"\u00a72",
StatCollector.translateToLocal("modifier.tool.moss")));
new TravelModDoubleJump(
EnumSet.of(ArmorPart.Legs, ArmorPart.Feet),
new ItemStack[] { new ItemStack(Items.ghast_tear), new ItemStack(TinkerWorld.slimeGel, 1, 1),
new ItemStack(Blocks.piston) }));
ModifyBuilder.registerModifier(
new AModInteger(
4,
"Moss",
EnumSet.of(ArmorPart.Legs, ArmorPart.Feet, ArmorPart.Chest, ArmorPart.Head),
new ItemStack[] { new ItemStack(TinkerTools.materials, 1, 6) },
3,
"\u00a72",
StatCollector.translateToLocal("modifier.tool.moss")));
ModifyBuilder.registerModifier(new TravelModRepair());
TConstructRegistry.registerActiveArmorMod(new ActiveTinkerArmor());
// Head
ModifyBuilder.registerModifier(new AModBoolean(
0,
"Night Vision",
EnumSet.of(ArmorPart.Head),
new ItemStack[] {
new ItemStack(Items.flint_and_steel),
new ItemStack(Items.potionitem, 1, 8198),
new ItemStack(Items.golden_carrot)
},
"\u00a78",
"Night Vision"));
ModifyBuilder.registerModifier(
new AModBoolean(
0,
"Night Vision",
EnumSet.of(ArmorPart.Head),
new ItemStack[] { new ItemStack(Items.flint_and_steel),
new ItemStack(Items.potionitem, 1, 8198), new ItemStack(Items.golden_carrot) },
"\u00a78",
"Night Vision"));
// Chest
ModifyBuilder.registerModifier(new AModInteger(
0,
"Perfect Dodge",
EnumSet.of(ArmorPart.Chest),
new ItemStack[] {
new ItemStack(Items.ender_eye), new ItemStack(Items.ender_pearl), new ItemStack(Items.sugar)
},
1,
"\u00a7d",
"Perfect Dodge"));
ModifyBuilder.registerModifier(new AModBoolean(
1,
"Stealth",
EnumSet.of(ArmorPart.Chest),
new ItemStack[] {
new ItemStack(Items.fermented_spider_eye),
new ItemStack(Items.ender_eye),
new ItemStack(Items.potionitem, 1, 8206),
new ItemStack(Items.golden_carrot)
},
"\u00a78",
"Stealth"));
ModifyBuilder.registerModifier(
new AModInteger(
0,
"Perfect Dodge",
EnumSet.of(ArmorPart.Chest),
new ItemStack[] { new ItemStack(Items.ender_eye), new ItemStack(Items.ender_pearl),
new ItemStack(Items.sugar) },
1,
"\u00a7d",
"Perfect Dodge"));
ModifyBuilder.registerModifier(
new AModBoolean(
1,
"Stealth",
EnumSet.of(ArmorPart.Chest),
new ItemStack[] { new ItemStack(Items.fermented_spider_eye), new ItemStack(Items.ender_eye),
new ItemStack(Items.potionitem, 1, 8206), new ItemStack(Items.golden_carrot) },
"\u00a78",
"Stealth"));
// Wings
ItemStack feather = new ItemStack(Items.feather);
ModifyBuilder.registerModifier(new AModInteger(
1,
"Feather Fall",
EnumSet.of(ArmorPart.Legs),
new ItemStack[] {
new ItemStack(TinkerWorld.slimeGel, 1, 0),
new ItemStack(Items.ender_pearl),
feather,
feather,
feather,
feather,
feather,
feather
},
1,
"\u00a7f",
"Feather Fall"));
ModifyBuilder.registerModifier(new AModInteger(
1,
"Feather Fall",
EnumSet.of(ArmorPart.Legs),
new ItemStack[] {
new ItemStack(TinkerWorld.slimeGel, 1, 1),
new ItemStack(Items.ender_pearl),
feather,
feather,
feather,
feather,
feather,
feather
},
1,
"\u00a7f",
"Feather Fall"));
ModifyBuilder.registerModifier(
new AModInteger(
1,
"Feather Fall",
EnumSet.of(ArmorPart.Legs),
new ItemStack[] { new ItemStack(TinkerWorld.slimeGel, 1, 0), new ItemStack(Items.ender_pearl),
feather, feather, feather, feather, feather, feather },
1,
"\u00a7f",
"Feather Fall"));
ModifyBuilder.registerModifier(
new AModInteger(
1,
"Feather Fall",
EnumSet.of(ArmorPart.Legs),
new ItemStack[] { new ItemStack(TinkerWorld.slimeGel, 1, 1), new ItemStack(Items.ender_pearl),
feather, feather, feather, feather, feather, feather },
1,
"\u00a7f",
"Feather Fall"));
// Feet
ModifyBuilder.registerModifier(new AModBoolean(
1,
"WaterWalk",
EnumSet.of(ArmorPart.Feet),
new ItemStack[] {new ItemStack(Blocks.waterlily), new ItemStack(Blocks.waterlily)},
"\u00a79",
"Water-Walking"));
ModifyBuilder.registerModifier(new AModLeadBoots(new ItemStack[] {new ItemStack(Blocks.iron_block)}));
ModifyBuilder.registerModifier(new AModInteger(
3,
"Slimy Soles",
EnumSet.of(ArmorPart.Feet),
new ItemStack[] {new ItemStack(TinkerWorld.slimePad, 1, 0), new ItemStack(TinkerWorld.slimePad, 1, 0)},
1,
"\u00a7a",
"Slimy Soles"));
ModifyBuilder.registerModifier(
new AModBoolean(
1,
"WaterWalk",
EnumSet.of(ArmorPart.Feet),
new ItemStack[] { new ItemStack(Blocks.waterlily), new ItemStack(Blocks.waterlily) },
"\u00a79",
"Water-Walking"));
ModifyBuilder.registerModifier(new AModLeadBoots(new ItemStack[] { new ItemStack(Blocks.iron_block) }));
ModifyBuilder.registerModifier(
new AModInteger(
3,
"Slimy Soles",
EnumSet.of(ArmorPart.Feet),
new ItemStack[] { new ItemStack(TinkerWorld.slimePad, 1, 0),
new ItemStack(TinkerWorld.slimePad, 1, 0) },
1,
"\u00a7a",
"Slimy Soles"));
// Glove
ModifyBuilder.registerModifier(
new GloveSpeed(1, new ItemStack[] {redstoneItem, redstoneBlock}, new int[] {1, 9}));
new GloveSpeed(1, new ItemStack[] { redstoneItem, redstoneBlock }, new int[] { 1, 9 }));
// ModifyBuilder.registerModifier(new GloveClimb(new ItemStack[] { new ItemStack(Items.slime_ball), new
// ItemStack(Blocks.web), new ItemStack(TinkerTools.materials, 1, 25) }));
modAttackGlove = new ModAttack(
"Quartz",
2,
new ItemStack[] {new ItemStack(Items.quartz), new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE)},
new int[] {1, 4},
new ItemStack[] { new ItemStack(Items.quartz), new ItemStack(Blocks.quartz_block, 1, Short.MAX_VALUE) },
new int[] { 1, 4 },
50,
50,
"Accessory");