mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 17:49:48 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -16,59 +16,62 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import noppes.npcs.blocks.tiles.TileVariant;
|
||||
|
||||
public abstract class BlockRotated extends BlockContainer {
|
||||
private Block block;
|
||||
protected BlockRotated(Block block) {
|
||||
super(block.getMaterial());
|
||||
this.block = block;
|
||||
}
|
||||
private Block block;
|
||||
|
||||
public int renderId = -1;
|
||||
protected BlockRotated(Block block) {
|
||||
super(block.getMaterial());
|
||||
this.block = block;
|
||||
}
|
||||
|
||||
public int renderId = -1;
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack){
|
||||
int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * maxRotation() / 360.0F) + 0.5D) & (maxRotation() - 1);
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
|
||||
int l = MathHelper.floor_double((double) (par5EntityLivingBase.rotationYaw * maxRotation() / 360.0F) + 0.5D) & (maxRotation() - 1);
|
||||
l %= maxRotation();
|
||||
|
||||
TileVariant tile = (TileVariant) par1World.getTileEntity(par2, par3, par4);
|
||||
tile.rotation = l;
|
||||
TileVariant tile = (TileVariant) par1World.getTileEntity(par2, par3, par4);
|
||||
tile.rotation = l;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z){
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
public int maxRotation(){
|
||||
return 4;
|
||||
public int maxRotation() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return renderId;
|
||||
}
|
||||
public int getRenderType() {
|
||||
return renderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side){
|
||||
return true;
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int meta){
|
||||
public IIcon getIcon(int p_149691_1_, int meta) {
|
||||
return block.getIcon(p_149691_1_, meta);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user