Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-25 07:40:08 +01:00
Merge remote-tracking branch 'origin/master' into dev
# Conflicts: # .github/workflows/gradle.yml
Dieser Commit ist enthalten in:
Commit
9c68b30865
6
.github/workflows/gradle.yml
vendored
6
.github/workflows/gradle.yml
vendored
@ -9,8 +9,10 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout Repository
|
||||||
- uses: gradle/wrapper-validation-action@v1
|
uses: actions/checkout@v3
|
||||||
|
- name: Validate Gradle Wrapper
|
||||||
|
uses: gradle/wrapper-validation-action@v1
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
|
@ -21,10 +21,8 @@ import com.viaversion.viaversion.util.Config;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
|
||||||
|
|
||||||
public class ViaBackwardsConfig extends Config implements com.viaversion.viabackwards.api.ViaBackwardsConfig {
|
public class ViaBackwardsConfig extends Config implements com.viaversion.viabackwards.api.ViaBackwardsConfig {
|
||||||
|
|
||||||
@ -34,7 +32,6 @@ public class ViaBackwardsConfig extends Config implements com.viaversion.viaback
|
|||||||
private boolean alwaysShowOriginalMobName;
|
private boolean alwaysShowOriginalMobName;
|
||||||
private boolean fix1_13FormattedInventoryTitles;
|
private boolean fix1_13FormattedInventoryTitles;
|
||||||
private boolean handlePingsAsInvAcknowledgements;
|
private boolean handlePingsAsInvAcknowledgements;
|
||||||
private Map<String, String> chatTypeFormats;
|
|
||||||
|
|
||||||
public ViaBackwardsConfig(File configFile) {
|
public ViaBackwardsConfig(File configFile) {
|
||||||
super(configFile);
|
super(configFile);
|
||||||
@ -53,7 +50,6 @@ public class ViaBackwardsConfig extends Config implements com.viaversion.viaback
|
|||||||
fix1_13FormattedInventoryTitles = getBoolean("fix-formatted-inventory-titles", true);
|
fix1_13FormattedInventoryTitles = getBoolean("fix-formatted-inventory-titles", true);
|
||||||
alwaysShowOriginalMobName = getBoolean("always-show-original-mob-name", true);
|
alwaysShowOriginalMobName = getBoolean("always-show-original-mob-name", true);
|
||||||
handlePingsAsInvAcknowledgements = getBoolean("handle-pings-as-inv-acknowledgements", false);
|
handlePingsAsInvAcknowledgements = getBoolean("handle-pings-as-inv-acknowledgements", false);
|
||||||
chatTypeFormats = get("chat-types-1_19_1", Map.class, new HashMap<String, String>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -86,11 +82,6 @@ public class ViaBackwardsConfig extends Config implements com.viaversion.viaback
|
|||||||
return handlePingsAsInvAcknowledgements || Boolean.getBoolean("com.viaversion.handlePingsAsInvAcknowledgements");
|
return handlePingsAsInvAcknowledgements || Boolean.getBoolean("com.viaversion.handlePingsAsInvAcknowledgements");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable String chatTypeFormat(final String translationKey) {
|
|
||||||
return chatTypeFormats.get(translationKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public URL getDefaultConfigURL() {
|
public URL getDefaultConfigURL() {
|
||||||
return getClass().getClassLoader().getResource("assets/viabackwards/config.yml");
|
return getClass().getClassLoader().getResource("assets/viabackwards/config.yml");
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.viaversion.viabackwards.api;
|
package com.viaversion.viabackwards.api;
|
||||||
|
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
|
||||||
|
|
||||||
public interface ViaBackwardsConfig {
|
public interface ViaBackwardsConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,6 +50,4 @@ public interface ViaBackwardsConfig {
|
|||||||
boolean alwaysShowOriginalMobName();
|
boolean alwaysShowOriginalMobName();
|
||||||
|
|
||||||
boolean handlePingsAsInvAcknowledgements();
|
boolean handlePingsAsInvAcknowledgements();
|
||||||
|
|
||||||
@Nullable String chatTypeFormat(String translationKey);
|
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,7 @@ import com.viaversion.viaversion.api.type.Type;
|
|||||||
import com.viaversion.viaversion.api.type.types.version.Types1_19_3;
|
import com.viaversion.viaversion.api.type.types.version.Types1_19_3;
|
||||||
import com.viaversion.viaversion.api.type.types.version.Types1_19_4;
|
import com.viaversion.viaversion.api.type.types.version.Types1_19_4;
|
||||||
import com.viaversion.viaversion.libs.gson.JsonElement;
|
import com.viaversion.viaversion.libs.gson.JsonElement;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.ByteTag;
|
import com.viaversion.viaversion.libs.opennbt.tag.builtin.*;
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.ListTag;
|
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.StringTag;
|
|
||||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
|
||||||
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ClientboundPackets1_19_3;
|
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ClientboundPackets1_19_3;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
|
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
|
||||||
|
|
||||||
@ -72,7 +68,7 @@ public final class EntityPackets1_19_4 extends EntityRewriter<ClientboundPackets
|
|||||||
final ListTag biomes = biomeRegistry.get("value");
|
final ListTag biomes = biomeRegistry.get("value");
|
||||||
for (final Tag biomeTag : biomes) {
|
for (final Tag biomeTag : biomes) {
|
||||||
final CompoundTag biomeData = ((CompoundTag) biomeTag).get("element");
|
final CompoundTag biomeData = ((CompoundTag) biomeTag).get("element");
|
||||||
final ByteTag hasPrecipitation = biomeData.get("has_precipitation");
|
final NumberTag hasPrecipitation = biomeData.get("has_precipitation");
|
||||||
biomeData.put("precipitation", new StringTag(hasPrecipitation.asByte() == 1 ? "rain" : "none"));
|
biomeData.put("precipitation", new StringTag(hasPrecipitation.asByte() == 1 ? "rain" : "none"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -19,14 +19,4 @@ fix-formatted-inventory-titles: true
|
|||||||
#
|
#
|
||||||
# Sends inventory acknowledgement packets to act as a replacement for ping packets for sub 1.17 clients.
|
# Sends inventory acknowledgement packets to act as a replacement for ping packets for sub 1.17 clients.
|
||||||
# This only takes effect for ids in the short range. Useful for anticheat compatibility.
|
# This only takes effect for ids in the short range. Useful for anticheat compatibility.
|
||||||
handle-pings-as-inv-acknowledgements: false
|
handle-pings-as-inv-acknowledgements: false
|
||||||
#
|
|
||||||
# 1.19.1 chat type formats.
|
|
||||||
chat-types-1_19_1:
|
|
||||||
"chat.type.text": "<%s> %s"
|
|
||||||
"chat.type.announcement": "[%s] %s"
|
|
||||||
"commands.message.display.incoming": "%s whispers to you: %s"
|
|
||||||
"commands.message.display.outgoing": "You whisper to %s: %s"
|
|
||||||
"chat.type.team.text": "%s <%s> %s"
|
|
||||||
"chat.type.team.sent": "-> %s <%s> %s"
|
|
||||||
"chat.type.emote": "* %s %s"
|
|
@ -15,7 +15,7 @@ dependencyResolutionManagement {
|
|||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
plugins {
|
plugins {
|
||||||
id("net.kyori.blossom") version "1.2.0"
|
id("net.kyori.blossom") version "1.3.1"
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1"
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren