fix buggy anvils
This commit is contained in:
parent
2d476cbf8a
commit
cb88dc3a4f
1 changed files with 11 additions and 1 deletions
|
@ -15,6 +15,8 @@ import common.model.Model.ModelProvider;
|
||||||
import common.model.ModelRotation;
|
import common.model.ModelRotation;
|
||||||
import common.properties.Property;
|
import common.properties.Property;
|
||||||
import common.util.LocalPos;
|
import common.util.LocalPos;
|
||||||
|
import common.util.BoundingBox;
|
||||||
|
import common.util.Clientside;
|
||||||
import common.util.ExtMath;
|
import common.util.ExtMath;
|
||||||
import common.util.Facing;
|
import common.util.Facing;
|
||||||
import common.world.IWorldAccess;
|
import common.world.IWorldAccess;
|
||||||
|
@ -84,7 +86,10 @@ public class BlockAnvil extends BlockFalling implements Rotatable
|
||||||
|
|
||||||
public void setBlockBounds(IWorldAccess worldIn, LocalPos pos)
|
public void setBlockBounds(IWorldAccess worldIn, LocalPos pos)
|
||||||
{
|
{
|
||||||
Facing enumfacing = (Facing)worldIn.getState(pos).getValue(FACING);
|
State state = worldIn.getState(pos);
|
||||||
|
if(state.getBlock() != this)
|
||||||
|
return;
|
||||||
|
Facing enumfacing = (Facing)state.getValue(FACING);
|
||||||
|
|
||||||
if (enumfacing.getAxis() == Facing.Axis.X)
|
if (enumfacing.getAxis() == Facing.Axis.X)
|
||||||
{
|
{
|
||||||
|
@ -106,6 +111,11 @@ public class BlockAnvil extends BlockFalling implements Rotatable
|
||||||
worldIn.playEffect(1022, pos, 0);
|
worldIn.playEffect(1022, pos, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BoundingBox getCollisionBox(World world, LocalPos pos, State state) {
|
||||||
|
this.setBlockBounds(world, pos);
|
||||||
|
return super.getCollisionBox(world, pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canRender(IWorldAccess worldIn, LocalPos pos, Facing side)
|
public boolean canRender(IWorldAccess worldIn, LocalPos pos, Facing side)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue