Another fix for #2398 since the auto rotator doesn't actually apply to the built-in model.
This commit is contained in:
parent
18ea568e2a
commit
a22cc2cedc
|
@ -63,9 +63,10 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
|||
@Override
|
||||
protected void addInnerCube( EnumFacing side, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
EnumFacing forward = getForward( state );
|
||||
|
||||
// For sides other than the front, use the chassis texture
|
||||
// The actual rotation of the cube is handled by the auto rotation as usual
|
||||
if( side != EnumFacing.NORTH )
|
||||
if( side != forward )
|
||||
{
|
||||
builder.setTexture( chassisTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
@ -110,4 +111,18 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
|||
return AEColor.TRANSPARENT;
|
||||
}
|
||||
|
||||
private static EnumFacing getForward( IBlockState state )
|
||||
{
|
||||
if( state instanceof IExtendedBlockState )
|
||||
{
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
EnumFacing forward = extState.getValue( BlockCraftingMonitor.FORWARD );
|
||||
if( forward != null )
|
||||
{
|
||||
return forward;
|
||||
}
|
||||
}
|
||||
|
||||
return EnumFacing.NORTH;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue