mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-12 16:37:38 +00:00
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:
1 parent
9f93d2cbde
commit
1721ef0720
3 files changed
+9
-2
No files matched your search
@@ -103,7 +103,13 @@ object RedstoneInteractions
|
||||
if(p.isInstanceOf[IRedstonePart] && p.asInstanceOf[IRedstonePart].canConnectRedstone(side))
|
||||
{
|
||||
if(p.isInstanceOf[IFaceRedstonePart])
|
||||
return 1<<rotationTo(side&6, p.asInstanceOf[IFaceRedstonePart].getFace)
|
||||
{
|
||||
val fside = p.asInstanceOf[IFaceRedstonePart].getFace
|
||||
if((side&6) == (fside&6))
|
||||
return 0x10
|
||||
|
||||
return 1<<rotationTo(side&6, fside)
|
||||
}
|
||||
return 0x1F
|
||||
}
|
||||
return 0
|
||||
|
||||
@@ -261,6 +261,7 @@ class TileMultipart extends TileEntity
|
||||
|
||||
partRemoved(part, r)
|
||||
part.onRemoved()
|
||||
part.tile = null
|
||||
|
||||
if(partList.isEmpty)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user