
Everything is still broken, but at least we reduced the amount of errors by hundreds, if not thousands.
82 lines
2.2 KiB
Java
82 lines
2.2 KiB
Java
package WayofTime.bloodmagic.block;
|
|
|
|
import WayofTime.bloodmagic.BloodMagic;
|
|
import WayofTime.bloodmagic.client.IVariantProvider;
|
|
import WayofTime.bloodmagic.tile.TilePhantomBlock;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.BlockState;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import net.minecraft.util.BlockRenderLayer;
|
|
import net.minecraft.block.BlockRenderType;
|
|
import net.minecraft.util.Direction;
|
|
import net.minecraft.util.math.BlockPos;
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
import javax.annotation.Nullable;
|
|
import java.util.Random;
|
|
|
|
public class BlockPhantom extends Block implements IVariantProvider {
|
|
public BlockPhantom() {
|
|
super(Material.CLOTH);
|
|
|
|
setTranslationKey(BloodMagic.MODID + ".phantom");
|
|
setCreativeTab(BloodMagic.TAB_BM);
|
|
}
|
|
|
|
@Override
|
|
public boolean isNormalCube(BlockState state, IBlockAccess world, BlockPos pos) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isOpaqueCube(BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean isFullCube(BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean causesSuffocation(BlockState state) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public BlockRenderType getRenderType(BlockState state) {
|
|
return BlockRenderType.MODEL;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public BlockRenderLayer getRenderLayer() {
|
|
return BlockRenderLayer.TRANSLUCENT;
|
|
}
|
|
|
|
@Override
|
|
@SideOnly(Side.CLIENT)
|
|
public boolean shouldSideBeRendered(BlockState state, IBlockAccess world, BlockPos pos, Direction side) {
|
|
return world.getBlockState(pos.offset(side)) != state || state.getBlock() != this && super.shouldSideBeRendered(state, world, pos, side);
|
|
}
|
|
|
|
@Override
|
|
public int quantityDropped(Random par1Random) {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public boolean hasTileEntity(BlockState state) {
|
|
return true;
|
|
}
|
|
|
|
@Nullable
|
|
@Override
|
|
public TileEntity createTileEntity(World world, BlockState state) {
|
|
return new TilePhantomBlock(20);
|
|
}
|
|
}
|