Merge branch 'master' into inventory
This commit is contained in:
commit
968110118f
4 files changed
+63
-2
No files matched your search
+2
-2
@@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
# or better: https://modmuss50.me/fabric.html
|
# or better: https://modmuss50.me/fabric.html
|
||||||
minecraft_version=1.14.3-pre4
|
minecraft_version=1.14.3
|
||||||
yarn_mappings=1.14.3-pre4+build.1
|
yarn_mappings=1.14.3+build.1
|
||||||
loader_version=0.4.8+build.155
|
loader_version=0.4.8+build.155
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ public abstract class ServerChunkManager_tickMixin
|
|||||||
|
|
||||||
CarpetProfiler.ProfilerToken currentSection;
|
CarpetProfiler.ProfilerToken currentSection;
|
||||||
|
|
||||||
|
/* Replaced with ThreadedAnvilCHunkStorage_Mixin path and separately isolated spawning and random ticks here
|
||||||
|
ticket manager is not worth its own section at this point - will fall into rest, until its fixed.
|
||||||
|
|
||||||
@Inject(method = "tick(Ljava/util/function/BooleanSupplier;)V", at = @At(
|
@Inject(method = "tick(Ljava/util/function/BooleanSupplier;)V", at = @At(
|
||||||
value = "CONSTANT",
|
value = "CONSTANT",
|
||||||
args = "stringValue=purge"
|
args = "stringValue=purge"
|
||||||
@@ -67,6 +70,25 @@ public abstract class ServerChunkManager_tickMixin
|
|||||||
CarpetProfiler.end_current_section(currentSection);
|
CarpetProfiler.end_current_section(currentSection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Inject(method = "tickChunks", at = @At("HEAD"))
|
||||||
|
private void startSpawningSection(CallbackInfo ci)
|
||||||
|
{
|
||||||
|
currentSection = CarpetProfiler.start_section(world, "Spawning and Random Ticks", CarpetProfiler.TYPE.GENERAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "tickChunks", at = @At("RETURN"))
|
||||||
|
private void stopSpawningSection(CallbackInfo ci)
|
||||||
|
{
|
||||||
|
if (currentSection != null)
|
||||||
|
{
|
||||||
|
CarpetProfiler.end_current_section(currentSection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//// Tick freeze
|
//// Tick freeze
|
||||||
@Redirect(method = "tickChunks", at = @At(
|
@Redirect(method = "tickChunks", at = @At(
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package carpet.mixins;
|
||||||
|
|
||||||
|
import carpet.utils.CarpetProfiler;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.server.world.ThreadedAnvilChunkStorage;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
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;
|
||||||
|
|
||||||
|
import java.util.function.BooleanSupplier;
|
||||||
|
|
||||||
|
@Mixin(ThreadedAnvilChunkStorage.class)
|
||||||
|
public class ThreadedAnvilChunkStorage_tickMixin
|
||||||
|
{
|
||||||
|
@Shadow @Final private ServerWorld world;
|
||||||
|
CarpetProfiler.ProfilerToken currentSection;
|
||||||
|
|
||||||
|
@Inject(method = "tick", at = @At("HEAD"))
|
||||||
|
private void startProfilerSection(BooleanSupplier booleanSupplier_1, CallbackInfo ci)
|
||||||
|
{
|
||||||
|
currentSection = CarpetProfiler.start_section(world, "Unloading", CarpetProfiler.TYPE.GENERAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "tick", at = @At("RETURN"))
|
||||||
|
private void stopProfilerSecion(BooleanSupplier booleanSupplier_1, CallbackInfo ci)
|
||||||
|
{
|
||||||
|
if (currentSection != null)
|
||||||
|
{
|
||||||
|
CarpetProfiler.end_current_section(currentSection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
"World_tickMixin",
|
"World_tickMixin",
|
||||||
"ServerWorld_tickMixin",
|
"ServerWorld_tickMixin",
|
||||||
"ServerChunkManager_tickMixin",
|
"ServerChunkManager_tickMixin",
|
||||||
|
"ThreadedAnvilChunkStorage_tickMixin",
|
||||||
|
|
||||||
"MobEntityMixin",
|
"MobEntityMixin",
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user