1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-26 03:17:38 +00:00

Update to 1.20.4

This commit is contained in:
Jonathan Coates
2024-01-31 20:55:14 +00:00
parent f26e443e81
commit fc834cd97f
217 changed files with 2303 additions and 3027 deletions

View File

@@ -30,8 +30,8 @@ public final class LuaMethodSupplier {
}
},
m -> (target, context, args) -> {
var escArgs = args.escapes();
return context.executeMainThreadTask(() -> ResultHelpers.checkNormalResult(m.apply(target, context, escArgs)));
args.escapes();
return context.executeMainThreadTask(() -> ResultHelpers.checkNormalResult(m.apply(target, context, args)));
}
);
private static final IntCache<LuaMethod> DYNAMIC = new IntCache<>(

View File

@@ -31,8 +31,8 @@ public final class PeripheralMethodSupplier {
}
},
m -> (target, context, computer, args) -> {
var escArgs = args.escapes();
return context.executeMainThreadTask(() -> ResultHelpers.checkNormalResult(m.apply(target, context, computer, escArgs)));
args.escapes();
return context.executeMainThreadTask(() -> ResultHelpers.checkNormalResult(m.apply(target, context, computer, args)));
}
);
private static final IntCache<PeripheralMethod> DYNAMIC = new IntCache<>(

View File

@@ -148,18 +148,6 @@ public final class MemoryMount extends AbstractInMemoryMount<MemoryMount.FileEnt
destParent.put(sourceParent.parent().remove(sourceParent.name()));
}
@Override
@Deprecated(forRemoval = true)
public SeekableByteChannel openForWrite(String path) throws IOException {
return openFile(path, WRITE_OPTIONS);
}
@Override
@Deprecated(forRemoval = true)
public SeekableByteChannel openForAppend(String path) throws IOException {
return openFile(path, APPEND_OPTIONS);
}
@Override
public SeekableByteChannel openFile(String path, Set<OpenOption> options) throws IOException {
var flags = FileFlags.of(options);

View File

@@ -155,18 +155,6 @@ public class WritableFileMount extends FileMount implements WritableMount {
}
}
@Override
@Deprecated(forRemoval = true)
public SeekableByteChannel openForWrite(String path) throws IOException {
return openFile(path, WRITE_OPTIONS);
}
@Override
@Deprecated(forRemoval = true)
public SeekableByteChannel openForAppend(String path) throws IOException {
return openFile(path, APPEND_OPTIONS);
}
@Override
public SeekableByteChannel openFile(String path, Set<OpenOption> options) throws IOException {
var flags = FileFlags.of(options);

View File

@@ -196,8 +196,8 @@ final class VarargArguments implements IArguments {
}
@Override
public IArguments escapes() {
if (escapes) return this;
public void escapes() {
if (escapes) return;
if (isClosed()) throw new IllegalStateException("Cannot call escapes after IArguments has been closed.");
var cache = this.cache;
@@ -223,7 +223,6 @@ final class VarargArguments implements IArguments {
escapes = true;
this.cache = cache;
this.typeNames = typeNames;
return this;
}
void close() {