Changes
From Forge Community Wiki
100 bytes added
, 10:00, 22 October 2021
mLine 314: |
Line 314: |
| | | |
| <syntaxhighlight lang="java"> | | <syntaxhighlight lang="java"> |
− | private final Map<Direction, LazyOptional<IEnergyStorage>> cache = new HashMap<>(); | + | // note the use of EnumMap, which is much more performant than HashMap for enum keys |
| + | private final Map<Direction, LazyOptional<IEnergyStorage>> cache = new EnumMap<>(Direction.class); |
| | | |
| private void sendPowerTo(int power, Direction direction) { | | private void sendPowerTo(int power, Direction direction) { |