Writable blocks (Signs)

Started by Ale1025 on Sat, 06/03/2017 - 11:50

Topic category: Help with modding (Java Edition)

Last seen on 23:06, 30. Aug 2020
Joined May 2015
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Writable blocks (Signs)
Sat, 06/03/2017 - 11:50

Is there anyway to make a block writable like the sign? I know the sign is a TileEntity, but i was wondering if there was anyway to make blocks (Or entities with no AI acting as blocks) writable such us signs. Thanks in advance.

Last seen on 10:02, 20. Jan 2021
Joined Dec 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think with making they…
Thu, 03/26/2020 - 12:06

I think with making they have GUI that has text input. But im not sure can it be made saving the text, so then it will be like sign.

Last seen on 14:41, 26. Mar 2020
Joined Feb 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You can, if you make a…
Thu, 03/26/2020 - 13:24

You can, if you make a variable and by clicking a button in the gui it give the variable the value of the text input but idk if you can display it on the block side

 

Last seen on 18:14, 17. Jan 2021
Joined Jun 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to display a text on a…
Tue, 10/27/2020 - 15:08

How to display a text on a block's side?

Last seen on 14:24, 10. Dec 2020
Joined Sep 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If you don't need your block…
Wed, 10/28/2020 - 08:20

If you don't need your block to store items, NBT or energy/fluid, you can try this steps:

  1. Enable tile entity of your block and do not change any other inventory settings;
  2. Make the block open a GUI with text label and "Ready" button;
  3. Create a procedure for that button that contains Set text variable textVar to: text inside textfield procedure block and custom code snippet - the code for it is:
    world.getTileEntity(new BlockPos((int)x, (int)y, (int)z)).setText(2, new StringTextComponent(textVar));
  4. Lock code of your block, remove CustomTileEntity class, replace all occurrences of CustomTileEntity with SignTileEntity, reformat and save code.