Removed unused branch code and tests
This commit is contained in:
parent
50f6dc4f28
commit
3f5c2db1b7
|
@ -2,7 +2,7 @@ package edx.electrical.transformer
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection
|
import net.minecraftforge.common.util.ForgeDirection
|
||||||
import resonant.api.tile.INodeProvider
|
import resonant.api.tile.INodeProvider
|
||||||
import resonant.lib.grid.electric.NodeDC
|
import resonant.lib.grid.energy.electric.NodeDC
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by robert on 8/11/2014.
|
* Created by robert on 8/11/2014.
|
||||||
|
|
|
@ -21,7 +21,7 @@ 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.electric.{NodeDC, NodeDCWire}
|
import resonant.lib.grid.energy.electric.{NodeDC, NodeDCWire}
|
||||||
|
|
||||||
import scala.collection.convert.wrapAll._
|
import scala.collection.convert.wrapAll._
|
||||||
|
|
||||||
|
@ -222,6 +222,28 @@ class PartFlatWire extends PartAbstract with TWire with TFacePart with TNormalOc
|
||||||
super.onChunkLoad()
|
super.onChunkLoad()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def dropIfCantStay: Boolean =
|
||||||
|
{
|
||||||
|
if (!canStay)
|
||||||
|
{
|
||||||
|
drop
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
def canStay: Boolean =
|
||||||
|
{
|
||||||
|
val pos: BlockCoord = new BlockCoord(tile).offset(side)
|
||||||
|
return MultipartUtil.canPlaceWireOnSide(world, pos.x, pos.y, pos.z, ForgeDirection.getOrientation(side ^ 1), false)
|
||||||
|
}
|
||||||
|
|
||||||
|
def drop
|
||||||
|
{
|
||||||
|
TileMultipart.dropItem(getItem, world, Vector3.fromTileEntityCenter(tile))
|
||||||
|
tile.remPart(this)
|
||||||
|
}
|
||||||
|
|
||||||
override def onAdded()
|
override def onAdded()
|
||||||
{
|
{
|
||||||
super.onAdded()
|
super.onAdded()
|
||||||
|
@ -250,28 +272,6 @@ class PartFlatWire extends PartAbstract with TWire with TFacePart with TNormalOc
|
||||||
sendPacket(3)
|
sendPacket(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
def dropIfCantStay: Boolean =
|
|
||||||
{
|
|
||||||
if (!canStay)
|
|
||||||
{
|
|
||||||
drop
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
def canStay: Boolean =
|
|
||||||
{
|
|
||||||
val pos: BlockCoord = new BlockCoord(tile).offset(side)
|
|
||||||
return MultipartUtil.canPlaceWireOnSide(world, pos.x, pos.y, pos.z, ForgeDirection.getOrientation(side ^ 1), false)
|
|
||||||
}
|
|
||||||
|
|
||||||
def drop
|
|
||||||
{
|
|
||||||
TileMultipart.dropItem(getItem, world, Vector3.fromTileEntityCenter(tile))
|
|
||||||
tile.remPart(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
def maskOpen(r: Int): Boolean =
|
def maskOpen(r: Int): Boolean =
|
||||||
{
|
{
|
||||||
return (connectionMask & 0x1000 << r) != 0
|
return (connectionMask & 0x1000 << r) != 0
|
||||||
|
|
|
@ -10,7 +10,7 @@ import edx.electrical.wire.base.TWire
|
||||||
import net.minecraft.client.renderer.RenderBlocks
|
import net.minecraft.client.renderer.RenderBlocks
|
||||||
import net.minecraft.nbt.NBTTagCompound
|
import net.minecraft.nbt.NBTTagCompound
|
||||||
import net.minecraftforge.common.util.ForgeDirection
|
import net.minecraftforge.common.util.ForgeDirection
|
||||||
import resonant.lib.grid.electric.NodeDC
|
import resonant.lib.grid.energy.electric.NodeDC
|
||||||
import resonant.lib.wrapper.BitmaskWrapper._
|
import resonant.lib.wrapper.BitmaskWrapper._
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue