Skip to content

Commit 6b5ce1d

Browse files
fix: yeeted pointless class
1 parent 15bfccd commit 6b5ce1d

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

common/src/main/java/pro/mikey/xray/core/ChunkScanTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public void run() {
4949
continue;
5050

5151
for (var target : ScanController.INSTANCE.scanStore.activeScanTargets()) {
52-
if (target.type().matches(level, pos, state, fluidState)) {
53-
renderQueue.add(new OutlineRenderTarget(pos.getX(), pos.getY(), pos.getZ(), target.color()));
52+
if (target.matches(level, pos, state, fluidState)) {
53+
renderQueue.add(new OutlineRenderTarget(pos.getX(), pos.getY(), pos.getZ(), target.colorInt()));
5454
}
5555
}
5656
}

common/src/main/java/pro/mikey/xray/core/ScanController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import net.minecraft.world.level.block.state.BlockState;
1212
import org.jetbrains.annotations.NotNull;
1313
import pro.mikey.xray.XRay;
14-
import pro.mikey.xray.core.scanner.ActiveScanTarget;
1514
import pro.mikey.xray.core.scanner.ScanStore;
15+
import pro.mikey.xray.core.scanner.ScanType;
1616

1717
import java.util.*;
1818
import java.util.concurrent.ExecutorService;
@@ -223,12 +223,12 @@ public static void onBlockChange(Level level, BlockPos pos, BlockState state) {
223223
// Otherwise, do we have scantarget in the active list of things to find?
224224
var noMatchesFound = true;
225225

226-
Set<ActiveScanTarget> activeScanTargets = ScanController.INSTANCE.scanStore.activeScanTargets();
226+
Set<ScanType> activeScanTargets = ScanController.INSTANCE.scanStore.activeScanTargets();
227227
for (var scanType : activeScanTargets) {
228-
if (scanType.type().matches(level, pos, state, state.getFluidState())) {
228+
if (scanType.matches(level, pos, state, state.getFluidState())) {
229229
// We need to tell the render system to refresh. We should manually add this black to the renderlist
230230
// We're actively looking at this chunk so let's inject this block
231-
outlineRenderTargets.add(new OutlineRenderTarget(pos.getX(), pos.getY(), pos.getZ(), scanType.color()));
231+
outlineRenderTargets.add(new OutlineRenderTarget(pos.getX(), pos.getY(), pos.getZ(), scanType.colorInt()));
232232

233233
// Tell the VBO to refresh for this chunk
234234
OutlineRender.refreshVBOForChunk(chunkPos);

common/src/main/java/pro/mikey/xray/core/scanner/ActiveScanTarget.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

common/src/main/java/pro/mikey/xray/core/scanner/ScanStore.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class ScanStore {
5454
private final List<Category> categories = new ArrayList<>();
5555

5656
// In memory holder of only the enabled scan targets
57-
private final Set<ActiveScanTarget> activeScanTargets = new HashSet<>();
57+
private final Set<ScanType> activeScanTargets = new HashSet<>();
5858

5959
public ScanStore() {}
6060

@@ -183,8 +183,7 @@ public void updateActiveTargets() {
183183
continue; // Skip disabled scan types
184184
}
185185

186-
var target = new ActiveScanTarget(scanType, scanType.colorInt);
187-
this.activeScanTargets.add(target);
186+
this.activeScanTargets.add(scanType);
188187
}
189188
}
190189
}
@@ -193,7 +192,7 @@ public List<Category> categories() {
193192
return Collections.unmodifiableList(categories);
194193
}
195194

196-
public Set<ActiveScanTarget> activeScanTargets() {
195+
public Set<ScanType> activeScanTargets() {
197196
return activeScanTargets;
198197
}
199198

0 commit comments

Comments
 (0)