Fixed Incompatibility with FMP.
This commit is contained in:
@@ -4,6 +4,7 @@ import java.util.EnumSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
@@ -75,6 +76,13 @@ public class BlockCableBus extends AEBaseBlock
|
|||||||
@Override
|
@Override
|
||||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||||
{
|
{
|
||||||
|
Block block = blocksList[world.getBlockId( x, y, z )];
|
||||||
|
if ( block != null && block != this )
|
||||||
|
{
|
||||||
|
return block.getLightValue( world, x, y, z );
|
||||||
|
}
|
||||||
|
if ( block == null )
|
||||||
|
return 0;
|
||||||
return cb( world, x, y, z ).getLightValue();
|
return cb( world, x, y, z ).getLightValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class FMP implements IIntegrationModule, IPartFactory, IPartConverter, IF
|
|||||||
MultiPartRegistry.registerConverter( this );
|
MultiPartRegistry.registerConverter( this );
|
||||||
MultiPartRegistry.registerParts( this, data );
|
MultiPartRegistry.registerParts( this, data );
|
||||||
MinecraftForge.EVENT_BUS.register( new FMPEvent() );
|
MinecraftForge.EVENT_BUS.register( new FMPEvent() );
|
||||||
// MultipartGenerator.registerPassThroughInterface( "appeng.helpers.AEMultiTile" );
|
MultipartGenerator.registerPassThroughInterface( "appeng.helpers.AEMultiTile" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -274,6 +274,8 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
|||||||
|
|
||||||
public void addToWorld()
|
public void addToWorld()
|
||||||
{
|
{
|
||||||
|
if ( inWorld )
|
||||||
|
return;
|
||||||
inWorld = true;
|
inWorld = true;
|
||||||
|
|
||||||
TileEntity te = getTile();
|
TileEntity te = getTile();
|
||||||
@@ -323,6 +325,8 @@ public class CableBusContainer implements AEMultiTile, ICableBusContainer
|
|||||||
|
|
||||||
public void removeFromWorld()
|
public void removeFromWorld()
|
||||||
{
|
{
|
||||||
|
if ( !inWorld )
|
||||||
|
return;
|
||||||
inWorld = false;
|
inWorld = false;
|
||||||
|
|
||||||
for (ForgeDirection s : ForgeDirection.values())
|
for (ForgeDirection s : ForgeDirection.values())
|
||||||
|
|||||||
Reference in New Issue
Block a user