Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
duplexsystem committed Sep 18, 2024
1 parent b63f5f4 commit 06457bf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
@Mixin(FluidBlock.class)
public interface FluidBlockInvoker {
@Invoker("getFluidState")
public FluidState invokeGetFluidState(BlockState state);
FluidState invokeGetFluidState(BlockState state);
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"implementations.terra.inventory.meta.ItemStackMetaMixin",
"implementations.terra.world.ChunkRegionMixin",
"implementations.terra.world.ServerWorldMixin",
"invoke.FluidBlockInvoker",
"lifecycle.DataPackContentsMixin"
],
"client": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import com.dfsek.terra.lifecycle.LifecyclePlatform;

import static com.dfsek.terra.lifecycle.util.LifecycleUtil.initialized;

@Mixin(MinecraftServer.class)
public class MinecraftServerMixin {
Expand All @@ -29,4 +30,9 @@ private void injectConstructor(Thread serverThread, LevelStorage.Session session
WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory, CallbackInfo ci) {
LifecyclePlatform.setServer((MinecraftServer) (Object) this);
}

@Inject(method = "shutdown()V", at = @At("RETURN"))
private void injectShutdown(CallbackInfo ci) {
initialized = false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
import com.dfsek.terra.lifecycle.util.LifecycleUtil;
import com.dfsek.terra.lifecycle.util.RegistryHack;

import static com.dfsek.terra.lifecycle.util.LifecycleUtil.initialized;


@Mixin(RegistryLoader.class)
public class RegistryLoaderMixin {
private static boolean initialized = false;

@Shadow
@Final
private static Logger LOGGER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


public final class LifecycleUtil {
public static boolean initialized = false;
private LifecycleUtil() {

}
Expand Down

0 comments on commit 06457bf

Please sign in to comment.