aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Anishin <oneeyemaker@gmail.com>2024-10-13 18:34:45 +0300
committerGitHub <noreply@github.com>2024-10-13 15:34:45 +0000
commita708d0ad7de777bf53199e2f28ceade6c08283b1 (patch)
tree3ece29aa086382b9944856808c74d5d2ea499e74 /src
parent52a4582f46de42ff19086760ac13303dfecb1593 (diff)
downloadGT5-Unofficial-a708d0ad7de777bf53199e2f28ceade6c08283b1.tar.gz
GT5-Unofficial-a708d0ad7de777bf53199e2f28ceade6c08283b1.tar.bz2
GT5-Unofficial-a708d0ad7de777bf53199e2f28ceade6c08283b1.zip
Fixed dust output of Ore Drilling Plant (#3350)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/gregtech/common/blocks/TileEntityOres.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/MTEOreDrillingPlantBase.java13
2 files changed, 17 insertions, 4 deletions
diff --git a/src/main/java/gregtech/common/blocks/TileEntityOres.java b/src/main/java/gregtech/common/blocks/TileEntityOres.java
index 9ddcbcc19c..0dbdcec1a2 100644
--- a/src/main/java/gregtech/common/blocks/TileEntityOres.java
+++ b/src/main/java/gregtech/common/blocks/TileEntityOres.java
@@ -452,6 +452,14 @@ public class TileEntityOres extends TileEntity implements IAllSidedTexturedTileE
return rList;
}
+ public ArrayList<ItemStack> getSilkTouchDrops(Block aDroppedOre) {
+ final boolean tShouldSilkTouch = TileEntityOres.shouldSilkTouch;
+ TileEntityOres.shouldSilkTouch = true;
+ final ArrayList<ItemStack> tDrops = getDrops(aDroppedOre, 0);
+ TileEntityOres.shouldSilkTouch = tShouldSilkTouch;
+ return tDrops;
+ }
+
@Override
public ITexture[] getTexture(Block aBlock) {
if (mMetadataForCachedTexture == mMetaData && mCachedTexture != null) return mCachedTexture;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEOreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEOreDrillingPlantBase.java
index 6acc48c772..116ab720f9 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEOreDrillingPlantBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEOreDrillingPlantBase.java
@@ -543,12 +543,17 @@ public abstract class MTEOreDrillingPlantBase extends MTEDrillerBase implements
}
if (oreBlock instanceof BlockOresAbstract) {
TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntity(posX, posY, posZ);
- if (tTileEntity instanceof TileEntityOres && ((TileEntityOres) tTileEntity).mMetaData >= 16000) {
- // GTLog.out.println("Running Small Ore");
- return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, mTier + 3);
+ if (tTileEntity instanceof TileEntityOres tTileEntityOres) {
+ if (tTileEntityOres.mMetaData >= 16000) {
+ // Small ore
+ return oreBlock
+ .getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, mTier + 3);
+ } else {
+ return tTileEntityOres.getSilkTouchDrops(oreBlock);
+ }
}
}
- // GTLog.out.println("Running Normal Ore");
+ // Regular ore
return oreBlock.getDrops(getBaseMetaTileEntity().getWorld(), posX, posY, posZ, blockMeta, 0);
}