From 56c008fa59f1a4c98f258d4865776211622c7f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sat, 25 Oct 2014 19:46:23 +0200 Subject: [PATCH] Should fix #625. --- src/main/scala/li/cil/oc/common/block/SimpleBlock.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/scala/li/cil/oc/common/block/SimpleBlock.scala b/src/main/scala/li/cil/oc/common/block/SimpleBlock.scala index 023ae559d..107f15965 100644 --- a/src/main/scala/li/cil/oc/common/block/SimpleBlock.scala +++ b/src/main/scala/li/cil/oc/common/block/SimpleBlock.scala @@ -203,7 +203,8 @@ class SimpleBlock(material: Material = Material.iron) extends Block(material) { bounds.maxZ.toFloat) } - final override def collisionRayTrace(world: World, x: Int, y: Int, z: Int, origin: Vec3, direction: Vec3) = + // NOTE: must not be final for immibis microblocks to work. + override def collisionRayTrace(world: World, x: Int, y: Int, z: Int, origin: Vec3, direction: Vec3) = this.synchronized(intersect(world, x, y, z, origin, direction)) protected def intersect(world: World, x: Int, y: Int, z: Int, origin: Vec3, direction: Vec3) = @@ -241,7 +242,8 @@ class SimpleBlock(material: Material = Material.iron) extends Block(material) { // ----------------------------------------------------------------------- // - final override def onBlockActivated(world: World, x: Int, y: Int, z: Int, player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float): Boolean = + // NOTE: must not be final for immibis microblocks to work. + override def onBlockActivated(world: World, x: Int, y: Int, z: Int, player: EntityPlayer, side: Int, hitX: Float, hitY: Float, hitZ: Float): Boolean = world.getTileEntity(x, y, z) match { case colored: Colored if Color.isDye(player.getHeldItem) => colored.color = Color.dyeColor(player.getHeldItem)