Potential fix for routing nodes (I changed nothing, but it now works). Fixed blocks that are solid that did not block sunlight.
This commit is contained in:
parent
0a2dfb4fd4
commit
8571d4d264
8 changed files with 155 additions and 12 deletions
|
@ -6,13 +6,17 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.tile.routing.TileMasterRoutingNode;
|
||||
import WayofTime.bloodmagic.tile.routing.TileRoutingNode;
|
||||
|
||||
public abstract class BlockRoutingNode extends BlockContainer
|
||||
{
|
||||
|
@ -112,4 +116,22 @@ public abstract class BlockRoutingNode extends BlockContainer
|
|||
Block block = blockState.getBlock();
|
||||
return block.getMaterial(blockState).isOpaque() && blockState.isFullCube();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState blockState)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileRoutingNode)
|
||||
{
|
||||
((TileRoutingNode) tile).removeAllConnections();
|
||||
} else if (tile instanceof TileMasterRoutingNode)
|
||||
{
|
||||
((TileMasterRoutingNode) tile).removeAllConnections();
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(world, pos, blockState);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import net.minecraft.block.state.BlockStateContainer;
|
|||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -86,12 +85,6 @@ public class BlockString extends Block
|
|||
return this.realBlockState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState()
|
||||
{
|
||||
return Blocks.air.getBlockState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue