mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-10-27 14:53:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
377fe3c27a | ||
|
|
4dbca55ab1 |
No files matched your search
+1
-1
@@ -18,7 +18,7 @@ buildscript {
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'scala'
|
||||
|
||||
version = "0.9.0"
|
||||
version = "0.9.2"
|
||||
|
||||
if (project.hasProperty('buildnum')) {
|
||||
project.version = project.version + '.' + project.buildnum
|
||||
|
||||
@@ -18,7 +18,7 @@ trait TileDataSlots extends TileExtended {
|
||||
val dataSlots = mutable.HashMap.empty[String, DataSlot]
|
||||
var lastChange = 0L
|
||||
|
||||
final val TRACE = true
|
||||
final val TRACE = false
|
||||
|
||||
def doSave(kind: UpdateKind.Value, t: NBTTagCompound) {
|
||||
for ((n, s) <- dataSlots if s.updateKind.contains(kind)) {
|
||||
|
||||
@@ -14,3 +14,12 @@ class Point(val x: Int, val y: Int) {
|
||||
def +(that: Point) = new Point(this.x + that.x, this.y + that.y)
|
||||
def -(that: Point) = new Point(this.x - that.x, this.y - that.y)
|
||||
}
|
||||
|
||||
object Point {
|
||||
|
||||
import language.implicitConversions
|
||||
|
||||
implicit def awt2point(p: java.awt.Point): Point = new Point(p.x, p.y)
|
||||
implicit def point2awt(p: Point): java.awt.Point = new java.awt.Point(p.x, p.y)
|
||||
implicit def tuple2point(p: (Int, Int)): Point = new Point(p._1, p._2)
|
||||
}
|
||||
@@ -13,4 +13,6 @@ class Rect(val x: Int, val y: Int, val w: Int, val h: Int) {
|
||||
def this(p: Point, w: Int, h: Int) = this(p.x, p.y, w, h)
|
||||
def contains(p: Point) = p.x >= x && p.y >= y && p.x <= x + w && p.y <= y + h
|
||||
def origin = new Point(x, y)
|
||||
def +(p: Point) = new Rect(origin + p, w, h)
|
||||
def -(p: Point) = new Rect(origin - p, w, h)
|
||||
}
|
||||
Reference in new issue
Block a user