mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-04 20:06:06 +00:00
[Fabric] Update fabric/yarn versions to 1.14.3.
This commit is contained in:
parent
aa8d34c913
commit
efc4d7cba1
@ -22,9 +22,9 @@ buildscript {
|
|||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'fabric-loom'
|
apply plugin: 'fabric-loom'
|
||||||
|
|
||||||
def minecraftVersion = "1.14.2"
|
def minecraftVersion = "1.14.3"
|
||||||
def fabricVersion = "0.3.0+build.185"
|
def fabricVersion = "0.3.0+build.187"
|
||||||
def yarnMappings = "1.14.2+build.7"
|
def yarnMappings = "1.14.3+build.1"
|
||||||
def loaderVersion = "0.4.8+build.155"
|
def loaderVersion = "0.4.8+build.155"
|
||||||
|
|
||||||
configurations.all { Configuration it ->
|
configurations.all { Configuration it ->
|
||||||
|
@ -51,7 +51,7 @@ class FabricBiomeRegistry implements BiomeRegistry {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return biome.getTextComponent().getString();
|
return biome.getName().asFormattedString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ public class FabricBlockRegistry extends BundledBlockRegistry {
|
|||||||
public String getName(BlockType blockType) {
|
public String getName(BlockType blockType) {
|
||||||
Block block = FabricAdapter.adapt(blockType);
|
Block block = FabricAdapter.adapt(blockType);
|
||||||
if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
|
if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
|
||||||
return block.getTextComponent().getFormattedText();
|
return block.getName().asFormattedString();
|
||||||
} else {
|
} else {
|
||||||
return super.getName(blockType);
|
return super.getName(blockType);
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,8 @@ import net.minecraft.nbt.FloatTag;
|
|||||||
import net.minecraft.nbt.ListTag;
|
import net.minecraft.nbt.ListTag;
|
||||||
import net.minecraft.nbt.StringTag;
|
import net.minecraft.nbt.StringTag;
|
||||||
import net.minecraft.nbt.Tag;
|
import net.minecraft.nbt.Tag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.network.chat.TextComponent;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.DyeColor;
|
import net.minecraft.util.DyeColor;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.JsonHelper;
|
import net.minecraft.util.JsonHelper;
|
||||||
@ -1839,12 +1839,12 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
if (!"null".equals(s) && !Strings.isNullOrEmpty(s)) {
|
if (!"null".equals(s) && !Strings.isNullOrEmpty(s)) {
|
||||||
if ((s.charAt(0) != 34 || s.charAt(s.length() - 1) != 34) && (s.charAt(0) != 123 || s.charAt(s.length() - 1) != 125)) {
|
if ((s.charAt(0) != 34 || s.charAt(s.length() - 1) != 34) && (s.charAt(0) != 123 || s.charAt(s.length() - 1) != 125)) {
|
||||||
object = new TextComponent(s);
|
object = new LiteralText(s);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
object = JsonHelper.deserialize(DataConverterSignText.a, s, Component.class, true);
|
object = JsonHelper.deserialize(DataConverterSignText.a, s, Text.class, true);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
object = new TextComponent("");
|
object = new LiteralText("");
|
||||||
}
|
}
|
||||||
} catch (JsonParseException jsonparseexception) {
|
} catch (JsonParseException jsonparseexception) {
|
||||||
;
|
;
|
||||||
@ -1852,7 +1852,7 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
try {
|
try {
|
||||||
object = Component.Serializer.fromJsonString(s);
|
object = Text.Serializer.fromJson(s);
|
||||||
} catch (JsonParseException jsonparseexception1) {
|
} catch (JsonParseException jsonparseexception1) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -1860,21 +1860,21 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
try {
|
try {
|
||||||
object = Component.Serializer.fromLenientJsonString(s);
|
object = Text.Serializer.fromLenientJson(s);
|
||||||
} catch (JsonParseException jsonparseexception2) {
|
} catch (JsonParseException jsonparseexception2) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
object = new TextComponent(s);
|
object = new LiteralText(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
object = new TextComponent("");
|
object = new LiteralText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttaglist.set(i, new StringTag(Component.Serializer.toJsonString((Component) object)));
|
nbttaglist.set(i, new StringTag(Text.Serializer.toJson((Text) object)));
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound1.put("pages", nbttaglist);
|
nbttagcompound1.put("pages", nbttaglist);
|
||||||
@ -2432,18 +2432,18 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
private static class DataConverterSignText implements DataConverter {
|
private static class DataConverterSignText implements DataConverter {
|
||||||
|
|
||||||
public static final Gson a = new GsonBuilder().registerTypeAdapter(Component.class, new JsonDeserializer() {
|
public static final Gson a = new GsonBuilder().registerTypeAdapter(Text.class, new JsonDeserializer() {
|
||||||
Component a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
Text a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||||
if (jsonelement.isJsonPrimitive()) {
|
if (jsonelement.isJsonPrimitive()) {
|
||||||
return new TextComponent(jsonelement.getAsString());
|
return new LiteralText(jsonelement.getAsString());
|
||||||
} else if (jsonelement.isJsonArray()) {
|
} else if (jsonelement.isJsonArray()) {
|
||||||
JsonArray jsonarray = jsonelement.getAsJsonArray();
|
JsonArray jsonarray = jsonelement.getAsJsonArray();
|
||||||
Component iTextComponent = null;
|
Text iTextComponent = null;
|
||||||
Iterator iterator = jsonarray.iterator();
|
Iterator iterator = jsonarray.iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
JsonElement jsonelement1 = (JsonElement) iterator.next();
|
JsonElement jsonelement1 = (JsonElement) iterator.next();
|
||||||
Component iTextComponent1 = this.a(jsonelement1, jsonelement1.getClass(), jsondeserializationcontext);
|
Text iTextComponent1 = this.a(jsonelement1, jsonelement1.getClass(), jsondeserializationcontext);
|
||||||
|
|
||||||
if (iTextComponent == null) {
|
if (iTextComponent == null) {
|
||||||
iTextComponent = iTextComponent1;
|
iTextComponent = iTextComponent1;
|
||||||
@ -2486,12 +2486,12 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
if (!"null".equals(s1) && !Strings.isNullOrEmpty(s1)) {
|
if (!"null".equals(s1) && !Strings.isNullOrEmpty(s1)) {
|
||||||
if ((s1.charAt(0) != 34 || s1.charAt(s1.length() - 1) != 34) && (s1.charAt(0) != 123 || s1.charAt(s1.length() - 1) != 125)) {
|
if ((s1.charAt(0) != 34 || s1.charAt(s1.length() - 1) != 34) && (s1.charAt(0) != 123 || s1.charAt(s1.length() - 1) != 125)) {
|
||||||
object = new TextComponent(s1);
|
object = new LiteralText(s1);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
object = JsonHelper.deserialize(DataConverterSignText.a, s1, Component.class, true);
|
object = JsonHelper.deserialize(DataConverterSignText.a, s1, Text.class, true);
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
object = new TextComponent("");
|
object = new LiteralText("");
|
||||||
}
|
}
|
||||||
} catch (JsonParseException jsonparseexception) {
|
} catch (JsonParseException jsonparseexception) {
|
||||||
;
|
;
|
||||||
@ -2499,7 +2499,7 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
try {
|
try {
|
||||||
object = Component.Serializer.fromJsonString(s1);
|
object = Text.Serializer.fromJson(s1);
|
||||||
} catch (JsonParseException jsonparseexception1) {
|
} catch (JsonParseException jsonparseexception1) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -2507,21 +2507,21 @@ class FabricDataFixer extends DataFixerBuilder implements com.sk89q.worldedit.wo
|
|||||||
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
try {
|
try {
|
||||||
object = Component.Serializer.fromLenientJsonString(s1);
|
object = Text.Serializer.fromLenientJson(s1);
|
||||||
} catch (JsonParseException jsonparseexception2) {
|
} catch (JsonParseException jsonparseexception2) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (object == null) {
|
if (object == null) {
|
||||||
object = new TextComponent(s1);
|
object = new LiteralText(s1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
object = new TextComponent("");
|
object = new LiteralText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound.putString(s, Component.Serializer.toJsonString((Component) object));
|
nbttagcompound.putString(s, Text.Serializer.toJson((Text) object));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,24 +39,24 @@ import com.sk89q.worldedit.world.block.BaseBlock;
|
|||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import net.minecraft.ChatFormat;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.network.packet.BlockEntityUpdateS2CPacket;
|
import net.minecraft.client.network.packet.BlockEntityUpdateS2CPacket;
|
||||||
import net.minecraft.client.network.packet.BlockUpdateS2CPacket;
|
import net.minecraft.client.network.packet.BlockUpdateS2CPacket;
|
||||||
import net.minecraft.client.network.packet.CustomPayloadS2CPacket;
|
import net.minecraft.client.network.packet.CustomPayloadS2CPacket;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.network.chat.TextComponent;
|
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.PacketByteBuf;
|
import net.minecraft.util.PacketByteBuf;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
public class FabricPlayer extends AbstractPlayerActor {
|
public class FabricPlayer extends AbstractPlayerActor {
|
||||||
|
|
||||||
// see ClientPlayNetHandler: search for "invalid update packet", lots of hardcoded consts
|
// see ClientPlayNetHandler: search for "invalid update packet", lots of hardcoded consts
|
||||||
@ -81,7 +81,7 @@ public class FabricPlayer extends AbstractPlayerActor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return this.player.getName().getFormattedText();
|
return this.player.getName().asFormattedString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -130,33 +130,33 @@ public class FabricPlayer extends AbstractPlayerActor {
|
|||||||
@Override
|
@Override
|
||||||
public void printRaw(String msg) {
|
public void printRaw(String msg) {
|
||||||
for (String part : msg.split("\n")) {
|
for (String part : msg.split("\n")) {
|
||||||
this.player.sendMessage(new TextComponent(part));
|
this.player.sendMessage(new LiteralText(part));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void printDebug(String msg) {
|
public void printDebug(String msg) {
|
||||||
sendColorized(msg, ChatFormat.GRAY);
|
sendColorized(msg, Formatting.GRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void print(String msg) {
|
public void print(String msg) {
|
||||||
sendColorized(msg, ChatFormat.LIGHT_PURPLE);
|
sendColorized(msg, Formatting.LIGHT_PURPLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void printError(String msg) {
|
public void printError(String msg) {
|
||||||
sendColorized(msg, ChatFormat.RED);
|
sendColorized(msg, Formatting.RED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void print(Component component) {
|
public void print(Component component) {
|
||||||
this.player.sendMessage(net.minecraft.network.chat.Component.Serializer.fromJsonString(GsonComponentSerializer.INSTANCE.serialize(component)));
|
this.player.sendMessage(Text.Serializer.fromJson(GsonComponentSerializer.INSTANCE.serialize(component)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void sendColorized(String msg, ChatFormat formatting) {
|
private void sendColorized(String msg, Formatting formatting) {
|
||||||
for (String part : msg.split("\n")) {
|
for (String part : msg.split("\n")) {
|
||||||
TextComponent component = new TextComponent(part);
|
LiteralText component = new LiteralText(part);
|
||||||
component.getStyle().setColor(formatting);
|
component.getStyle().setColor(formatting);
|
||||||
this.player.sendMessage(component);
|
this.player.sendMessage(component);
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,15 @@ package com.sk89q.worldedit.fabric;
|
|||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.damage.DamageSource;
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
import net.minecraft.network.chat.Component;
|
|
||||||
import net.minecraft.server.network.ServerPlayerEntity;
|
import net.minecraft.server.network.ServerPlayerEntity;
|
||||||
import net.minecraft.server.network.ServerPlayerInteractionManager;
|
import net.minecraft.server.network.ServerPlayerInteractionManager;
|
||||||
import net.minecraft.server.world.ServerWorld;
|
import net.minecraft.server.world.ServerWorld;
|
||||||
import net.minecraft.stat.Stat;
|
import net.minecraft.stat.Stat;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class WorldEditFakePlayer extends ServerPlayerEntity {
|
public class WorldEditFakePlayer extends ServerPlayerEntity {
|
||||||
private static final GameProfile FAKE_WORLDEDIT_PROFILE = new GameProfile(UUID.nameUUIDFromBytes("worldedit".getBytes()), "[WorldEdit]");
|
private static final GameProfile FAKE_WORLDEDIT_PROFILE = new GameProfile(UUID.nameUUIDFromBytes("worldedit".getBytes()), "[WorldEdit]");
|
||||||
@ -53,11 +52,11 @@ public class WorldEditFakePlayer extends ServerPlayerEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(Component component) {
|
public void sendMessage(Text component) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addChatMessage(Component component, boolean opt) {
|
public void addChatMessage(Text component, boolean opt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Loading…
Reference in New Issue
Block a user