mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-25 19:07:39 +00:00
Handle tile entity changes
This commit is contained in:
@@ -46,7 +46,7 @@ public abstract class BlockGeneric extends Block implements
|
||||
public final void dropBlockAsItemWithChance( World world, BlockPos pos, IBlockState state, float chance, int fortune )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final List<ItemStack> getDrops( IBlockAccess world, BlockPos pos, IBlockState state, int fortune )
|
||||
{
|
||||
@@ -107,7 +107,7 @@ public abstract class BlockGeneric extends Block implements
|
||||
{
|
||||
Block.spawnAsEntity( world, pos, stack );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final void breakBlock( World world, BlockPos pos, IBlockState newState )
|
||||
{
|
||||
@@ -162,6 +162,17 @@ public abstract class BlockGeneric extends Block implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onNeighborChange( IBlockAccess world, BlockPos pos, BlockPos neighbour )
|
||||
{
|
||||
TileEntity tile = world.getTileEntity( pos );
|
||||
if( tile instanceof TileGeneric )
|
||||
{
|
||||
TileGeneric generic = (TileGeneric)tile;
|
||||
generic.onNeighbourTileEntityChange( neighbour );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isSideSolid( IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side )
|
||||
{
|
||||
|
||||
@@ -95,6 +95,10 @@ public abstract class TileGeneric extends TileEntity
|
||||
{
|
||||
}
|
||||
|
||||
public void onNeighbourTileEntityChange( BlockPos neighbour )
|
||||
{
|
||||
}
|
||||
|
||||
public boolean isSolidOnSide( int side )
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user