Fixed up the Tile Entity mess a bit, still need to look at the CableBus stuff a bit though.

This commit is contained in:
Gunther De Wachter
2017-06-30 17:22:06 +02:00
parent 10e050c35b
commit 49a6df5bc7
44 changed files with 167 additions and 77 deletions
@@ -100,7 +100,6 @@ public class BlockCableBus extends AEBaseTileBlock
// this will actually be overwritten later through setupTile and the
// combined layers
this.setTileEntity( TileCableBus.class );
}
@Override
@@ -387,20 +386,22 @@ public class BlockCableBus extends AEBaseTileBlock
{
noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class );
this.setTileEntity( noTesrTile );
// TODO: Change after transition phase
Platform.registerTileEntityWithAlternatives( noTesrTile, AppEng.MOD_ID.toLowerCase() + ":" + "BlockCableBus", "BlockCableBus" );
if( Platform.isClient() )
{
setupTesr();
}
else
{
GameRegistry.registerTileEntity( noTesrTile, AppEng.MOD_ID.toLowerCase() + ":" + "BlockCableBus" );
}
}
@SideOnly( Side.CLIENT )
private static void setupTesr()
{
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class );
// TODO: Change after transition phase
Platform.registerTileEntityWithAlternatives( tesrTile, AppEng.MOD_ID.toLowerCase() + ":" + "ClientOnly_TESR_CableBus", "ClientOnly_TESR_CableBus" );
GameRegistry.registerTileEntity( tesrTile, AppEng.MOD_ID.toLowerCase() + ":" + "ClientOnly_TESR_CableBus" );
ClientRegistry.bindTileEntitySpecialRenderer( BlockCableBus.getTesrTile(), new CableBusTESR() );
}