User Tools

Site Tools


tutorial:blocks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:blocks [2022/04/29 09:57] – [Custom VoxelShape] solidblocktutorial:blocks [2022/07/17 11:57] – A not available function has been changed(new LiteralText -> Text.of), becuase it cannot work properly. luo_tian_wy
Line 190: Line 190:
     public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {     public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
         if (!world.isClient) {         if (!world.isClient) {
-            player.sendMessage(new LiteralText("Hello, world!"), false);+            player.sendMessage(Text.of("Hello, world!"), false);
         }         }
  
tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock