From dba0d0c2def63bb5f90e7689141551fedda18143 Mon Sep 17 00:00:00 2001 From: asie Date: Wed, 5 Dec 2018 19:42:11 +0100 Subject: [PATCH] update to 18w49a.2 --- build.gradle | 6 +++--- .../net/fabricmc/fabric/helpers/FabricBlockBuilder.java | 8 ++++---- .../fabric/mixin/block/entity/MixinBlockEntity.java | 8 ++++---- .../mixin/block/entity/MixinClientPlayNetworkHandler.java | 4 ++-- .../fabricmc/fabric/mixin/helpers/MixinBlockBuilder.java | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 4a813bed7..703c8b64d 100644 --- a/build.gradle +++ b/build.gradle @@ -30,9 +30,9 @@ minecraft { } dependencies { - minecraft "com.mojang:minecraft:18w48b" - mappings "net.fabricmc:pomf:18w48b.16" - modCompile "net.fabricmc:fabric-loader:0.1.0.49" + minecraft "com.mojang:minecraft:18w49a" + mappings "net.fabricmc:pomf:18w49a.2" + modCompile "net.fabricmc:fabric-loader:0.1.0.52" } apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/maven.gradle' diff --git a/src/main/java/net/fabricmc/fabric/helpers/FabricBlockBuilder.java b/src/main/java/net/fabricmc/fabric/helpers/FabricBlockBuilder.java index a20c382fa..afe7f0f10 100644 --- a/src/main/java/net/fabricmc/fabric/helpers/FabricBlockBuilder.java +++ b/src/main/java/net/fabricmc/fabric/helpers/FabricBlockBuilder.java @@ -19,19 +19,19 @@ package net.fabricmc.fabric.helpers; import net.fabricmc.fabric.tools.ToolManager; import net.minecraft.block.Block; import net.minecraft.block.Material; +import net.minecraft.block.MaterialColor; import net.minecraft.item.Item; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.tag.Tag; import net.minecraft.util.DyeColor; import net.minecraft.util.Identifier; -import net.minecraft.util.MapColor; import net.minecraft.world.loot.LootTables; import java.util.function.Function; public class FabricBlockBuilder { public interface Delegate { - void fabric_setMapColor(MapColor color); + void fabric_setMapColor(MaterialColor color); void fabric_setCollidable(boolean value); void fabric_setSoundGroup(BlockSoundGroup group); void fabric_setLuminance(int value); @@ -81,13 +81,13 @@ public class FabricBlockBuilder { /* DELEGATE WRAPPERS */ - public FabricBlockBuilder setMapColor(MapColor color) { + public FabricBlockBuilder setMapColor(MaterialColor color) { castDelegate.fabric_setMapColor(color); return this; } public FabricBlockBuilder setMapColor(DyeColor color) { - castDelegate.fabric_setMapColor(color.getMapColor()); + castDelegate.fabric_setMapColor(color.getMaterialColor()); return this; } diff --git a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java index fd49e9ccd..be26e164b 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java +++ b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinBlockEntity.java @@ -40,8 +40,8 @@ public abstract class MixinBlockEntity { @Shadow public abstract BlockPos getPos(); - @Inject(at = @At("HEAD"), method = "getUpdatePacket", cancellable = true) - public void getUpdatePacket(CallbackInfoReturnable info) { + @Inject(at = @At("HEAD"), method = "toUpdatePacket", cancellable = true) + public void toUpdatePacket(CallbackInfoReturnable info) { Object self = (Object) this; if (self instanceof ClientSerializable) { @@ -64,8 +64,8 @@ public abstract class MixinBlockEntity { } } - @Inject(at = @At("RETURN"), method = "serializeInitialChunkData", cancellable = true) - public void serializeInitialChunkData(CallbackInfoReturnable info) { + @Inject(at = @At("RETURN"), method = "toInitialChunkDataTag", cancellable = true) + public void toInitialChunkDataTag(CallbackInfoReturnable info) { Object self = (Object) this; if (self instanceof ClientSerializable && info.getReturnValue() != null) { diff --git a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java index 74d5b1162..46d834cac 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java +++ b/src/main/java/net/fabricmc/fabric/mixin/block/entity/MixinClientPlayNetworkHandler.java @@ -64,12 +64,12 @@ public class MixinClientPlayNetworkHandler { } } - @Redirect(method = "onChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;deserialize(Lnet/minecraft/nbt/CompoundTag;)V")) + @Redirect(method = "onChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/block/entity/BlockEntity;fromTag(Lnet/minecraft/nbt/CompoundTag;)V")) public void deserializeBlockEntityChunkData(BlockEntity entity, CompoundTag tag) { if (entity instanceof ClientSerializable) { ((ClientSerializable) entity).fromClientTag(tag); } else { - entity.deserialize(tag); + entity.fromTag(tag); } } } diff --git a/src/main/java/net/fabricmc/fabric/mixin/helpers/MixinBlockBuilder.java b/src/main/java/net/fabricmc/fabric/mixin/helpers/MixinBlockBuilder.java index 7b9423898..748451835 100644 --- a/src/main/java/net/fabricmc/fabric/mixin/helpers/MixinBlockBuilder.java +++ b/src/main/java/net/fabricmc/fabric/mixin/helpers/MixinBlockBuilder.java @@ -19,9 +19,9 @@ package net.fabricmc.fabric.mixin.helpers; import net.fabricmc.fabric.helpers.FabricBlockBuilder; import net.minecraft.block.Block; import net.minecraft.block.Material; +import net.minecraft.block.MaterialColor; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.util.Identifier; -import net.minecraft.util.MapColor; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -30,7 +30,7 @@ public class MixinBlockBuilder implements FabricBlockBuilder.Delegate { @Shadow private Material material; @Shadow - private MapColor mapColor; + private MaterialColor materialColor; @Shadow private boolean collidable; @Shadow @@ -49,8 +49,8 @@ public class MixinBlockBuilder implements FabricBlockBuilder.Delegate { private Identifier dropTableId; @Override - public void fabric_setMapColor(MapColor color) { - mapColor = color; + public void fabric_setMapColor(MaterialColor color) { + materialColor = color; } @Override