Make fields final if possible to ensure immutability

This commit is contained in:
thatsIch
2014-09-29 09:54:34 +02:00
parent 35f6c84d9f
commit 474596f095
261 changed files with 607 additions and 597 deletions
+3 -3
View File
@@ -119,14 +119,14 @@ import cpw.mods.fml.relauncher.SideOnly;
public class Platform
{
public static Block air = Blocks.air;
public static final Block air = Blocks.air;
public static final int DEF_OFFSET = 16;
/*
* random source, use it for item drop locations...
*/
static private Random rdnSrc = new Random();
static private final Random rdnSrc = new Random();
public static Random getRandom()
{
@@ -907,7 +907,7 @@ public class Platform
return false;
}
private static WeakHashMap<World, EntityPlayer> fakePlayers = new WeakHashMap<World, EntityPlayer>();
private static final WeakHashMap<World, EntityPlayer> fakePlayers = new WeakHashMap<World, EntityPlayer>();
public static EntityPlayer getPlayer(WorldServer w)
{