Fixed crops

This commit is contained in:
TheDarkDnKTv 2021-03-13 08:33:19 +02:00
parent 9bcfcfa3dd
commit 3185adc613
22 changed files with 68 additions and 31 deletions

View file

@ -264,12 +264,15 @@ public class GT_Mod implements IGT_Mod {
File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg");
Configuration tConfig1 = new Configuration(tFile);
tConfig1.load();
GregTech_API.sRecipeFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "DynamicConfig.cfg")));
GregTech_API.sMachineFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "MachineStats.cfg")));
GregTech_API.sWorldgenFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "WorldGeneration.cfg")));
GregTech_API.sMaterialProperties = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "MaterialProperties.cfg")));
GregTech_API.sUnification = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Unification.cfg")));
GregTech_API.sSpecialFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Other.cfg")));
File gtDir = new File(aEvent.getModConfigurationDirectory(), "GregTech");
GregTech_API.sRecipeFile = new GT_Config(new Configuration(new File(gtDir, "DynamicConfig.cfg")));
GregTech_API.sMachineFile = new GT_Config(new Configuration(new File(gtDir, "MachineStats.cfg")));
GregTech_API.sWorldgenFile = new GT_Config(new Configuration(new File(gtDir, "WorldGeneration.cfg")));
GregTech_API.sMaterialProperties = new GT_Config(new Configuration(new File(gtDir, "MaterialProperties.cfg")));
GregTech_API.sUnification = new GT_Config(new Configuration(new File(gtDir, "Unification.cfg")));
GregTech_API.sSpecialFile = new GT_Config(new Configuration(new File(gtDir, "Other.cfg")));
GregTech_API.sIDFile = new GT_Config(GT_Config.sConfigFileIDs = new Configuration(new File(gtDir, "IDs.cfg")));
mDoNotInit = (!tFile.getAbsolutePath().toLowerCase().contains("voltz")) && (tFile.getAbsolutePath().toLowerCase().contains(".technic") || tFile.getAbsolutePath().toLowerCase().contains("tekkit"));
if (mDoNotInit) {
@ -294,7 +297,7 @@ public class GT_Mod implements IGT_Mod {
return;
}
GT_Log.mOreDictLogFile = new File(aEvent.getModConfigurationDirectory().getParentFile(), "OreDict.log");
GT_Log.mOreDictLogFile = new File(aEvent.getModConfigurationDirectory().getParentFile(), "logs/GT_OreDict.log");
if(!GT_Log.mOreDictLogFile.exists()) {
try {
GT_Log.mOreDictLogFile.createNewFile();

View file

@ -77,7 +77,7 @@ public class GregTech_API {
public static boolean DEBUG_MODE = false, SECONDARY_DEBUG_MODE = false, IC_ENERGY_COMPATIBILITY = true, RF_ENERGY_COMPATIBILITY = true;
/** The Configuration Objects */
public static GT_Config sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, sSpecialFile = null, sRecipeFile = null;
public static GT_Config sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null, sSpecialFile = null, sRecipeFile = null, sIDFile = null;
/** Because Minecraft changed it from -1 to that Value */
public static final short ITEM_WILDCARD_DAMAGE = OreDictionary.WILDCARD_VALUE;

View file

@ -7,9 +7,13 @@ import ic2.api.crops.ICropTile;
import java.util.ArrayList;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class GT_BaseCrop extends CropCard {
private String mName = "", mDiscoveredBy = "Gregorius Techneticies", mAttributes[];
@ -51,6 +55,7 @@ public class GT_BaseCrop extends CropCard {
mAttributes = aAttributes;
if (!Crops.instance.registerCrop(this, aID)) throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!");
if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, aID, 1, 1, 1, 1);
sCropList.add(this);
}
}
@ -129,7 +134,18 @@ public class GT_BaseCrop extends CropCard {
}
return false;
}
@Override
@SideOnly(Side.CLIENT)
public void registerSprites(IIconRegister iconRegister) {
textures = new IIcon[maxSize()];
for (int i = 1; i <= textures.length; i++) {
String name = GT_Utility.capitalizeString(mName.substring(9));
textures[i - 1] = iconRegister.registerIcon("ic2:crop/blockCrop." + name + "."+i);
}
}
@Override
public int getOptimalHavestSize(ICropTile crop) {
return (byte)mAfterHarvestSize;

View file

@ -1,5 +1,6 @@
package gregtechmod.loaders.postload;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.util.GT_BaseCrop;
import gregtechmod.api.util.GT_Log;
import gregtechmod.api.util.GT_OreDictUnificator;
@ -13,31 +14,29 @@ public class GT_CropLoader implements Runnable {
public void run() {
GT_Log.log.info("GT_Mod: Register Crops to IC2.");
try {
new GT_BaseCrop(124, "Indigo" , "Eloraam" , GT_MetaItem_Material.instance.getStack(8, 1) , null , GT_MetaItem_Material.instance.getStack(8, 4) , 2, 4, 0, 1, 4, 1, 1, 0, 4, 0, new String[] {"Flower", "Color", "Ingredient"});
new GT_BaseCrop(125, "Flax" , "Eloraam" , new ItemStack(Items.string, 1) , null , null , 2, 4, 0, 1, 4, 1, 1, 2, 0, 1, new String[] {"Silk", "Vine", "Addictive"});
new GT_BaseCrop(126, "Oilberries" , "Spacetoad" , GT_MetaItem_Material.instance.getStack(7, 1) , null , null , 9, 4, 0, 1, 4, 6, 1, 2, 1,12, new String[] {"Fire", "Dark", "Reed", "Rotten", "Coal", "Oil"});
new GT_BaseCrop(127, "Bobsyeruncleranks", "GenerikB" , GT_OreDictUnificator.get("dustSmallEmerald",1), new ItemStack[] {new ItemStack(Items.emerald, 1)} , null ,11, 4, 0, 1, 4, 4, 0, 8, 2, 9, new String[] {"Shiny", "Vine", "Emerald", "Berylium", "Crystal"});
new GT_BaseCrop(128, "Diareed" , "Direwolf20" , GT_OreDictUnificator.get("dustSmallDiamond",1), new ItemStack[] {new ItemStack(Items.diamond, 1)} , null ,12, 4, 0, 1, 4, 5, 0,10, 2,10, new String[] {"Fire", "Shiny", "Reed", "Coal", "Diamond", "Crystal"});
new GT_BaseCrop(129, "Withereed" , "CovertJaguar" , GT_OreDictUnificator.get("dustCoal", 1) , new ItemStack[] {new ItemStack(Items.coal, 1), new ItemStack(Items.coal, 1)} , null , 8, 4, 0, 1, 4, 2, 0, 4, 1, 3, new String[] {"Fire", "Undead", "Reed", "Coal", "Rotten", "Wither"});
new GT_BaseCrop(130, "Blazereed" , "Mr. Brain" , new ItemStack(Items.blaze_powder, 1) , new ItemStack[] {new ItemStack(Items.blaze_rod, 1)} , null , 6, 4, 0, 1, 4, 0, 4, 1, 0, 0, new String[] {"Fire", "Blaze", "Reed", "Sulfur"});
new GT_BaseCrop(131, "Eggplant" , "Link" , new ItemStack(Items.egg, 1) , new ItemStack[] {new ItemStack(Items.chicken, 1), new ItemStack(Items.feather , 1), new ItemStack(Items.feather , 1), new ItemStack(Items.feather , 1)} , null , 6, 3, 900, 2, 3, 0, 4, 1, 0, 0, new String[] {"Chicken", "Egg", "Edible", "Feather", "Flower", "Addictive"});
new GT_BaseCrop(132, "Corium" , "Gregorius Techneticies" , new ItemStack(Items.leather, 1) , null , null , 6, 4, 0, 1, 4, 0, 2, 3, 1, 0, new String[] {"Cow", "Silk", "Vine"});
new GT_BaseCrop(133, "Corpseplant" , "Mr. Kenny" , new ItemStack(Items.rotten_flesh, 1) , new ItemStack[] {new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.bone, 1)} , null , 5, 4, 0, 1, 4, 0, 2, 1, 0, 3, new String[] {"Toxic", "Undead", "Vine", "Edible", "Rotten"});
new GT_BaseCrop(134, "Creeperweed" , "General Spaz" , GT_OreDictUnificator.get("dustGunpowder", 1) , null , null , 7, 4, 0, 1, 4, 3, 0, 5, 1, 3, new String[] {"Creeper", "Vine", "Explosive", "Fire", "Sulfur", "Saltpeter", "Coal"});
new GT_BaseCrop(135, "Enderbloom" , "RichardG" , GT_OreDictUnificator.get("dustEnderPearl", 1) , new ItemStack[] {new ItemStack(Items.ender_pearl, 1), new ItemStack(Items.ender_pearl , 1), new ItemStack(Items.ender_eye , 1)} , null ,10, 4, 0, 1, 4, 5, 0, 2, 1, 6, new String[] {"Ender", "Flower", "Shiny"});
new GT_BaseCrop(136, "Meatrose" , "VintageBeef" , new ItemStack(Items.dye, 1, 9) , new ItemStack[] {new ItemStack(Items.beef, 1), new ItemStack(Items.porkchop , 1), new ItemStack(Items.chicken , 1), new ItemStack(Items.fish , 1)} , null , 7, 4, 1500, 1, 4, 0, 4, 1, 3, 0, new String[] {"Edible", "Flower", "Cow", "Fish", "Chicken", "Pig"});
new GT_BaseCrop(137, "Milkwart" , "Mr. Brain" , new ItemStack(Items.milk_bucket, 1) , null , null , 6, 3, 900, 1, 3, 0, 3, 0, 1, 0, new String[] {"Edible", "Milk", "Cow"});
new GT_BaseCrop(138, "Slimeplant" , "Neowulf" , new ItemStack(Items.slime_ball, 1) , null , null , 6, 4, 0, 3, 4, 3, 0, 0, 0, 2, new String[] {"Slime", "Bouncy", "Sticky", "Bush"});
new GT_BaseCrop(139, "Spidernip" , "Mr. Kenny" , new ItemStack(Items.string, 1) , new ItemStack[] {new ItemStack(Items.spider_eye, 1), new ItemStack(Blocks.web , 1)} , null , 4, 4, 600, 1, 4, 2, 1, 4, 1, 3, new String[] {"Toxic", "Silk", "Spider", "Flower", "Ingredient", "Addictive"});
new GT_BaseCrop(140, "Tearstalks" , "Neowulf" , new ItemStack(Items.ghast_tear, 1) , null , null , 8, 4, 0, 1, 4, 1, 2, 0, 0, 0, new String[] {"Healing", "Nether", "Ingredient", "Reed", "Ghast"});
new GT_BaseCrop(141, "Tine" , "Gregorius Techneticies" , GT_OreDictUnificator.get("nuggetTin", 1) , null , null , 5, 3, 0, 2, 3, 2, 0, 3, 0, 0, new String[] {"Shiny", "Metal", "Pine", "Tin", "Bush"});
new GT_BaseCrop(142, "Coppon" , "Mr. Brain" , GT_OreDictUnificator.get("nuggetCopper", 1) , null , null , 6, 3, 0, 2, 3, 2, 0, 1, 1, 1, new String[] {"Shiny", "Metal", "Cotton", "Copper", "Bush"});
new GT_BaseCrop(143, "Brown Mushrooms" , "Mr. Brain" , new ItemStack(Blocks.brown_mushroom, 1) , null , new ItemStack(Blocks.brown_mushroom, 4) , 1, 3, 0, 1, 3, 0, 2, 0, 0, 2, new String[] {"Edible", "Mushroom", "Ingredient"});
new GT_BaseCrop(144, "Red Mushrooms" , "Mr. Kenny" , new ItemStack(Blocks.red_mushroom, 1) , null , new ItemStack(Blocks.red_mushroom , 4) , 1, 3, 0, 1, 3, 0, 1, 3, 0, 2, new String[] {"Toxic", "Mushroom", "Ingredient"});
new GT_BaseCrop(145, "Argentia" , "Eloraam" , GT_OreDictUnificator.get("nuggetSilver", 1) , null , null , 7, 4, 0, 3, 4, 2, 0, 1, 0, 0, new String[] {"Shiny", "Metal", "Silver", "Reed"});
new GT_BaseCrop(146, "Plumbilia" , "KingLemming" , GT_OreDictUnificator.get("nuggetLead", 1) , null , null , 6, 4, 0, 3, 4, 2, 0, 3, 1, 1, new String[] {"Heavy", "Metal", "Lead", "Reed"});
new GT_BaseCrop(124, "gt_crops.indigo" , "Eloraam" , GT_MetaItem_Material.instance.getStack(8, 1) , null , GT_MetaItem_Material.instance.getStack(8, 4) , 2, 4, 0, 1, 4, 1, 1, 0, 4, 0, new String[] {"Flower", "Color", "Ingredient"});
new GT_BaseCrop(125, "gt_crops.flax" , "Eloraam" , new ItemStack(Items.string, 1) , null , null , 2, 4, 0, 1, 4, 1, 1, 2, 0, 1, new String[] {"Silk", "Vine", "Addictive"});
new GT_BaseCrop(126, "gt_crops.oilberries" , "Spacetoad" , GT_MetaItem_Material.instance.getStack(7, 1) , null , null , 9, 4, 0, 1, 4, 6, 1, 2, 1,12, new String[] {"Fire", "Dark", "Reed", "Rotten", "Coal", "Oil"});
new GT_BaseCrop(127, "gt_crops.bobsyeruncleranks" , "GenerikB" , GT_OreDictUnificator.get("dustSmallEmerald",1), new ItemStack[] {new ItemStack(Items.emerald, 1)} , null ,11, 4, 0, 1, 4, 4, 0, 8, 2, 9, new String[] {"Shiny", "Vine", "Emerald", "Berylium", "Crystal"});
new GT_BaseCrop(128, "gt_crops.diareed" , "Direwolf20" , GT_OreDictUnificator.get("dustSmallDiamond",1), new ItemStack[] {new ItemStack(Items.diamond, 1)} , null ,12, 4, 0, 1, 4, 5, 0,10, 2,10, new String[] {"Fire", "Shiny", "Reed", "Coal", "Diamond", "Crystal"});
new GT_BaseCrop(129, "gt_crops.withereed" , "CovertJaguar" , GT_OreDictUnificator.get("dustCoal", 1) , new ItemStack[] {new ItemStack(Items.coal, 1), new ItemStack(Items.coal, 1)} , null , 8, 4, 0, 1, 4, 2, 0, 4, 1, 3, new String[] {"Fire", "Undead", "Reed", "Coal", "Rotten", "Wither"});
new GT_BaseCrop(130, "gt_crops.blazereed" , "Mr. Brain" , new ItemStack(Items.blaze_powder, 1) , new ItemStack[] {new ItemStack(Items.blaze_rod, 1)} , null , 6, 4, 0, 1, 4, 0, 4, 1, 0, 0, new String[] {"Fire", "Blaze", "Reed", "Sulfur"});
new GT_BaseCrop(131, "gt_crops.eggplant" , "Link" , new ItemStack(Items.egg, 1) , new ItemStack[] {new ItemStack(Items.chicken, 1), new ItemStack(Items.feather , 1), new ItemStack(Items.feather , 1), new ItemStack(Items.feather , 1)} , null , 6, 3, 900, 2, 3, 0, 4, 1, 0, 0, new String[] {"Chicken", "Egg", "Edible", "Feather", "Flower", "Addictive"});
new GT_BaseCrop(132, "gt_crops.corium" , "Gregorius Techneticies" , new ItemStack(Items.leather, 1) , null , null , 6, 4, 0, 1, 4, 0, 2, 3, 1, 0, new String[] {"Cow", "Silk", "Vine"});
new GT_BaseCrop(133, "gt_crops.corpseplant" , "Mr. Kenny" , new ItemStack(Items.rotten_flesh, 1) , new ItemStack[] {new ItemStack(Items.dye, 1, 15), new ItemStack(Items.dye, 1, 15), new ItemStack(Items.bone, 1)} , null , 5, 4, 0, 1, 4, 0, 2, 1, 0, 3, new String[] {"Toxic", "Undead", "Vine", "Edible", "Rotten"});
new GT_BaseCrop(134, "gt_crops.creeperweed" , "General Spaz" , GT_OreDictUnificator.get("dustGunpowder", 1) , null , null , 7, 4, 0, 1, 4, 3, 0, 5, 1, 3, new String[] {"Creeper", "Vine", "Explosive", "Fire", "Sulfur", "Saltpeter", "Coal"});
new GT_BaseCrop(135, "gt_crops.enderbloom" , "RichardG" , GT_OreDictUnificator.get("dustEnderPearl", 1) , new ItemStack[] {new ItemStack(Items.ender_pearl, 1), new ItemStack(Items.ender_pearl , 1), new ItemStack(Items.ender_eye , 1)} , null ,10, 4, 0, 1, 4, 5, 0, 2, 1, 6, new String[] {"Ender", "Flower", "Shiny"});
new GT_BaseCrop(136, "gt_crops.meatrose" , "VintageBeef" , new ItemStack(Items.dye, 1, 9) , new ItemStack[] {new ItemStack(Items.beef, 1), new ItemStack(Items.porkchop , 1), new ItemStack(Items.chicken , 1), new ItemStack(Items.fish , 1)} , null , 7, 4, 1500, 1, 4, 0, 4, 1, 3, 0, new String[] {"Edible", "Flower", "Cow", "Fish", "Chicken", "Pig"});
new GT_BaseCrop(137, "gt_crops.milkwart" , "Mr. Brain" , new ItemStack(Items.milk_bucket, 1) , null , null , 6, 3, 900, 1, 3, 0, 3, 0, 1, 0, new String[] {"Edible", "Milk", "Cow"});
new GT_BaseCrop(138, "gt_crops.slimeplant" , "Neowulf" , new ItemStack(Items.slime_ball, 1) , null , null , 6, 4, 0, 3, 4, 3, 0, 0, 0, 2, new String[] {"Slime", "Bouncy", "Sticky", "Bush"});
new GT_BaseCrop(139, "gt_crops.spidernip" , "Mr. Kenny" , new ItemStack(Items.string, 1) , new ItemStack[] {new ItemStack(Items.spider_eye, 1), new ItemStack(Blocks.web , 1)} , null , 4, 4, 600, 1, 4, 2, 1, 4, 1, 3, new String[] {"Toxic", "Silk", "Spider", "Flower", "Ingredient", "Addictive"});
new GT_BaseCrop(140, "gt_crops.tearstalks" , "Neowulf" , new ItemStack(Items.ghast_tear, 1) , null , null , 8, 4, 0, 1, 4, 1, 2, 0, 0, 0, new String[] {"Healing", "Nether", "Ingredient", "Reed", "Ghast"});
new GT_BaseCrop(141, "gt_crops.tine" , "Gregorius Techneticies" , GT_OreDictUnificator.get("nuggetTin", 1) , null , null , 5, 3, 0, 2, 3, 2, 0, 3, 0, 0, new String[] {"Shiny", "Metal", "Pine", "Tin", "Bush"});
} catch(Throwable e) {
GT_Log.log.error("GT_Mod: Failed to register Crops to IC2.");
if (GregTech_API.DEBUG_MODE) {
GT_Log.log.catching(e);
}
}
}
}

View file

@ -1416,6 +1416,25 @@ item.GT_SensorCard_Item.tooltip.info.1=Device at:
item.GT_SensorCard_Item.tooltip.info.2=x: %d y: %d z: %d
item.GT_SensorCard_Item.tooltip.info.missing=Missing Coordinates!
gt_crops.indigo=Indigo
gt_crops.flax=Flax
gt_crops.oilberries=Oilberries
gt_crops.bobsyeruncleranks=Bobsyeruncleranks
gt_crops.diareed=Diareed
gt_crops.withereed=Withereed
gt_crops.blazereed=Blazereed
gt_crops.eggplant=Eggplant
gt_crops.corium=Corium
gt_crops.corpseplant=Corpseplant
gt_crops.creeperweed=Creeperweed
gt_crops.enderbloom=Enderbloom
gt_crops.meatrose=Meatrose
gt_crops.milkwart=Milkwart
gt_crops.slimeplant=Slimeplant
gt_crops.spidernip=Spidernip
gt_crops.tearstalks=Tearstalks
gt_crops.tine=Tine
metatileentity.GT_MetaTileEntity_BasicGenerator.tooltip=Generating: %d EU
metatileentity.machines.input_allow=Input from Output Side allowed
metatileentity.machines.input_deny=Input from Output Side forbidden

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B