Skip to content

Commit

Permalink
Add Support for MC Structure Blocks #100
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Oct 15, 2016
1 parent 563173d commit c2d03e1
Showing 1 changed file with 43 additions and 0 deletions.
Expand Up @@ -29,6 +29,8 @@
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumFacing.Axis;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
Expand Down Expand Up @@ -375,6 +377,47 @@ public void readFromNBT(
readChisleData( compound );
}

@Override
public void func_189668_a(
final Mirror p_189668_1_ )
{
switch ( p_189668_1_ )
{
case FRONT_BACK:
setBlob( getBlob().mirror( Axis.X ), true );
break;
case LEFT_RIGHT:
setBlob( getBlob().mirror( Axis.Z ), true );
break;
case NONE:
default:
break;

}
}

@Override
public void func_189667_a(
final Rotation p_189667_1_ )
{
switch ( p_189667_1_ )
{
case CLOCKWISE_90:
setBlob( getBlob().spin( Axis.Y ).spin( Axis.Y ).spin( Axis.Y ), true );
break;
case CLOCKWISE_180:
setBlob( getBlob().spin( Axis.Y ).spin( Axis.Y ), true );
break;
case COUNTERCLOCKWISE_90:
setBlob( getBlob().spin( Axis.Y ), true );
break;
case NONE:
default:
break;

}
}

public void fillWith(
final IBlockState blockType )
{
Expand Down

0 comments on commit c2d03e1

Please sign in to comment.