Skip to content

Commit

Permalink
spotless apply
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 committed Sep 5, 2024
1 parent e132494 commit 2219251
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 102 deletions.
194 changes: 128 additions & 66 deletions src/main/java/com/github/bartimaeusnek/cropspp/Cropspp.java
Original file line number Diff line number Diff line change
@@ -1,27 +1,5 @@
package com.github.bartimaeusnek.cropspp;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.github.bartimaeusnek.cropspp.GTHandler.CropItemList;
import com.github.bartimaeusnek.cropspp.GTHandler.GTHandler;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropGeneExtractor;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropReplicator;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropSynthesiser;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropWeedPicker;
import com.github.bartimaeusnek.cropspp.commands.EnableDebug;
import com.github.bartimaeusnek.cropspp.croploader.CropLoader;
import com.github.bartimaeusnek.cropspp.fluids.CppFluids;
import com.github.bartimaeusnek.cropspp.items.CppItems;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;

import static gregtech.api.enums.MetaTileEntityIDs.cropGeneExtractorEV;
import static gregtech.api.enums.MetaTileEntityIDs.cropGeneExtractorHV;
import static gregtech.api.enums.MetaTileEntityIDs.cropGeneExtractorIV;
Expand Down Expand Up @@ -50,6 +28,27 @@
import static gregtech.api.enums.MetaTileEntityIDs.cropSynthesiserUV;
import static gregtech.api.enums.MetaTileEntityIDs.cropSynthesiserZPM;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.github.bartimaeusnek.cropspp.GTHandler.CropItemList;
import com.github.bartimaeusnek.cropspp.GTHandler.GTHandler;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropGeneExtractor;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropReplicator;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropSynthesiser;
import com.github.bartimaeusnek.cropspp.GTHandler.machines.CropWeedPicker;
import com.github.bartimaeusnek.cropspp.commands.EnableDebug;
import com.github.bartimaeusnek.cropspp.croploader.CropLoader;
import com.github.bartimaeusnek.cropspp.items.CppItems;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;

@Mod(
modid = Cropspp.modID,
name = Cropspp.name,
Expand Down Expand Up @@ -79,91 +78,154 @@ public final class Cropspp {
public void preInit(FMLPreInitializationEvent preinit) {
CropLoader.load(preinit);
CropItemList.cropGeneExtractorLV.set(
new CropGeneExtractor(cropGeneExtractorLV.ID, "Basic Crop Gene Extractor", "Basic Crop Gene Extractor", 1)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorLV.ID,
"Basic Crop Gene Extractor",
"Basic Crop Gene Extractor",
1).getStackForm(1));
CropItemList.cropGeneExtractorMV.set(
new CropGeneExtractor(cropGeneExtractorMV.ID, "Advanced Crop Gene Extractor I", "Advanced Crop Gene Extractor I", 2)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorMV.ID,
"Advanced Crop Gene Extractor I",
"Advanced Crop Gene Extractor I",
2).getStackForm(1));
CropItemList.cropGeneExtractorHV.set(
new CropGeneExtractor(cropGeneExtractorHV.ID, "Advanced Crop Gene Extractor II", "Advanced Crop Gene Extractor II", 3)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorHV.ID,
"Advanced Crop Gene Extractor II",
"Advanced Crop Gene Extractor II",
3).getStackForm(1));
CropItemList.cropGeneExtractorEV.set(
new CropGeneExtractor(cropGeneExtractorEV.ID, "Advanced Crop Gene Extractor III", "Advanced Crop Gene Extractor III", 4)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorEV.ID,
"Advanced Crop Gene Extractor III",
"Advanced Crop Gene Extractor III",
4).getStackForm(1));
CropItemList.cropGeneExtractorIV.set(
new CropGeneExtractor(cropGeneExtractorIV.ID, "Advanced Crop Gene Extractor IV", "Advanced Crop Gene Extractor IV", 5)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorIV.ID,
"Advanced Crop Gene Extractor IV",
"Advanced Crop Gene Extractor IV",
5).getStackForm(1));
CropItemList.cropGeneExtractorLuV.set(
new CropGeneExtractor(cropGeneExtractorLuV.ID, "Advanced Crop Gene Extractor V", "Advanced Crop Gene Extractor V", 6)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorLuV.ID,
"Advanced Crop Gene Extractor V",
"Advanced Crop Gene Extractor V",
6).getStackForm(1));
CropItemList.cropGeneExtractorZPM.set(
new CropGeneExtractor(cropGeneExtractorZPM.ID, "Advanced Crop Gene Extractor VI", "Advanced Crop Gene Extractor VI", 7)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorZPM.ID,
"Advanced Crop Gene Extractor VI",
"Advanced Crop Gene Extractor VI",
7).getStackForm(1));
CropItemList.cropGeneExtractorUV.set(
new CropGeneExtractor(cropGeneExtractorUV.ID, "Advanced Crop Gene Extractor VII", "Advanced Crop Gene Extractor VII", 8)
.getStackForm(1));
new CropGeneExtractor(
cropGeneExtractorUV.ID,
"Advanced Crop Gene Extractor VII",
"Advanced Crop Gene Extractor VII",
8).getStackForm(1));
CropItemList.cropGeneExtractorUHV.set(
new CropGeneExtractor(
cropGeneExtractorUHV.ID,
"Advanced Crop Gene Extractor VIII",
"Advanced Crop Gene Extractor VIII",
9).getStackForm(1));

