mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-24 05:54:25 +00:00
Redstone torch parts
Improved tick scheduler, added random update ticks
This commit is contained in:
1 parent
3fd55ce0a0
commit
5032937cfb
11 files changed
+344
-17
No files matched your search
@@ -22,13 +22,19 @@ public abstract class McSidedMetaPart extends McMetaPart
|
||||
|
||||
public void onNeighbourChanged()
|
||||
{
|
||||
TileEntity tile = getTile();
|
||||
if(!tile.worldObj.isRemote)
|
||||
if(!getTile().worldObj.isRemote)
|
||||
dropIfCantStay();
|
||||
}
|
||||
|
||||
public boolean dropIfCantStay()
|
||||
{
|
||||
BlockCoord pos = new BlockCoord(getTile()).offset(sideForMeta(meta));
|
||||
if(!getTile().worldObj.isBlockSolidOnSide(pos.x, pos.y, pos.z, ForgeDirection.getOrientation(sideForMeta(meta)^1)))
|
||||
{
|
||||
BlockCoord pos = new BlockCoord(tile).offset(sideForMeta(meta));
|
||||
if(!tile.worldObj.isBlockSolidOnSide(pos.x, pos.y, pos.z, ForgeDirection.getOrientation(sideForMeta(meta)^1)))
|
||||
drop();
|
||||
drop();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void drop()
|
||||
|
||||
Reference in new issue
Block a user