Major Update for Cable Rendering.
TESRs will are no longer used if the tile contains no dynamic renders. Added alpha pass rendering for stained glass. Enabled Stained Glass facades. Cables / Facades have less geometry by hiding faces on connected boxes. Added AlphaPass Option to disable AlphaPass Cables rendering ( fixes crash with Immbis Microblocks. )
This commit is contained in:
@@ -26,6 +26,7 @@ import appeng.api.parts.SelectedPart;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.helpers.AEMultiTile;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.hooks.TickHandler;
|
||||
@@ -74,6 +75,7 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
// worldObj.updateAllLightTypes( xCoord, yCoord, zCoord );
|
||||
}
|
||||
|
||||
updateTileSetting();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -85,6 +87,32 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
||||
|
||||
};
|
||||
|
||||
protected void updateTileSetting()
|
||||
{
|
||||
if ( cb.requiresDynamicRender )
|
||||
{
|
||||
TileCableBus tcb;
|
||||
try
|
||||
{
|
||||
tcb = (TileCableBus) BlockCableBus.tesrTile.newInstance();
|
||||
tcb.copyFrom( this );
|
||||
getWorldObj().setTileEntity( xCoord, yCoord, zCoord, tcb );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void copyFrom(TileCableBus oldTile)
|
||||
{
|
||||
CableBusContainer tmpCB = cb;
|
||||
cb = oldTile.cb;
|
||||
oldLV = oldTile.oldLV;
|
||||
oldTile.cb = tmpCB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReady()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user