CropItemList.cropReplicatorLV
.set(new CropReplicator(cropReplicatorLV.ID, "Basic Crop Replicator", "Basic Crop Replicator", 1).getStackForm(1));
CropItemList.cropReplicatorLV.set(
new CropReplicator(cropReplicatorLV.ID, "Basic Crop Replicator", "Basic Crop Replicator", 1)
.getStackForm(1));
CropItemList.cropReplicatorMV.set(
new CropReplicator(cropReplicatorMV.ID, "Advanced Crop Replicator I", "Advanced Crop Replicator I", 2)
.getStackForm(1));
CropItemList.cropReplicatorHV.set(
new CropReplicator(cropReplicatorHV.ID, "Advanced Crop Replicator II", "Advanced Crop Replicator II", 3)
.getStackForm(1));
CropItemList.cropReplicatorEV.set(
new CropReplicator(cropReplicatorEV.ID, "Advanced Crop Replicator III", "Advanced Crop Replicator III", 4)
.getStackForm(1));
new CropReplicator(
cropReplicatorEV.ID,
"Advanced Crop Replicator III",
"Advanced Crop Replicator III",
4).getStackForm(1));
CropItemList.cropReplicatorIV.set(
new CropReplicator(cropReplicatorIV.ID, "Advanced Crop Replicator IV", "Advanced Crop Replicator IV", 5)
.getStackForm(1));
CropItemList.cropReplicatorLuV.set(
new CropReplicator(cropReplicatorLuV.ID, "Advanced Crop Replicator V", "Advanced Crop Replicator V", 6)
.getStackForm(1));
CropItemList.cropReplicatorZPM.set(
new CropReplicator(cropReplicatorZPM.ID, "Advanced Crop Replicator VI", "Advanced Crop Replicator VI", 7)
.getStackForm(1));
new CropReplicator(
cropReplicatorZPM.ID,
"Advanced Crop Replicator VI",
"Advanced Crop Replicator VI",
7).getStackForm(1));
CropItemList.cropReplicatorUV.set(
new CropReplicator(cropReplicatorUV.ID, "Advanced Crop Replicator VII", "Advanced Crop Replicator VII", 8)
.getStackForm(1));
new CropReplicator(
cropReplicatorUV.ID,
"Advanced Crop Replicator VII",
"Advanced Crop Replicator VII",
8).getStackForm(1));
CropItemList.cropReplicatorUHV.set(
new CropReplicator(cropReplicatorUHV.ID, "Advanced Crop Replicator VIII", "Advanced Crop Replicator VIII", 9)
.getStackForm(1));
new CropReplicator(
cropReplicatorUHV.ID,
"Advanced Crop Replicator VIII",
"Advanced Crop Replicator VIII",
9).getStackForm(1));

