mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 23:33:08 +00:00
Flamethrowers now properly check collisions, these things are awesome
This commit is contained in:
1 parent
f5dadf443a
commit
1675b9b1cf
3 files changed
+14
-13
No files matched your search
@@ -43,8 +43,7 @@ public class TileEntityLaser extends TileEntityElectricBlock
|
||||
LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), usage.laserUsage, worldObj);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if(getEnergy() >= usage.laserUsage)
|
||||
{
|
||||
if(!on)
|
||||
@@ -67,6 +66,7 @@ public class TileEntityLaser extends TileEntityElectricBlock
|
||||
Block blockHit = hitCoord.getBlock(worldObj);
|
||||
TileEntity tileHit = hitCoord.getTileEntity(worldObj);
|
||||
float hardness = blockHit.getBlockHardness(worldObj, hitCoord.xCoord, hitCoord.yCoord, hitCoord.zCoord);
|
||||
|
||||
if(!(hardness < 0 || (tileHit instanceof ILaserReceptor && !((ILaserReceptor)tileHit).canLasersDig())))
|
||||
{
|
||||
diggingProgress += usage.laserUsage;
|
||||
@@ -76,8 +76,7 @@ public class TileEntityLaser extends TileEntityElectricBlock
|
||||
LaserManager.breakBlock(hitCoord, true, worldObj);
|
||||
diggingProgress = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(hitCoord.xCoord, hitCoord.yCoord, hitCoord.zCoord, mop);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user