Fix chunk index extracting negative y values

Make parts lose their tile reference on being removed, fixes crash with tick scheduler
This commit is contained in:
Chicken Bones committed 2013-07-30 11:20:06 +10:00
1 parent 9f93d2cbde
commit 1721ef0720
3 files changed
+9 -2

No files matched your search

+1 -1
View File
@@ -94,6 +94,6 @@ object MultipartProxy extends MultipartProxy_clientImpl
var block:BlockMultipart = _
var config:ConfigFile = _
def indexInChunk(cc:ChunkCoordIntPair, i:Int) = new BlockCoord(cc.chunkXPos<<4|i&0xF, i>>8, cc.chunkZPos<<4|(i&0xF0)>>4)
def indexInChunk(cc:ChunkCoordIntPair, i:Int) = new BlockCoord(cc.chunkXPos<<4|i&0xF, (i>>8)&0xFF, cc.chunkZPos<<4|(i&0xF0)>>4)
def indexInChunk(pos:BlockCoord) = pos.x&0xF|pos.y<<8|(pos.z&0xF)<<4
}