From de6e90a000b6a6c7c5f314cb8e4b311304cd775a Mon Sep 17 00:00:00 2001 From: Muramasa Date: Mon, 18 Jul 2016 19:00:53 +0100 Subject: Ore system rewrite --- src/main/java/gregtech/api/util/GT_BaseCrop.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_BaseCrop.java b/src/main/java/gregtech/api/util/GT_BaseCrop.java index 304a0f3c62..c106816ba2 100644 --- a/src/main/java/gregtech/api/util/GT_BaseCrop.java +++ b/src/main/java/gregtech/api/util/GT_BaseCrop.java @@ -7,7 +7,7 @@ import gregtech.api.enums.ConfigCategories; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.objects.ItemData; -import gregtech.common.blocks.GT_Block_Ores; +import gregtech.common.blocks.GT_Block_Ores_Abstract; import gregtech.common.blocks.GT_TileEntity_Ores; import ic2.api.crops.CropCard; import ic2.api.crops.Crops; @@ -200,7 +200,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo { } for (int i = 1; i < this.getrootslength(aCrop); i++) { Block tBlock = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); - if ((tBlock instanceof GT_Block_Ores)) { + if ((tBlock instanceof GT_Block_Ores_Abstract)) { TileEntity tTileEntity = aCrop.getWorld().getTileEntity(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ); if ((tTileEntity instanceof GT_TileEntity_Ores)) { Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)]; -- cgit From 248ce596a5f1be0ce511b30f61157d999f424b25 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Thu, 21 Jul 2016 07:24:42 +0100 Subject: Ore System Rewrite part 2 Lots of ore system changes Added Marble/Basalt gen Ore Mixes can now have a specified biome name that they can only spawn in --- src/main/java/gregtech/api/util/GT_Config.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_Config.java b/src/main/java/gregtech/api/util/GT_Config.java index f4631f5de6..23a43f7085 100644 --- a/src/main/java/gregtech/api/util/GT_Config.java +++ b/src/main/java/gregtech/api/util/GT_Config.java @@ -80,6 +80,18 @@ public class GT_Config implements Runnable { return rResult; } + public String get(Object aCategory, ItemStack aStack, String aDefault) { + return get(aCategory, getStackConfigName(aStack), aDefault); + } + + public String get(Object aCategory, String aName, String aDefault) { + if (GT_Utility.isStringInvalid(aName)) return aDefault; + Property tProperty = mConfig.get(aCategory.toString().replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); + String rResult = tProperty.getString(); + if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + return rResult; + } + @Override public void run() { mConfig.save(); -- cgit