User Tools

Site Tools


tutorial:propertydelegates

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:propertydelegates [2020/08/15 18:58] technici4ntutorial:propertydelegates [2022/05/27 16:00] (current) solidblock
Line 4: Line 4:
 In this Tutorial we will sync Integer values between the client and the server, an example for this in Vanilla would be the smelting progress of a furnace. In this Tutorial we will sync Integer values between the client and the server, an example for this in Vanilla would be the smelting progress of a furnace.
  
-To understand this tutorial you need to read the first [[tutorial:screenhandler|Screenhandler]] tutorial. +To understand this tutorial you need to read the first [[tutorial:screenhandler|ScreenHandler]] tutorial. 
 Methods which have no code here were already shown in that tutorial. Methods which have no code here were already shown in that tutorial.
  
Line 67: Line 67:
     @Override     @Override
     public Text getDisplayName() {     public Text getDisplayName() {
-        return new TranslatableText(getCachedState().getBlock().getTranslationKey());+        // For versions 1.18.2 and below, please use return new TranslatableText(getCachedState().getBlock().getTranslationKey()); 
 +        return Text.translatable(getCachedState().getBlock().getTranslationKey());
     }     }
  
tutorial/propertydelegates.1597517912.txt.gz · Last modified: 2020/08/15 18:58 by technici4n