Merge branch 'master' into 1.16
# Conflicts: # src/main/java/carpet/script/bundled/Module.java
This commit is contained in:
commit
a757c6f88a
15 files changed
+219
-64
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.helpers.TickSpeed;
|
||||
import net.minecraft.server.world.ChunkTicketManager;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(ChunkTicketManager.class)
|
||||
public class ChunkTicketManager_tickMixin
|
||||
{
|
||||
@Shadow private long age;
|
||||
|
||||
@Inject(method = "purge", at = @At("HEAD"), cancellable = true)
|
||||
private void pauseTicketSystem(CallbackInfo ci)
|
||||
{
|
||||
// pausing expiry of tickets
|
||||
// that will prevent also chunks from unloading, so require a deep frozen state
|
||||
if (!TickSpeed.process_entities && TickSpeed.deepFreeze) age--;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public abstract class MinecraftServer_tickspeedMixin extends ReentrantThreadExec
|
||||
this.startMonitor(tickDurationMonitor);
|
||||
this.profiler.startTick();
|
||||
this.profiler.push("tick");
|
||||
this.tick(TickSpeed.time_warp_start_time != 0 ? ()->true : this::shouldKeepTicking);
|
||||
this.tick(TickSpeed.time_warp_start_time != 0 ? ()->!hasRunningTasks() : this::shouldKeepTicking);
|
||||
this.profiler.swap("nextTickWait");
|
||||
this.waitingForNextTick = true;
|
||||
this.field_19248 = Math.max(Util.getMeasuringTimeMs() + /*50L*/ msThisTick, this.timeReference);
|
||||
|
||||
@@ -72,7 +72,7 @@ public abstract class TntEntityMixin extends Entity implements TntEntityInterfac
|
||||
private void onExplode(CallbackInfo ci)
|
||||
{
|
||||
if (LoggerRegistry.__tnt && logHelper != null)
|
||||
logHelper.onExploded(getX(), getY(), getZ());
|
||||
logHelper.onExploded(getX(), getY(), getZ(), this.world.getTime());
|
||||
|
||||
if (mergedTNT > 1)
|
||||
for (int i = 0; i < mergedTNT - 1; i++)
|
||||
|
||||
Reference in new issue
Block a user