tutorial:propertydelegates
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:propertydelegates [2020/08/15 18:58] – technici4n | tutorial: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: | + | To understand this tutorial you need to read the first [[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()); | + |          | 
| + |         return Text.translatable(getCachedState().getBlock().getTranslationKey()); | ||
| } | } | ||
tutorial/propertydelegates.1597517912.txt.gz · Last modified: 2020/08/15 18:58 by technici4n