diff options
Diffstat (limited to 'src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets')
5 files changed, 43 insertions, 45 deletions
diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGFlowerBucket.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGFlowerBucket.java index 1c5588c335..9b96317f00 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGFlowerBucket.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGFlowerBucket.java @@ -11,7 +11,7 @@ import net.minecraft.nbt.NBTTagCompound; import kubatech.api.eig.EIGBucket; import kubatech.api.eig.EIGDropTable; import kubatech.api.eig.IEIGBucketFactory; -import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeIndustrialGreenhouse; +import kubatech.tileentity.gregtech.multiblock.MTEExtremeIndustrialGreenhouse; public class EIGFlowerBucket extends EIGBucket { @@ -27,7 +27,7 @@ public class EIGFlowerBucket extends EIGBucket { } @Override - public EIGBucket tryCreateBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack input) { + public EIGBucket tryCreateBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack input) { // Check if input is a flower, reed or cacti. They all drop their source item multiplied by their seed count Item item = input.getItem(); Block block = Block.getBlockFromItem(item); @@ -67,7 +67,7 @@ public class EIGFlowerBucket extends EIGBucket { } @Override - public boolean revalidate(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public boolean revalidate(MTEExtremeIndustrialGreenhouse greenhouse) { return this.isValid(); } } diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGIC2Bucket.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGIC2Bucket.java index 7daa524d5d..8c58f911c5 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGIC2Bucket.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGIC2Bucket.java @@ -17,11 +17,11 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.oredict.OreDictionary; -import gregtech.api.GregTech_API; +import gregtech.api.GregTechAPI; import gregtech.api.enums.ItemList; -import gregtech.common.blocks.GT_Block_Ores_Abstract; -import gregtech.common.blocks.GT_Item_Ores; -import gregtech.common.blocks.GT_TileEntity_Ores; +import gregtech.common.blocks.BlockOresAbstract; +import gregtech.common.blocks.ItemOres; +import gregtech.common.blocks.TileEntityOres; import ic2.api.crops.CropCard; import ic2.api.crops.Crops; import ic2.core.Ic2Items; @@ -31,7 +31,7 @@ import ic2.core.crop.TileEntityCrop; import kubatech.api.eig.EIGBucket; import kubatech.api.eig.EIGDropTable; import kubatech.api.eig.IEIGBucketFactory; -import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeIndustrialGreenhouse; +import kubatech.tileentity.gregtech.multiblock.MTEExtremeIndustrialGreenhouse; public class EIGIC2Bucket extends EIGBucket { @@ -85,7 +85,7 @@ public class EIGIC2Bucket extends EIGBucket { } @Override - public EIGBucket tryCreateBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack input) { + public EIGBucket tryCreateBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack input) { // Check if input is a seed. if (!ItemList.IC2_Crop_Seeds.isStackEqual(input, true, true)) return null; if (!input.hasTagCompound()) return null; @@ -130,7 +130,7 @@ public class EIGIC2Bucket extends EIGBucket { this.isValid = false; } - private EIGIC2Bucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack seed) { + private EIGIC2Bucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack seed) { super(seed, 1, null); this.useNoHumidity = greenhouse.isInNoHumidityMode(); this.recalculateDrops(greenhouse); @@ -184,7 +184,7 @@ public class EIGIC2Bucket extends EIGBucket { } @Override - public boolean revalidate(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public boolean revalidate(MTEExtremeIndustrialGreenhouse greenhouse) { this.recalculateDrops(greenhouse); return this.isValid(); } @@ -197,9 +197,9 @@ public class EIGIC2Bucket extends EIGBucket { /** * (Re-)calculates the pre-generated drop table for this bucket. * - * @param greenhouse The {@link GT_MetaTileEntity_ExtremeIndustrialGreenhouse} that contains this bucket. + * @param greenhouse The {@link MTEExtremeIndustrialGreenhouse} that contains this bucket. */ - public void recalculateDrops(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public void recalculateDrops(MTEExtremeIndustrialGreenhouse greenhouse) { this.isValid = false; World world = greenhouse.getBaseMetaTileEntity() .getWorld(); @@ -216,7 +216,7 @@ public class EIGIC2Bucket extends EIGBucket { boolean cheating = false; FakeTileEntityCrop crop; try { - if (world.getBlock(xyz[0], xyz[1] - 2, xyz[2]) != GregTech_API.sBlockCasings4 + if (world.getBlock(xyz[0], xyz[1] - 2, xyz[2]) != GregTechAPI.sBlockCasings4 || world.getBlockMetadata(xyz[0], xyz[1] - 2, xyz[2]) != 1) { // no cheating = true; @@ -376,7 +376,7 @@ public class EIGIC2Bucket extends EIGBucket { e.printStackTrace(System.err); } finally { // always reset the world to it's original state - if (!cheating) world.setBlock(xyz[0], xyz[1] - 2, xyz[2], GregTech_API.sBlockCasings4, 1, 0); + if (!cheating) world.setBlock(xyz[0], xyz[1] - 2, xyz[2], GregTechAPI.sBlockCasings4, 1, 0); // world.setBlockToAir(xyz[0], xyz[1], xyz[2]); } } @@ -396,19 +396,18 @@ public class EIGIC2Bucket extends EIGBucket { Block b = Block.getBlockFromItem(item); if (b == Blocks.air || !(item instanceof ItemBlock)) return false; short tDamage = (short) item.getDamage(stack); - if (item instanceof GT_Item_Ores && tDamage > 0) { + if (item instanceof ItemOres && tDamage > 0) { if (!world.setBlock( x, y, z, b, - GT_TileEntity_Ores.getHarvestData( - tDamage, - ((GT_Block_Ores_Abstract) b).getBaseBlockHarvestLevel(tDamage % 16000 / 1000)), + TileEntityOres + .getHarvestData(tDamage, ((BlockOresAbstract) b).getBaseBlockHarvestLevel(tDamage % 16000 / 1000)), 0)) { return false; } - GT_TileEntity_Ores tTileEntity = (GT_TileEntity_Ores) world.getTileEntity(x, y, z); + TileEntityOres tTileEntity = (TileEntityOres) world.getTileEntity(x, y, z); tTileEntity.mMetaData = tDamage; tTileEntity.mNatural = false; } else world.setBlock(x, y, z, b, tDamage, 0); @@ -716,10 +715,10 @@ public class EIGIC2Bucket extends EIGBucket { * @see EIGIC2Bucket#IS_ON_WET_FARMLAND * @see EIGIC2Bucket#WATER_STORAGE_VALUE * @see TileEntityCrop#updateHumidity() - * @param greenhouse The {@link GT_MetaTileEntity_ExtremeIndustrialGreenhouse} that holds the seed. + * @param greenhouse The {@link MTEExtremeIndustrialGreenhouse} that holds the seed. * @return The humidity environmental value at the controller's location. */ - public static byte getHumidity(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, boolean useNoHumidity) { + public static byte getHumidity(MTEExtremeIndustrialGreenhouse greenhouse, boolean useNoHumidity) { if (useNoHumidity) return 0; int value = Crops.instance.getHumidityBiomeBonus( greenhouse.getBaseMetaTileEntity() @@ -738,10 +737,10 @@ public class EIGIC2Bucket extends EIGBucket { * @see EIGIC2Bucket#NUMBER_OF_DIRT_BLOCKS_UNDER * @see EIGIC2Bucket#FERTILIZER_STORAGE_VALUE * @see TileEntityCrop#updateNutrients() - * @param greenhouse The {@link GT_MetaTileEntity_ExtremeIndustrialGreenhouse} that holds the seed. + * @param greenhouse The {@link MTEExtremeIndustrialGreenhouse} that holds the seed. * @return The nutrient environmental value at the controller's location. */ - public static byte getNutrients(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public static byte getNutrients(MTEExtremeIndustrialGreenhouse greenhouse) { int value = Crops.instance.getNutrientBiomeBonus( greenhouse.getBaseMetaTileEntity() .getBiome()); @@ -756,10 +755,10 @@ public class EIGIC2Bucket extends EIGBucket { * @see EIGIC2Bucket#CROP_OBSTRUCTION_VALUE * @see EIGIC2Bucket#CROP_CAN_SEE_SKY * @see TileEntityCrop#updateAirQuality() - * @param greenhouse The {@link GT_MetaTileEntity_ExtremeIndustrialGreenhouse} that holds the seed. + * @param greenhouse The {@link MTEExtremeIndustrialGreenhouse} that holds the seed. * @return The air quality environmental value at the controller's location. */ - public static byte getAirQuality(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public static byte getAirQuality(MTEExtremeIndustrialGreenhouse greenhouse) { // clamp height bonus to 0-4, use the height of the crop itself // TODO: check if we want to add the extra +2 for the actual height of the crop stick in the EIG. int value = Math.max( @@ -784,8 +783,7 @@ public class EIGIC2Bucket extends EIGBucket { public Set<String> reqBlockOreDict = new HashSet<>(); private int lightLevel = 15; - public FakeTileEntityCrop(EIGIC2Bucket bucket, GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, - int[] xyz) { + public FakeTileEntityCrop(EIGIC2Bucket bucket, MTEExtremeIndustrialGreenhouse greenhouse, int[] xyz) { super(); this.isValid = false; this.ticker = 1; diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGRainbowCactusBucket.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGRainbowCactusBucket.java index 6342080722..b3ad861551 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGRainbowCactusBucket.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGRainbowCactusBucket.java @@ -10,7 +10,7 @@ import net.minecraft.nbt.NBTTagCompound; import kubatech.api.eig.EIGBucket; import kubatech.api.eig.EIGDropTable; import kubatech.api.eig.IEIGBucketFactory; -import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeIndustrialGreenhouse; +import kubatech.tileentity.gregtech.multiblock.MTEExtremeIndustrialGreenhouse; import tb.common.block.BlockRainbowCactus; import tb.init.TBBlocks; @@ -30,7 +30,7 @@ public class EIGRainbowCactusBucket extends EIGBucket { } @Override - public EIGBucket tryCreateBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack input) { + public EIGBucket tryCreateBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack input) { // check if input is rainbow cacti; if (!(Block.getBlockFromItem(input.getItem()) instanceof BlockRainbowCactus)) return null; return new EIGRainbowCactusBucket(input, 1); @@ -54,7 +54,7 @@ public class EIGRainbowCactusBucket extends EIGBucket { } @Override - public boolean revalidate(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public boolean revalidate(MTEExtremeIndustrialGreenhouse greenhouse) { return this.isValid(); } diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGSeedBucket.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGSeedBucket.java index 51b4a7162a..831569a4ae 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGSeedBucket.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGSeedBucket.java @@ -20,12 +20,12 @@ import net.minecraft.world.World; import net.minecraftforge.common.IPlantable; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.util.GT_Utility; -import gregtech.common.GT_DummyWorld; +import gregtech.api.util.GTUtility; +import gregtech.common.GTDummyWorld; import kubatech.api.eig.EIGBucket; import kubatech.api.eig.EIGDropTable; import kubatech.api.eig.IEIGBucketFactory; -import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeIndustrialGreenhouse; +import kubatech.tileentity.gregtech.multiblock.MTEExtremeIndustrialGreenhouse; public class EIGSeedBucket extends EIGBucket { @@ -44,7 +44,7 @@ public class EIGSeedBucket extends EIGBucket { } @Override - public EIGBucket tryCreateBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack input) { + public EIGBucket tryCreateBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack input) { return new EIGSeedBucket(greenhouse, input); } @@ -58,7 +58,7 @@ public class EIGSeedBucket extends EIGBucket { private boolean isValid = false; private EIGDropTable drops = new EIGDropTable(); - private EIGSeedBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack seed) { + private EIGSeedBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack seed) { super(seed, 1, null); this.recalculateDrops(greenhouse); } @@ -94,12 +94,12 @@ public class EIGSeedBucket extends EIGBucket { } @Override - public boolean revalidate(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public boolean revalidate(MTEExtremeIndustrialGreenhouse greenhouse) { this.recalculateDrops(greenhouse); return this.isValid(); } - public void recalculateDrops(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public void recalculateDrops(MTEExtremeIndustrialGreenhouse greenhouse) { this.isValid = false; int optimalGrowthMetadata = 7; // Get the relevant item and block for this item. @@ -164,7 +164,7 @@ public class EIGSeedBucket extends EIGBucket { IRecipe[] validRecipes = CraftingManager.getInstance() .getRecipeList() .parallelStream() - .filter(recipe -> GT_Utility.areStacksEqual(recipe.getRecipeOutput(), seed)) + .filter(recipe -> GTUtility.areStacksEqual(recipe.getRecipeOutput(), seed)) .toArray(IRecipe[]::new); // if no recipes outputs the input seed, abort. @@ -233,7 +233,7 @@ public class EIGSeedBucket extends EIGBucket { public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {} } - private static class GreenHouseWorld extends GT_DummyWorld { + private static class GreenHouseWorld extends GTDummyWorld { public int x, y, z, meta = 0; public Block block; diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGStemBucket.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGStemBucket.java index e0ebcf8652..b132243a66 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGStemBucket.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/eigbuckets/EIGStemBucket.java @@ -14,7 +14,7 @@ import kubatech.api.IBlockStemAccesor; import kubatech.api.eig.EIGBucket; import kubatech.api.eig.EIGDropTable; import kubatech.api.eig.IEIGBucketFactory; -import kubatech.tileentity.gregtech.multiblock.GT_MetaTileEntity_ExtremeIndustrialGreenhouse; +import kubatech.tileentity.gregtech.multiblock.MTEExtremeIndustrialGreenhouse; public class EIGStemBucket extends EIGBucket { @@ -31,7 +31,7 @@ public class EIGStemBucket extends EIGBucket { } @Override - public EIGBucket tryCreateBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack input) { + public EIGBucket tryCreateBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack input) { // Check if input is a flower, reed or cacti. They all drop their source item multiplied by their seed count Item item = input.getItem(); if (!(item instanceof IPlantable)) return null; @@ -54,7 +54,7 @@ public class EIGStemBucket extends EIGBucket { private boolean isValid = false; private EIGDropTable drops = new EIGDropTable(); - private EIGStemBucket(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse, ItemStack input) { + private EIGStemBucket(MTEExtremeIndustrialGreenhouse greenhouse, ItemStack input) { super(input, 1, null); recalculateDrops(greenhouse); } @@ -92,7 +92,7 @@ public class EIGStemBucket extends EIGBucket { } @Override - public boolean revalidate(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public boolean revalidate(MTEExtremeIndustrialGreenhouse greenhouse) { recalculateDrops(greenhouse); return this.isValid(); } @@ -102,7 +102,7 @@ public class EIGStemBucket extends EIGBucket { * * @param greenhouse The greenhouse that houses this bucket. */ - public void recalculateDrops(GT_MetaTileEntity_ExtremeIndustrialGreenhouse greenhouse) { + public void recalculateDrops(MTEExtremeIndustrialGreenhouse greenhouse) { this.isValid = false; Item item = this.seed.getItem(); if (!(item instanceof IPlantable)) return; |