simplified explosion stuff in multi-block implementation for fmp callbacks

This commit is contained in:
Florian Nücke 2014-03-02 18:35:35 +01:00
parent 61f744dcb9
commit e702d0bf63
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ trait Delegate {
def drops(world: World, x: Int, y: Int, z: Int, fortune: Int): Option[java.util.ArrayList[ItemStack]] = None
def explosionResistance(entity: Entity, world: World, x: Int, y: Int, z: Int, explosionX: Double, explosionY: Double, explosionZ: Double): Float = parent.getExplosionResistance(entity)
def explosionResistance(entity: Entity): Float = parent.getExplosionResistance(entity)
def isNormalCube(world: World, x: Int, y: Int, z: Int) = true

View File

@ -136,7 +136,7 @@ class Delegator[Child <: Delegate](id: Int) extends Block(id, Material.iron) {
override def getExplosionResistance(entity: Entity, world: World, x: Int, y: Int, z: Int, explosionX: Double, explosionY: Double, explosionZ: Double) =
subBlock(world, x, y, z) match {
case Some(subBlock) => subBlock.explosionResistance(entity, world, x, y, z, explosionX, explosionY, explosionZ)
case Some(subBlock) => subBlock.explosionResistance(entity)
case _ => super.getExplosionResistance(entity, world, x, y, z, explosionX, explosionY, explosionZ)
}

View File

@ -71,7 +71,7 @@ class RobotProxy(val parent: SpecialDelegator) extends RedstoneAware with Specia
// ----------------------------------------------------------------------- //
override def explosionResistance(entity: Entity, world: World, x: Int, y: Int, z: Int, explosionX: Double, explosionY: Double, explosionZ: Double) = 10f
override def explosionResistance(entity: Entity) = 10f
override def isNormalCube(world: World, x: Int, y: Int, z: Int) = false