Skip to content

Commit

Permalink
Fixed hoppers breaking the cobble/gravel/sand/dirt blocks instead of …
Browse files Browse the repository at this point in the history
…being crushed by them if they are in the process of pressing olives.
  • Loading branch information
Kittychanley committed Oct 5, 2015
1 parent aeab79d commit 16bab62
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Common/com/bioxx/tfc/TileEntities/TEHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
import cpw.mods.fml.relauncher.SideOnly;

import com.bioxx.tfc.Blocks.Devices.BlockChestTFC;
import com.bioxx.tfc.Blocks.Terrain.BlockCobble;
import com.bioxx.tfc.Blocks.Terrain.BlockDirt;
import com.bioxx.tfc.Blocks.Terrain.BlockGravel;
import com.bioxx.tfc.Blocks.Terrain.BlockSmooth;
import com.bioxx.tfc.Core.TFC_Core;
import com.bioxx.tfc.api.Food;
import com.bioxx.tfc.api.TFCBlocks;
import com.bioxx.tfc.api.TFCFluids;
import com.bioxx.tfc.api.TFCItems;

Expand Down Expand Up @@ -301,12 +304,11 @@ else if(pressCooldown == 0 && pressBlock != null)
Block blockAbove = worldObj.getBlock(xCoord, yCoord+1, zCoord);
if(blockAbove != null && this.hasPressableItem() > 0)
{
if(pressBlock != null)
if (pressBlock != null && !(blockAbove instanceof BlockCobble || blockAbove instanceof BlockGravel || blockAbove instanceof BlockSand || blockAbove instanceof BlockDirt))
{
TFC_Core.setBlockToAirWithDrops(worldObj, xCoord, yCoord+1, zCoord);
}
else if (blockAbove == TFCBlocks.stoneIgInSmooth || blockAbove == TFCBlocks.stoneSedSmooth ||
blockAbove == TFCBlocks.stoneMMSmooth || blockAbove == TFCBlocks.stoneIgExSmooth)
else if (blockAbove instanceof BlockSmooth)
{
pressBlock = new ItemStack(blockAbove, 1, worldObj.getBlockMetadata(xCoord, yCoord+1, zCoord));
worldObj.setBlockToAir(xCoord, yCoord+1, zCoord);
Expand Down

0 comments on commit 16bab62

Please sign in to comment.