CropItemList.cropSynthesiserLV.set(
new CropSynthesiser(cropSynthesiserLV.ID, "Basic Crop Synthesiser", "Basic Crop Synthesiser", 1).getStackForm(1));
CropItemList.cropSynthesiserMV.set(
new CropSynthesiser(cropSynthesiserMV.ID, "Advanced Crop Synthesiser I", "Advanced Crop Synthesiser I", 2)
new CropSynthesiser(cropSynthesiserLV.ID, "Basic Crop Synthesiser", "Basic Crop Synthesiser", 1)
.getStackForm(1));
CropItemList.cropSynthesiserMV.set(
new CropSynthesiser(
cropSynthesiserMV.ID,
"Advanced Crop Synthesiser I",
"Advanced Crop Synthesiser I",
2).getStackForm(1));
CropItemList.cropSynthesiserHV.set(
new CropSynthesiser(cropSynthesiserHV.ID, "Advanced Crop Synthesiser II", "Advanced Crop Synthesiser II", 3)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserHV.ID,
"Advanced Crop Synthesiser II",
"Advanced Crop Synthesiser II",
3).getStackForm(1));
CropItemList.cropSynthesiserEV.set(
new CropSynthesiser(cropSynthesiserEV.ID, "Advanced Crop Synthesiser III", "Advanced Crop Synthesiser III", 4)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserEV.ID,
"Advanced Crop Synthesiser III",
"Advanced Crop Synthesiser III",
4).getStackForm(1));
CropItemList.cropSynthesiserIV.set(
new CropSynthesiser(cropSynthesiserIV.ID, "Advanced Crop Synthesiser IV", "Advanced Crop Synthesiser IV", 5)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserIV.ID,
"Advanced Crop Synthesiser IV",
"Advanced Crop Synthesiser IV",
5).getStackForm(1));
CropItemList.cropSynthesiserLuV.set(
new CropSynthesiser(cropSynthesiserLuV.ID, "Advanced Crop Synthesiser V", "Advanced Crop Synthesiser V", 6)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserLuV.ID,
"Advanced Crop Synthesiser V",
"Advanced Crop Synthesiser V",
6).getStackForm(1));
CropItemList.cropSynthesiserZPM.set(
new CropSynthesiser(cropSynthesiserZPM.ID, "Advanced Crop Synthesiser VI", "Advanced Crop Synthesiser VI", 7)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserZPM.ID,
"Advanced Crop Synthesiser VI",
"Advanced Crop Synthesiser VI",
7).getStackForm(1));
CropItemList.cropSynthesiserUV.set(
new CropSynthesiser(cropSynthesiserUV.ID, "Advanced Crop Synthesiser VII", "Advanced Crop Synthesiser VII", 8)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserUV.ID,
"Advanced Crop Synthesiser VII",
"Advanced Crop Synthesiser VII",
8).getStackForm(1));
CropItemList.cropSynthesiserUHV.set(
new CropSynthesiser(cropSynthesiserUHV.ID, "Advanced Crop Synthesiser VIII", "Advanced Crop Synthesiser VIII", 9)
.getStackForm(1));
new CropSynthesiser(
cropSynthesiserUHV.ID,
"Advanced Crop Synthesiser VIII",
"Advanced Crop Synthesiser VIII",
9).getStackForm(1));

CropItemList.cropWeedPicker.set(new CropWeedPicker(12528, "Basic CropWeedPicker", "Basic CropWeedPicker", 1).getStackForm(1));
CropItemList.cropWeedPicker
.set(new CropWeedPicker(12528, "Basic CropWeedPicker", "Basic CropWeedPicker", 1).getStackForm(1));

CppItems.register_Items();
CppItems.OreDictItems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
import ic2.core.Ic2Items;

