More work on DC Grid

This commit is contained in:
Calclavia 2015-01-15 22:50:14 +08:00
parent ea2d56f4b6
commit 092669a2b4

View file

@ -21,7 +21,6 @@ import net.minecraft.util.{IIcon, MovingObjectPosition}
import net.minecraftforge.common.util.ForgeDirection import net.minecraftforge.common.util.ForgeDirection
import org.lwjgl.opengl.GL11 import org.lwjgl.opengl.GL11
import resonant.api.tile.INodeProvider import resonant.api.tile.INodeProvider
import resonant.lib.grid.UpdateTicker
import resonant.lib.grid.electric.NodeDC import resonant.lib.grid.electric.NodeDC
import scala.collection.convert.wrapAll._ import scala.collection.convert.wrapAll._
@ -287,10 +286,10 @@ class PartFlatWire extends PartAbstract with TWire with TFacePart with TNormalOc
override def getSubParts: JIterable[IndexedCuboid6] = Seq(new IndexedCuboid6(0, PartFlatWire.selectionBounds(getThickness)(side))) override def getSubParts: JIterable[IndexedCuboid6] = Seq(new IndexedCuboid6(0, PartFlatWire.selectionBounds(getThickness)(side)))
def getThickness: Int = if (insulated) 2 else 1
def getOcclusionBoxes: JIterable[Cuboid6] = Seq(PartFlatWire.occlusionBounds(getThickness)(side)) def getOcclusionBoxes: JIterable[Cuboid6] = Seq(PartFlatWire.occlusionBounds(getThickness)(side))
def getThickness: Int = if (insulated) 2 else 1
override def solid(arg0: Int) = false override def solid(arg0: Int) = false
/** /**
@ -312,6 +311,8 @@ class PartFlatWire extends PartAbstract with TWire with TFacePart with TNormalOc
return false return false
} }
def useStaticRenderer: Boolean = true
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
override def renderDynamic(pos: Vector3, frame: Float, pass: Int) override def renderDynamic(pos: Vector3, frame: Float, pass: Int)
{ {
@ -327,8 +328,6 @@ class PartFlatWire extends PartAbstract with TWire with TFacePart with TNormalOc
} }
} }
def useStaticRenderer: Boolean = true
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
override def drawBreaking(renderBlocks: RenderBlocks) override def drawBreaking(renderBlocks: RenderBlocks)
{ {
@ -345,8 +344,6 @@ class PartFlatWire extends PartAbstract with TWire with TFacePart with TNormalOc
{ {
override def reconstruct() override def reconstruct()
{ {
UpdateTicker.threaded.addUpdater(this)
if (!world.isRemote) if (!world.isRemote)
{ {
directionMap.clear() directionMap.clear()