Update to latest Fabric/yarn

This commit is contained in:
Shadowfacts 2018-12-22 13:37:19 -05:00
parent cb98afd9f3
commit 7c059deb02
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
3 changed files with 11 additions and 11 deletions

View File

@ -14,9 +14,9 @@ minecraft {
dependencies {
minecraft "com.mojang:minecraft:18w50a"
mappings "net.fabricmc:yarn:18w50a.48"
modCompile "net.fabricmc:fabric-loader:0.2.0.71"
mappings "net.fabricmc:yarn:18w50a.63"
modCompile "net.fabricmc:fabric-loader:0.3.0.73"
// Fabric API. This is technically optional, but you probably want it anyway.
modCompile "net.fabricmc:fabric:0.1.1.58"
modCompile "net.fabricmc:fabric:0.1.2.62"
}

View File

@ -5,7 +5,7 @@ import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.client.render.model.json.ModelItemPropertyOverrideList;
import net.minecraft.client.render.model.json.ModelTransformations;
import net.minecraft.client.render.model.json.ModelTransformation;
import net.minecraft.client.texture.Sprite;
import net.minecraft.util.math.Direction;
import net.shadowfacts.simplemultipart.container.MultipartContainerBlockState;
@ -60,8 +60,8 @@ public class MultipartContainerBakedModel implements BakedModel {
}
@Override
public ModelTransformations getTransformations() {
return ModelTransformations.ORIGIN;
public ModelTransformation getTransformations() {
return ModelTransformation.ORIGIN;
}
@Override

View File

@ -1,11 +1,11 @@
package net.shadowfacts.simplemultipart.mixin.client;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
import net.minecraft.block.RenderTypeBlock;
import net.minecraft.client.render.BufferBuilder;
import net.minecraft.client.render.block.BlockModelRenderer;
import net.minecraft.client.render.block.BlockRenderManager;
import net.minecraft.client.render.block.BlockRenderer;
import net.minecraft.client.render.model.BakedModel;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ExtendedBlockView;
@ -25,7 +25,7 @@ import java.util.Random;
public abstract class MixinBlockRenderManager {
@Shadow
private BlockRenderer renderer;
private BlockModelRenderer renderer;
@Shadow
public abstract BakedModel getModel(BlockState var1);
@ -33,12 +33,12 @@ public abstract class MixinBlockRenderManager {
@Inject(at = @At("HEAD"), method = "tesselateBlock", cancellable = true)
public void tesselateBlock(BlockState state, BlockPos pos, ExtendedBlockView world, BufferBuilder buffer, Random random, CallbackInfoReturnable<Boolean> info) {
Block block = state.getBlock();
if (state.getRenderType() == RenderTypeBlock.MODEL && block instanceof RenderStateProvider) {
if (state.getRenderType() == BlockRenderType.MODEL && block instanceof RenderStateProvider) {
RenderStateProvider provider = (RenderStateProvider)block;
BlockState renderState = provider.getStateForRendering(state, pos, world);
BakedModel model = getModel(state);
boolean result = renderer.tesselate(world, model, renderState, pos, buffer, true, random, state.getPosRandom(pos));
boolean result = renderer.tesselate(world, model, renderState, pos, buffer, true, random, state.getRenderingSeed(pos));
info.setReturnValue(result);
info.cancel();
}