public class GTCraftingRecipeLoader implements Runnable {

private static final String aTextCableHull = "CMC";
private static final String aTextWireHull = "WMW";
private static final String aTextWireChest = "WTW";
private static final String aTextMotorWire = "EWE";


private static final long bitsd = GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE
| GTModHandler.RecipeBits.REVERSIBLE;

Expand Down Expand Up @@ -104,8 +104,7 @@ public void run() {
bitsd,
new Object[] { "CFC", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_MV, 'F',
ItemList.Field_Generator_MV, 'E', ItemList.Emitter_MV, 'C',
OrePrefixes.circuit.get(Materials.HV), 'W',
OrePrefixes.cableGt04.get(Materials.AnyCopper) });
OrePrefixes.circuit.get(Materials.HV), 'W', OrePrefixes.cableGt04.get(Materials.AnyCopper) });
GTModHandler.addCraftingRecipe(
CropItemList.cropReplicatorHV.get(1L),
bitsd,
Expand All @@ -117,15 +116,13 @@ public void run() {
bitsd,
new Object[] { "CFC", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_EV, 'F',
ItemList.Field_Generator_EV, 'E', ItemList.Emitter_EV, 'C',
OrePrefixes.circuit.get(Materials.IV), 'W',
OrePrefixes.cableGt04.get(Materials.Aluminium) });
OrePrefixes.circuit.get(Materials.IV), 'W', OrePrefixes.cableGt04.get(Materials.Aluminium) });
GTModHandler.addCraftingRecipe(
CropItemList.cropReplicatorIV.get(1L),
bitsd,
new Object[] { "CFC", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_IV, 'F',
ItemList.Field_Generator_IV, 'E', ItemList.Emitter_IV, 'C',
OrePrefixes.circuit.get(Materials.LuV), 'W',
OrePrefixes.cableGt04.get(Materials.Tungsten) });
OrePrefixes.circuit.get(Materials.LuV), 'W', OrePrefixes.cableGt04.get(Materials.Tungsten) });
GTModHandler.addCraftingRecipe(
CropItemList.cropReplicatorLuV.get(1L),
bitsd,
Expand All @@ -138,8 +135,7 @@ public void run() {
bitsd,
new Object[] { "CFC", aTextCableHull, aTextMotorWire, 'M', ItemList.Hull_ZPM, 'F',
ItemList.Field_Generator_ZPM, 'E', ItemList.Emitter_ZPM, 'C',
OrePrefixes.circuit.get(Materials.UV), 'W',
OrePrefixes.cableGt04.get(Materials.Naquadah) });
OrePrefixes.circuit.get(Materials.UV), 'W', OrePrefixes.cableGt04.get(Materials.Naquadah) });
GTModHandler.addCraftingRecipe(
CropItemList.cropReplicatorUV.get(1L),
bitsd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,12 @@ public static void load(FMLPreInitializationEvent preinit) {
bHasCropObj.add(c.tConfig.get("Crops", setnames().get(i), true).getBoolean(true));
}
bHasCropObj.add(c.tConfig.get("Crops", "Bonsai", true).getBoolean(true));
c.tConfig.addCustomCategoryComment(
"Gain",
"""
Set custom gain modifiers here:
Tinker's Construct Berries' Gain is not modified by All Crops.
Primordial Berry's gain is absolut
Primordial Berry's growth time is divided by 4, in IC2 groth points. F.e. 10 = 40GP per groth-period
IC2 groth points are calculated by 3 + random 0-7 + statGrowth per 256ticks""");
c.tConfig.addCustomCategoryComment("Gain", """
Set custom gain modifiers here:
Tinker's Construct Berries' Gain is not modified by All Crops.
Primordial Berry's gain is absolut
Primordial Berry's growth time is divided by 4, in IC2 groth points. F.e. 10 = 40GP per groth-period
IC2 groth points are calculated by 3 + random 0-7 + statGrowth per 256ticks""");
ConfigValues.BerryGain = (float) c.tConfig.get("Gain", "All crops", (float) 1).getDouble(1);
ConfigValues.TConstructBerryGain = (float) c.tConfig.get("Gain", "Tinker's Construct berries", (float) 1)
.getDouble(1);
Expand Down
Loading

0 comments on commit 2219251

Please sign in to comment.