diff --git a/src/main/java/com/kamesuta/mc/signpic/preview/SignEntity.java b/src/main/java/com/kamesuta/mc/signpic/preview/SignEntity.java index 0284818e..1f4a32c4 100644 --- a/src/main/java/com/kamesuta/mc/signpic/preview/SignEntity.java +++ b/src/main/java/com/kamesuta/mc/signpic/preview/SignEntity.java @@ -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; @@ -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; }