Jump to content

Nekromantcer

Members
  • Posts

    2
  • Joined

  • Last visited

Nekromantcer's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi guys. How can I change the text of the sign. It is necessary to create an auto farm issuing objects with RMB on the sign. I tried to use new TesctComponentsString but it do nothing. @SubscribeEvent public void onPlayerInteract(PlayerInteractEvent.RightClickBlock event) { if (event.getWorld().isRemote) { return; } TileEntity te = event.getEntityPlayer().world.getTileEntity(event.getPos()); if (te != null && te instanceof TileEntitySign) { ITextComponent[] signText = ((TileEntitySign) te).signText; System.out.println(signText[1].getUnformattedText()); System.out.println(signText[0].getUnformattedText()); System.out.println("test"+signText[1].getUnformattedText()); String ln1 = signText[0].getUnformattedText(); TileEntitySign t1 = (TileEntitySign) te; t1.signText[0] = new TextComponentString("ffff"); if (ln1.equals("444")) {System.out.println("Totototoot");} } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.