Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcl committed Dec 27, 2016
1 parent d267912 commit 5e329c8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/java/com/kamesuta/mc/signpic/preview/SignEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ private PreviewTileEntitySign onItemUse(final EntityPlayer playerIn, final World

if (side==EnumFacing.UP) {
this.tileSign.setBlockType(Blocks.STANDING_SIGN);
final int i = MathHelper.floor_double((playerIn.rotationYaw + 180.0F) * 16.0F / 360.0F + 0.5D) & 15;
final int i = MathHelper.floor((playerIn.rotationYaw+180.0F)*16.0F/360.0F+0.5D)&15;
this.tileSign.setBlockMetadata(i);
} else {
this.tileSign.setBlockType(Blocks.WALL_SIGN);
this.tileSign.setBlockMetadata(side.getIndex());
this.tileSign.setBlockMetadata(side.getIndex());
}

this.renderable = true;
Expand All @@ -47,16 +47,15 @@ private PreviewTileEntitySign onItemUse(final EntityPlayer playerIn, final World
}
}


public TileEntitySign capturePlace() {
final Minecraft mc = Client.mc;
if (mc.thePlayer != null) {
if (mc.player!=null) {
final RayTraceResult m = MovePos.getMovingPos();
final MovePos p = MovePos.getBlockPos();
if (m!=null && p!=null) {
final MovePos p = MovePos.getBlockPos();
if (m!=null&&p!=null) {
setVisible(true);
return onItemUse(mc.thePlayer, mc.theWorld, p.pos, m.sideHit);
}
return onItemUse(mc.player, mc.world, p.pos, m.sideHit);
}
}
return null;
}
Expand Down

0 comments on commit 5e329c8

Please sign in to comment.