From f5c2d193a527960d6624abdade17f4f3109b0f93 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 19 Dec 2018 20:23:04 -0500 Subject: [PATCH] Update Fabric/Yarn --- build.gradle | 6 +++--- .../container/MultipartContainerBlock.java | 2 +- .../container/MultipartContainerEventHandler.java | 2 +- .../mixin/client/MixinBlockRenderManager.java | 8 +++----- .../simplemultipart/test/TestMultipartModel.java | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 5a81ee8..012f5b9 100644 --- a/build.gradle +++ b/build.gradle @@ -14,9 +14,9 @@ minecraft { dependencies { minecraft "com.mojang:minecraft:18w50a" - mappings "net.fabricmc:yarn:18w50a.9" - modCompile "net.fabricmc:fabric-loader:0.2.0.70" + mappings "net.fabricmc:yarn:18w50a.48" + modCompile "net.fabricmc:fabric-loader:0.2.0.71" // Fabric API. This is technically optional, but you probably want it anyway. - modCompile "net.fabricmc:fabric:0.1.1.55" + modCompile "net.fabricmc:fabric:0.1.1.58" } diff --git a/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerBlock.java b/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerBlock.java index 21dffec..4a7784e 100644 --- a/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerBlock.java +++ b/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerBlock.java @@ -54,7 +54,7 @@ public class MultipartContainerBlock extends Block implements BlockEntityProvide VoxelShape shape = null; for (Map.Entry e : container.getParts().entrySet()) { VoxelShape partShape = e.getValue().getBoundingShape(e.getKey(), container); - shape = shape == null ? partShape : VoxelShapes.method_1084(shape, partShape); + shape = shape == null ? partShape : VoxelShapes.union(shape, partShape); } return shape == null ? VoxelShapes.empty() : shape; } diff --git a/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerEventHandler.java b/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerEventHandler.java index a653a9e..11ce65a 100644 --- a/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerEventHandler.java +++ b/src/main/java/net/shadowfacts/simplemultipart/container/MultipartContainerEventHandler.java @@ -21,7 +21,7 @@ public class MultipartContainerEventHandler { } private static ActionResult handleBlockAttack(PlayerEntity player, World world, Hand hand, BlockPos pos, Direction direction) { - if (world.isRemote || world.getBlockState(pos).getBlock() != SimpleMultipart.containerBlock) { + if (world.isClient || world.getBlockState(pos).getBlock() != SimpleMultipart.containerBlock) { return ActionResult.PASS; } diff --git a/src/main/java/net/shadowfacts/simplemultipart/mixin/client/MixinBlockRenderManager.java b/src/main/java/net/shadowfacts/simplemultipart/mixin/client/MixinBlockRenderManager.java index 2fa2ff4..233c8e7 100644 --- a/src/main/java/net/shadowfacts/simplemultipart/mixin/client/MixinBlockRenderManager.java +++ b/src/main/java/net/shadowfacts/simplemultipart/mixin/client/MixinBlockRenderManager.java @@ -3,7 +3,7 @@ package net.shadowfacts.simplemultipart.mixin.client; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.RenderTypeBlock; -import net.minecraft.client.render.VertexBuffer; +import net.minecraft.client.render.BufferBuilder; import net.minecraft.client.render.block.BlockRenderManager; import net.minecraft.client.render.block.BlockRenderer; import net.minecraft.client.render.model.BakedModel; @@ -26,14 +26,12 @@ public abstract class MixinBlockRenderManager { @Shadow private BlockRenderer renderer; - @Shadow - private Random field_4169; @Shadow public abstract BakedModel getModel(BlockState var1); - @Inject(at = @At("HEAD"), method = "method_3355", cancellable = true) - public void method_3355(BlockState state, BlockPos pos, ExtendedBlockView world, VertexBuffer buffer, Random random, CallbackInfoReturnable info) { + @Inject(at = @At("HEAD"), method = "tesselateBlock", cancellable = true) + public void tesselateBlock(BlockState state, BlockPos pos, ExtendedBlockView world, BufferBuilder buffer, Random random, CallbackInfoReturnable info) { Block block = state.getBlock(); if (state.getRenderType() == RenderTypeBlock.MODEL && block instanceof RenderStateProvider) { RenderStateProvider provider = (RenderStateProvider)block; diff --git a/src/test/java/net/shadowfacts/simplemultipart/test/TestMultipartModel.java b/src/test/java/net/shadowfacts/simplemultipart/test/TestMultipartModel.java index e5ef09e..a9bb828 100644 --- a/src/test/java/net/shadowfacts/simplemultipart/test/TestMultipartModel.java +++ b/src/test/java/net/shadowfacts/simplemultipart/test/TestMultipartModel.java @@ -9,7 +9,7 @@ import net.minecraft.client.render.model.json.ModelElementFace; import net.minecraft.client.render.model.json.ModelElementTexture; import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.sortme.Vector3f; +import net.minecraft.client.util.math.Vector3f; import net.minecraft.util.math.Direction; import net.shadowfacts.simplemultipart.client.MultipartBakedModel; import net.shadowfacts.simplemultipart.multipart.MultipartSlot;