mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
simplified explosion stuff in multi-block implementation for fmp callbacks
This commit is contained in:
parent
61f744dcb9
commit
e702d0bf63
@ -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
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user