From 2f56dff236fd81c6dce808d2cbf5e2c7521e11b6 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Wed, 26 Feb 2020 19:10:16 +0000 Subject: [PATCH] Initial port to 20w09a --- build.gradle | 2 +- fabric-loot-tables-v1/build.gradle | 2 +- .../fabricmc/fabric/mixin/loot/table/MixinLootManager.java | 6 +++--- fabric-renderer-api-v1/build.gradle | 2 +- .../net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java | 2 +- fabric-renderer-indigo/build.gradle | 2 +- .../renderer/accessor/AccessAmbientOcclusionCalculator.java | 2 +- .../impl/client/indigo/renderer/aocalc/AoCalculator.java | 4 ++-- .../indigo/renderer/MixinAmbientOcclusionCalculator.java | 6 +++--- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 806aadbc4..6abb9b2ec 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ def ENV = System.getenv() class Globals { static def baseVersion = "0.4.33" - static def mcVersion = "20w07a" + static def mcVersion = "20w09a" static def yarnVersion = "+build.1" } diff --git a/fabric-loot-tables-v1/build.gradle b/fabric-loot-tables-v1/build.gradle index ffa1e37fd..78564a386 100644 --- a/fabric-loot-tables-v1/build.gradle +++ b/fabric-loot-tables-v1/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-loot-tables-v1" -version = getSubprojectVersion(project, "0.1.5") +version = getSubprojectVersion(project, "0.1.6") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/table/MixinLootManager.java b/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/table/MixinLootManager.java index fb96896ef..abd255c86 100644 --- a/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/table/MixinLootManager.java +++ b/fabric-loot-tables-v1/src/main/java/net/fabricmc/fabric/mixin/loot/table/MixinLootManager.java @@ -38,13 +38,13 @@ import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback; @Mixin(LootManager.class) public class MixinLootManager { - @Shadow private Map suppliers; + @Shadow private Map tables; @Inject(method = "apply", at = @At("RETURN")) private void apply(Map objectMap, ResourceManager manager, Profiler profiler, CallbackInfo info) { Map newSuppliers = new HashMap<>(); - suppliers.forEach((id, supplier) -> { + tables.forEach((id, supplier) -> { FabricLootSupplierBuilder builder = FabricLootSupplierBuilder.of(supplier); //noinspection ConstantConditions @@ -55,6 +55,6 @@ public class MixinLootManager { newSuppliers.computeIfAbsent(id, (i) -> builder.create()); }); - suppliers = ImmutableMap.copyOf(newSuppliers); + tables = ImmutableMap.copyOf(newSuppliers); } } diff --git a/fabric-renderer-api-v1/build.gradle b/fabric-renderer-api-v1/build.gradle index 4967cfe99..839d72517 100644 --- a/fabric-renderer-api-v1/build.gradle +++ b/fabric-renderer-api-v1/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-renderer-api-v1" -version = getSubprojectVersion(project, "0.2.10") +version = getSubprojectVersion(project, "0.2.11") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java index f55c95056..952293be2 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/QuadView.java @@ -122,7 +122,7 @@ public interface QuadView { default BakedQuad toBakedQuad(int spriteIndex, Sprite sprite, boolean isItem) { int[] vertexData = new int[VANILLA_QUAD_STRIDE]; toVanilla(spriteIndex, vertexData, 0, isItem); - return new BakedQuad(vertexData, colorIndex(), lightFace(), sprite); + return new BakedQuad(vertexData, colorIndex(), lightFace(), sprite, true /* TODO:20w09a check me */); } /** diff --git a/fabric-renderer-indigo/build.gradle b/fabric-renderer-indigo/build.gradle index a02280eb7..489d17873 100644 --- a/fabric-renderer-indigo/build.gradle +++ b/fabric-renderer-indigo/build.gradle @@ -1,5 +1,5 @@ archivesBaseName = "fabric-renderer-indigo" -version = getSubprojectVersion(project, "0.2.24") +version = getSubprojectVersion(project, "0.2.25") dependencies { compile project(path: ':fabric-api-base', configuration: 'dev') diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/accessor/AccessAmbientOcclusionCalculator.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/accessor/AccessAmbientOcclusionCalculator.java index 77e13f2aa..ff07c6bbb 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/accessor/AccessAmbientOcclusionCalculator.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/accessor/AccessAmbientOcclusionCalculator.java @@ -28,5 +28,5 @@ public interface AccessAmbientOcclusionCalculator { int[] fabric_brightness(); - void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits); + void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits, boolean shade); } diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/aocalc/AoCalculator.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/aocalc/AoCalculator.java index 47039d3cb..e72d263fb 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/aocalc/AoCalculator.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/impl/client/indigo/renderer/aocalc/AoCalculator.java @@ -114,7 +114,7 @@ public class AoCalculator { } public void compute(MutableQuadViewImpl quad, boolean isVanilla) { - final AoConfig config = Indigo.AMBIENT_OCCLUSION_MODE; + final AoConfig config = AoConfig.VANILLA; // Indigo.AMBIENT_OCCLUSION_MODE; TODO:20w09a Fix me final boolean shouldCompare; switch (config) { @@ -188,7 +188,7 @@ public class AoCalculator { quad.toVanilla(0, vertexData, 0, false); VanillaAoHelper.updateShape(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, vertexData, face, vanillaAoData, vanillaAoControlBits); - vanillaCalc.fabric_apply(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, quad.lightFace(), vanillaAoData, vanillaAoControlBits); + vanillaCalc.fabric_apply(blockInfo.blockView, blockInfo.blockState, blockInfo.blockPos, quad.lightFace(), vanillaAoData, vanillaAoControlBits, true /* TODO:20w09a check me */); System.arraycopy(vanillaCalc.fabric_colorMultiplier(), 0, aoDest, 0, 4); System.arraycopy(vanillaCalc.fabric_brightness(), 0, lightDest, 0, 4); diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/mixin/client/indigo/renderer/MixinAmbientOcclusionCalculator.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/mixin/client/indigo/renderer/MixinAmbientOcclusionCalculator.java index 24d28ed71..9233b7545 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/mixin/client/indigo/renderer/MixinAmbientOcclusionCalculator.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/fabric/mixin/client/indigo/renderer/MixinAmbientOcclusionCalculator.java @@ -34,7 +34,7 @@ public abstract class MixinAmbientOcclusionCalculator implements AccessAmbientOc @Shadow private int[] light; @Shadow - public abstract void apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits); + public abstract void apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits, boolean shade); @Override public float[] fabric_colorMultiplier() { @@ -47,7 +47,7 @@ public abstract class MixinAmbientOcclusionCalculator implements AccessAmbientOc } @Override - public void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits) { - apply(blockRenderView, blockState, pos, face, aoData, controlBits); + public void fabric_apply(BlockRenderView blockRenderView, BlockState blockState, BlockPos pos, Direction face, float[] aoData, BitSet controlBits, boolean shade) { + apply(blockRenderView, blockState, pos, face, aoData, controlBits, shade); } }