mirror of
https://github.com/ViaVersion/ViaRewind.git
synced 2026-11-04 17:00:20 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d159189c0 | ||
|
|
2076294856 | ||
|
|
49f7bd22be | ||
|
|
298605874d | ||
|
|
35b94f1878 | ||
|
|
37955059c4 | ||
|
|
af4306bc81 | ||
|
|
98ca00f625 | ||
|
|
598804432b | ||
|
|
92bae0a5c4 | ||
|
|
d50b6a2f89 | ||
|
|
54cc085717 | ||
|
|
bd0d4c31b2 | ||
|
|
705c88f4b3 | ||
|
|
7306a795b9 | ||
|
|
dfdfad4bfc | ||
|
|
c87654848d | ||
|
|
08a7077d10 | ||
|
|
73afaaf493 | ||
|
|
f0f8038b18 | ||
|
|
540c0d0d47 | ||
|
|
d00b0c8afe | ||
|
|
b34385c09e | ||
|
|
ff47845df1 | ||
|
|
fc37b9c0ba | ||
|
|
e3baafa2a2 | ||
|
|
11914da37e | ||
|
|
30fa58af81 | ||
|
|
52b6aed005 | ||
|
|
9d74706e84 | ||
|
|
7d5ad45ffc |
No files matched your search
@@ -1,10 +1,14 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gradle"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
interval: "monthly"
|
||||
- package-ecosystem: "github-actions"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "monthly"
|
||||
@@ -1,21 +1,30 @@
|
||||
name: Build
|
||||
on: [ pull_request, push, workflow_dispatch ]
|
||||
on: [pull_request, push, workflow_dispatch]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
# Only run on PRs if the source branch is on a different repo. We do not need to run everything twice.
|
||||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # 5.1.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
check-latest: true
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Upload Artifacts to GitHub
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # 6.0.0
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
||||
@@ -4,6 +4,10 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- dev
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
@@ -11,18 +15,18 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # 6.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # 5.1.0
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
check-latest: true
|
||||
- name: Build
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Publish to Hangar
|
||||
env:
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ allprojects {
|
||||
subprojects {
|
||||
|
||||
dependencies {
|
||||
compileOnly("com.viaversion:viaversion:5.5.0")
|
||||
compileOnly("com.viaversion:viabackwards:5.5.0")
|
||||
compileOnly("com.viaversion:viaversion:5.7.1")
|
||||
compileOnly("com.viaversion:viabackwards:5.7.1")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,8 +18,11 @@
|
||||
package com.viaversion.viarewind;
|
||||
|
||||
import com.viaversion.viarewind.api.ViaRewindPlatform;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.provider.InventoryProvider;
|
||||
import com.viaversion.viarewind.provider.BukkitInventoryProvider;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import java.io.File;
|
||||
import com.viaversion.viaversion.api.platform.providers.ViaProviders;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class BukkitPlugin extends JavaPlugin implements ViaRewindPlatform {
|
||||
@@ -27,4 +30,10 @@ public class BukkitPlugin extends JavaPlugin implements ViaRewindPlatform {
|
||||
public BukkitPlugin() {
|
||||
Via.getManager().addEnableListener(() -> this.init(new File(getDataFolder(), "config.yml")));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
final ViaProviders providers = Via.getManager().getProviders();
|
||||
providers.use(InventoryProvider.class, new BukkitInventoryProvider());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.provider;
|
||||
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.provider.InventoryProvider;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public final class BukkitInventoryProvider extends InventoryProvider {
|
||||
|
||||
@Override
|
||||
public boolean hasElytra(final UserConnection connection) {
|
||||
final Player player = Bukkit.getPlayer(connection.getProtocolInfo().getUuid());
|
||||
final ItemStack chestplate = player.getInventory().getChestplate();
|
||||
return chestplate != null && chestplate.getType() == Material.ELYTRA;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,8 +9,9 @@ val viaProxy: Configuration by configurations.creating
|
||||
dependencies {
|
||||
compileOnly("io.netty:netty-all:4.0.20.Final")
|
||||
compileOnly("com.google.guava:guava:17.0")
|
||||
compileOnly("com.velocitypowered:velocity-native:3.4.0-SNAPSHOT")
|
||||
|
||||
viaProxy("net.raphimc:ViaProxy:3.4.5-SNAPSHOT") {
|
||||
viaProxy("net.raphimc:ViaProxy:[3.0.0,4.0.0)") {
|
||||
isTransitive = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind;
|
||||
|
||||
import com.viaversion.viarewind.api.ViaRewindPlatform;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class ViaRewindPlatformImpl implements ViaRewindPlatform {
|
||||
|
||||
private final Logger logger;
|
||||
|
||||
public ViaRewindPlatformImpl() {
|
||||
logger = Via.getPlatform().createLogger("ViaRewind");
|
||||
init(new File(getDataFolder(), "viarewind.yml"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger getLogger() {
|
||||
return logger;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDataFolder() {
|
||||
return Via.getPlatform().getDataFolder();
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -36,11 +36,14 @@ public interface ViaRewindPlatform {
|
||||
String VERSION = "${version}";
|
||||
String IMPL_VERSION = "${impl_version}";
|
||||
|
||||
default void init(final File configFile) {
|
||||
init(new ViaRewindConfig(configFile, getLogger()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize ViaRewind
|
||||
*/
|
||||
default void init(final File configFile) {
|
||||
ViaRewindConfig config = new ViaRewindConfig(configFile, getLogger());
|
||||
default void init(final com.viaversion.viarewind.api.ViaRewindConfig config) {
|
||||
config.reload();
|
||||
Via.getManager().getConfigurationProvider().register(config);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.api.minecraft;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.NibbleArray;
|
||||
|
||||
public class ExtendedBlockStorage {
|
||||
private final byte[] blockLSBArray = new byte[ChunkSection.SIZE];
|
||||
|
||||
private final NibbleArray blockMetadataArray = new NibbleArray(this.blockLSBArray.length);
|
||||
private final NibbleArray blockLightArray = new NibbleArray(this.blockLSBArray.length);
|
||||
|
||||
private NibbleArray blockMSBArray;
|
||||
private NibbleArray skyLightArray;
|
||||
|
||||
public ExtendedBlockStorage(final boolean skylight) {
|
||||
if (skylight) {
|
||||
this.skyLightArray = new NibbleArray(this.blockLSBArray.length);
|
||||
}
|
||||
}
|
||||
|
||||
public void setBlockId(final int x, final int y, final int z, final int value) {
|
||||
this.blockLSBArray[ChunkSection.index(x, y, z)] = (byte) (value & 255);
|
||||
if (value > 255) {
|
||||
this.getOrCreateBlockMSBArray().set(x, y, z, (value & 0xF00) >> 8);
|
||||
} else if (this.blockMSBArray != null) {
|
||||
this.blockMSBArray.set(x, y, z, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void setBlockMetadata(final int x, final int y, final int z, final int value) {
|
||||
this.blockMetadataArray.set(x, y, z, value);
|
||||
}
|
||||
|
||||
public boolean hasBlockMSBArray() {
|
||||
return this.blockMSBArray != null;
|
||||
}
|
||||
|
||||
public byte[] getBlockLSBArray() {
|
||||
return this.blockLSBArray;
|
||||
}
|
||||
|
||||
public NibbleArray getOrCreateBlockMSBArray() {
|
||||
if (this.blockMSBArray == null) {
|
||||
return this.blockMSBArray = new NibbleArray(this.blockLSBArray.length);
|
||||
}
|
||||
return this.blockMSBArray;
|
||||
}
|
||||
|
||||
public NibbleArray getBlockMetadataArray() {
|
||||
return this.blockMetadataArray;
|
||||
}
|
||||
|
||||
public NibbleArray getBlockLightArray() {
|
||||
return this.blockLightArray;
|
||||
}
|
||||
|
||||
public NibbleArray getSkyLightArray() {
|
||||
return this.skyLightArray;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,7 +28,6 @@ import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.libs.gson.JsonElement;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -36,7 +35,6 @@ import java.util.List;
|
||||
*/
|
||||
public class RewindTypes {
|
||||
|
||||
public static final Type<JsonElement> SIGN_COMPONENT = new SignComponentType();
|
||||
public static final Type<int[]> INT_ARRAY = new IntArrayType(); // Integer array with byte as length indicator
|
||||
|
||||
public static final Type<BlockPosition> SHORT_POSITION = new PositionVarYType<>(Types.SHORT, value -> (short) value);
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.api.type;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.ComponentType;
|
||||
import com.viaversion.viaversion.api.type.types.StringType;
|
||||
import com.viaversion.viaversion.libs.gson.JsonElement;
|
||||
import com.viaversion.viaversion.libs.gson.JsonParser;
|
||||
import com.viaversion.viaversion.libs.gson.JsonSyntaxException;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class SignComponentType extends ComponentType {
|
||||
|
||||
public static final Type<String> STRING = new StringType(384);
|
||||
|
||||
@Override
|
||||
public JsonElement read(final ByteBuf buffer) {
|
||||
final String string = STRING.read(buffer);
|
||||
try {
|
||||
return JsonParser.parseString(string);
|
||||
} catch (final JsonSyntaxException e) {
|
||||
if (Via.getManager().isDebug()) {
|
||||
Via.getPlatform().getLogger().severe("Error when trying to parse json: " + string);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final ByteBuf buffer, final JsonElement value) {
|
||||
STRING.write(buffer, value.toString());
|
||||
}
|
||||
|
||||
}
|
||||
+47
-48
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,10 +18,9 @@
|
||||
package com.viaversion.viarewind.api.type.chunk;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.util.Pair;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.zip.Deflater;
|
||||
|
||||
public class BulkChunkType1_7_6 extends Type<Chunk[]> {
|
||||
@@ -38,40 +37,51 @@ public class BulkChunkType1_7_6 extends Type<Chunk[]> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(ByteBuf byteBuf, Chunk[] chunks) {
|
||||
public void write(ByteBuf buffer, Chunk[] chunks) {
|
||||
final int chunkCount = chunks.length;
|
||||
final int[] chunkX = new int[chunkCount];
|
||||
final int[] chunkZ = new int[chunkCount];
|
||||
final short[] primaryBitMask = new short[chunkCount];
|
||||
final short[] additionalBitMask = new short[chunkCount];
|
||||
final int[] addBitMasks = new int[chunkCount];
|
||||
int totalSize = 0;
|
||||
boolean anySkyLight = false;
|
||||
|
||||
final byte[][] dataArrays = new byte[chunkCount][];
|
||||
int dataSize = 0;
|
||||
for (Chunk chunk : chunks) {
|
||||
if (ChunkType1_7_6.hasSkyLight(chunk)) {
|
||||
anySkyLight = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < chunkCount; i++) {
|
||||
final Chunk chunk = chunks[i];
|
||||
Pair<byte[], Short> chunkData;
|
||||
try {
|
||||
chunkData = ChunkType1_7_6.serialize(chunk);
|
||||
final byte[] data = chunkData.key();
|
||||
dataArrays[i] = data;
|
||||
dataSize += data.length;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Unable to serialize chunk", e);
|
||||
}
|
||||
chunkX[i] = chunk.getX();
|
||||
chunkZ[i] = chunk.getZ();
|
||||
primaryBitMask[i] = (short) chunk.getBitmask();
|
||||
additionalBitMask[i] = chunkData.value();
|
||||
Chunk chunk = chunks[i];
|
||||
addBitMasks[i] = ChunkType1_7_6.getAddBitMask(chunk);
|
||||
boolean biomes = chunk.isFullChunk() && chunk.getBiomeData() != null;
|
||||
|
||||
totalSize += ChunkType1_7_6.calcSize(
|
||||
chunk.getBitmask(),
|
||||
addBitMasks[i],
|
||||
anySkyLight,
|
||||
biomes
|
||||
);
|
||||
}
|
||||
|
||||
final byte[] data = new byte[dataSize];
|
||||
int destPos = 0;
|
||||
for (final byte[] array : dataArrays) {
|
||||
System.arraycopy(array, 0, data, destPos, array.length);
|
||||
destPos += array.length;
|
||||
final byte[] data = new byte[totalSize];
|
||||
int offset = 0;
|
||||
|
||||
for (int i = 0; i < chunkCount; i++) {
|
||||
Chunk chunk = chunks[i];
|
||||
boolean biomes = chunk.isFullChunk() && chunk.getBiomeData() != null;
|
||||
|
||||
offset = ChunkType1_7_6.serialize(
|
||||
chunk,
|
||||
data,
|
||||
offset,
|
||||
addBitMasks[i],
|
||||
anySkyLight,
|
||||
biomes
|
||||
);
|
||||
}
|
||||
|
||||
buffer.writeShort(chunkCount);
|
||||
|
||||
final Deflater deflater = new Deflater();
|
||||
byte[] compressedData;
|
||||
int compressedSize;
|
||||
@@ -84,27 +94,16 @@ public class BulkChunkType1_7_6 extends Type<Chunk[]> {
|
||||
deflater.end();
|
||||
}
|
||||
|
||||
byteBuf.writeShort(chunkCount);
|
||||
byteBuf.writeInt(compressedSize);
|
||||
|
||||
boolean skyLight = false;
|
||||
for (Chunk chunk : chunks) {
|
||||
for (ChunkSection section : chunk.getSections()) {
|
||||
if (section != null && section.getLight().hasSkyLight()) {
|
||||
skyLight = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
byteBuf.writeBoolean(skyLight); // hasSkyLight
|
||||
byteBuf.writeBytes(compressedData, 0, compressedSize);
|
||||
buffer.writeInt(compressedSize);
|
||||
buffer.writeBoolean(anySkyLight);
|
||||
buffer.writeBytes(compressedData, 0, compressedSize);
|
||||
|
||||
for (int i = 0; i < chunkCount; i++) {
|
||||
byteBuf.writeInt(chunkX[i]);
|
||||
byteBuf.writeInt(chunkZ[i]);
|
||||
byteBuf.writeShort(primaryBitMask[i]);
|
||||
byteBuf.writeShort(additionalBitMask[i]);
|
||||
Chunk chunk = chunks[i];
|
||||
buffer.writeInt(chunk.getX());
|
||||
buffer.writeInt(chunk.getZ());
|
||||
buffer.writeShort(chunk.getBitmask());
|
||||
buffer.writeShort(addBitMasks[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
+140
-122
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -17,14 +17,12 @@
|
||||
*/
|
||||
package com.viaversion.viarewind.api.type.chunk;
|
||||
|
||||
import com.viaversion.viarewind.api.minecraft.ExtendedBlockStorage;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.DataPalette;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.PaletteType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.util.Pair;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.io.IOException;
|
||||
import java.util.zip.Deflater;
|
||||
|
||||
import static com.viaversion.viaversion.api.minecraft.chunks.ChunkSection.SIZE;
|
||||
@@ -38,123 +36,28 @@ public class ChunkType1_7_6 extends Type<Chunk> {
|
||||
super(Chunk.class);
|
||||
}
|
||||
|
||||
public static Pair<byte[], Short> serialize(final Chunk chunk) throws IOException {
|
||||
final ExtendedBlockStorage[] storageArrays = new ExtendedBlockStorage[16];
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
final ChunkSection section = chunk.getSections()[i];
|
||||
if (section != null) {
|
||||
final ExtendedBlockStorage storage = storageArrays[i] = new ExtendedBlockStorage(section.getLight().hasSkyLight());
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
for (int y = 0; y < 16; y++) {
|
||||
final int flatBlock = section.palette(PaletteType.BLOCKS).idAt(x, y, z);
|
||||
storage.setBlockId(x, y, z, flatBlock >> 4);
|
||||
storage.setBlockMetadata(x, y, z, flatBlock & 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
storage.getBlockLightArray().setHandle(section.getLight().getBlockLight());
|
||||
if (section.getLight().hasSkyLight()) {
|
||||
storage.getSkyLightArray().setHandle(section.getLight().getSkyLight());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final boolean biomes = chunk.isFullChunk() && chunk.getBiomeData() != null;
|
||||
final int totalSize = calculateSize(storageArrays, chunk.getBitmask(), biomes);
|
||||
|
||||
final byte[] output = new byte[totalSize];
|
||||
int index = 0;
|
||||
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
if ((chunk.getBitmask() & 1 << i) != 0) {
|
||||
final byte[] blockLSBArray = storageArrays[i].getBlockLSBArray();
|
||||
System.arraycopy(blockLSBArray, 0, output, index, blockLSBArray.length);
|
||||
index += blockLSBArray.length;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
if ((chunk.getBitmask() & 1 << i) != 0) {
|
||||
final byte[] blockMetadataArray = storageArrays[i].getBlockMetadataArray().getHandle();
|
||||
System.arraycopy(blockMetadataArray, 0, output, index, blockMetadataArray.length);
|
||||
index += blockMetadataArray.length;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
if ((chunk.getBitmask() & 1 << i) != 0) {
|
||||
final byte[] blockLightArray = storageArrays[i].getBlockLightArray().getHandle();
|
||||
System.arraycopy(blockLightArray, 0, output, index, blockLightArray.length);
|
||||
index += blockLightArray.length;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
if ((chunk.getBitmask() & 1 << i) != 0 && storageArrays[i].getSkyLightArray() != null) {
|
||||
final byte[] skyLightArray = storageArrays[i].getSkyLightArray().getHandle();
|
||||
System.arraycopy(skyLightArray, 0, output, index, skyLightArray.length);
|
||||
index += skyLightArray.length;
|
||||
}
|
||||
}
|
||||
|
||||
short additionalBitMask = 0;
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
if ((chunk.getBitmask() & 1 << i) != 0 && storageArrays[i].hasBlockMSBArray()) {
|
||||
additionalBitMask |= (short) (1 << i);
|
||||
final byte[] blockMSBArray = storageArrays[i].getOrCreateBlockMSBArray().getHandle();
|
||||
System.arraycopy(blockMSBArray, 0, output, index, blockMSBArray.length);
|
||||
index += blockMSBArray.length;
|
||||
}
|
||||
}
|
||||
|
||||
if (biomes) {
|
||||
for (int biome : chunk.getBiomeData()) {
|
||||
output[index++] = (byte) biome;
|
||||
}
|
||||
}
|
||||
|
||||
return new Pair<>(output, additionalBitMask);
|
||||
}
|
||||
|
||||
private static int calculateSize(final ExtendedBlockStorage[] storageArrays, final int bitmask, final boolean biomes) {
|
||||
int totalSize = 0;
|
||||
for (int i = 0; i < storageArrays.length; i++) {
|
||||
if ((bitmask & 1 << i) != 0) {
|
||||
totalSize += SIZE; // Block lsb array
|
||||
totalSize += SIZE / 2; // Block metadata array
|
||||
totalSize += LIGHT_LENGTH; // Block light array
|
||||
|
||||
if (storageArrays[i].getSkyLightArray() != null) {
|
||||
totalSize += LIGHT_LENGTH;
|
||||
}
|
||||
|
||||
if (storageArrays[i].hasBlockMSBArray()) {
|
||||
totalSize += SIZE / 2; // Block msb array
|
||||
}
|
||||
}
|
||||
}
|
||||
if (biomes) {
|
||||
totalSize += 256;
|
||||
}
|
||||
return totalSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chunk read(ByteBuf byteBuf) {
|
||||
throw new UnsupportedOperationException(); // Not needed, see https://github.com/ViaVersion/ViaLegacy/blob/main/src/main/java/net/raphimc/vialegacy/protocols/release/protocol1_8to1_7_6_10/types/Chunk1_7_6Type.java
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(ByteBuf output, Chunk chunk) {
|
||||
Pair<byte[], Short> chunkData;
|
||||
try {
|
||||
chunkData = serialize(chunk);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Unable to serialize chunk", e);
|
||||
}
|
||||
final byte[] data = chunkData.key();
|
||||
final short additionalBitMask = chunkData.value();
|
||||
public void write(ByteBuf buffer, Chunk chunk) {
|
||||
final int bitmask = chunk.getBitmask();
|
||||
final int addBitmask = getAddBitMask(chunk);
|
||||
final boolean hasSkyLight = hasSkyLight(chunk);
|
||||
final boolean biomes = chunk.isFullChunk() && chunk.getBiomeData() != null;
|
||||
|
||||
final int size = calcSize(bitmask, addBitmask, hasSkyLight, biomes);
|
||||
final byte[] data = new byte[size];
|
||||
|
||||
serialize(chunk, data, 0, addBitmask, hasSkyLight, biomes);
|
||||
|
||||
buffer.writeInt(chunk.getX());
|
||||
buffer.writeInt(chunk.getZ());
|
||||
buffer.writeBoolean(chunk.isFullChunk());
|
||||
buffer.writeShort(bitmask);
|
||||
buffer.writeShort(addBitmask);
|
||||
|
||||
final Deflater deflater = new Deflater();
|
||||
byte[] compressedData;
|
||||
@@ -168,13 +71,128 @@ public class ChunkType1_7_6 extends Type<Chunk> {
|
||||
deflater.end();
|
||||
}
|
||||
|
||||
output.writeInt(chunk.getX());
|
||||
output.writeInt(chunk.getZ());
|
||||
output.writeBoolean(chunk.isFullChunk());
|
||||
output.writeShort(chunk.getBitmask());
|
||||
output.writeShort(additionalBitMask);
|
||||
output.writeInt(compressedSize);
|
||||
output.writeBytes(compressedData, 0, compressedSize);
|
||||
buffer.writeInt(compressedSize);
|
||||
buffer.writeBytes(compressedData, 0, compressedSize);
|
||||
}
|
||||
|
||||
public static int serialize(Chunk chunk, byte[] output, int offset, int addBitmask, boolean writeSkyLight, boolean biomes) {
|
||||
final ChunkSection[] sections = chunk.getSections();
|
||||
final int bitmask = chunk.getBitmask();
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((bitmask & (1 << i)) != 0) {
|
||||
final ChunkSection section = sections[i];
|
||||
final DataPalette palette = section.palette(PaletteType.BLOCKS);
|
||||
for (int j = 0; j < SIZE; j++) {
|
||||
final int block = palette.idAt(j);
|
||||
output[offset++] = (byte) ((block >> 4) & 0xFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((bitmask & (1 << i)) != 0) {
|
||||
final ChunkSection section = sections[i];
|
||||
final DataPalette palette = section.palette(PaletteType.BLOCKS);
|
||||
for (int j = 0; j < ChunkSection.SIZE; j += 2) {
|
||||
final int meta1 = palette.idAt(j) & 0xF;
|
||||
final int meta2 = palette.idAt(j + 1) & 0xF;
|
||||
output[offset++] = (byte) (meta1 | (meta2 << 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((bitmask & (1 << i)) != 0) {
|
||||
final byte[] blockLight = sections[i].getLight().getBlockLight();
|
||||
System.arraycopy(blockLight, 0, output, offset, LIGHT_LENGTH);
|
||||
offset += LIGHT_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
if (writeSkyLight) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((bitmask & (1 << i)) != 0) {
|
||||
if (sections[i].getLight().hasSkyLight()) {
|
||||
final byte[] skyLight = sections[i].getLight().getSkyLight();
|
||||
System.arraycopy(skyLight, 0, output, offset, LIGHT_LENGTH);
|
||||
}
|
||||
offset += LIGHT_LENGTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (addBitmask != 0) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((bitmask & (1 << i)) != 0 && (addBitmask & (1 << i)) != 0) {
|
||||
final ChunkSection section = sections[i];
|
||||
final DataPalette palette = section.palette(PaletteType.BLOCKS);
|
||||
for (int j = 0; j < SIZE; j += 2) {
|
||||
final int add1 = (palette.idAt(j) >> 12) & 0xF;
|
||||
final int add2 = (palette.idAt(j + 1) >> 12) & 0xF;
|
||||
output[offset++] = (byte) (add1 | (add2 << 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (biomes && chunk.getBiomeData() != null) {
|
||||
final int[] biomeData = chunk.getBiomeData();
|
||||
for (int biome : biomeData) {
|
||||
output[offset++] = (byte) biome;
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
public static int calcSize(int bitmask, int addBitmask, boolean hasSkyLight, boolean biomes) {
|
||||
int size = 0;
|
||||
int sections = Integer.bitCount(bitmask);
|
||||
|
||||
size += sections * SIZE;
|
||||
size += sections * (SIZE / 2);
|
||||
size += sections * LIGHT_LENGTH;
|
||||
|
||||
if (hasSkyLight) {
|
||||
size += sections * LIGHT_LENGTH;
|
||||
}
|
||||
|
||||
if (addBitmask != 0) {
|
||||
size += Integer.bitCount(addBitmask) * (SIZE / 2);
|
||||
}
|
||||
|
||||
if (biomes) {
|
||||
size += 256;
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
public static int getAddBitMask(Chunk chunk) {
|
||||
int addBitMask = 0;
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((chunk.getBitmask() & (1 << i)) != 0) {
|
||||
final ChunkSection section = chunk.getSections()[i];
|
||||
final DataPalette palette = section.palette(PaletteType.BLOCKS);
|
||||
for (int j = 0; j < SIZE; j++) {
|
||||
final int id = palette.idAt(j);
|
||||
if ((id >> 12) != 0) {
|
||||
addBitMask |= (1 << i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return addBitMask;
|
||||
}
|
||||
|
||||
public static boolean hasSkyLight(Chunk chunk) {
|
||||
for (ChunkSection section : chunk.getSections()) {
|
||||
if (section != null && section.getLight().hasSkyLight()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+17
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,9 +28,23 @@ public abstract class CompressionHandlerProvider implements Provider {
|
||||
|
||||
public abstract void onTransformPacket(UserConnection user);
|
||||
|
||||
public abstract ChannelHandler getEncoder(int threshold);
|
||||
/**
|
||||
* Creates the compression encoder
|
||||
*
|
||||
* @param compressor A nullable object that may present a native backend for compression (if available)
|
||||
* @param threshold The compression threshold
|
||||
* @return The encoder
|
||||
*/
|
||||
public abstract ChannelHandler getEncoder(Object compressor, int threshold);
|
||||
|
||||
public abstract ChannelHandler getDecoder(int threshold);
|
||||
/**
|
||||
* Creates the compression decoder
|
||||
*
|
||||
* @param compressor A nullable object that may present a native backend for compression (if available)
|
||||
* @param threshold The compression threshold
|
||||
* @return The decoder
|
||||
*/
|
||||
public abstract ChannelHandler getDecoder(Object compressor, int threshold);
|
||||
|
||||
public boolean isRemoveCompression(UserConnection user) {
|
||||
return user.get(CompressionStatusTracker.class).removeCompression;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+14
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,6 +24,7 @@ import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.DecoderException;
|
||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||
import java.util.List;
|
||||
import java.util.zip.DataFormatException;
|
||||
import java.util.zip.Inflater;
|
||||
|
||||
public class CompressionDecoder extends MessageToMessageDecoder<ByteBuf> {
|
||||
@@ -41,7 +42,9 @@ public class CompressionDecoder extends MessageToMessageDecoder<ByteBuf> {
|
||||
|
||||
@Override
|
||||
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
|
||||
if (!in.isReadable()) return;
|
||||
if (!in.isReadable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int outLength = Types.VAR_INT.readPrimitive(in);
|
||||
if (outLength == 0) {
|
||||
@@ -55,11 +58,15 @@ public class CompressionDecoder extends MessageToMessageDecoder<ByteBuf> {
|
||||
throw new DecoderException("Badly compressed packet - size of " + outLength + " is larger than protocol maximum of " + 2097152);
|
||||
}
|
||||
|
||||
ByteBuf temp = in;
|
||||
if (!in.hasArray()) {
|
||||
temp = ByteBufAllocator.DEFAULT.heapBuffer().writeBytes(in);
|
||||
inflate(ctx, in, outLength, out);
|
||||
}
|
||||
|
||||
protected void inflate(final ChannelHandlerContext ctx, final ByteBuf source, final int outLength, final List<Object> out) throws DataFormatException {
|
||||
ByteBuf temp = source;
|
||||
if (!source.hasArray()) {
|
||||
temp = ByteBufAllocator.DEFAULT.heapBuffer().writeBytes(source);
|
||||
} else {
|
||||
in.retain();
|
||||
source.retain();
|
||||
}
|
||||
ByteBuf output = ByteBufAllocator.DEFAULT.heapBuffer(outLength, outLength);
|
||||
try {
|
||||
@@ -72,4 +79,5 @@ public class CompressionDecoder extends MessageToMessageDecoder<ByteBuf> {
|
||||
this.inflater.reset();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+12
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -22,6 +22,7 @@ import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufAllocator;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.handler.codec.MessageToByteEncoder;
|
||||
import java.util.zip.DataFormatException;
|
||||
import java.util.zip.Deflater;
|
||||
|
||||
public class CompressionEncoder extends MessageToByteEncoder<ByteBuf> {
|
||||
@@ -48,11 +49,15 @@ public class CompressionEncoder extends MessageToByteEncoder<ByteBuf> {
|
||||
|
||||
Types.VAR_INT.writePrimitive(out, frameLength);
|
||||
|
||||
ByteBuf temp = in;
|
||||
if (!in.hasArray()) {
|
||||
temp = ByteBufAllocator.DEFAULT.heapBuffer().writeBytes(in);
|
||||
deflate(in, out);
|
||||
}
|
||||
|
||||
protected void deflate(final ByteBuf source, final ByteBuf destination) throws DataFormatException {
|
||||
ByteBuf temp = source;
|
||||
if (!source.hasArray()) {
|
||||
temp = ByteBufAllocator.DEFAULT.heapBuffer().writeBytes(source);
|
||||
} else {
|
||||
in.retain();
|
||||
source.retain();
|
||||
}
|
||||
ByteBuf output = ByteBufAllocator.DEFAULT.heapBuffer();
|
||||
try {
|
||||
@@ -63,11 +68,12 @@ public class CompressionEncoder extends MessageToByteEncoder<ByteBuf> {
|
||||
output.ensureWritable(4096);
|
||||
output.writerIndex(output.writerIndex() + this.deflater.deflate(output.array(), output.arrayOffset() + output.writerIndex(), output.writableBytes()));
|
||||
}
|
||||
out.writeBytes(output);
|
||||
destination.writeBytes(output);
|
||||
} finally {
|
||||
output.release();
|
||||
temp.release();
|
||||
this.deflater.reset();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+36
-7
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -21,6 +21,8 @@ import com.viaversion.viarewind.ViaRewind;
|
||||
import com.viaversion.viarewind.api.minecraft.netty.EmptyChannelHandler;
|
||||
import com.viaversion.viarewind.api.minecraft.netty.ForwardMessageToByteEncoder;
|
||||
import com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.CompressionHandlerProvider;
|
||||
import com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.compression.velocity.VelocityCompressionDecoder;
|
||||
import com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.compression.velocity.VelocityCompressionEncoder;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import io.netty.channel.ChannelHandler;
|
||||
@@ -28,6 +30,19 @@ import io.netty.channel.ChannelPipeline;
|
||||
|
||||
public class TrackingCompressionHandlerProvider extends CompressionHandlerProvider {
|
||||
|
||||
// Use Velocity's compression backend if ViaRewind is loaded on a Velocity server or a custom server software
|
||||
// is shipping them in the classpath.
|
||||
private static boolean velocityNatives;
|
||||
|
||||
static {
|
||||
try {
|
||||
Class.forName("com.velocitypowered.natives.compression.VelocityCompressor");
|
||||
velocityNatives = true;
|
||||
} catch (final ClassNotFoundException ignored) {
|
||||
velocityNatives = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCompressionThreshold(UserConnection user, int threshold) {
|
||||
final ChannelPipeline pipeline = user.getChannel().pipeline();
|
||||
@@ -36,12 +51,17 @@ public class TrackingCompressionHandlerProvider extends CompressionHandlerProvid
|
||||
return;
|
||||
}
|
||||
|
||||
Object compressor = null;
|
||||
if (velocityNatives) {
|
||||
compressor = com.velocitypowered.natives.util.Natives.compress.get().create(-1);
|
||||
}
|
||||
|
||||
final String compressHandlerName = ViaRewind.getPlatform().compressHandlerName();
|
||||
final CompressionEncoder encoder = (CompressionEncoder) pipeline.get(compressHandlerName);
|
||||
if (encoder != null) {
|
||||
encoder.setThreshold(threshold);
|
||||
} else {
|
||||
pipeline.addBefore(Via.getManager().getInjector().getEncoderName(), compressHandlerName, getEncoder(threshold));
|
||||
pipeline.addBefore(Via.getManager().getInjector().getEncoderName(), compressHandlerName, getEncoder(compressor, threshold));
|
||||
}
|
||||
|
||||
final String decompressHandlerName = ViaRewind.getPlatform().decompressHandlerName();
|
||||
@@ -49,7 +69,7 @@ public class TrackingCompressionHandlerProvider extends CompressionHandlerProvid
|
||||
if (decoder != null) {
|
||||
decoder.setThreshold(threshold);
|
||||
} else {
|
||||
pipeline.addBefore(Via.getManager().getInjector().getDecoderName(), decompressHandlerName, getDecoder(threshold));
|
||||
pipeline.addBefore(Via.getManager().getInjector().getDecoderName(), decompressHandlerName, getDecoder(compressor, threshold));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,12 +97,21 @@ public class TrackingCompressionHandlerProvider extends CompressionHandlerProvid
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelHandler getEncoder(int threshold) {
|
||||
return new CompressionEncoder(threshold);
|
||||
public ChannelHandler getEncoder(final Object compressor, int threshold) {
|
||||
if (velocityNatives) {
|
||||
return new VelocityCompressionEncoder(threshold, (com.velocitypowered.natives.compression.VelocityCompressor) compressor);
|
||||
} else {
|
||||
return new CompressionEncoder(threshold);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChannelHandler getDecoder(int threshold) {
|
||||
return new CompressionDecoder(threshold);
|
||||
public ChannelHandler getDecoder(final Object compressor, int threshold) {
|
||||
if (velocityNatives) {
|
||||
return new VelocityCompressionDecoder(threshold, (com.velocitypowered.natives.compression.VelocityCompressor) compressor);
|
||||
} else {
|
||||
return new CompressionDecoder(threshold);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.compression.velocity;
|
||||
|
||||
import com.velocitypowered.natives.compression.VelocityCompressor;
|
||||
import com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.compression.CompressionDecoder;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import java.util.List;
|
||||
import java.util.zip.DataFormatException;
|
||||
|
||||
public final class VelocityCompressionDecoder extends CompressionDecoder {
|
||||
|
||||
private final VelocityCompressor compressor;
|
||||
|
||||
public VelocityCompressionDecoder(final int threshold, final VelocityCompressor compressor) {
|
||||
super(threshold);
|
||||
this.compressor = compressor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void inflate(final ChannelHandlerContext ctx, final ByteBuf source, final int outLength, final List<Object> out) throws DataFormatException {
|
||||
ByteBuf output = ctx.alloc().buffer(outLength);
|
||||
try {
|
||||
this.compressor.inflate(source, output, outLength);
|
||||
out.add(output.retain());
|
||||
} finally {
|
||||
output.release();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.compression.velocity;
|
||||
|
||||
import com.velocitypowered.natives.compression.VelocityCompressor;
|
||||
import com.viaversion.viarewind.protocol.v1_8to1_7_6_10.provider.compression.CompressionEncoder;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.util.zip.DataFormatException;
|
||||
|
||||
public final class VelocityCompressionEncoder extends CompressionEncoder {
|
||||
|
||||
private final VelocityCompressor compressor;
|
||||
|
||||
public VelocityCompressionEncoder(final int threshold, final VelocityCompressor compressor) {
|
||||
super(threshold);
|
||||
this.compressor = compressor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deflate(final ByteBuf source, final ByteBuf destination) throws DataFormatException {
|
||||
this.compressor.deflate(source, destination);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+7
-4
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -18,7 +18,8 @@
|
||||
package com.viaversion.viarewind.protocol.v1_9to1_8;
|
||||
|
||||
import com.viaversion.viabackwards.api.BackwardsProtocol;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.data.RewindMappingData1_8;
|
||||
import com.viaversion.viarewind.api.data.RewindMappingData;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.provider.InventoryProvider;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.rewriter.BlockItemPacketRewriter1_9;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.rewriter.EntityPacketRewriter1_9;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.rewriter.PlayerPacketRewriter1_9;
|
||||
@@ -60,7 +61,7 @@ public class Protocol1_9To1_8 extends BackwardsProtocol<ClientboundPackets1_9, C
|
||||
}
|
||||
};
|
||||
|
||||
public static final RewindMappingData1_8 MAPPINGS = new RewindMappingData1_8();
|
||||
public static final RewindMappingData MAPPINGS = new RewindMappingData("1.9.4", "1.8");
|
||||
|
||||
private final BlockItemPacketRewriter1_9 itemRewriter = new BlockItemPacketRewriter1_9(this);
|
||||
private final EntityPacketRewriter1_9 entityRewriter = new EntityPacketRewriter1_9(this);
|
||||
@@ -92,12 +93,14 @@ public class Protocol1_9To1_8 extends BackwardsProtocol<ClientboundPackets1_9, C
|
||||
|
||||
@Override
|
||||
public void register(ViaProviders providers) {
|
||||
providers.register(InventoryProvider.class, new InventoryProvider());
|
||||
|
||||
Via.getManager().getScheduler().scheduleRepeating(new LevitationUpdateTask(), 0L, 50L, TimeUnit.MILLISECONDS);
|
||||
Via.getManager().getScheduler().scheduleRepeating(new CooldownIndicatorTask(), 0L, 50L, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RewindMappingData1_8 getMappingData() {
|
||||
public RewindMappingData getMappingData() {
|
||||
return MAPPINGS;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.protocol.v1_9to1_8.data;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viarewind.api.data.RewindMappingDataLoader;
|
||||
import com.viaversion.viaversion.libs.fastutil.objects.ObjectArrayList;
|
||||
import com.viaversion.viaversion.libs.fastutil.objects.ObjectList;
|
||||
import com.viaversion.viaversion.libs.gson.JsonArray;
|
||||
import com.viaversion.viaversion.libs.gson.JsonElement;
|
||||
|
||||
public final class RewindMappingData1_8 extends com.viaversion.viarewind.api.data.RewindMappingData {
|
||||
|
||||
private final ObjectList<String> sounds = new ObjectArrayList<>();
|
||||
|
||||
public RewindMappingData1_8() {
|
||||
super("1.9.4", "1.8");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadExtras(CompoundTag data) {
|
||||
super.loadExtras(data);
|
||||
|
||||
final JsonArray sounds = RewindMappingDataLoader.INSTANCE.loadData("sounds-1.9.json").getAsJsonArray("sounds");
|
||||
for (final JsonElement sound : sounds) {
|
||||
this.sounds.add(sound.getAsString());
|
||||
}
|
||||
}
|
||||
|
||||
public String soundName(final int soundId) {
|
||||
return sounds.get(soundId);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.viaversion.viarewind.protocol.v1_9to1_8.provider;
|
||||
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.platform.providers.Provider;
|
||||
|
||||
public class InventoryProvider implements Provider {
|
||||
|
||||
public boolean hasElytra(final UserConnection connection) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -118,7 +118,7 @@ public class EntityPacketRewriter1_9 extends VREntityRewriter<ClientboundPackets
|
||||
wrapper.set(Types.BYTE, 1, yaw);
|
||||
|
||||
int y = wrapper.get(Types.INT, 1);
|
||||
y += 10;
|
||||
y += 6;
|
||||
wrapper.set(Types.INT, 1, y);
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ public class EntityPacketRewriter1_9 extends VREntityRewriter<ClientboundPackets
|
||||
yaw -= 64;
|
||||
wrapper.set(Types.BYTE, 0, yaw);
|
||||
int y = wrapper.get(Types.INT, 1);
|
||||
y += 10;
|
||||
y += 6;
|
||||
wrapper.set(Types.INT, 1, y);
|
||||
}
|
||||
});
|
||||
@@ -464,7 +464,7 @@ public class EntityPacketRewriter1_9 extends VREntityRewriter<ClientboundPackets
|
||||
wrapper.set(Types.BYTE, 0, yaw);
|
||||
|
||||
int y = wrapper.get(Types.INT, 1);
|
||||
y += 10;
|
||||
y += 6;
|
||||
wrapper.set(Types.INT, 1, y);
|
||||
}
|
||||
tracker.resetEntityOffset(entityId);
|
||||
|
||||
+6
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -23,12 +23,14 @@ import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.viarewind.ViaRewind;
|
||||
import com.viaversion.viarewind.api.type.RewindTypes;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.Protocol1_9To1_8;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.provider.InventoryProvider;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.storage.BlockPlaceDestroyTracker;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.storage.BossBarStorage;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.storage.CooldownStorage;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.storage.EntityTracker1_9;
|
||||
import com.viaversion.viarewind.protocol.v1_9to1_8.storage.PlayerPositionTracker;
|
||||
import com.viaversion.viarewind.utils.ChatUtil;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.entity.EntityTracker;
|
||||
import com.viaversion.viaversion.api.minecraft.BlockPosition;
|
||||
import com.viaversion.viaversion.api.minecraft.ClientWorld;
|
||||
@@ -409,10 +411,11 @@ public class PlayerPacketRewriter1_9 extends RewriterBase<Protocol1_9To1_8> {
|
||||
map(Types.VAR_INT); // Action parameter
|
||||
handler(wrapper -> {
|
||||
final PlayerPositionTracker tracker = wrapper.user().get(PlayerPositionTracker.class);
|
||||
final InventoryProvider provider = Via.getManager().getProviders().get(InventoryProvider.class);
|
||||
final int action = wrapper.get(Types.VAR_INT, 1);
|
||||
if (action == 6) { // Jump with horse
|
||||
wrapper.set(Types.VAR_INT, 1, 7);
|
||||
} else if (action == 0 && !tracker.isOnGround()) { // Start sneaking
|
||||
} else if (action == 0 && provider.hasElytra(wrapper.user()) && !tracker.isOnGround()) { // Start sneaking
|
||||
final PacketWrapper elytra = PacketWrapper.create(ServerboundPackets1_9.PLAYER_COMMAND, wrapper.user());
|
||||
elytra.write(Types.VAR_INT, wrapper.get(Types.VAR_INT, 0));
|
||||
elytra.write(Types.VAR_INT, 8);
|
||||
@@ -444,7 +447,7 @@ public class PlayerPacketRewriter1_9 extends RewriterBase<Protocol1_9To1_8> {
|
||||
map(Types.BLOCK_POSITION1_8); // Position
|
||||
handler(wrapper -> {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
final JsonElement json = wrapper.read(RewindTypes.SIGN_COMPONENT);
|
||||
final JsonElement json = wrapper.read(Types.COMPONENT);
|
||||
if (!json.isJsonPrimitive()) {
|
||||
throw new IllegalStateException("Invalid sign text: " + StringUtil.forLogging(json));
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -251,11 +251,11 @@ public class WorldPacketRewriter1_9 extends RewriterBase<Protocol1_9To1_8> {
|
||||
public void register() {
|
||||
handler(wrapper -> {
|
||||
final int soundId = wrapper.read(Types.VAR_INT);
|
||||
final String soundName = protocol.getMappingData().soundName(soundId);
|
||||
if (soundName == null) {
|
||||
final int mappedSoundId = protocol.getMappingData().getFullSoundMappings().getNewId(soundId);
|
||||
if (mappedSoundId == -1) {
|
||||
wrapper.cancel();
|
||||
} else {
|
||||
wrapper.write(Types.STRING, protocol.getMappingData().getMappedNamedSound(soundName));
|
||||
wrapper.write(Types.STRING, protocol.getMappingData().getFullSoundMappings().mappedIdentifier(mappedSoundId));
|
||||
}
|
||||
});
|
||||
read(Types.VAR_INT); // Sound category
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -49,7 +49,7 @@ public class ChatUtil {
|
||||
try {
|
||||
return jsonToLegacy(JsonParser.parseString(json));
|
||||
} catch (Exception e) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings()) {
|
||||
if (Via.getConfig().logTextComponentConversionErrors()) {
|
||||
ViaRewind.getPlatform().getLogger().log(Level.WARNING, "Could not convert component to legacy text: " + json, e);
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class ChatUtil {
|
||||
}
|
||||
return legacy;
|
||||
} catch (Exception ex) {
|
||||
if (!Via.getConfig().isSuppressConversionWarnings()) {
|
||||
if (Via.getConfig().logTextComponentConversionErrors()) {
|
||||
ViaRewind.getPlatform().getLogger().log(Level.WARNING, "Could not convert component to legacy text: " + component, ex);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,447 +0,0 @@
|
||||
{
|
||||
"sounds": [
|
||||
"ambient.cave",
|
||||
"block.anvil.break",
|
||||
"block.anvil.destroy",
|
||||
"block.anvil.fall",
|
||||
"block.anvil.hit",
|
||||
"block.anvil.land",
|
||||
"block.anvil.place",
|
||||
"block.anvil.step",
|
||||
"block.anvil.use",
|
||||
"block.brewing_stand.brew",
|
||||
"block.chest.close",
|
||||
"block.chest.locked",
|
||||
"block.chest.open",
|
||||
"block.chorus_flower.death",
|
||||
"block.chorus_flower.grow",
|
||||
"block.cloth.break",
|
||||
"block.cloth.fall",
|
||||
"block.cloth.hit",
|
||||
"block.cloth.place",
|
||||
"block.cloth.step",
|
||||
"block.comparator.click",
|
||||
"block.dispenser.dispense",
|
||||
"block.dispenser.fail",
|
||||
"block.dispenser.launch",
|
||||
"block.end_gateway.spawn",
|
||||
"block.enderchest.close",
|
||||
"block.enderchest.open",
|
||||
"block.fence_gate.close",
|
||||
"block.fence_gate.open",
|
||||
"block.fire.ambient",
|
||||
"block.fire.extinguish",
|
||||
"block.furnace.fire_crackle",
|
||||
"block.glass.break",
|
||||
"block.glass.fall",
|
||||
"block.glass.hit",
|
||||
"block.glass.place",
|
||||
"block.glass.step",
|
||||
"block.grass.break",
|
||||
"block.grass.fall",
|
||||
"block.grass.hit",
|
||||
"block.grass.place",
|
||||
"block.grass.step",
|
||||
"block.gravel.break",
|
||||
"block.gravel.fall",
|
||||
"block.gravel.hit",
|
||||
"block.gravel.place",
|
||||
"block.gravel.step",
|
||||
"block.iron_door.close",
|
||||
"block.iron_door.open",
|
||||
"block.iron_trapdoor.close",
|
||||
"block.iron_trapdoor.open",
|
||||
"block.ladder.break",
|
||||
"block.ladder.fall",
|
||||
"block.ladder.hit",
|
||||
"block.ladder.place",
|
||||
"block.ladder.step",
|
||||
"block.lava.ambient",
|
||||
"block.lava.extinguish",
|
||||
"block.lava.pop",
|
||||
"block.lever.click",
|
||||
"block.metal.break",
|
||||
"block.metal.fall",
|
||||
"block.metal.hit",
|
||||
"block.metal.place",
|
||||
"block.metal.step",
|
||||
"block.metal_pressureplate.click_off",
|
||||
"block.metal_pressureplate.click_on",
|
||||
"block.note.basedrum",
|
||||
"block.note.bass",
|
||||
"block.note.harp",
|
||||
"block.note.hat",
|
||||
"block.note.pling",
|
||||
"block.note.snare",
|
||||
"block.piston.contract",
|
||||
"block.piston.extend",
|
||||
"block.portal.ambient",
|
||||
"block.portal.travel",
|
||||
"block.portal.trigger",
|
||||
"block.redstone_torch.burnout",
|
||||
"block.sand.break",
|
||||
"block.sand.fall",
|
||||
"block.sand.hit",
|
||||
"block.sand.place",
|
||||
"block.sand.step",
|
||||
"block.slime.break",
|
||||
"block.slime.fall",
|
||||
"block.slime.hit",
|
||||
"block.slime.place",
|
||||
"block.slime.step",
|
||||
"block.snow.break",
|
||||
"block.snow.fall",
|
||||
"block.snow.hit",
|
||||
"block.snow.place",
|
||||
"block.snow.step",
|
||||
"block.stone.break",
|
||||
"block.stone.fall",
|
||||
"block.stone.hit",
|
||||
"block.stone.place",
|
||||
"block.stone.step",
|
||||
"block.stone_button.click_off",
|
||||
"block.stone_button.click_on",
|
||||
"block.stone_pressureplate.click_off",
|
||||
"block.stone_pressureplate.click_on",
|
||||
"block.tripwire.attach",
|
||||
"block.tripwire.click_off",
|
||||
"block.tripwire.click_on",
|
||||
"block.tripwire.detach",
|
||||
"block.water.ambient",
|
||||
"block.waterlily.place",
|
||||
"block.wood.break",
|
||||
"block.wood.fall",
|
||||
"block.wood.hit",
|
||||
"block.wood.place",
|
||||
"block.wood.step",
|
||||
"block.wood_button.click_off",
|
||||
"block.wood_button.click_on",
|
||||
"block.wood_pressureplate.click_off",
|
||||
"block.wood_pressureplate.click_on",
|
||||
"block.wooden_door.close",
|
||||
"block.wooden_door.open",
|
||||
"block.wooden_trapdoor.close",
|
||||
"block.wooden_trapdoor.open",
|
||||
"enchant.thorns.hit",
|
||||
"entity.armorstand.break",
|
||||
"entity.armorstand.fall",
|
||||
"entity.armorstand.hit",
|
||||
"entity.armorstand.place",
|
||||
"entity.arrow.hit",
|
||||
"entity.arrow.hit_player",
|
||||
"entity.arrow.shoot",
|
||||
"entity.bat.ambient",
|
||||
"entity.bat.death",
|
||||
"entity.bat.hurt",
|
||||
"entity.bat.loop",
|
||||
"entity.bat.takeoff",
|
||||
"entity.blaze.ambient",
|
||||
"entity.blaze.burn",
|
||||
"entity.blaze.death",
|
||||
"entity.blaze.hurt",
|
||||
"entity.blaze.shoot",
|
||||
"entity.bobber.splash",
|
||||
"entity.bobber.throw",
|
||||
"entity.cat.ambient",
|
||||
"entity.cat.death",
|
||||
"entity.cat.hiss",
|
||||
"entity.cat.hurt",
|
||||
"entity.cat.purr",
|
||||
"entity.cat.purreow",
|
||||
"entity.chicken.ambient",
|
||||
"entity.chicken.death",
|
||||
"entity.chicken.egg",
|
||||
"entity.chicken.hurt",
|
||||
"entity.chicken.step",
|
||||
"entity.cow.ambient",
|
||||
"entity.cow.death",
|
||||
"entity.cow.hurt",
|
||||
"entity.cow.milk",
|
||||
"entity.cow.step",
|
||||
"entity.creeper.death",
|
||||
"entity.creeper.hurt",
|
||||
"entity.creeper.primed",
|
||||
"entity.donkey.ambient",
|
||||
"entity.donkey.angry",
|
||||
"entity.donkey.chest",
|
||||
"entity.donkey.death",
|
||||
"entity.donkey.hurt",
|
||||
"entity.egg.throw",
|
||||
"entity.elder_guardian.ambient",
|
||||
"entity.elder_guardian.ambient_land",
|
||||
"entity.elder_guardian.curse",
|
||||
"entity.elder_guardian.death",
|
||||
"entity.elder_guardian.death_land",
|
||||
"entity.elder_guardian.hurt",
|
||||
"entity.elder_guardian.hurt_land",
|
||||
"entity.enderdragon.ambient",
|
||||
"entity.enderdragon.death",
|
||||
"entity.enderdragon.flap",
|
||||
"entity.enderdragon.growl",
|
||||
"entity.enderdragon.hurt",
|
||||
"entity.enderdragon.shoot",
|
||||
"entity.enderdragon_fireball.explode",
|
||||
"entity.endereye.launch",
|
||||
"entity.endermen.ambient",
|
||||
"entity.endermen.death",
|
||||
"entity.endermen.hurt",
|
||||
"entity.endermen.scream",
|
||||
"entity.endermen.stare",
|
||||
"entity.endermen.teleport",
|
||||
"entity.endermite.ambient",
|
||||
"entity.endermite.death",
|
||||
"entity.endermite.hurt",
|
||||
"entity.endermite.step",
|
||||
"entity.enderpearl.throw",
|
||||
"entity.experience_bottle.throw",
|
||||
"entity.experience_orb.pickup",
|
||||
"entity.experience_orb.touch",
|
||||
"entity.firework.blast",
|
||||
"entity.firework.blast_far",
|
||||
"entity.firework.large_blast",
|
||||
"entity.firework.large_blast_far",
|
||||
"entity.firework.launch",
|
||||
"entity.firework.shoot",
|
||||
"entity.firework.twinkle",
|
||||
"entity.firework.twinkle_far",
|
||||
"entity.generic.big_fall",
|
||||
"entity.generic.burn",
|
||||
"entity.generic.death",
|
||||
"entity.generic.drink",
|
||||
"entity.generic.eat",
|
||||
"entity.generic.explode",
|
||||
"entity.generic.extinguish_fire",
|
||||
"entity.generic.hurt",
|
||||
"entity.generic.small_fall",
|
||||
"entity.generic.splash",
|
||||
"entity.generic.swim",
|
||||
"entity.ghast.ambient",
|
||||
"entity.ghast.death",
|
||||
"entity.ghast.hurt",
|
||||
"entity.ghast.scream",
|
||||
"entity.ghast.shoot",
|
||||
"entity.ghast.warn",
|
||||
"entity.guardian.ambient",
|
||||
"entity.guardian.ambient_land",
|
||||
"entity.guardian.attack",
|
||||
"entity.guardian.death",
|
||||
"entity.guardian.death_land",
|
||||
"entity.guardian.flop",
|
||||
"entity.guardian.hurt",
|
||||
"entity.guardian.hurt_land",
|
||||
"entity.horse.ambient",
|
||||
"entity.horse.angry",
|
||||
"entity.horse.armor",
|
||||
"entity.horse.breathe",
|
||||
"entity.horse.death",
|
||||
"entity.horse.eat",
|
||||
"entity.horse.gallop",
|
||||
"entity.horse.hurt",
|
||||
"entity.horse.jump",
|
||||
"entity.horse.land",
|
||||
"entity.horse.saddle",
|
||||
"entity.horse.step",
|
||||
"entity.horse.step_wood",
|
||||
"entity.hostile.big_fall",
|
||||
"entity.hostile.death",
|
||||
"entity.hostile.hurt",
|
||||
"entity.hostile.small_fall",
|
||||
"entity.hostile.splash",
|
||||
"entity.hostile.swim",
|
||||
"entity.irongolem.attack",
|
||||
"entity.irongolem.death",
|
||||
"entity.irongolem.hurt",
|
||||
"entity.irongolem.step",
|
||||
"entity.item.break",
|
||||
"entity.item.pickup",
|
||||
"entity.itemframe.add_item",
|
||||
"entity.itemframe.break",
|
||||
"entity.itemframe.place",
|
||||
"entity.itemframe.remove_item",
|
||||
"entity.itemframe.rotate_item",
|
||||
"entity.leashknot.break",
|
||||
"entity.leashknot.place",
|
||||
"entity.lightning.impact",
|
||||
"entity.lightning.thunder",
|
||||
"entity.lingeringpotion.throw",
|
||||
"entity.magmacube.death",
|
||||
"entity.magmacube.hurt",
|
||||
"entity.magmacube.jump",
|
||||
"entity.magmacube.squish",
|
||||
"entity.minecart.inside",
|
||||
"entity.minecart.riding",
|
||||
"entity.mooshroom.shear",
|
||||
"entity.mule.ambient",
|
||||
"entity.mule.death",
|
||||
"entity.mule.hurt",
|
||||
"entity.painting.break",
|
||||
"entity.painting.place",
|
||||
"entity.pig.ambient",
|
||||
"entity.pig.death",
|
||||
"entity.pig.hurt",
|
||||
"entity.pig.saddle",
|
||||
"entity.pig.step",
|
||||
"entity.player.attack.crit",
|
||||
"entity.player.attack.knockback",
|
||||
"entity.player.attack.nodamage",
|
||||
"entity.player.attack.strong",
|
||||
"entity.player.attack.sweep",
|
||||
"entity.player.attack.weak",
|
||||
"entity.player.big_fall",
|
||||
"entity.player.breath",
|
||||
"entity.player.burp",
|
||||
"entity.player.death",
|
||||
"entity.player.hurt",
|
||||
"entity.player.levelup",
|
||||
"entity.player.small_fall",
|
||||
"entity.player.splash",
|
||||
"entity.player.swim",
|
||||
"entity.rabbit.ambient",
|
||||
"entity.rabbit.attack",
|
||||
"entity.rabbit.death",
|
||||
"entity.rabbit.hurt",
|
||||
"entity.rabbit.jump",
|
||||
"entity.sheep.ambient",
|
||||
"entity.sheep.death",
|
||||
"entity.sheep.hurt",
|
||||
"entity.sheep.shear",
|
||||
"entity.sheep.step",
|
||||
"entity.shulker.ambient",
|
||||
"entity.shulker.close",
|
||||
"entity.shulker.death",
|
||||
"entity.shulker.hurt",
|
||||
"entity.shulker.hurt_closed",
|
||||
"entity.shulker.open",
|
||||
"entity.shulker.shoot",
|
||||
"entity.shulker.teleport",
|
||||
"entity.shulker_bullet.hit",
|
||||
"entity.shulker_bullet.hurt",
|
||||
"entity.silverfish.ambient",
|
||||
"entity.silverfish.death",
|
||||
"entity.silverfish.hurt",
|
||||
"entity.silverfish.step",
|
||||
"entity.skeleton.ambient",
|
||||
"entity.skeleton.death",
|
||||
"entity.skeleton.hurt",
|
||||
"entity.skeleton.shoot",
|
||||
"entity.skeleton.step",
|
||||
"entity.skeleton_horse.ambient",
|
||||
"entity.skeleton_horse.death",
|
||||
"entity.skeleton_horse.hurt",
|
||||
"entity.slime.attack",
|
||||
"entity.slime.death",
|
||||
"entity.slime.hurt",
|
||||
"entity.slime.jump",
|
||||
"entity.slime.squish",
|
||||
"entity.small_magmacube.death",
|
||||
"entity.small_magmacube.hurt",
|
||||
"entity.small_magmacube.squish",
|
||||
"entity.small_slime.death",
|
||||
"entity.small_slime.hurt",
|
||||
"entity.small_slime.jump",
|
||||
"entity.small_slime.squish",
|
||||
"entity.snowball.throw",
|
||||
"entity.snowman.ambient",
|
||||
"entity.snowman.death",
|
||||
"entity.snowman.hurt",
|
||||
"entity.snowman.shoot",
|
||||
"entity.spider.ambient",
|
||||
"entity.spider.death",
|
||||
"entity.spider.hurt",
|
||||
"entity.spider.step",
|
||||
"entity.splash_potion.break",
|
||||
"entity.splash_potion.throw",
|
||||
"entity.squid.ambient",
|
||||
"entity.squid.death",
|
||||
"entity.squid.hurt",
|
||||
"entity.tnt.primed",
|
||||
"entity.villager.ambient",
|
||||
"entity.villager.death",
|
||||
"entity.villager.hurt",
|
||||
"entity.villager.no",
|
||||
"entity.villager.trading",
|
||||
"entity.villager.yes",
|
||||
"entity.witch.ambient",
|
||||
"entity.witch.death",
|
||||
"entity.witch.drink",
|
||||
"entity.witch.hurt",
|
||||
"entity.witch.throw",
|
||||
"entity.wither.ambient",
|
||||
"entity.wither.break_block",
|
||||
"entity.wither.death",
|
||||
"entity.wither.hurt",
|
||||
"entity.wither.shoot",
|
||||
"entity.wither.spawn",
|
||||
"entity.wolf.ambient",
|
||||
"entity.wolf.death",
|
||||
"entity.wolf.growl",
|
||||
"entity.wolf.howl",
|
||||
"entity.wolf.hurt",
|
||||
"entity.wolf.pant",
|
||||
"entity.wolf.shake",
|
||||
"entity.wolf.step",
|
||||
"entity.wolf.whine",
|
||||
"entity.zombie.ambient",
|
||||
"entity.zombie.attack_door_wood",
|
||||
"entity.zombie.attack_iron_door",
|
||||
"entity.zombie.break_door_wood",
|
||||
"entity.zombie.death",
|
||||
"entity.zombie.hurt",
|
||||
"entity.zombie.infect",
|
||||
"entity.zombie.step",
|
||||
"entity.zombie_horse.ambient",
|
||||
"entity.zombie_horse.death",
|
||||
"entity.zombie_horse.hurt",
|
||||
"entity.zombie_pig.ambient",
|
||||
"entity.zombie_pig.angry",
|
||||
"entity.zombie_pig.death",
|
||||
"entity.zombie_pig.hurt",
|
||||
"entity.zombie_villager.ambient",
|
||||
"entity.zombie_villager.converted",
|
||||
"entity.zombie_villager.cure",
|
||||
"entity.zombie_villager.death",
|
||||
"entity.zombie_villager.hurt",
|
||||
"entity.zombie_villager.step",
|
||||
"item.armor.equip_chain",
|
||||
"item.armor.equip_diamond",
|
||||
"item.armor.equip_generic",
|
||||
"item.armor.equip_gold",
|
||||
"item.armor.equip_iron",
|
||||
"item.armor.equip_leather",
|
||||
"item.bottle.fill",
|
||||
"item.bottle.fill_dragonbreath",
|
||||
"item.bucket.empty",
|
||||
"item.bucket.empty_lava",
|
||||
"item.bucket.fill",
|
||||
"item.bucket.fill_lava",
|
||||
"item.chorus_fruit.teleport",
|
||||
"item.firecharge.use",
|
||||
"item.flintandsteel.use",
|
||||
"item.hoe.till",
|
||||
"item.shield.block",
|
||||
"item.shield.break",
|
||||
"item.shovel.flatten",
|
||||
"music.creative",
|
||||
"music.credits",
|
||||
"music.dragon",
|
||||
"music.end",
|
||||
"music.game",
|
||||
"music.menu",
|
||||
"music.nether",
|
||||
"record.11",
|
||||
"record.13",
|
||||
"record.blocks",
|
||||
"record.cat",
|
||||
"record.chirp",
|
||||
"record.far",
|
||||
"record.mall",
|
||||
"record.mellohi",
|
||||
"record.stal",
|
||||
"record.strad",
|
||||
"record.wait",
|
||||
"record.ward",
|
||||
"ui.button.click",
|
||||
"weather.rain",
|
||||
"weather.rain.above"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of ViaRewind - https://github.com/ViaVersion/ViaRewind
|
||||
* Copyright (C) 2018-2025 ViaVersion and contributors
|
||||
* Copyright (C) 2018-2026 ViaVersion and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"depends": {
|
||||
"viafabric": ">=0.4.14",
|
||||
"viabackwards": ">=5.5.0"
|
||||
"viabackwards": ">=5.7.1"
|
||||
},
|
||||
"custom": {
|
||||
"modmenu:api": true,
|
||||
|
||||
+4
-4
@@ -7,14 +7,14 @@ org.gradle.configuration-cache=true
|
||||
project_jvm_version=17
|
||||
|
||||
project_group=com.viaversion
|
||||
project_version=4.0.10
|
||||
project_version=4.0.14
|
||||
project_description=ViaVersion addon to allow 1.8.x and 1.7.x clients on newer server versions.
|
||||
|
||||
publishing_dev_id=FlorianMichael
|
||||
publishing_dev_name=EnZaXD
|
||||
publishing_dev_mail=florian.michael07@gmail.com
|
||||
publishing_dev_mail=git@florianmichael.de
|
||||
|
||||
# Modrinth/Hangar Publishing
|
||||
minecraft_versions=1.21.9, 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9, 1.8.8
|
||||
minecraft_version_range=1.8-1.21.9
|
||||
minecraft_versions=1.21.11, 1.21.10, 1.21.9, 1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9, 1.8.8
|
||||
minecraft_version_range=1.8-1.21.11
|
||||
velocity_version=3.3
|
||||
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||
distributionSha256Sum=0d585f69da091fc5b2beced877feab55a3064d43b8a1d46aeb07996b0915e0e0
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("de.florianmichael.baseproject.BaseProject") version "1.2.2"
|
||||
id("io.papermc.hangar-publish-plugin") version "0.1.3"
|
||||
id("de.florianmichael.baseproject.BaseProject") version "1.2.6"
|
||||
id("io.papermc.hangar-publish-plugin") version "0.1.4"
|
||||
id("net.raphimc.class-token-replacer") version "1.1.7"
|
||||
id("com.modrinth.minotaur") version "2.+"
|
||||
}
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
},
|
||||
{
|
||||
"id": "viaversion",
|
||||
"version": "[5.5.0,)"
|
||||
"version": "[5.7.1,)"
|
||||
},
|
||||
{
|
||||
"id": "viabackwards",
|
||||
"version": "[5.5.0,)"
|
||||
"version": "[5.7.1,)"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user