mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
update to 18w49a.2
This commit is contained in:
parent
3df386717e
commit
dba0d0c2de
5 changed files with 17 additions and 17 deletions
|
@ -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'
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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<BlockEntityUpdateClientPacket> info) {
|
||||
@Inject(at = @At("HEAD"), method = "toUpdatePacket", cancellable = true)
|
||||
public void toUpdatePacket(CallbackInfoReturnable<BlockEntityUpdateClientPacket> 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<CompoundTag> info) {
|
||||
@Inject(at = @At("RETURN"), method = "toInitialChunkDataTag", cancellable = true)
|
||||
public void toInitialChunkDataTag(CallbackInfoReturnable<CompoundTag> info) {
|
||||
Object self = (Object) this;
|
||||
|
||||
if (self instanceof ClientSerializable && info.getReturnValue() != null) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue