This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
forked from eatmyvenom/litematica-printer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically detect the build limits. It detects it only once, when the world is loaded. This should improve performance and make this mod compatible with data packs that modifies the build limits. Thanks to @aria1th!
- Loading branch information
Showing
5 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/io/github/eatmyvenom/litematicin/mixin/Litematica/MinecraftClientMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.github.eatmyvenom.litematicin.mixin.Litematica; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
import io.github.eatmyvenom.litematicin.utils.Printer; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.world.ClientWorld; | ||
|
||
|
||
@Mixin(MinecraftClient.class) | ||
public class MinecraftClientMixin { | ||
|
||
// On join a new world/server | ||
@Inject(at = @At("HEAD"), method = "joinWorld") | ||
public void joinWorld(ClientWorld world, CallbackInfo ci) { | ||
Printer.worldBottomY = world.getBottomY(); | ||
Printer.worldTopY = world.getTopY(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters