Canvas compat (Closes #2), Fix Z-Fighting

This commit is contained in:
Motschen
2021-01-23 10:47:14 +01:00
parent 2cffce91fd
commit fe5c2a7e1b
4 changed files with 13 additions and 7 deletions

View File

@@ -3,18 +3,18 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.16.4
yarn_mappings=1.16.4+build.7
loader_version=0.10.8
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.3
loader_version=0.11.1
# Mod Properties
mod_version = 1.0.0
mod_version = 1.1.0
maven_group = eu.midnightdust
archives_base_name = visualoverhaul
# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.28.4+1.16
fabric_version=0.29.4+1.16
auto_config_version = 3.2.0-unstable
cloth_config_version = 4.7.0-unstable

View File

@@ -10,13 +10,16 @@ import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl;
import net.fabricmc.fabric.impl.networking.ClientSidePacketRegistryImpl;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.block.entity.BrewingStandBlockEntity;
import net.minecraft.block.entity.JukeboxBlockEntity;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.MusicDiscItem;
import net.minecraft.util.Identifier;
@@ -40,6 +43,9 @@ public class VisualOverhaulClient implements ClientModInitializer {
// Block only registered on client, because it's just used for the renderer //
Registry.register(Registry.BLOCK, new Identifier("visualoverhaul","jukebox_top"), JukeBoxTop);
BlockRenderLayerMapImpl.INSTANCE.putBlock(Blocks.JUKEBOX, RenderLayer.getCutout());
BlockRenderLayerMapImpl.INSTANCE.putBlock(JukeBoxTop, RenderLayer.getCutout());
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.BREWING_STAND, BrewingStandBlockEntityRenderer::new);
BlockEntityRendererRegistry.INSTANCE.register(BlockEntityType.JUKEBOX, JukeboxBlockEntityRenderer::new);

View File

@@ -10,7 +10,7 @@
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.001, 16],
"to": [16, 0.01, 16],
"faces": {
"up": {"uv": [0, 0, 16, 16], "texture": "#3"}
}

View File

@@ -10,7 +10,7 @@
"elements": [
{
"from": [0, 0, 0],
"to": [16, 0.001, 16],
"to": [16, 0.01, 16],
"faces": {
"up": {"uv": [0, 0, 16, 16], "texture": "#3"}
}