Simplified handling of rotations inside getCapability() for TileInscriber.
This commit is contained in:
parent
7ac817e9ae
commit
3a8d6d0bcd
|
@ -56,7 +56,6 @@ import appeng.api.networking.ticking.TickingRequest;
|
||||||
import appeng.api.util.AECableType;
|
import appeng.api.util.AECableType;
|
||||||
import appeng.api.util.AEPartLocation;
|
import appeng.api.util.AEPartLocation;
|
||||||
import appeng.api.util.IConfigManager;
|
import appeng.api.util.IConfigManager;
|
||||||
import appeng.client.render.FacingToRotation;
|
|
||||||
import appeng.core.features.registries.entries.InscriberRecipe;
|
import appeng.core.features.registries.entries.InscriberRecipe;
|
||||||
import appeng.core.settings.TickRates;
|
import appeng.core.settings.TickRates;
|
||||||
import appeng.helpers.Reflected;
|
import appeng.helpers.Reflected;
|
||||||
|
@ -564,14 +563,11 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||||
{
|
{
|
||||||
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
if( capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY )
|
||||||
{
|
{
|
||||||
final FacingToRotation rot = FacingToRotation.get( getForward(), getUp() );
|
if( facing == getUp() )
|
||||||
EnumFacing effectiveUp = rot.rotate( EnumFacing.UP );
|
|
||||||
|
|
||||||
if( facing == effectiveUp )
|
|
||||||
{
|
{
|
||||||
return (T) topItemHandler;
|
return (T) topItemHandler;
|
||||||
}
|
}
|
||||||
else if( facing == effectiveUp.getOpposite() )
|
else if( facing == getUp().getOpposite() )
|
||||||
{
|
{
|
||||||
return (T) bottomItemHandler;
|
return (T) bottomItemHandler;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue