Anvil Model + Push Attributes

This commit is contained in:
Kam committed 2025-02-12 17:39:33 -05:00
1 parent 4905b9400a
commit 5dd260bb42
19 files changed
+275 -98

No files matched your search

@@ -15,7 +15,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import noppes.npcs.blocks.tiles.TileColorable;
public abstract class BlockRotated extends BlockContainer{
public abstract class BlockRotated extends BlockContainer {
private Block block;
protected BlockRotated(Block block) {
super(block.getMaterial());
@@ -24,38 +24,38 @@ public abstract class BlockRotated extends BlockContainer{
public int renderId = -1;
@Override
@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);
l %= maxRotation();
TileColorable tile = (TileColorable) par1World.getTileEntity(par2, par3, par4);
tile.rotation = l;
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 int maxRotation(){
return 4;
}
@Override
@Override
public boolean isOpaqueCube(){
return false;
}
@Override
@Override
public boolean renderAsNormalBlock(){
return false;
}
@Override
@Override
public int getRenderType(){
return renderId;
return renderId;
}
@Override
@Override
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side){
return true;
}
@@ -64,7 +64,7 @@ public abstract class BlockRotated extends BlockContainer{
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister par1IconRegister)
{
}
@Override
@SideOnly(Side.CLIENT)