Creative Tab Signature + Matrix Frame
This commit is contained in:
@@ -19,19 +19,24 @@
|
||||
package appeng.block.spatial;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.BlockRenderType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.shapes.ISelectionContext;
|
||||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
@@ -45,24 +50,31 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
|
||||
public BlockMatrixFrame()
|
||||
{
|
||||
super( Material.ANVIL );
|
||||
this.setResistance( 6000000.0F );
|
||||
this.setBlockUnbreakable();
|
||||
this.setLightOpacity( 0 );
|
||||
this.setOpaque( false );
|
||||
super( Properties.create(Material.ANVIL).hardnessAndResistance(-1.0F, 6000000.0F).noDrops().notSolid() );
|
||||
// FIXME this.setLightOpacity( 0 );
|
||||
// FIXME this.setOpaque( false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.INVISIBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public void getSubBlocks( final CreativeTabs tabs, final NonNullList<ItemStack> itemStacks )
|
||||
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> itemStacks)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final World w, final BlockPos pos, final Entity thePlayer, final boolean b )
|
||||
{
|
||||
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
|
||||
public VoxelShape getRaytraceShape(BlockState state, IBlockReader worldIn, BlockPos pos) {
|
||||
return VoxelShapes.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<VoxelShape> getSelectedBoundingBoxesFromPool(IBlockReader w, BlockPos pos, Entity thePlayer, boolean b ) {
|
||||
return Collections.emptyList();// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
|
||||
// } );
|
||||
}
|
||||
|
||||
@@ -73,17 +85,18 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt( final World worldIn, final BlockPos pos )
|
||||
{
|
||||
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded( final World world, final BlockPos pos, final Explosion explosion )
|
||||
public void onExplosionDestroy( final World world, final BlockPos pos, final Explosion explosion )
|
||||
{
|
||||
// Don't explode.
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy( final BlockState state, final IBlockReader world, final BlockPos pos, final Entity entity )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user