Skip to content

Commit

Permalink
Release update 0.21.80
Browse files Browse the repository at this point in the history
Also worked on some stuff
  • Loading branch information
jediminer543 committed Jun 17, 2021
1 parent 0e5ac61 commit c434b97
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 24 deletions.
25 changes: 15 additions & 10 deletions etc/update.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,52 @@
{
"homepage": "https://github.com/jediminer543/JMT-MCMT",
"1.16.5": {
"0.21.80": "Fix compatibility with CraftBukkit and Java 11",
"0.20.75": "Revert performance tweak as it was broken",
"0.20.74": "Hopefully improved performance, and worked on compatibility"
},
"1.16.3": {
"0.21.80": "Fix compatibility with CraftBukkit and Java 11",
"0.20.75": "Revert performance tweak as it was broken",
"0.20.74": "Hopefully improved performance, and worked on compatibility",
"0.18.60": "Fixed loading so you only need one jar; and added thread capping to the config",
"0.17.54": "Added update checking and made mod actually load again",
"0.17.52": "Added FU patching"
},
"1.16.2": {
"0.21.80": "Fix compatibility with CraftBukkit and Java 11",
"0.20.75": "Revert performance tweak as it was broken",
"0.20.74": "Hopefully improved performance, and worked on compatibility",
"0.18.60": "Fixed loading so you only need one jar; and added thread capping to the config",
"0.17.54": "Added update checking and made mod actually load again",
"0.17.52": "Added FU patching"
},
"1.16.1": {
"0.21.80": "Fix compatibility with CraftBukkit and Java 11",
"0.20.75": "Revert performance tweak as it was broken",
"0.20.74": "Hopefully improved performance, and worked on compatibility",
"0.18.60": "Fixed loading so you only need one jar; and added thread capping to the config",
"0.17.54": "Added update checking and made mod actually load again",
"0.17.52": "Added FU patching"
},
"1.15.2": {
"0.21.80": "Fix compatibility with CraftBukkit and Java 11",
"0.20.75": "Revert performance tweak as it was broken",
"0.20.74": "Hopefully improved performance, and worked on compatibility",
"0.18.60": "Fixed loading so you only need one jar; and added thread capping to the config",
"0.17.54": "Added update checking and made mod actually load again",
"0.17.52": "Added FU patching"
},
"promos": {
"1.16.5-latest": "0.20.75",
"1.16.5-recommended": "0.20.75",
"1.16.3-latest": "0.20.75",
"1.16.3-recommended": "0.20.75",
"1.16.2-latest": "0.20.75",
"1.16.2-recommended": "0.20.75",
"1.16.1-latest": "0.20.75",
"1.16.1-recommended": "0.20.75",
"1.15.2-latest": "0.20.75",
"1.15.2-recommended": "0.20.75"
"1.16.5-latest": "0.21.80",
"1.16.5-recommended": "0.21.80",
"1.16.3-latest": "0.21.80",
"1.16.3-recommended": "0.21.80",
"1.16.2-latest": "0.21.80",
"1.16.2-recommended": "0.21.80",
"1.16.1-latest": "0.21.80",
"1.16.1-recommended": "0.21.80",
"1.15.2-latest": "0.21.80",
"1.15.2-recommended": "0.21.80"
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mcmt_ver=0.21.80-PRE
mcmt_ver=0.21.80

mappings_ver=20200723-1.16.1
mappings_chan=snapshot
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/jmt/mcmt/commands/DebugCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import net.minecraft.command.Commands;
import net.minecraft.command.arguments.ILocationArgument;
import net.minecraft.command.arguments.Vec3Argument;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.tileentity.TileEntity;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jmt/mcmt/config/GeneralConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public GeneralConfigTemplate(ForgeConfigSpec.Builder builder) {
builder.comment("This allows for tracing the operations invoked, to diagnose lockups/etc.");
logcap = builder
.comment("Maximum time between MCMT presence alerts in 10ms steps")
.defineInRange("opsTracing", 720000, 15000, Integer.MAX_VALUE);
.defineInRange("logcap", 720000, 15000, Integer.MAX_VALUE);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Supplier;

import javax.annotation.Nullable;
Expand Down Expand Up @@ -41,8 +42,8 @@
public class ParaServerChunkProvider extends ServerChunkProvider {

protected Map<ChunkCacheAddress, ChunkCacheLine> chunkCache = new ConcurrentHashMap<ChunkCacheAddress, ChunkCacheLine>();
protected int access = Integer.MIN_VALUE;
protected static final int CACHE_SIZE = 64;
protected AtomicInteger access = new AtomicInteger(Integer.MIN_VALUE);
protected static final int CACHE_SIZE = 512;
protected Thread cacheThread;
Logger log = LogManager.getLogger();
Marker chunkCleaner = MarkerManager.getMarker("ChunkCleaner");
Expand Down Expand Up @@ -145,8 +146,8 @@ public Chunk getChunkNow(int chunkX, int chunkZ) {
/* */

public IChunk lookupChunk(long chunkPos, ChunkStatus status, boolean compute) {
int oldaccess = access++;
if (access < oldaccess) {
int oldaccess = access.getAndIncrement();
if (access.get() < oldaccess) {
// Long Rollover so super rare
chunkCache.clear();
return null;
Expand All @@ -162,8 +163,8 @@ public IChunk lookupChunk(long chunkPos, ChunkStatus status, boolean compute) {
}

public void cacheChunk(long chunkPos, IChunk chunk, ChunkStatus status) {
long oldaccess = access++;
if (access < oldaccess) {
long oldaccess = access.getAndIncrement();
if (access.get() < oldaccess) {
// Long Rollover so super rare
chunkCache.clear();
}
Expand Down Expand Up @@ -195,7 +196,7 @@ public void chunkCacheCleanup() {
if (size < CACHE_SIZE)
continue;
// System.out.println("CacheFill: " + size);
long maxAccess = chunkCache.values().stream().mapToInt(ccl -> ccl.lastAccess).max().orElseGet(() -> access);
long maxAccess = chunkCache.values().stream().mapToInt(ccl -> ccl.lastAccess).max().orElseGet(() -> access.get());
long minAccess = chunkCache.values().stream().mapToInt(ccl -> ccl.lastAccess).min()
.orElseGet(() -> Integer.MIN_VALUE);
long cutoff = minAccess + (long) ((maxAccess - minAccess) / ((float) size / ((float) CACHE_SIZE)));
Expand Down Expand Up @@ -240,7 +241,7 @@ protected class ChunkCacheLine {
int lastAccess;

public ChunkCacheLine(IChunk chunk) {
this(chunk, access);
this(chunk, access.get());
}

public ChunkCacheLine(IChunk chunk, int lastAccess) {
Expand All @@ -257,7 +258,7 @@ public int getLastAccess() {
}

public void updateLastAccess() {
lastAccess = access;
lastAccess = access.get();
}

public void updateChunkRef(IChunk c) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.concurrent.atomic.AtomicInteger;

// This is highly WIP, please ignore for now

@SuppressWarnings("unused")
public class LockAwareThreadPool extends AbstractExecutorService {

private volatile boolean isShutdown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public Set<Target> targets() {
out.add(Target.targetClass("it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet"));
out.add(Target.targetClass("it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap"));
//out.add(Target.targetClass("it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap"));
File f = new File("config/mcmt-sync-fu-list.txt");
File f = new File("config/jmt_mcmt-sync-fu-list.txt");
if (f.exists()) {
try (BufferedReader r = new BufferedReader(new FileReader(f))) {
r.lines().filter(s -> !(s.startsWith("#") || s.startsWith("//") || s.equals(""))).map(s -> Target.targetClass(s)).forEach(t -> out.add(t));
Expand Down

0 comments on commit c434b97

Please sign in to comment.