Skip to content

Commit 47e7764

Browse files
committed
Add license header to images (TODO: expand README)
1 parent c34fa48 commit 47e7764

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

common/src/main/java/gripe/_90/megacells/part/MEGAPatternProviderPart.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
import gripe._90.megacells.util.Utils;
2929

3030
public class MEGAPatternProviderPart extends PatternProviderPart {
31-
32-
public static final ResourceLocation MODEL_BASE = Utils.makeId("part/mega_pattern_provider");
31+
private static final ResourceLocation MODEL_BASE = Utils.makeId("part/mega_pattern_provider");
3332

3433
@PartModels
3534
public static final PartModel MODELS_OFF = new PartModel(MODEL_BASE, AppEng.makeId("part/interface_off"));

common/src/main/java/gripe/_90/megacells/service/DecompressionService.java

+9-9
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@
3131
import gripe._90.megacells.item.cell.BulkCellInventory;
3232

3333
public class DecompressionService implements IGridService, IGridServiceProvider {
34-
private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
35-
private static final Class<?> CHEST_MONITOR_CLASS;
3634
private static final VarHandle CHEST_MONITOR_HANDLE;
3735
private static final VarHandle CHEST_CELL_HANDLE;
3836
private static final MethodHandle DRIVE_DELEGATE_HANDLE;
3937
private static final VarHandle DRIVE_WATCHERS_HANDLE;
4038

4139
static {
4240
try {
43-
CHEST_MONITOR_CLASS = Class.forName("appeng.blockentity.storage.ChestBlockEntity$ChestMonitorHandler");
44-
CHEST_MONITOR_HANDLE = MethodHandles.privateLookupIn(ChestBlockEntity.class, LOOKUP)
45-
.findVarHandle(ChestBlockEntity.class, "cellHandler", CHEST_MONITOR_CLASS);
46-
CHEST_CELL_HANDLE = MethodHandles.privateLookupIn(CHEST_MONITOR_CLASS, LOOKUP)
47-
.findVarHandle(CHEST_MONITOR_CLASS, "cellInventory", StorageCell.class);
41+
var lookup = MethodHandles.lookup();
4842

49-
DRIVE_WATCHERS_HANDLE = MethodHandles.privateLookupIn(DriveBlockEntity.class, LOOKUP)
43+
var chestMonitor = Class.forName("appeng.blockentity.storage.ChestBlockEntity$ChestMonitorHandler");
44+
CHEST_MONITOR_HANDLE = MethodHandles.privateLookupIn(ChestBlockEntity.class, lookup)
45+
.findVarHandle(ChestBlockEntity.class, "cellHandler", chestMonitor);
46+
CHEST_CELL_HANDLE = MethodHandles.privateLookupIn(chestMonitor, lookup)
47+
.findVarHandle(chestMonitor, "cellInventory", StorageCell.class);
48+
49+
DRIVE_WATCHERS_HANDLE = MethodHandles.privateLookupIn(DriveBlockEntity.class, lookup)
5050
.findVarHandle(DriveBlockEntity.class, "invBySlot", DriveWatcher[].class);
51-
DRIVE_DELEGATE_HANDLE = MethodHandles.privateLookupIn(DelegatingMEInventory.class, LOOKUP)
51+
DRIVE_DELEGATE_HANDLE = MethodHandles.privateLookupIn(DelegatingMEInventory.class, lookup)
5252
.findVirtual(DelegatingMEInventory.class, "getDelegate", MethodType.methodType(MEStorage.class));
5353
} catch (NoSuchFieldException | NoSuchMethodException | ClassNotFoundException | IllegalAccessException e) {
5454
throw new RuntimeException("Failed to create DecompressionService method handles", e);

img/MEGACELLS.png

-2.15 KB
Loading

img/header_about.png

-26 Bytes
Loading

img/header_features.png

-20 Bytes
Loading

img/header_license.png

171 Bytes
Loading

0 commit comments

Comments
 (0)