mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-18 01:46:11 +00:00
Compress switch statements a bit using enhanced
This commit is contained in:
parent
867b28d439
commit
8d565b93f7
@ -50,9 +50,7 @@ public class NMSAdapter implements FAWEPlatformAdapterImpl {
|
|||||||
switch (ordinal) {
|
switch (ordinal) {
|
||||||
case BlockTypesCache.ReservedIDs.__RESERVED__:
|
case BlockTypesCache.ReservedIDs.__RESERVED__:
|
||||||
ordinal = BlockTypesCache.ReservedIDs.AIR;
|
ordinal = BlockTypesCache.ReservedIDs.AIR;
|
||||||
case BlockTypesCache.ReservedIDs.AIR:
|
case BlockTypesCache.ReservedIDs.AIR, BlockTypesCache.ReservedIDs.CAVE_AIR, BlockTypesCache.ReservedIDs.VOID_AIR:
|
||||||
case BlockTypesCache.ReservedIDs.CAVE_AIR:
|
|
||||||
case BlockTypesCache.ReservedIDs.VOID_AIR:
|
|
||||||
air++;
|
air++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -130,15 +128,12 @@ public class NMSAdapter implements FAWEPlatformAdapterImpl {
|
|||||||
if (getArr == null) {
|
if (getArr == null) {
|
||||||
getArr = get.apply(layer);
|
getArr = get.apply(layer);
|
||||||
}
|
}
|
||||||
ordinal = getArr[i];
|
set[i] = switch (ordinal = getArr[i]) {
|
||||||
switch (ordinal) {
|
|
||||||
case BlockTypesCache.ReservedIDs.__RESERVED__:
|
case BlockTypesCache.ReservedIDs.__RESERVED__:
|
||||||
ordinal = BlockTypesCache.ReservedIDs.AIR;
|
ordinal = BlockTypesCache.ReservedIDs.AIR;
|
||||||
case BlockTypesCache.ReservedIDs.AIR:
|
case BlockTypesCache.ReservedIDs.AIR, BlockTypesCache.ReservedIDs.CAVE_AIR, BlockTypesCache.ReservedIDs.VOID_AIR:
|
||||||
case BlockTypesCache.ReservedIDs.CAVE_AIR:
|
|
||||||
case BlockTypesCache.ReservedIDs.VOID_AIR:
|
|
||||||
air++;
|
air++;
|
||||||
break;
|
yield ordinal;
|
||||||
default:
|
default:
|
||||||
if (!fastmode && !tick_placed && tick_existing) {
|
if (!fastmode && !tick_placed && tick_existing) {
|
||||||
boolean ticking;
|
boolean ticking;
|
||||||
@ -160,8 +155,8 @@ public class NMSAdapter implements FAWEPlatformAdapterImpl {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
yield ordinal;
|
||||||
set[i] = ordinal;
|
};
|
||||||
}
|
}
|
||||||
case BlockTypesCache.ReservedIDs.AIR, BlockTypesCache.ReservedIDs.CAVE_AIR, BlockTypesCache.ReservedIDs.VOID_AIR -> air++;
|
case BlockTypesCache.ReservedIDs.AIR, BlockTypesCache.ReservedIDs.CAVE_AIR, BlockTypesCache.ReservedIDs.VOID_AIR -> air++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user