From 2cf455aa66b7d78286923bb873cffabcd997edc6 Mon Sep 17 00:00:00 2001 From: Ethryan <3237986+Ethryan@users.noreply.github.com> Date: Wed, 22 May 2024 21:42:42 +0200 Subject: Implementation: Raw Ore Items as Ore Drops (#2502) * testing * Fix textures * Adding Drops, still need to add furnace recipe * Need to fix the multiple smelting recipes. otherwise stuff works. * part 2 * Remove wip block code I added * Moved it to a new processing file * Fix Oredict and add a stone dust chance output. And added a config option for fortune bonus. * Finally got Spotless to work * fix config system set it in gregtech config with oredropbehaviour in gregtech.cfg * Added new option and an option that returns it to the old behaviour. * Moved the raw ores to meta3 since meta1 was full. (MetaID range fix) * Fixing the MBM to only process small ores with fortune. * New config option * try to fix the recipes not working on Zeta * Implement Caedis Fortune fix * Added comment * Spotless * Fix stone dust amount from macerator * Adding Raw ore to the OreFactory (Untested) * spotless * Update this to actually drop the amount number of stack, instead of the stack set to the amount * New Random function for fortune and shapeless crushing recipes for the raw ores. * Fix * Actually make the block per dimension. * Fix an () issue. And make this actually work ingame. and not just randomly. * Change back drops Ned to look into Silk Touch more * Enable Silk Touch * Wth Spotless?, THIS made you complain? --- .../multi/GT_MetaTileEntity_IntegratedOreFactory.java | 4 ++++ .../multi/GT_MetaTileEntity_OreDrillingPlantBase.java | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/tileentities/machines/multi') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java index 9ea42c6a00..27998e97e1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java @@ -163,6 +163,10 @@ public class GT_MetaTileEntity_IntegratedOreFactory extends for (ItemStack stack : OreDictionary.getOres(name)) { isOre.add(GT_Utility.stackToInt(stack)); } + } else if (name.startsWith("rawOre")) { + for (ItemStack stack : OreDictionary.getOres(name)) { + isOre.add(GT_Utility.stackToInt(stack)); + } } } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java index 045374823f..9c15d2b6eb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java @@ -503,7 +503,16 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile final int blockMeta = getBaseMetaTileEntity().getMetaID(posX, posY, posZ); if (oreBlock.canSilkHarvest(getBaseMetaTileEntity().getWorld(), null, posX, posY, posZ, blockMeta)) { return Collections.singleton(new ItemStack(oreBlock, 1, blockMeta)); - } else return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, mTier + 3); + } + if (oreBlock instanceof GT_Block_Ores_Abstract) { + TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(posX, posY, posZ); + if (tTileEntity instanceof GT_TileEntity_Ores && ((GT_TileEntity_Ores) tTileEntity).mMetaData >= 16000) { + // GT_Log.out.println("Running Small Ore"); + return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, mTier + 3); + } + } + // GT_Log.out.println("Running Normal Ore"); + return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, 0); } private boolean tryConsumeDrillingFluid(boolean simulate) { -- cgit