mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 03:00:30 +00:00
Fix peripheral direction not being set
We moved the direction call within the if block, but never actally updated the condition! I'm on a roll of stupid bug fixes today, which really isn't a good sign.
This commit is contained in:
parent
f450c0156b
commit
86ad43c3ab
@ -376,17 +376,9 @@ public class BlockPeripheral extends BlockGeneric
|
||||
{
|
||||
case DiskDrive:
|
||||
default:
|
||||
{
|
||||
IBlockState state = getDefaultState().withProperty( Properties.VARIANT, BlockPeripheralVariant.DiskDriveEmpty );
|
||||
if( placedSide.getAxis() != EnumFacing.Axis.Y )
|
||||
{
|
||||
return state.withProperty( Properties.FACING, placedSide );
|
||||
}
|
||||
else
|
||||
{
|
||||
return state.withProperty( Properties.FACING, EnumFacing.NORTH );
|
||||
}
|
||||
}
|
||||
return getDefaultState()
|
||||
.withProperty( Properties.VARIANT, BlockPeripheralVariant.DiskDriveEmpty )
|
||||
.withProperty( Properties.FACING, placedSide.getAxis() == EnumFacing.Axis.Y ? EnumFacing.NORTH : placedSide );
|
||||
case WirelessModem:
|
||||
{
|
||||
EnumFacing dir = placedSide.getOpposite();
|
||||
@ -410,21 +402,13 @@ public class BlockPeripheral extends BlockGeneric
|
||||
}
|
||||
}
|
||||
case Monitor:
|
||||
{
|
||||
return getDefaultState().withProperty( Properties.VARIANT, BlockPeripheralVariant.Monitor );
|
||||
}
|
||||
case Printer:
|
||||
{
|
||||
return getDefaultState().withProperty( Properties.VARIANT, BlockPeripheralVariant.PrinterEmpty );
|
||||
}
|
||||
case AdvancedMonitor:
|
||||
{
|
||||
return getDefaultState().withProperty( Properties.VARIANT, BlockPeripheralVariant.AdvancedMonitor );
|
||||
}
|
||||
case Speaker:
|
||||
{
|
||||
return getDefaultState().withProperty( Properties.VARIANT, BlockPeripheralVariant.Speaker );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,19 +450,15 @@ public class BlockPeripheral extends BlockGeneric
|
||||
case Speaker:
|
||||
case DiskDrive:
|
||||
case Printer:
|
||||
{
|
||||
EnumFacing dir = DirectionUtil.fromEntityRot( player );
|
||||
if( stack.hasDisplayName() && tile instanceof TilePeripheralBase )
|
||||
if( tile instanceof TilePeripheralBase )
|
||||
{
|
||||
TilePeripheralBase peripheral = (TilePeripheralBase) tile;
|
||||
peripheral.setLabel( stack.getDisplayName() );
|
||||
peripheral.setDirection( dir );
|
||||
peripheral.setDirection( DirectionUtil.fromEntityRot( player ) );
|
||||
if( stack.hasDisplayName() ) peripheral.setLabel( stack.getDisplayName() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Monitor:
|
||||
case AdvancedMonitor:
|
||||
{
|
||||
if( tile instanceof TileMonitor )
|
||||
{
|
||||
int direction = DirectionUtil.fromEntityRot( player ).getIndex();
|
||||
@ -505,7 +485,6 @@ public class BlockPeripheral extends BlockGeneric
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user