Auto format code
This commit is contained in:
parent
fc4d8686b8
commit
b25742dde0
175 changed files with 527 additions and 737 deletions
|
@ -130,7 +130,6 @@ public class IC2Dict {
|
|||
|
||||
OreDictionary.registerOre("plateIridium", ItemName.crafting.getItemStack(CraftingItemType.iridium));
|
||||
|
||||
|
||||
} catch (NoClassDefFoundError notFound) {
|
||||
Core.logHelper.warn(
|
||||
"Can't enable integration: IC2 installed but cannot be hooked\n" +
|
||||
|
@ -146,14 +145,12 @@ public class IC2Dict {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static ItemStack getIC2Cable(CableType type, int insulation){
|
||||
if(insulation > type.maxInsulation){
|
||||
public static ItemStack getIC2Cable(CableType type, int insulation) {
|
||||
if (insulation > type.maxInsulation) {
|
||||
return null;
|
||||
}
|
||||
ItemCable itemCable = ItemName.cable.getInstance();
|
||||
return itemCable.getCable(type, insulation);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import techreborn.config.ConfigTechReborn;
|
|||
import techreborn.items.ItemIngots;
|
||||
import techreborn.items.ItemParts;
|
||||
import techreborn.items.ItemUpgrades;
|
||||
|
||||
/**
|
||||
* Created by Mark on 18/12/2016.
|
||||
*/
|
||||
|
@ -102,7 +103,7 @@ public enum IC2Duplicates {
|
|||
}
|
||||
|
||||
public boolean hasIC2Stack() {
|
||||
if(ic2Stack == null){
|
||||
if (ic2Stack == null) {
|
||||
return false;
|
||||
}
|
||||
return !ic2Stack.isEmpty();
|
||||
|
|
|
@ -213,9 +213,9 @@ public class ModBlocks {
|
|||
registerBlock(CABLE, ItemBlockCable.class, "cable");
|
||||
GameRegistry.registerTileEntity(TileCable.class, "TileCableTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(CABLE, "cable");
|
||||
// for (EnumCableType cableType : EnumCableType.values()) {
|
||||
// Core.proxy.registerSubBlockInventoryLocation(CABLE, cableType.ordinal(), "techreborn:cable", "type=inv_" + cableType.getName().toLowerCase());
|
||||
// }
|
||||
// for (EnumCableType cableType : EnumCableType.values()) {
|
||||
// Core.proxy.registerSubBlockInventoryLocation(CABLE, cableType.ordinal(), "techreborn:cable", "type=inv_" + cableType.getName().toLowerCase());
|
||||
// }
|
||||
|
||||
MACHINE_CASINGS = new BlockMachineCasing(Material.ROCK);
|
||||
registerBlock(MACHINE_CASINGS, ItemBlockMachineCasing.class, "machinecasing");
|
||||
|
|
|
@ -83,7 +83,8 @@ public class ModItems {
|
|||
public static Item ENERGY_CRYSTAL;
|
||||
public static Item SCRAP_BOX;
|
||||
public static Item FREQUENCY_TRANSMITTER;
|
||||
public static @Nullable Item BRONZE_SWORD;
|
||||
public static @Nullable
|
||||
Item BRONZE_SWORD;
|
||||
@Nullable
|
||||
public static Item BRONZE_PICKAXE;
|
||||
@Nullable
|
||||
|
@ -349,8 +350,8 @@ public class ModItems {
|
|||
public static void registerItem(Item item, String name) {
|
||||
item.setRegistryName(name);
|
||||
GameRegistry.register(item);
|
||||
if(item.getClass().isInstance(IEnergyItemInfo.class)){
|
||||
if(!item.getClass().isInstance(IEnergyInterfaceItem.class)){
|
||||
if (item.getClass().isInstance(IEnergyItemInfo.class)) {
|
||||
if (!item.getClass().isInstance(IEnergyInterfaceItem.class)) {
|
||||
Core.logHelper.error(name + " was not patched with the power mixin. This is a error, the item may not work as intended.");
|
||||
Core.logHelper.error("Please check that the reborn core loading plugin has been registerd.");
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import reborncore.common.powerSystem.PoweredItem;
|
|||
*/
|
||||
public class ModPoweredItems {
|
||||
|
||||
public static void preInit(){
|
||||
public static void preInit() {
|
||||
PoweredItem.registerPoweredItem("techreborn.items.tools.ItemRockCutter");
|
||||
PoweredItem.registerPoweredItem("techreborn.items.armor.ItemLithiumBatpack");
|
||||
PoweredItem.registerPoweredItem("techreborn.items.armor.ItemLapotronPack");
|
||||
|
|
|
@ -92,8 +92,8 @@ public class ModRecipes {
|
|||
addCompressorRecipes();
|
||||
}
|
||||
|
||||
public static void postInit(){
|
||||
if(ConfigTechReborn.disableRailcraftSteelNuggetRecipe){
|
||||
public static void postInit() {
|
||||
if (ConfigTechReborn.disableRailcraftSteelNuggetRecipe) {
|
||||
Iterator iterator = FurnaceRecipes.instance().getSmeltingList().entrySet().iterator();
|
||||
Map.Entry entry;
|
||||
while (iterator.hasNext()) {
|
||||
|
@ -101,7 +101,7 @@ public class ModRecipes {
|
|||
if (entry.getValue() instanceof ItemStack && entry.getKey() instanceof ItemStack) {
|
||||
ItemStack input = (ItemStack) entry.getKey();
|
||||
ItemStack output = (ItemStack) entry.getValue();
|
||||
if(ItemUtils.isInputEqual("nuggetSteel", output, true , true, false) && ItemUtils.isInputEqual("nuggetIron", input, true , true, false)){
|
||||
if (ItemUtils.isInputEqual("nuggetSteel", output, true, true, false) && ItemUtils.isInputEqual("nuggetIron", input, true, true, false)) {
|
||||
Core.logHelper.info("Removing a steelnugget smelting recipe");
|
||||
iterator.remove();
|
||||
}
|
||||
|
@ -333,7 +333,6 @@ public class ModRecipes {
|
|||
"circuitBasic", 'T', IC2Duplicates.MVT.getStackBasedOnConfig());
|
||||
}
|
||||
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(ItemUpgrades.getUpgradeByName("energy_storage"), "PPP", "WBW", "PCP", 'P',
|
||||
"plankWood", 'W', IC2Duplicates.CABLE_ICOPPER.getStackBasedOnConfig(), 'C',
|
||||
"circuitBasic", 'B', ModItems.RE_BATTERY);
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CraftingTableRecipes extends RecipeMethods {
|
|||
|
||||
registerShapeless(getStack(ModBlocks.RUBBER_PLANKS, 4), getStack(ModBlocks.RUBBER_LOG));
|
||||
|
||||
if(!IC2Duplicates.deduplicate()){
|
||||
if (!IC2Duplicates.deduplicate()) {
|
||||
registerShapeless(getStack(ModItems.FREQUENCY_TRANSMITTER), getStack(IC2Duplicates.CABLE_ICOPPER), "circuitBasic");
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
|
|||
|
||||
}
|
||||
|
||||
if(input instanceof ItemStack){
|
||||
if (input instanceof ItemStack) {
|
||||
if (((ItemStack) input).getItem() instanceof DynamicCell) {
|
||||
int inputCount = ((ItemStack) input).getCount();
|
||||
if (cellCount < inputCount) {
|
||||
|
|
|
@ -87,8 +87,8 @@ public class IndustrialSawmillRecipes extends RecipeMethods {
|
|||
|
||||
@Nonnull
|
||||
public static ItemStack findMatchingRecipe(InventoryCrafting inv) {
|
||||
for(IRecipe recipe : CraftingManager.field_193380_a){
|
||||
if (recipe.matches(inv, null)) {
|
||||
for (IRecipe recipe : CraftingManager.field_193380_a) {
|
||||
if (recipe.matches(inv, null)) {
|
||||
return recipe.getCraftingResult(inv);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,9 +86,9 @@ public abstract class RecipeMethods {
|
|||
} else if (type == Type.NUGGET) {
|
||||
object = "nugget" + StringUtils.toFirstCapital(name);
|
||||
}
|
||||
if(object != null){
|
||||
if(object instanceof String){
|
||||
if(OreUtil.doesOreExistAndValid((String) object)){
|
||||
if (object != null) {
|
||||
if (object instanceof String) {
|
||||
if (OreUtil.doesOreExistAndValid((String) object)) {
|
||||
return object;
|
||||
}
|
||||
} else {
|
||||
|
@ -136,7 +136,7 @@ public abstract class RecipeMethods {
|
|||
}
|
||||
|
||||
static ItemStack getStack(Item item, int count, boolean wildcard) {
|
||||
return getStack(item, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
|
||||
return getStack(item, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
|
||||
}
|
||||
|
||||
static ItemStack getStack(Item item, int count, int metadata) {
|
||||
|
@ -156,7 +156,7 @@ public abstract class RecipeMethods {
|
|||
}
|
||||
|
||||
static ItemStack getStack(Block block, int count, boolean wildcard) {
|
||||
return getStack(block, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
|
||||
return getStack(block, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
|
||||
}
|
||||
|
||||
static ItemStack getStack(Block block, int count, int metadata) {
|
||||
|
|
|
@ -37,24 +37,24 @@ import techreborn.lib.ModInfo;
|
|||
public class RollingMachineRecipes extends RecipeMethods {
|
||||
public static void init() {
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "cupronickel_heating_coil"), getMaterial("cupronickel_heating_coil", 3, Type.PART), "NCN", "C C", "NCN", 'N', "ingotNickel", 'C', "ingotCopper");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "nichrome_heating_coil"),getMaterial("nichrome_heating_coil", 2, Type.PART), " N ", "NCN", " N ", 'N', "ingotNickel", 'C', "ingotChrome");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "nichrome_heating_coil"), getMaterial("nichrome_heating_coil", 2, Type.PART), " N ", "NCN", " N ", 'N', "ingotNickel", 'C', "ingotChrome");
|
||||
if (oresExist("ingotAluminum")) {
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "kanthal_heating_coil"),getMaterial("kanthal_heating_coil", 3, Type.PART), "RRR", "CAA", "CCA", 'R', "ingotRefinedIron", 'C', "ingotChrome", 'A', "ingotAluminum");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "kanthal_heating_coil"), getMaterial("kanthal_heating_coil", 3, Type.PART), "RRR", "CAA", "CCA", 'R', "ingotRefinedIron", 'C', "ingotChrome", 'A', "ingotAluminum");
|
||||
}
|
||||
if (oresExist("ingotAluminium")) {
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "kanthal_heating_coil2"),getMaterial("kanthal_heating_coil", 3, Type.PART), "RRR", "CAA", "CCA", 'R', "ingotRefinedIron", 'C', "ingotChrome", 'A', "ingotAluminium");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "kanthal_heating_coil2"), getMaterial("kanthal_heating_coil", 3, Type.PART), "RRR", "CAA", "CCA", 'R', "ingotRefinedIron", 'C', "ingotChrome", 'A', "ingotAluminium");
|
||||
}
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "rail"),getStack(Blocks.RAIL, 24), "I I", "ISI", "I I", 'I', "ingotIron", 'S', "stickWood");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "gold_rail"),getStack(Blocks.GOLDEN_RAIL, 8), "I I", "ISI", "IRI", 'I', "ingotGold", 'S', "stickWood", 'R', "dustRedstone");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "detector_rail"),getStack(Blocks.DETECTOR_RAIL, 8), "I I", "IPI", "IRI", 'I', "ingotIron", 'P', getStack(Blocks.STONE_PRESSURE_PLATE), 'R', "dustRedstone");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "activator_rail"),getStack(Blocks.ACTIVATOR_RAIL, 8), "ISI", "IRI", "ISI", 'I', "ingotIron", 'S', "stickWood", 'R', getStack(Blocks.REDSTONE_TORCH));
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "iron_bars"),getStack(Blocks.IRON_BARS, 24), "III", "III", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "iron_door"),getStack(Items.IRON_DOOR, 4), "II ", "II ", "II ", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "minecart"),getStack(Items.MINECART, 2), "I I", "III", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "bucket"),getStack(Items.BUCKET, 2), "I I", "I I", " I ", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "tripwire_hook"),getStack(Blocks.TRIPWIRE_HOOK, 4), " I ", " S ", " W ", 'I', "ingotIron", 'S', "stickWood", 'W', "plankWood");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "heavy_pressure_plate"),getStack(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, 2), "II ", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "light_pressure_plate"),getStack(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, 2), "GG ", 'G', "ingotGold");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "rail"), getStack(Blocks.RAIL, 24), "I I", "ISI", "I I", 'I', "ingotIron", 'S', "stickWood");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "gold_rail"), getStack(Blocks.GOLDEN_RAIL, 8), "I I", "ISI", "IRI", 'I', "ingotGold", 'S', "stickWood", 'R', "dustRedstone");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "detector_rail"), getStack(Blocks.DETECTOR_RAIL, 8), "I I", "IPI", "IRI", 'I', "ingotIron", 'P', getStack(Blocks.STONE_PRESSURE_PLATE), 'R', "dustRedstone");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "activator_rail"), getStack(Blocks.ACTIVATOR_RAIL, 8), "ISI", "IRI", "ISI", 'I', "ingotIron", 'S', "stickWood", 'R', getStack(Blocks.REDSTONE_TORCH));
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "iron_bars"), getStack(Blocks.IRON_BARS, 24), "III", "III", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "iron_door"), getStack(Items.IRON_DOOR, 4), "II ", "II ", "II ", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "minecart"), getStack(Items.MINECART, 2), "I I", "III", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "bucket"), getStack(Items.BUCKET, 2), "I I", "I I", " I ", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "tripwire_hook"), getStack(Blocks.TRIPWIRE_HOOK, 4), " I ", " S ", " W ", 'I', "ingotIron", 'S', "stickWood", 'W', "plankWood");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "heavy_pressure_plate"), getStack(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, 2), "II ", 'I', "ingotIron");
|
||||
register(new ResourceLocation(ModInfo.MOD_ID, "light_pressure_plate"), getStack(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, 2), "GG ", 'G', "ingotGold");
|
||||
}
|
||||
|
||||
static void register(ResourceLocation resourceLocation, ItemStack output, Object... componentsObjects) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue