mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 12:19:55 +00:00
Cache enum .values() (#248)
Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
1 parent
b46cfbb351
commit
8750005be5
20 files changed
+59
-52
No files matched your search
@@ -472,10 +472,10 @@ public abstract class AbstractMachineEntity extends TileEntityEio
|
||||
}
|
||||
|
||||
int rsContr = nbtRoot.getInteger("redstoneControlMode");
|
||||
if (rsContr < 0 || rsContr >= RedstoneControlMode.values().length) {
|
||||
if (rsContr < 0 || rsContr >= RedstoneControlMode.VALUES.length) {
|
||||
rsContr = 0;
|
||||
}
|
||||
redstoneControlMode = RedstoneControlMode.values()[rsContr];
|
||||
redstoneControlMode = RedstoneControlMode.VALUES[rsContr];
|
||||
|
||||
if (nbtRoot.hasKey("hasFaces")) {
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
Reference in new issue
Block a user