mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-03-06 08:19:45 +00:00
Use IBlockState instead of Block methods
There was a crash in RedstoneUtil when redstone state was changing next to a full block due to the incorrect state being passed. By using IBlockState methods we ensure that this cannot happen again. The old IBlockState methods were also deprecated, so this reduces the warning count a little. I've also moved string translation into StringUtils, to reduce the number of deprecation warnings from there.
This commit is contained in:
@@ -23,4 +23,22 @@ public class StringUtil
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates a Stat name
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static String translateToLocal( String key )
|
||||
{
|
||||
return net.minecraft.util.text.translation.I18n.translateToLocal( key );
|
||||
}
|
||||
|
||||
/**
|
||||
* Translates a Stat name with format args
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static String translateToLocalFormatted( String key, Object... format )
|
||||
{
|
||||
return net.minecraft.util.text.translation.I18n.translateToLocalFormatted( key, format );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user