forked from jensvh/litematica-printer
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from sakura-ryoko/multiversion
1.20.6 & 1.21.0 branches update
- Loading branch information
Showing
27 changed files
with
4,188 additions
and
175 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
Binary file renamed
BIN
+1.16 MB
...tica-fabric-1.20.5-pre1-0.18.0-beta.1.jar → ...atica-fabric-1.20.6-0.17.999-sakura.8.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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 was deleted.
Oops, something went wrong.
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,15 @@ | ||
# Fabric Properties | ||
# check these on https://fabricmc.net/use | ||
minecraft_version=1.20.6 | ||
yarn_mappings=1.20.6+build.3 | ||
fabricapi_version=0.97.8+1.20.6 | ||
minecraft_version_out = 1.20.6 | ||
|
||
# Mod Properties | ||
#malilib_projectid=303119 | ||
#malilib_fileid=4946328 | ||
#litematica_fileid=4946471 | ||
#litematica_projectid=308892 | ||
essentialclient_filename=essential-client-1.20.1-1.3.6.jar | ||
malilib_filename=malilib-fabric-1.20.6-0.18.999-sakura.4.jar | ||
litematica_filename=litematica-fabric-1.20.6-0.17.999-sakura.8.jar |
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
59 changes: 59 additions & 0 deletions
59
...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,59 @@ | ||
package io.github.eatmyvenom.litematicin.mixin.Litematica; | ||
|
||
import org.jetbrains.annotations.Nullable; | ||
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 net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.screen.DownloadingTerrainScreen; | ||
import net.minecraft.client.network.ClientPlayNetworkHandler; | ||
import net.minecraft.client.network.ClientPlayerEntity; | ||
import net.minecraft.client.world.ClientWorld; | ||
import net.minecraft.util.hit.BlockHitResult; | ||
import net.minecraft.util.hit.HitResult; | ||
import io.github.eatmyvenom.litematicin.utils.*; | ||
|
||
|
||
@Mixin(MinecraftClient.class) | ||
public abstract class MinecraftClientMixin | ||
{ | ||
@Shadow | ||
public HitResult crosshairTarget; | ||
|
||
@Shadow | ||
@Nullable | ||
public ClientWorld world; | ||
|
||
@Shadow | ||
@Nullable | ||
public abstract ClientPlayNetworkHandler getNetworkHandler(); | ||
|
||
@Shadow | ||
@Nullable | ||
public ClientPlayerEntity player; | ||
|
||
// On join a new world/server | ||
@Inject(at = @At("HEAD"), method = "joinWorld") | ||
public void joinWorld(ClientWorld world, DownloadingTerrainScreen.WorldEntryReason worldEntryReason, CallbackInfo ci) { | ||
Printer.worldBottomY = world.getBottomY(); | ||
Printer.worldTopY = world.getTopY(); | ||
} | ||
|
||
@Inject(at = @At("HEAD"), method = "tick") | ||
public void onPrinterTickCount(CallbackInfo info) { | ||
BedrockBreaker.tick(); | ||
InventoryUtils.tick(); | ||
FakeAccurateBlockPlacement.tick(this.getNetworkHandler(), this.player); | ||
} | ||
|
||
@Inject(at = @At("HEAD"), method = "doItemUse") | ||
public void getIfBlockEntity(CallbackInfo info) { | ||
if (crosshairTarget != null && crosshairTarget.getType() == HitResult.Type.BLOCK && (this.world != null ? this.world.getBlockEntity(((BlockHitResult) crosshairTarget).getBlockPos()) : null) != null) { | ||
ItemInputs.clickedPos = ((BlockHitResult) crosshairTarget).getBlockPos(); | ||
} else { | ||
ItemInputs.clickedPos = null; | ||
} | ||
} | ||
} |
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
File renamed without changes.
Oops, something went wrong.