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 #72 from sakura-ryoko/multiversion
1.20.5 support
- Loading branch information
Showing
20 changed files
with
3,884 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,4 @@ bin/ | |
# fabric | ||
|
||
run/ | ||
/libs/ |
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 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Fabric Properties | ||
# check these on https://fabricmc.net/use | ||
minecraft_version=1.20.5-pre1 | ||
yarn_mappings=1.20.5-pre1+build.5 | ||
fabricapi_version=0.96.15+1.20.5 | ||
minecraft_version_out = 1.20.5-beta.1 | ||
|
||
# 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.5-pre1-0.19.0-beta.1.jar | ||
litematica_filename=litematica-fabric-1.20.5-pre1-0.18.0-beta.1.jar | ||
mod_menu_filename=modmenu-v10.0.0-alpha.3+1.20.5.c36bdf3.jar |
42 changes: 42 additions & 0 deletions
42
...ava/io/github/eatmyvenom/litematicin/mixin/Litematica/ChunkRendererSchematicVboMixin.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,42 @@ | ||
package io.github.eatmyvenom.litematicin.mixin.Litematica; | ||
|
||
import fi.dy.masa.litematica.render.schematic.BufferBuilderCache; | ||
import fi.dy.masa.litematica.render.schematic.ChunkCacheSchematic; | ||
import fi.dy.masa.litematica.render.schematic.ChunkRenderDataSchematic; | ||
import fi.dy.masa.litematica.render.schematic.ChunkRendererSchematicVbo; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.entity.BlockEntity; | ||
import net.minecraft.client.render.RenderLayer; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.util.math.BlockPos; | ||
import org.joml.Matrix4f; | ||
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.Set; | ||
|
||
import static io.github.eatmyvenom.litematicin.LitematicaMixinMod.RENDER_ONLY_HOLDING_ITEMS; | ||
import static io.github.eatmyvenom.litematicin.utils.InventoryUtils.ITEMS; | ||
|
||
@Mixin(value = ChunkRendererSchematicVbo.class, priority = 1200) | ||
public class ChunkRendererSchematicVboMixin | ||
{ | ||
|
||
@Shadow | ||
protected ChunkCacheSchematic schematicWorldView; | ||
|
||
@Inject(method = "renderBlocksAndOverlay", at = @At("HEAD"), cancellable = true, remap = false) | ||
private void onRenderBlocksAndOverlay(BlockPos pos, ChunkRenderDataSchematic data, Set<BlockEntity> tileEntities, Set<RenderLayer> usedLayers, Matrix4f matrix4f, BufferBuilderCache buffers, CallbackInfo ci) { | ||
if (!RENDER_ONLY_HOLDING_ITEMS.getBooleanValue()) return; | ||
BlockState stateSchematic = this.schematicWorldView.getBlockState(pos); | ||
Item item = stateSchematic.getBlock().asItem(); | ||
if (!ITEMS.contains(item)) { | ||
ci.cancel(); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.