3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00

Rename a few data classes, provider packages, task classes

Dieser Commit ist enthalten in:
FlorianMichael 2024-05-11 18:54:27 +02:00 committet von Nassim Jahnke
Ursprung d0fecb8951
Commit 0142e3aea7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
54 geänderte Dateien mit 396 neuen und 413 gelöschten Zeilen

Datei anzeigen

@ -22,7 +22,7 @@ import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener; import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.ArmorType; import com.viaversion.viaversion.protocols.v1_8to1_9.data.ArmorTypes1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import java.util.UUID; import java.util.UUID;
@ -56,7 +56,7 @@ public class ArmorListener extends ViaBukkitListener {
int armor = 0; int armor = 0;
for (ItemStack stack : player.getInventory().getArmorContents()) { for (ItemStack stack : player.getInventory().getArmorContents()) {
armor += ArmorType.findById(stack.getTypeId()).getArmorPoints(); armor += ArmorTypes1_8.findById(stack.getTypeId()).getArmorPoints();
} }
PacketWrapper wrapper = PacketWrapper.create(ClientboundPackets1_9.UPDATE_ATTRIBUTES, null, getUserConnection(player)); PacketWrapper wrapper = PacketWrapper.create(ClientboundPackets1_9.UPDATE_ATTRIBUTES, null, getUserConnection(player));
@ -75,7 +75,7 @@ public class ArmorListener extends ViaBukkitListener {
public void onInventoryClick(InventoryClickEvent e) { public void onInventoryClick(InventoryClickEvent e) {
HumanEntity human = e.getWhoClicked(); HumanEntity human = e.getWhoClicked();
if (human instanceof final Player player && e.getInventory() instanceof CraftingInventory) { if (human instanceof final Player player && e.getInventory() instanceof CraftingInventory) {
if ((e.getCurrentItem() != null && ArmorType.isArmor(e.getCurrentItem().getTypeId())) if ((e.getCurrentItem() != null && ArmorTypes1_8.isArmor(e.getCurrentItem().getTypeId()))
|| (e.getRawSlot() >= 5 && e.getRawSlot() <= 8)) { || (e.getRawSlot() >= 5 && e.getRawSlot() <= 8)) {
sendDelayedArmorUpdate(player); sendDelayedArmorUpdate(player);
} }

Datei anzeigen

@ -38,12 +38,12 @@ import com.viaversion.viaversion.bukkit.providers.BukkitAckSequenceProvider;
import com.viaversion.viaversion.bukkit.providers.BukkitBlockConnectionProvider; import com.viaversion.viaversion.bukkit.providers.BukkitBlockConnectionProvider;
import com.viaversion.viaversion.bukkit.providers.BukkitInventoryQuickMoveProvider; import com.viaversion.viaversion.bukkit.providers.BukkitInventoryQuickMoveProvider;
import com.viaversion.viaversion.bukkit.providers.BukkitViaMovementTransmitter; import com.viaversion.viaversion.bukkit.providers.BukkitViaMovementTransmitter;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider; import com.viaversion.viaversion.protocols.v1_11_1to1_12.provider.InventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.ConnectionData; import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.ConnectionData;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.BlockConnectionProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.blockconnections.providers.BlockConnectionProvider;
import com.viaversion.viaversion.protocols.v1_18_2to1_19.provider.AckSequenceProvider; import com.viaversion.viaversion.protocols.v1_18_2to1_19.provider.AckSequenceProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.HandItemProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.HandItemProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MovementTransmitterProvider;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;

Datei anzeigen

@ -23,7 +23,7 @@ import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1.BukkitInventoryUpdateTask; import com.viaversion.viaversion.bukkit.tasks.protocol1_12to1_11_1.BukkitInventoryUpdateTask;
import com.viaversion.viaversion.bukkit.util.NMSUtil; import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider; import com.viaversion.viaversion.protocols.v1_11_1to1_12.provider.InventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.storage.ItemTransaction; import com.viaversion.viaversion.protocols.v1_11_1to1_12.storage.ItemTransaction;
import com.viaversion.viaversion.util.ReflectionUtil; import com.viaversion.viaversion.util.ReflectionUtil;
import java.lang.reflect.Field; import java.lang.reflect.Field;

Datei anzeigen

@ -20,7 +20,7 @@ package com.viaversion.viaversion.bukkit.providers;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bukkit.util.NMSUtil; import com.viaversion.viaversion.bukkit.util.NMSUtil;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MovementTransmitterProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;

Datei anzeigen

@ -23,7 +23,6 @@ import com.viaversion.viaversion.api.connection.StorableObject;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.data.entity.ClientEntityIdChangeListener; import com.viaversion.viaversion.api.data.entity.ClientEntityIdChangeListener;
import com.viaversion.viaversion.api.data.entity.EntityTracker; import com.viaversion.viaversion.api.data.entity.EntityTracker;
import com.viaversion.viaversion.api.protocol.Protocol;
import com.viaversion.viaversion.api.protocol.ProtocolPathEntry; import com.viaversion.viaversion.api.protocol.ProtocolPathEntry;
import com.viaversion.viaversion.api.protocol.ProtocolPipeline; import com.viaversion.viaversion.api.protocol.ProtocolPipeline;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
@ -34,12 +33,11 @@ import com.viaversion.viaversion.bungee.storage.BungeeStorage;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.ItemPacketRewriter1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.ItemPacketRewriter1_13;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.EntityIdProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType; import java.lang.invoke.MethodType;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;

Datei anzeigen

@ -29,9 +29,9 @@ import com.viaversion.viaversion.bungee.providers.BungeeBossBarProvider;
import com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider; import com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider;
import com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider; import com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider;
import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider; import com.viaversion.viaversion.bungee.providers.BungeeVersionProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.BossBarProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.EntityIdProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MainHandProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MainHandProvider;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

Datei anzeigen

@ -19,7 +19,7 @@ package com.viaversion.viaversion.bungee.providers;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bungee.storage.BungeeStorage; import com.viaversion.viaversion.bungee.storage.BungeeStorage;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.BossBarProvider;
import java.util.UUID; import java.util.UUID;
public class BungeeBossBarProvider extends BossBarProvider { public class BungeeBossBarProvider extends BossBarProvider {

Datei anzeigen

@ -19,7 +19,7 @@ package com.viaversion.viaversion.bungee.providers;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.bungee.storage.BungeeStorage; import com.viaversion.viaversion.bungee.storage.BungeeStorage;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.EntityIdProvider;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.ProxiedPlayer;

Datei anzeigen

@ -20,7 +20,7 @@ package com.viaversion.viaversion.bungee.providers;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.ProtocolInfo; import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MainHandProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MainHandProvider;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.logging.Level; import java.util.logging.Level;

Datei anzeigen

@ -40,8 +40,8 @@ import com.viaversion.viaversion.debug.DebugHandlerImpl;
import com.viaversion.viaversion.protocol.ProtocolManagerImpl; import com.viaversion.viaversion.protocol.ProtocolManagerImpl;
import com.viaversion.viaversion.protocol.ServerProtocolVersionRange; import com.viaversion.viaversion.protocol.ServerProtocolVersionRange;
import com.viaversion.viaversion.protocol.ServerProtocolVersionSingleton; import com.viaversion.viaversion.protocol.ServerProtocolVersionSingleton;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.task.TabCompleteThread; import com.viaversion.viaversion.protocols.v1_12_2to1_13.task.TabCompleteTask;
import com.viaversion.viaversion.protocols.v1_8to1_9.task.ViaIdleThread; import com.viaversion.viaversion.protocols.v1_8to1_9.task.IdlePacketTask;
import com.viaversion.viaversion.scheduler.TaskScheduler; import com.viaversion.viaversion.scheduler.TaskScheduler;
import com.viaversion.viaversion.update.UpdateUtil; import com.viaversion.viaversion.update.UpdateUtil;
import java.util.ArrayList; import java.util.ArrayList;
@ -173,12 +173,12 @@ public class ViaManagerImpl implements ViaManager {
final ProtocolVersion serverProtocolVersion = protocolManager.getServerProtocolVersion().lowestSupportedProtocolVersion(); final ProtocolVersion serverProtocolVersion = protocolManager.getServerProtocolVersion().lowestSupportedProtocolVersion();
if (serverProtocolVersion.olderThan(ProtocolVersion.v1_9)) { if (serverProtocolVersion.olderThan(ProtocolVersion.v1_9)) {
if (Via.getConfig().isSimulatePlayerTick()) { if (Via.getConfig().isSimulatePlayerTick()) {
Via.getPlatform().runRepeatingSync(new ViaIdleThread(), 1L); Via.getPlatform().runRepeatingSync(new IdlePacketTask(), 1L);
} }
} }
if (serverProtocolVersion.olderThan(ProtocolVersion.v1_13)) { if (serverProtocolVersion.olderThan(ProtocolVersion.v1_13)) {
if (Via.getConfig().get1_13TabCompleteDelay() > 0) { if (Via.getConfig().get1_13TabCompleteDelay() > 0) {
Via.getPlatform().runRepeatingSync(new TabCompleteThread(), 1L); Via.getPlatform().runRepeatingSync(new TabCompleteTask(), 1L);
} }
} }

Datei anzeigen

@ -41,7 +41,7 @@ import com.viaversion.viaversion.data.entity.EntityTrackerBase;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.metadata.MetadataRewriter1_12To1_11_1; import com.viaversion.viaversion.protocols.v1_11_1to1_12.metadata.MetadataRewriter1_12To1_11_1;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ClientboundPackets1_12; import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ClientboundPackets1_12;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ServerboundPackets1_12; import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ServerboundPackets1_12;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider; import com.viaversion.viaversion.protocols.v1_11_1to1_12.provider.InventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.ChatItemRewriter; import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.ChatItemRewriter;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.ItemPacketRewriter1_12; import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.ItemPacketRewriter1_12;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.TranslateRewriter; import com.viaversion.viaversion.protocols.v1_11_1to1_12.rewriter.TranslateRewriter;
@ -50,7 +50,6 @@ import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPacke
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
import com.viaversion.viaversion.rewriter.SoundRewriter; import com.viaversion.viaversion.rewriter.SoundRewriter;
import java.util.logging.Level;
public class Protocol1_11_1To1_12 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_12, ServerboundPackets1_9_3, ServerboundPackets1_12> { public class Protocol1_11_1To1_12 extends AbstractProtocol<ClientboundPackets1_9_3, ClientboundPackets1_12, ServerboundPackets1_9_3, ServerboundPackets1_12> {

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_11_1to1_12.providers; package com.viaversion.viaversion.protocols.v1_11_1to1_12.provider;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.platform.providers.Provider; import com.viaversion.viaversion.api.platform.providers.Provider;

Datei anzeigen

@ -25,7 +25,7 @@ import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.Protocol1_11_1To1_12; import com.viaversion.viaversion.protocols.v1_11_1to1_12.Protocol1_11_1To1_12;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ServerboundPackets1_12; import com.viaversion.viaversion.protocols.v1_11_1to1_12.packet.ServerboundPackets1_12;
import com.viaversion.viaversion.protocols.v1_11_1to1_12.providers.InventoryQuickMoveProvider; import com.viaversion.viaversion.protocols.v1_11_1to1_12.provider.InventoryQuickMoveProvider;
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
import com.viaversion.viaversion.rewriter.ItemRewriter; import com.viaversion.viaversion.rewriter.ItemRewriter;
import org.checkerframework.checker.nullness.qual.Nullable; import org.checkerframework.checker.nullness.qual.Nullable;

Datei anzeigen

@ -57,9 +57,9 @@ import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.RecipeData;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.StatisticData; import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.StatisticData;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.StatisticMappings; import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.StatisticMappings;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.metadata.MetadataRewriter1_13To1_12_2; import com.viaversion.viaversion.protocols.v1_12_2to1_13.metadata.MetadataRewriter1_13To1_12_2;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.PaintingProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.PaintingProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.PlayerLookTargetProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.PlayerLookTargetProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.EntityPacketRewriter1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.EntityPacketRewriter1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.ItemPacketRewriter1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.ItemPacketRewriter1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.WorldPacketRewriter1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.rewriter.WorldPacketRewriter1_13;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.StringTag; import com.viaversion.nbt.tag.StringTag;
@ -28,12 +28,12 @@ import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities.BannerHandler; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities.BannerHandler;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities.BedHandler; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities.BedHandler;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities.CommandBlockHandler; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities.CommandBlockHandler;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities.FlowerPotHandler; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities.FlowerPotHandler;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities.SkullHandler; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities.SkullHandler;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities.SpawnerHandler; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities.SpawnerHandler;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider;
import com.viaversion.viaversion.api.platform.providers.Provider; import com.viaversion.viaversion.api.platform.providers.Provider;
import com.viaversion.viaversion.util.Key; import com.viaversion.viaversion.util.Key;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;

Datei anzeigen

@ -15,17 +15,16 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.ListTag; import com.viaversion.nbt.tag.ListTag;
import com.viaversion.nbt.tag.NumberTag; import com.viaversion.nbt.tag.NumberTag;
import com.viaversion.nbt.tag.StringTag; import com.viaversion.nbt.tag.StringTag;
import com.viaversion.nbt.tag.Tag;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage; import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage;
import com.viaversion.viaversion.util.ComponentUtil; import com.viaversion.viaversion.util.ComponentUtil;

Datei anzeigen

@ -15,14 +15,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.NumberTag; import com.viaversion.nbt.tag.NumberTag;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage; import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage;
public class BedHandler implements BlockEntityProvider.BlockEntityHandler { public class BedHandler implements BlockEntityProvider.BlockEntityHandler {

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.StringTag; import com.viaversion.nbt.tag.StringTag;
@ -24,7 +24,7 @@ import com.google.gson.JsonParser;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.util.ComponentUtil; import com.viaversion.viaversion.util.ComponentUtil;
public class CommandBlockHandler implements BlockEntityProvider.BlockEntityHandler { public class CommandBlockHandler implements BlockEntityProvider.BlockEntityHandler {

Datei anzeigen

@ -15,11 +15,11 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.util.Key; import com.viaversion.viaversion.util.Key;
import com.viaversion.viaversion.util.Pair; import com.viaversion.viaversion.util.Pair;
import java.util.Map; import java.util.Map;

Datei anzeigen

@ -15,14 +15,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.NumberTag; import com.viaversion.nbt.tag.NumberTag;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.Position; import com.viaversion.viaversion.api.minecraft.Position;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage; import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage;
public class SkullHandler implements BlockEntityProvider.BlockEntityHandler { public class SkullHandler implements BlockEntityProvider.BlockEntityHandler {

Datei anzeigen

@ -15,13 +15,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.blockentities; package com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.blockentities;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.StringTag; import com.viaversion.nbt.tag.StringTag;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.EntityNameRewriter; import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.EntityNameRewriter;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
public class SpawnerHandler implements BlockEntityProvider.BlockEntityHandler { public class SpawnerHandler implements BlockEntityProvider.BlockEntityHandler {
@Override @Override

Datei anzeigen

@ -42,8 +42,8 @@ import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.NamedSoundRewriter
import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.ParticleRewriter; import com.viaversion.viaversion.protocols.v1_12_2to1_13.data.ParticleRewriter;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ClientboundPackets1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ServerboundPackets1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.packet.ServerboundPackets1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.BlockEntityProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.BlockEntityProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.PaintingProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.PaintingProvider;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage; import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.BlockStorage;
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ClientboundPackets1_12_1; import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ClientboundPackets1_12_1;
import com.viaversion.viaversion.util.IdAndData; import com.viaversion.viaversion.util.IdAndData;

Datei anzeigen

@ -25,9 +25,8 @@ import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.providers.PlayerLookTargetProvider; import com.viaversion.viaversion.protocols.v1_12_2to1_13.provider.PlayerLookTargetProvider;
import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ServerboundPackets1_12_1; import com.viaversion.viaversion.protocols.v1_12to1_12_1.packet.ServerboundPackets1_12_1;
import java.util.logging.Level;
public class TabCompleteTracker implements StorableObject { public class TabCompleteTracker implements StorableObject {
private int transactionId; private int transactionId;

Datei anzeigen

@ -22,7 +22,7 @@ import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13; import com.viaversion.viaversion.protocols.v1_12_2to1_13.Protocol1_12_2To1_13;
import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.TabCompleteTracker; import com.viaversion.viaversion.protocols.v1_12_2to1_13.storage.TabCompleteTracker;
public class TabCompleteThread implements Runnable { public class TabCompleteTask implements Runnable {
@Override @Override
public void run() { public void run() {
for (UserConnection info : Via.getManager().getConnectionManager().getConnections()) { for (UserConnection info : Via.getManager().getConnectionManager().getConnections()) {

Datei anzeigen

@ -27,24 +27,23 @@ import com.viaversion.viaversion.api.protocol.AbstractProtocol;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.packet.State; import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer; import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets; import com.viaversion.viaversion.protocols.base.ClientboundLoginPackets;
import com.viaversion.viaversion.protocols.v1_8.packet.ClientboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8.packet.ServerboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.BossBarProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.CommandBlockProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.CommandBlockProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.CompressionProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.CompressionProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.EntityIdProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.HandItemProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.HandItemProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MainHandProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MainHandProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MovementTransmitterProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.EntityPacketRewriter1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.EntityPacketRewriter1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.ItemPacketRewriter1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.ItemPacketRewriter1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.PlayerPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.PlayerPacketRewriter1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.SpawnPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.SpawnPacketRewriter1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.WorldPacketRewriter1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.rewriter.WorldPacketRewriter1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.ClientChunks; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.ClientChunks;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.CommandBlockStorage; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.CommandBlockStorage;
@ -99,8 +98,8 @@ public class Protocol1_8To1_9 extends AbstractProtocol<ClientboundPackets1_8, Cl
}); });
// Other Handlers // Other Handlers
SpawnPackets1_9.register(this); SpawnPacketRewriter1_9.register(this);
PlayerPackets1_9.register(this); PlayerPacketRewriter1_9.register(this);
WorldPacketRewriter1_9.register(this); WorldPacketRewriter1_9.register(this);
} }

Datei anzeigen

@ -20,7 +20,7 @@ package com.viaversion.viaversion.protocols.v1_8to1_9.data;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public enum ArmorType { public enum ArmorTypes1_8 {
LEATHER_HELMET(1, 298, "minecraft:leather_helmet"), LEATHER_HELMET(1, 298, "minecraft:leather_helmet"),
LEATHER_CHESTPLATE(3, 299, "minecraft:leather_chestplate"), LEATHER_CHESTPLATE(3, 299, "minecraft:leather_chestplate"),
@ -44,11 +44,11 @@ public enum ArmorType {
GOLD_BOOTS(1, 317, "minecraft:gold_boots"), GOLD_BOOTS(1, 317, "minecraft:gold_boots"),
NONE(0, 0, "none"); NONE(0, 0, "none");
private static final Map<Integer, ArmorType> armor; private static final Map<Integer, ArmorTypes1_8> armor;
static { static {
armor = new HashMap<>(); armor = new HashMap<>();
for (ArmorType a : ArmorType.values()) { for (ArmorTypes1_8 a : ArmorTypes1_8.values()) {
armor.put(a.getId(), a); armor.put(a.getId(), a);
} }
} }
@ -57,7 +57,7 @@ public enum ArmorType {
private final int id; private final int id;
private final String type; private final String type;
ArmorType(int armorPoints, int id, String type) { ArmorTypes1_8(int armorPoints, int id, String type) {
this.armorPoints = armorPoints; this.armorPoints = armorPoints;
this.id = id; this.id = id;
this.type = type; this.type = type;
@ -77,9 +77,9 @@ public enum ArmorType {
* @param id ID of the item * @param id ID of the item
* @return Return the ArmourType, ArmourType.NONE if not found * @return Return the ArmourType, ArmourType.NONE if not found
*/ */
public static ArmorType findById(int id) { public static ArmorTypes1_8 findById(int id) {
ArmorType type = armor.get(id); ArmorTypes1_8 type = armor.get(id);
return type == null ? ArmorType.NONE : type; return type == null ? ArmorTypes1_8.NONE : type;
} }
/** /**
@ -88,8 +88,8 @@ public enum ArmorType {
* @param type String name for the item * @param type String name for the item
* @return Return the ArmourType, ArmourType.NONE if not found * @return Return the ArmourType, ArmourType.NONE if not found
*/ */
public static ArmorType findByType(String type) { public static ArmorTypes1_8 findByType(String type) {
for (ArmorType a : ArmorType.values()) for (ArmorTypes1_8 a : ArmorTypes1_8.values())
if (a.getType().equals(type)) if (a.getType().equals(type))
return a; return a;
return NONE; return NONE;
@ -112,7 +112,7 @@ public enum ArmorType {
* @return True if the item is a piece of armour * @return True if the item is a piece of armour
*/ */
public static boolean isArmor(String type) { public static boolean isArmor(String type) {
for (ArmorType a : ArmorType.values()) for (ArmorTypes1_8 a : ArmorTypes1_8.values())
if (a.getType().equals(type)) if (a.getType().equals(type))
return true; return true;
return false; return false;

Datei anzeigen

@ -20,7 +20,7 @@ package com.viaversion.viaversion.protocols.v1_8to1_9.data;
import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntMap;
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
public class EffectIds { public class EffectIds1_8 {
private static final Int2IntMap EFFECTS = new Int2IntOpenHashMap(19, .99F); private static final Int2IntMap EFFECTS = new Int2IntOpenHashMap(19, .99F);

Datei anzeigen

@ -20,7 +20,7 @@ package com.viaversion.viaversion.protocols.v1_8to1_9.data;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class EntityIds { public class EntityIds1_8 {
public static final Map<String, Integer> ENTITY_NAME_TO_ID = new HashMap<>(); public static final Map<String, Integer> ENTITY_NAME_TO_ID = new HashMap<>();
public static final Map<Integer, String> ENTITY_ID_TO_NAME = new HashMap<>(); public static final Map<Integer, String> ENTITY_ID_TO_NAME = new HashMap<>();

Datei anzeigen

@ -28,7 +28,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
import static com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_10.EntityType.*; import static com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_10.EntityType.*;
public enum MetaIndex { public enum MetaIndex1_8 {
// Entity // Entity
ENTITY_STATUS(ENTITY, 0, MetaType1_8.BYTE, MetaType1_9.BYTE), ENTITY_STATUS(ENTITY, 0, MetaType1_8.BYTE, MetaType1_9.BYTE),
@ -189,10 +189,10 @@ public enum MetaIndex {
// Ender dragon // Ender dragon
ENDER_DRAGON_PHASE(ENDER_DRAGON, 11, MetaType1_9.VAR_INT); ENDER_DRAGON_PHASE(ENDER_DRAGON, 11, MetaType1_9.VAR_INT);
private static final HashMap<Pair<EntityTypes1_10.EntityType, Integer>, MetaIndex> metadataRewrites = new HashMap<>(); private static final HashMap<Pair<EntityTypes1_10.EntityType, Integer>, MetaIndex1_8> metadataRewrites = new HashMap<>();
static { static {
for (MetaIndex index : MetaIndex.values()) { for (MetaIndex1_8 index : MetaIndex1_8.values()) {
metadataRewrites.put(new Pair<>(index.clazz, index.index), index); metadataRewrites.put(new Pair<>(index.clazz, index.index), index);
} }
} }
@ -203,7 +203,7 @@ public enum MetaIndex {
private final MetaType1_8 oldType; private final MetaType1_8 oldType;
private final int index; private final int index;
MetaIndex(EntityTypes1_10.EntityType type, int index, MetaType1_8 oldType, @Nullable MetaType1_9 newType) { MetaIndex1_8(EntityTypes1_10.EntityType type, int index, MetaType1_8 oldType, @Nullable MetaType1_9 newType) {
this.clazz = type; this.clazz = type;
this.index = index; this.index = index;
this.newIndex = index; this.newIndex = index;
@ -211,7 +211,7 @@ public enum MetaIndex {
this.newType = newType; this.newType = newType;
} }
MetaIndex(EntityTypes1_10.EntityType type, int newIndex, @Nullable MetaType1_9 newType) { MetaIndex1_8(EntityTypes1_10.EntityType type, int newIndex, @Nullable MetaType1_9 newType) {
this.clazz = type; this.clazz = type;
this.index = -1; this.index = -1;
this.oldType = null; this.oldType = null;
@ -219,7 +219,7 @@ public enum MetaIndex {
this.newType = newType; this.newType = newType;
} }
MetaIndex(EntityTypes1_10.EntityType type, int index, MetaType1_8 oldType, int newIndex, @Nullable MetaType1_9 newType) { MetaIndex1_8(EntityTypes1_10.EntityType type, int index, MetaType1_8 oldType, int newIndex, @Nullable MetaType1_9 newType) {
this.clazz = type; this.clazz = type;
this.index = index; this.index = index;
this.oldType = oldType; this.oldType = oldType;
@ -247,15 +247,15 @@ public enum MetaIndex {
return index; return index;
} }
private static Optional<MetaIndex> getIndex(EntityType type, int index) { private static Optional<MetaIndex1_8> getIndex(EntityType type, int index) {
Pair pair = new Pair<>(type, index); Pair pair = new Pair<>(type, index);
return Optional.ofNullable(metadataRewrites.get(pair)); return Optional.ofNullable(metadataRewrites.get(pair));
} }
public static MetaIndex searchIndex(EntityType type, int index) { public static MetaIndex1_8 searchIndex(EntityType type, int index) {
EntityType currentType = type; EntityType currentType = type;
do { do {
Optional<MetaIndex> optMeta = getIndex(currentType, index); Optional<MetaIndex1_8> optMeta = getIndex(currentType, index);
if (optMeta.isPresent()) { if (optMeta.isPresent()) {
return optMeta.get(); return optMeta.get();

Datei anzeigen

@ -17,18 +17,12 @@
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.data; package com.viaversion.viaversion.protocols.v1_8to1_9.data;
import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.nbt.tag.ListTag;
import com.viaversion.nbt.tag.StringTag;
import com.viaversion.viaversion.api.minecraft.item.Item;
import com.viaversion.viaversion.util.ComponentUtil;
import com.viaversion.viaversion.util.SerializerVersion;
import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntMap;
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class PotionIds { public class PotionIds1_8 {
public static final Map<String, Integer> POTION_NAME_TO_ID = new HashMap<>(); public static final Map<String, Integer> POTION_NAME_TO_ID = new HashMap<>();
public static final Map<Integer, String> POTION_ID_TO_NAME = new HashMap<>(); public static final Map<Integer, String> POTION_ID_TO_NAME = new HashMap<>();

Datei anzeigen

@ -17,7 +17,7 @@
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.data; package com.viaversion.viaversion.protocols.v1_8to1_9.data;
public enum SoundCategory { public enum SoundCategories1_8 {
MASTER("master", 0), MASTER("master", 0),
MUSIC("music", 1), MUSIC("music", 1),
@ -33,7 +33,7 @@ public enum SoundCategory {
private final String name; private final String name;
private final int id; private final int id;
SoundCategory(String name, int id) { SoundCategories1_8(String name, int id) {
this.name = name; this.name = name;
this.id = id; this.id = id;
} }

Datei anzeigen

@ -20,284 +20,284 @@ package com.viaversion.viaversion.protocols.v1_8to1_9.data;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public enum SoundEffect { public enum SoundEffects1_8 {
MOB_HORSE_ZOMBIE_IDLE("mob.horse.zombie.idle", "entity.zombie_horse.ambient", SoundCategory.NEUTRAL), MOB_HORSE_ZOMBIE_IDLE("mob.horse.zombie.idle", "entity.zombie_horse.ambient", SoundCategories1_8.NEUTRAL),
NOTE_SNARE("note.snare", "block.note.snare", SoundCategory.RECORD), NOTE_SNARE("note.snare", "block.note.snare", SoundCategories1_8.RECORD),
RANDOM_WOOD_CLICK("random.wood_click", "block.wood_button.click_on", SoundCategory.BLOCK), RANDOM_WOOD_CLICK("random.wood_click", "block.wood_button.click_on", SoundCategories1_8.BLOCK),
DIG_GRAVEL("dig.gravel", "block.gravel.place", SoundCategory.BLOCK), DIG_GRAVEL("dig.gravel", "block.gravel.place", SoundCategories1_8.BLOCK),
RANDOM_BOWHIT("random.bowhit", "block.tripwire.detach", SoundCategory.NEUTRAL), RANDOM_BOWHIT("random.bowhit", "block.tripwire.detach", SoundCategories1_8.NEUTRAL),
DIG_GLASS("dig.glass", "block.glass.break", SoundCategory.BLOCK), DIG_GLASS("dig.glass", "block.glass.break", SoundCategories1_8.BLOCK),
MOB_ZOMBIE_SAY("mob.zombie.say", "entity.zombie.ambient", SoundCategory.HOSTILE), MOB_ZOMBIE_SAY("mob.zombie.say", "entity.zombie.ambient", SoundCategories1_8.HOSTILE),
MOB_PIG_DEATH("mob.pig.death", "entity.pig.death", SoundCategory.NEUTRAL), MOB_PIG_DEATH("mob.pig.death", "entity.pig.death", SoundCategories1_8.NEUTRAL),
MOB_HORSE_DONKEY_HIT("mob.horse.donkey.hit", "entity.donkey.hurt", SoundCategory.NEUTRAL), MOB_HORSE_DONKEY_HIT("mob.horse.donkey.hit", "entity.donkey.hurt", SoundCategories1_8.NEUTRAL),
GAME_NEUTRAL_SWIM("game.neutral.swim", "entity.player.swim", SoundCategory.NEUTRAL), GAME_NEUTRAL_SWIM("game.neutral.swim", "entity.player.swim", SoundCategories1_8.NEUTRAL),
GAME_PLAYER_SWIM("game.player.swim", "entity.player.swim", SoundCategory.PLAYER), GAME_PLAYER_SWIM("game.player.swim", "entity.player.swim", SoundCategories1_8.PLAYER),
MOB_ENDERMEN_IDLE("mob.endermen.idle", "entity.endermen.ambient", SoundCategory.HOSTILE), MOB_ENDERMEN_IDLE("mob.endermen.idle", "entity.endermen.ambient", SoundCategories1_8.HOSTILE),
PORTAL_PORTAL("portal.portal", "block.portal.ambient", SoundCategory.BLOCK), PORTAL_PORTAL("portal.portal", "block.portal.ambient", SoundCategories1_8.BLOCK),
RANDOM_FIZZ("random.fizz", "entity.generic.extinguish_fire", SoundCategory.BLOCK), RANDOM_FIZZ("random.fizz", "entity.generic.extinguish_fire", SoundCategories1_8.BLOCK),
NOTE_HARP("note.harp", "block.note.harp", SoundCategory.RECORD), NOTE_HARP("note.harp", "block.note.harp", SoundCategories1_8.RECORD),
STEP_SNOW("step.snow", "block.snow.step", SoundCategory.NEUTRAL), STEP_SNOW("step.snow", "block.snow.step", SoundCategories1_8.NEUTRAL),
RANDOM_SUCCESSFUL_HIT("random.successful_hit", "entity.arrow.hit_player", SoundCategory.PLAYER), RANDOM_SUCCESSFUL_HIT("random.successful_hit", "entity.arrow.hit_player", SoundCategories1_8.PLAYER),
MOB_ZOMBIEPIG_ZPIGHURT("mob.zombiepig.zpighurt", "entity.zombie_pig.hurt", SoundCategory.HOSTILE), MOB_ZOMBIEPIG_ZPIGHURT("mob.zombiepig.zpighurt", "entity.zombie_pig.hurt", SoundCategories1_8.HOSTILE),
MOB_WOLF_HOWL("mob.wolf.howl", "entity.wolf.howl", SoundCategory.NEUTRAL), MOB_WOLF_HOWL("mob.wolf.howl", "entity.wolf.howl", SoundCategories1_8.NEUTRAL),
FIREWORKS_LAUNCH("fireworks.launch", "entity.firework.launch", SoundCategory.AMBIENT), FIREWORKS_LAUNCH("fireworks.launch", "entity.firework.launch", SoundCategories1_8.AMBIENT),
MOB_COW_HURT("mob.cow.hurt", "entity.cow.death", SoundCategory.NEUTRAL), MOB_COW_HURT("mob.cow.hurt", "entity.cow.death", SoundCategories1_8.NEUTRAL),
FIREWORKS_LARGEBLAST("fireworks.largeBlast", "entity.firework.large_blast", SoundCategory.AMBIENT), FIREWORKS_LARGEBLAST("fireworks.largeBlast", "entity.firework.large_blast", SoundCategories1_8.AMBIENT),
MOB_BLAZE_HIT("mob.blaze.hit", "entity.blaze.hurt", SoundCategory.HOSTILE), MOB_BLAZE_HIT("mob.blaze.hit", "entity.blaze.hurt", SoundCategories1_8.HOSTILE),
MOB_VILLAGER_DEATH("mob.villager.death", "entity.villager.death", SoundCategory.NEUTRAL), MOB_VILLAGER_DEATH("mob.villager.death", "entity.villager.death", SoundCategories1_8.NEUTRAL),
MOB_BLAZE_DEATH("mob.blaze.death", "entity.blaze.death", SoundCategory.HOSTILE), MOB_BLAZE_DEATH("mob.blaze.death", "entity.blaze.death", SoundCategories1_8.HOSTILE),
MOB_HORSE_ZOMBIE_DEATH("mob.horse.zombie.death", "entity.zombie_horse.death", SoundCategory.NEUTRAL), MOB_HORSE_ZOMBIE_DEATH("mob.horse.zombie.death", "entity.zombie_horse.death", SoundCategories1_8.NEUTRAL),
MOB_SILVERFISH_KILL("mob.silverfish.kill", "entity.endermite.death", SoundCategory.HOSTILE), MOB_SILVERFISH_KILL("mob.silverfish.kill", "entity.endermite.death", SoundCategories1_8.HOSTILE),
MOB_WOLF_PANTING("mob.wolf.panting", "entity.wolf.pant", SoundCategory.NEUTRAL), MOB_WOLF_PANTING("mob.wolf.panting", "entity.wolf.pant", SoundCategories1_8.NEUTRAL),
NOTE_BASS("note.bass", "block.note.bass", SoundCategory.RECORD), NOTE_BASS("note.bass", "block.note.bass", SoundCategories1_8.RECORD),
DIG_STONE("dig.stone", "block.glass.place", SoundCategory.BLOCK), DIG_STONE("dig.stone", "block.glass.place", SoundCategories1_8.BLOCK),
MOB_ENDERMEN_STARE("mob.endermen.stare", "entity.endermen.stare", SoundCategory.HOSTILE), MOB_ENDERMEN_STARE("mob.endermen.stare", "entity.endermen.stare", SoundCategories1_8.HOSTILE),
GAME_PLAYER_SWIM_SPLASH("game.player.swim.splash", "entity.generic.splash", SoundCategory.BLOCK), GAME_PLAYER_SWIM_SPLASH("game.player.swim.splash", "entity.generic.splash", SoundCategories1_8.BLOCK),
MOB_SLIME_SMALL("mob.slime.small", "block.slime.hit", SoundCategory.HOSTILE), MOB_SLIME_SMALL("mob.slime.small", "block.slime.hit", SoundCategories1_8.HOSTILE),
MOB_GHAST_DEATH("mob.ghast.death", "entity.ghast.death", SoundCategory.HOSTILE), MOB_GHAST_DEATH("mob.ghast.death", "entity.ghast.death", SoundCategories1_8.HOSTILE),
MOB_GUARDIAN_ATTACK("mob.guardian.attack", "entity.guardian.attack", SoundCategory.HOSTILE), MOB_GUARDIAN_ATTACK("mob.guardian.attack", "entity.guardian.attack", SoundCategories1_8.HOSTILE),
RANDOM_CLICK("random.click", "block.wood_pressureplate.click_on", SoundCategory.BLOCK), RANDOM_CLICK("random.click", "block.wood_pressureplate.click_on", SoundCategories1_8.BLOCK),
MOB_ZOMBIEPIG_ZPIG("mob.zombiepig.zpig", "entity.zombie_pig.ambient", SoundCategory.HOSTILE), MOB_ZOMBIEPIG_ZPIG("mob.zombiepig.zpig", "entity.zombie_pig.ambient", SoundCategories1_8.HOSTILE),
GAME_PLAYER_DIE("game.player.die", "entity.player.death", SoundCategory.PLAYER), GAME_PLAYER_DIE("game.player.die", "entity.player.death", SoundCategories1_8.PLAYER),
FIREWORKS_TWINKLE_FAR("fireworks.twinkle_far", "entity.firework.twinkle_far", SoundCategory.AMBIENT), FIREWORKS_TWINKLE_FAR("fireworks.twinkle_far", "entity.firework.twinkle_far", SoundCategories1_8.AMBIENT),
MOB_GUARDIAN_LAND_IDLE("mob.guardian.land.idle", "entity.guardian.ambient_land", SoundCategory.HOSTILE), MOB_GUARDIAN_LAND_IDLE("mob.guardian.land.idle", "entity.guardian.ambient_land", SoundCategories1_8.HOSTILE),
DIG_GRASS("dig.grass", "block.grass.place", SoundCategory.BLOCK), DIG_GRASS("dig.grass", "block.grass.place", SoundCategories1_8.BLOCK),
MOB_SKELETON_STEP("mob.skeleton.step", "entity.skeleton.step", SoundCategory.HOSTILE), MOB_SKELETON_STEP("mob.skeleton.step", "entity.skeleton.step", SoundCategories1_8.HOSTILE),
MOB_WITHER_DEATH("mob.wither.death", "entity.wither.death", SoundCategory.HOSTILE), MOB_WITHER_DEATH("mob.wither.death", "entity.wither.death", SoundCategories1_8.HOSTILE),
MOB_WOLF_HURT("mob.wolf.hurt", "entity.wolf.hurt", SoundCategory.NEUTRAL), MOB_WOLF_HURT("mob.wolf.hurt", "entity.wolf.hurt", SoundCategories1_8.NEUTRAL),
MOB_HORSE_LEATHER("mob.horse.leather", "entity.horse.saddle", SoundCategory.NEUTRAL), MOB_HORSE_LEATHER("mob.horse.leather", "entity.horse.saddle", SoundCategories1_8.NEUTRAL),
MOB_BAT_LOOP("mob.bat.loop", "entity.bat.loop", SoundCategory.NEUTRAL), MOB_BAT_LOOP("mob.bat.loop", "entity.bat.loop", SoundCategories1_8.NEUTRAL),
MOB_GHAST_SCREAM("mob.ghast.scream", "entity.ghast.hurt", SoundCategory.HOSTILE), MOB_GHAST_SCREAM("mob.ghast.scream", "entity.ghast.hurt", SoundCategories1_8.HOSTILE),
GAME_PLAYER_HURT("game.player.hurt", "entity.player.death", SoundCategory.PLAYER), GAME_PLAYER_HURT("game.player.hurt", "entity.player.death", SoundCategories1_8.PLAYER),
GAME_NEUTRAL_DIE("game.neutral.die", "entity.player.death", SoundCategory.NEUTRAL), GAME_NEUTRAL_DIE("game.neutral.die", "entity.player.death", SoundCategories1_8.NEUTRAL),
MOB_CREEPER_DEATH("mob.creeper.death", "entity.creeper.death", SoundCategory.HOSTILE), MOB_CREEPER_DEATH("mob.creeper.death", "entity.creeper.death", SoundCategories1_8.HOSTILE),
MOB_HORSE_GALLOP("mob.horse.gallop", "entity.horse.gallop", SoundCategory.NEUTRAL), MOB_HORSE_GALLOP("mob.horse.gallop", "entity.horse.gallop", SoundCategories1_8.NEUTRAL),
MOB_WITHER_SPAWN("mob.wither.spawn", "entity.wither.spawn", SoundCategory.HOSTILE), MOB_WITHER_SPAWN("mob.wither.spawn", "entity.wither.spawn", SoundCategories1_8.HOSTILE),
MOB_ENDERMEN_HIT("mob.endermen.hit", "entity.endermen.hurt", SoundCategory.HOSTILE), MOB_ENDERMEN_HIT("mob.endermen.hit", "entity.endermen.hurt", SoundCategories1_8.HOSTILE),
MOB_CREEPER_SAY("mob.creeper.say", "entity.creeper.hurt", SoundCategory.HOSTILE), MOB_CREEPER_SAY("mob.creeper.say", "entity.creeper.hurt", SoundCategories1_8.HOSTILE),
MOB_HORSE_WOOD("mob.horse.wood", "entity.horse.step_wood", SoundCategory.NEUTRAL), MOB_HORSE_WOOD("mob.horse.wood", "entity.horse.step_wood", SoundCategories1_8.NEUTRAL),
MOB_ZOMBIE_UNFECT("mob.zombie.unfect", "entity.zombie_villager.converted", SoundCategory.HOSTILE), MOB_ZOMBIE_UNFECT("mob.zombie.unfect", "entity.zombie_villager.converted", SoundCategories1_8.HOSTILE),
RANDOM_ANVIL_USE("random.anvil_use", "block.anvil.use", SoundCategory.BLOCK), RANDOM_ANVIL_USE("random.anvil_use", "block.anvil.use", SoundCategories1_8.BLOCK),
RANDOM_CHESTCLOSED("random.chestclosed", "block.chest.close", SoundCategory.BLOCK), RANDOM_CHESTCLOSED("random.chestclosed", "block.chest.close", SoundCategories1_8.BLOCK),
MOB_SHEEP_SHEAR("mob.sheep.shear", "entity.sheep.shear", SoundCategory.NEUTRAL), MOB_SHEEP_SHEAR("mob.sheep.shear", "entity.sheep.shear", SoundCategories1_8.NEUTRAL),
RANDOM_POP("random.pop", "entity.item.pickup", SoundCategory.PLAYER), RANDOM_POP("random.pop", "entity.item.pickup", SoundCategories1_8.PLAYER),
MOB_BAT_DEATH("mob.bat.death", "entity.bat.death", SoundCategory.NEUTRAL), MOB_BAT_DEATH("mob.bat.death", "entity.bat.death", SoundCategories1_8.NEUTRAL),
DIG_WOOD("dig.wood", "block.ladder.break", SoundCategory.BLOCK), DIG_WOOD("dig.wood", "block.ladder.break", SoundCategories1_8.BLOCK),
MOB_HORSE_DONKEY_DEATH("mob.horse.donkey.death", "entity.donkey.death", SoundCategory.NEUTRAL), MOB_HORSE_DONKEY_DEATH("mob.horse.donkey.death", "entity.donkey.death", SoundCategories1_8.NEUTRAL),
FIREWORKS_BLAST("fireworks.blast", "entity.firework.blast", SoundCategory.AMBIENT), FIREWORKS_BLAST("fireworks.blast", "entity.firework.blast", SoundCategories1_8.AMBIENT),
MOB_ZOMBIEPIG_ZPIGANGRY("mob.zombiepig.zpigangry", "entity.zombie_pig.angry", SoundCategory.HOSTILE), MOB_ZOMBIEPIG_ZPIGANGRY("mob.zombiepig.zpigangry", "entity.zombie_pig.angry", SoundCategories1_8.HOSTILE),
GAME_HOSTILE_SWIM("game.hostile.swim", "entity.player.swim", SoundCategory.HOSTILE), GAME_HOSTILE_SWIM("game.hostile.swim", "entity.player.swim", SoundCategories1_8.HOSTILE),
MOB_GUARDIAN_FLOP("mob.guardian.flop", "entity.guardian.flop", SoundCategory.HOSTILE), MOB_GUARDIAN_FLOP("mob.guardian.flop", "entity.guardian.flop", SoundCategories1_8.HOSTILE),
MOB_VILLAGER_YES("mob.villager.yes", "entity.villager.yes", SoundCategory.NEUTRAL), MOB_VILLAGER_YES("mob.villager.yes", "entity.villager.yes", SoundCategories1_8.NEUTRAL),
MOB_GHAST_CHARGE("mob.ghast.charge", "entity.ghast.warn", SoundCategory.HOSTILE), MOB_GHAST_CHARGE("mob.ghast.charge", "entity.ghast.warn", SoundCategories1_8.HOSTILE),
CREEPER_PRIMED("creeper.primed", "entity.creeper.primed", SoundCategory.HOSTILE), CREEPER_PRIMED("creeper.primed", "entity.creeper.primed", SoundCategories1_8.HOSTILE),
DIG_SAND("dig.sand", "block.sand.break", SoundCategory.BLOCK), DIG_SAND("dig.sand", "block.sand.break", SoundCategories1_8.BLOCK),
MOB_CHICKEN_SAY("mob.chicken.say", "entity.chicken.ambient", SoundCategory.NEUTRAL), MOB_CHICKEN_SAY("mob.chicken.say", "entity.chicken.ambient", SoundCategories1_8.NEUTRAL),
RANDOM_DOOR_CLOSE("random.door_close", "block.wooden_door.close", SoundCategory.BLOCK), RANDOM_DOOR_CLOSE("random.door_close", "block.wooden_door.close", SoundCategories1_8.BLOCK),
MOB_GUARDIAN_ELDER_DEATH("mob.guardian.elder.death", "entity.elder_guardian.death", SoundCategory.HOSTILE), MOB_GUARDIAN_ELDER_DEATH("mob.guardian.elder.death", "entity.elder_guardian.death", SoundCategories1_8.HOSTILE),
FIREWORKS_TWINKLE("fireworks.twinkle", "entity.firework.twinkle", SoundCategory.AMBIENT), FIREWORKS_TWINKLE("fireworks.twinkle", "entity.firework.twinkle", SoundCategories1_8.AMBIENT),
MOB_HORSE_SKELETON_DEATH("mob.horse.skeleton.death", "entity.skeleton_horse.death", SoundCategory.NEUTRAL), MOB_HORSE_SKELETON_DEATH("mob.horse.skeleton.death", "entity.skeleton_horse.death", SoundCategories1_8.NEUTRAL),
AMBIENT_WEATHER_RAIN("ambient.weather.rain", "weather.rain.above", SoundCategory.WEATHER), AMBIENT_WEATHER_RAIN("ambient.weather.rain", "weather.rain.above", SoundCategories1_8.WEATHER),
PORTAL_TRIGGER("portal.trigger", "block.portal.trigger", SoundCategory.BLOCK), PORTAL_TRIGGER("portal.trigger", "block.portal.trigger", SoundCategories1_8.BLOCK),
RANDOM_CHESTOPEN("random.chestopen", "block.chest.open", SoundCategory.BLOCK), RANDOM_CHESTOPEN("random.chestopen", "block.chest.open", SoundCategories1_8.BLOCK),
MOB_HORSE_LAND("mob.horse.land", "entity.horse.land", SoundCategory.NEUTRAL), MOB_HORSE_LAND("mob.horse.land", "entity.horse.land", SoundCategories1_8.NEUTRAL),
MOB_SILVERFISH_STEP("mob.silverfish.step", "entity.silverfish.step", SoundCategory.HOSTILE), MOB_SILVERFISH_STEP("mob.silverfish.step", "entity.silverfish.step", SoundCategories1_8.HOSTILE),
MOB_BAT_TAKEOFF("mob.bat.takeoff", "entity.bat.takeoff", SoundCategory.NEUTRAL), MOB_BAT_TAKEOFF("mob.bat.takeoff", "entity.bat.takeoff", SoundCategories1_8.NEUTRAL),
MOB_VILLAGER_NO("mob.villager.no", "entity.villager.no", SoundCategory.NEUTRAL), MOB_VILLAGER_NO("mob.villager.no", "entity.villager.no", SoundCategories1_8.NEUTRAL),
GAME_HOSTILE_HURT_FALL_BIG("game.hostile.hurt.fall.big", "entity.hostile.big_fall", SoundCategory.HOSTILE), GAME_HOSTILE_HURT_FALL_BIG("game.hostile.hurt.fall.big", "entity.hostile.big_fall", SoundCategories1_8.HOSTILE),
MOB_IRONGOLEM_WALK("mob.irongolem.walk", "entity.irongolem.step", SoundCategory.NEUTRAL), MOB_IRONGOLEM_WALK("mob.irongolem.walk", "entity.irongolem.step", SoundCategories1_8.NEUTRAL),
NOTE_HAT("note.hat", "block.note.hat", SoundCategory.RECORD), NOTE_HAT("note.hat", "block.note.hat", SoundCategories1_8.RECORD),
MOB_ZOMBIE_METAL("mob.zombie.metal", "entity.zombie.attack_iron_door", SoundCategory.HOSTILE), MOB_ZOMBIE_METAL("mob.zombie.metal", "entity.zombie.attack_iron_door", SoundCategories1_8.HOSTILE),
MOB_VILLAGER_HAGGLE("mob.villager.haggle", "entity.villager.trading", SoundCategory.NEUTRAL), MOB_VILLAGER_HAGGLE("mob.villager.haggle", "entity.villager.trading", SoundCategories1_8.NEUTRAL),
MOB_GHAST_FIREBALL("mob.ghast.fireball", "entity.blaze.shoot", SoundCategory.HOSTILE), MOB_GHAST_FIREBALL("mob.ghast.fireball", "entity.blaze.shoot", SoundCategories1_8.HOSTILE),
MOB_IRONGOLEM_DEATH("mob.irongolem.death", "entity.irongolem.death", SoundCategory.NEUTRAL), MOB_IRONGOLEM_DEATH("mob.irongolem.death", "entity.irongolem.death", SoundCategories1_8.NEUTRAL),
RANDOM_BREAK("random.break", "item.shield.break", SoundCategory.PLAYER), RANDOM_BREAK("random.break", "item.shield.break", SoundCategories1_8.PLAYER),
MOB_ZOMBIE_REMEDY("mob.zombie.remedy", "entity.zombie_villager.cure", SoundCategory.HOSTILE), MOB_ZOMBIE_REMEDY("mob.zombie.remedy", "entity.zombie_villager.cure", SoundCategories1_8.HOSTILE),
RANDOM_BOW("random.bow", "entity.splash_potion.throw", SoundCategory.NEUTRAL), RANDOM_BOW("random.bow", "entity.splash_potion.throw", SoundCategories1_8.NEUTRAL),
MOB_VILLAGER_IDLE("mob.villager.idle", "entity.villager.ambient", SoundCategory.NEUTRAL), MOB_VILLAGER_IDLE("mob.villager.idle", "entity.villager.ambient", SoundCategories1_8.NEUTRAL),
STEP_CLOTH("step.cloth", "block.cloth.fall", SoundCategory.NEUTRAL), STEP_CLOTH("step.cloth", "block.cloth.fall", SoundCategories1_8.NEUTRAL),
MOB_SILVERFISH_HIT("mob.silverfish.hit", "entity.endermite.hurt", SoundCategory.HOSTILE), MOB_SILVERFISH_HIT("mob.silverfish.hit", "entity.endermite.hurt", SoundCategories1_8.HOSTILE),
LIQUID_LAVA("liquid.lava", "block.lava.ambient", SoundCategory.BLOCK), LIQUID_LAVA("liquid.lava", "block.lava.ambient", SoundCategories1_8.BLOCK),
GAME_NEUTRAL_HURT_FALL_BIG("game.neutral.hurt.fall.big", "entity.hostile.big_fall", SoundCategory.NEUTRAL), GAME_NEUTRAL_HURT_FALL_BIG("game.neutral.hurt.fall.big", "entity.hostile.big_fall", SoundCategories1_8.NEUTRAL),
FIRE_FIRE("fire.fire", "block.fire.ambient", SoundCategory.BLOCK), FIRE_FIRE("fire.fire", "block.fire.ambient", SoundCategories1_8.BLOCK),
MOB_ZOMBIE_WOOD("mob.zombie.wood", "entity.zombie.attack_door_wood", SoundCategory.HOSTILE), MOB_ZOMBIE_WOOD("mob.zombie.wood", "entity.zombie.attack_door_wood", SoundCategories1_8.HOSTILE),
MOB_CHICKEN_STEP("mob.chicken.step", "entity.chicken.step", SoundCategory.NEUTRAL), MOB_CHICKEN_STEP("mob.chicken.step", "entity.chicken.step", SoundCategories1_8.NEUTRAL),
MOB_GUARDIAN_LAND_HIT("mob.guardian.land.hit", "entity.guardian.hurt_land", SoundCategory.HOSTILE), MOB_GUARDIAN_LAND_HIT("mob.guardian.land.hit", "entity.guardian.hurt_land", SoundCategories1_8.HOSTILE),
MOB_CHICKEN_PLOP("mob.chicken.plop", "entity.donkey.chest", SoundCategory.NEUTRAL), MOB_CHICKEN_PLOP("mob.chicken.plop", "entity.donkey.chest", SoundCategories1_8.NEUTRAL),
MOB_ENDERDRAGON_WINGS("mob.enderdragon.wings", "entity.enderdragon.flap", SoundCategory.HOSTILE), MOB_ENDERDRAGON_WINGS("mob.enderdragon.wings", "entity.enderdragon.flap", SoundCategories1_8.HOSTILE),
STEP_GRASS("step.grass", "block.grass.hit", SoundCategory.NEUTRAL), STEP_GRASS("step.grass", "block.grass.hit", SoundCategories1_8.NEUTRAL),
MOB_HORSE_BREATHE("mob.horse.breathe", "entity.horse.breathe", SoundCategory.NEUTRAL), MOB_HORSE_BREATHE("mob.horse.breathe", "entity.horse.breathe", SoundCategories1_8.NEUTRAL),
GAME_PLAYER_HURT_FALL_BIG("game.player.hurt.fall.big", "entity.hostile.big_fall", SoundCategory.PLAYER), GAME_PLAYER_HURT_FALL_BIG("game.player.hurt.fall.big", "entity.hostile.big_fall", SoundCategories1_8.PLAYER),
MOB_HORSE_DONKEY_IDLE("mob.horse.donkey.idle", "entity.donkey.ambient", SoundCategory.NEUTRAL), MOB_HORSE_DONKEY_IDLE("mob.horse.donkey.idle", "entity.donkey.ambient", SoundCategories1_8.NEUTRAL),
MOB_SPIDER_STEP("mob.spider.step", "entity.spider.step", SoundCategory.HOSTILE), MOB_SPIDER_STEP("mob.spider.step", "entity.spider.step", SoundCategories1_8.HOSTILE),
GAME_NEUTRAL_HURT("game.neutral.hurt", "entity.player.death", SoundCategory.NEUTRAL), GAME_NEUTRAL_HURT("game.neutral.hurt", "entity.player.death", SoundCategories1_8.NEUTRAL),
MOB_COW_SAY("mob.cow.say", "entity.cow.ambient", SoundCategory.NEUTRAL), MOB_COW_SAY("mob.cow.say", "entity.cow.ambient", SoundCategories1_8.NEUTRAL),
MOB_HORSE_JUMP("mob.horse.jump", "entity.horse.jump", SoundCategory.NEUTRAL), MOB_HORSE_JUMP("mob.horse.jump", "entity.horse.jump", SoundCategories1_8.NEUTRAL),
MOB_HORSE_SOFT("mob.horse.soft", "entity.horse.step", SoundCategory.NEUTRAL), MOB_HORSE_SOFT("mob.horse.soft", "entity.horse.step", SoundCategories1_8.NEUTRAL),
GAME_NEUTRAL_SWIM_SPLASH("game.neutral.swim.splash", "entity.generic.splash", SoundCategory.NEUTRAL), GAME_NEUTRAL_SWIM_SPLASH("game.neutral.swim.splash", "entity.generic.splash", SoundCategories1_8.NEUTRAL),
MOB_GUARDIAN_HIT("mob.guardian.hit", "entity.guardian.hurt", SoundCategory.HOSTILE), MOB_GUARDIAN_HIT("mob.guardian.hit", "entity.guardian.hurt", SoundCategories1_8.HOSTILE),
MOB_ENDERDRAGON_END("mob.enderdragon.end", "entity.enderdragon.death", SoundCategory.HOSTILE), MOB_ENDERDRAGON_END("mob.enderdragon.end", "entity.enderdragon.death", SoundCategories1_8.HOSTILE),
MOB_ZOMBIE_STEP("mob.zombie.step", "entity.zombie.step", SoundCategory.HOSTILE), MOB_ZOMBIE_STEP("mob.zombie.step", "entity.zombie.step", SoundCategories1_8.HOSTILE),
MOB_ENDERDRAGON_GROWL("mob.enderdragon.growl", "entity.enderdragon.growl", SoundCategory.HOSTILE), MOB_ENDERDRAGON_GROWL("mob.enderdragon.growl", "entity.enderdragon.growl", SoundCategories1_8.HOSTILE),
MOB_WOLF_SHAKE("mob.wolf.shake", "entity.wolf.shake", SoundCategory.NEUTRAL), MOB_WOLF_SHAKE("mob.wolf.shake", "entity.wolf.shake", SoundCategories1_8.NEUTRAL),
MOB_ENDERMEN_DEATH("mob.endermen.death", "entity.endermen.death", SoundCategory.HOSTILE), MOB_ENDERMEN_DEATH("mob.endermen.death", "entity.endermen.death", SoundCategories1_8.HOSTILE),
RANDOM_ANVIL_LAND("random.anvil_land", "block.anvil.land", SoundCategory.BLOCK), RANDOM_ANVIL_LAND("random.anvil_land", "block.anvil.land", SoundCategories1_8.BLOCK),
GAME_HOSTILE_HURT("game.hostile.hurt", "entity.player.death", SoundCategory.HOSTILE), GAME_HOSTILE_HURT("game.hostile.hurt", "entity.player.death", SoundCategories1_8.HOSTILE),
MINECART_INSIDE("minecart.inside", "entity.minecart.inside", SoundCategory.PLAYER), MINECART_INSIDE("minecart.inside", "entity.minecart.inside", SoundCategories1_8.PLAYER),
MOB_SLIME_BIG("mob.slime.big", "entity.slime.death", SoundCategory.HOSTILE), MOB_SLIME_BIG("mob.slime.big", "entity.slime.death", SoundCategories1_8.HOSTILE),
LIQUID_WATER("liquid.water", "block.water.ambient", SoundCategory.BLOCK), LIQUID_WATER("liquid.water", "block.water.ambient", SoundCategories1_8.BLOCK),
MOB_PIG_SAY("mob.pig.say", "entity.pig.ambient", SoundCategory.NEUTRAL), MOB_PIG_SAY("mob.pig.say", "entity.pig.ambient", SoundCategories1_8.NEUTRAL),
MOB_WITHER_SHOOT("mob.wither.shoot", "entity.wither.shoot", SoundCategory.HOSTILE), MOB_WITHER_SHOOT("mob.wither.shoot", "entity.wither.shoot", SoundCategories1_8.HOSTILE),
ITEM_FIRECHARGE_USE("item.fireCharge.use", "entity.blaze.shoot", SoundCategory.BLOCK), ITEM_FIRECHARGE_USE("item.fireCharge.use", "entity.blaze.shoot", SoundCategories1_8.BLOCK),
STEP_SAND("step.sand", "block.sand.fall", SoundCategory.NEUTRAL), STEP_SAND("step.sand", "block.sand.fall", SoundCategories1_8.NEUTRAL),
MOB_IRONGOLEM_HIT("mob.irongolem.hit", "entity.irongolem.hurt", SoundCategory.NEUTRAL), MOB_IRONGOLEM_HIT("mob.irongolem.hit", "entity.irongolem.hurt", SoundCategories1_8.NEUTRAL),
MOB_HORSE_DEATH("mob.horse.death", "entity.horse.death", SoundCategory.NEUTRAL), MOB_HORSE_DEATH("mob.horse.death", "entity.horse.death", SoundCategories1_8.NEUTRAL),
MOB_BAT_HURT("mob.bat.hurt", "entity.bat.hurt", SoundCategory.NEUTRAL), MOB_BAT_HURT("mob.bat.hurt", "entity.bat.hurt", SoundCategories1_8.NEUTRAL),
MOB_GHAST_AFFECTIONATE_SCREAM("mob.ghast.affectionate_scream", "entity.ghast.scream", SoundCategory.HOSTILE), MOB_GHAST_AFFECTIONATE_SCREAM("mob.ghast.affectionate_scream", "entity.ghast.scream", SoundCategories1_8.HOSTILE),
MOB_GUARDIAN_ELDER_IDLE("mob.guardian.elder.idle", "entity.elder_guardian.ambient", SoundCategory.HOSTILE), MOB_GUARDIAN_ELDER_IDLE("mob.guardian.elder.idle", "entity.elder_guardian.ambient", SoundCategories1_8.HOSTILE),
MOB_ZOMBIEPIG_ZPIGDEATH("mob.zombiepig.zpigdeath", "entity.zombie_pig.death", SoundCategory.HOSTILE), MOB_ZOMBIEPIG_ZPIGDEATH("mob.zombiepig.zpigdeath", "entity.zombie_pig.death", SoundCategories1_8.HOSTILE),
AMBIENT_WEATHER_THUNDER("ambient.weather.thunder", "entity.lightning.thunder", SoundCategory.WEATHER), AMBIENT_WEATHER_THUNDER("ambient.weather.thunder", "entity.lightning.thunder", SoundCategories1_8.WEATHER),
MINECART_BASE("minecart.base", "entity.minecart.riding", SoundCategory.NEUTRAL), MINECART_BASE("minecart.base", "entity.minecart.riding", SoundCategories1_8.NEUTRAL),
STEP_LADDER("step.ladder", "block.ladder.hit", SoundCategory.NEUTRAL), STEP_LADDER("step.ladder", "block.ladder.hit", SoundCategories1_8.NEUTRAL),
MOB_HORSE_DONKEY_ANGRY("mob.horse.donkey.angry", "entity.donkey.angry", SoundCategory.NEUTRAL), MOB_HORSE_DONKEY_ANGRY("mob.horse.donkey.angry", "entity.donkey.angry", SoundCategories1_8.NEUTRAL),
AMBIENT_CAVE_CAVE("ambient.cave.cave", "ambient.cave", SoundCategory.AMBIENT), AMBIENT_CAVE_CAVE("ambient.cave.cave", "ambient.cave", SoundCategories1_8.AMBIENT),
FIREWORKS_BLAST_FAR("fireworks.blast_far", "entity.firework.blast_far", SoundCategory.AMBIENT), FIREWORKS_BLAST_FAR("fireworks.blast_far", "entity.firework.blast_far", SoundCategories1_8.AMBIENT),
GAME_NEUTRAL_HURT_FALL_SMALL("game.neutral.hurt.fall.small", "entity.generic.small_fall", SoundCategory.NEUTRAL), GAME_NEUTRAL_HURT_FALL_SMALL("game.neutral.hurt.fall.small", "entity.generic.small_fall", SoundCategories1_8.NEUTRAL),
GAME_HOSTILE_SWIM_SPLASH("game.hostile.swim.splash", "entity.generic.splash", SoundCategory.HOSTILE), GAME_HOSTILE_SWIM_SPLASH("game.hostile.swim.splash", "entity.generic.splash", SoundCategories1_8.HOSTILE),
RANDOM_DRINK("random.drink", "entity.generic.drink", SoundCategory.PLAYER), RANDOM_DRINK("random.drink", "entity.generic.drink", SoundCategories1_8.PLAYER),
GAME_HOSTILE_DIE("game.hostile.die", "entity.player.death", SoundCategory.HOSTILE), GAME_HOSTILE_DIE("game.hostile.die", "entity.player.death", SoundCategories1_8.HOSTILE),
MOB_CAT_HISS("mob.cat.hiss", "entity.cat.hiss", SoundCategory.NEUTRAL), MOB_CAT_HISS("mob.cat.hiss", "entity.cat.hiss", SoundCategories1_8.NEUTRAL),
NOTE_BD("note.bd", "block.note.basedrum", SoundCategory.RECORD), NOTE_BD("note.bd", "block.note.basedrum", SoundCategories1_8.RECORD),
MOB_SPIDER_SAY("mob.spider.say", "entity.spider.hurt", SoundCategory.HOSTILE), MOB_SPIDER_SAY("mob.spider.say", "entity.spider.hurt", SoundCategories1_8.HOSTILE),
STEP_STONE("step.stone", "block.anvil.hit", SoundCategory.NEUTRAL, true), //Is used for glass placement sound STEP_STONE("step.stone", "block.anvil.hit", SoundCategories1_8.NEUTRAL, true), //Is used for glass placement sound
RANDOM_LEVELUP("random.levelup", "entity.player.levelup", SoundCategory.PLAYER), RANDOM_LEVELUP("random.levelup", "entity.player.levelup", SoundCategories1_8.PLAYER),
LIQUID_LAVAPOP("liquid.lavapop", "block.lava.pop", SoundCategory.BLOCK), LIQUID_LAVAPOP("liquid.lavapop", "block.lava.pop", SoundCategories1_8.BLOCK),
MOB_SHEEP_SAY("mob.sheep.say", "entity.sheep.ambient", SoundCategory.NEUTRAL), MOB_SHEEP_SAY("mob.sheep.say", "entity.sheep.ambient", SoundCategories1_8.NEUTRAL),
MOB_SKELETON_SAY("mob.skeleton.say", "entity.skeleton.ambient", SoundCategory.HOSTILE), MOB_SKELETON_SAY("mob.skeleton.say", "entity.skeleton.ambient", SoundCategories1_8.HOSTILE),
MOB_BLAZE_BREATHE("mob.blaze.breathe", "entity.blaze.ambient", SoundCategory.HOSTILE), MOB_BLAZE_BREATHE("mob.blaze.breathe", "entity.blaze.ambient", SoundCategories1_8.HOSTILE),
MOB_BAT_IDLE("mob.bat.idle", "entity.bat.ambient", SoundCategory.NEUTRAL), MOB_BAT_IDLE("mob.bat.idle", "entity.bat.ambient", SoundCategories1_8.NEUTRAL),
MOB_MAGMACUBE_BIG("mob.magmacube.big", "entity.magmacube.squish", SoundCategory.HOSTILE), MOB_MAGMACUBE_BIG("mob.magmacube.big", "entity.magmacube.squish", SoundCategories1_8.HOSTILE),
MOB_HORSE_IDLE("mob.horse.idle", "entity.horse.ambient", SoundCategory.NEUTRAL), MOB_HORSE_IDLE("mob.horse.idle", "entity.horse.ambient", SoundCategories1_8.NEUTRAL),
GAME_HOSTILE_HURT_FALL_SMALL("game.hostile.hurt.fall.small", "entity.generic.small_fall", SoundCategory.HOSTILE), GAME_HOSTILE_HURT_FALL_SMALL("game.hostile.hurt.fall.small", "entity.generic.small_fall", SoundCategories1_8.HOSTILE),
MOB_HORSE_ZOMBIE_HIT("mob.horse.zombie.hit", "entity.zombie_horse.hurt", SoundCategory.NEUTRAL), MOB_HORSE_ZOMBIE_HIT("mob.horse.zombie.hit", "entity.zombie_horse.hurt", SoundCategories1_8.NEUTRAL),
MOB_IRONGOLEM_THROW("mob.irongolem.throw", "entity.irongolem.attack", SoundCategory.NEUTRAL), MOB_IRONGOLEM_THROW("mob.irongolem.throw", "entity.irongolem.attack", SoundCategories1_8.NEUTRAL),
DIG_CLOTH("dig.cloth", "block.cloth.place", SoundCategory.BLOCK), DIG_CLOTH("dig.cloth", "block.cloth.place", SoundCategories1_8.BLOCK),
STEP_GRAVEL("step.gravel", "block.gravel.hit", SoundCategory.NEUTRAL), STEP_GRAVEL("step.gravel", "block.gravel.hit", SoundCategories1_8.NEUTRAL),
MOB_SILVERFISH_SAY("mob.silverfish.say", "entity.silverfish.ambient", SoundCategory.HOSTILE), MOB_SILVERFISH_SAY("mob.silverfish.say", "entity.silverfish.ambient", SoundCategories1_8.HOSTILE),
MOB_CAT_PURR("mob.cat.purr", "entity.cat.purr", SoundCategory.NEUTRAL), MOB_CAT_PURR("mob.cat.purr", "entity.cat.purr", SoundCategories1_8.NEUTRAL),
MOB_ZOMBIE_INFECT("mob.zombie.infect", "entity.zombie.infect", SoundCategory.HOSTILE), MOB_ZOMBIE_INFECT("mob.zombie.infect", "entity.zombie.infect", SoundCategories1_8.HOSTILE),
RANDOM_EAT("random.eat", "entity.generic.eat", SoundCategory.PLAYER), RANDOM_EAT("random.eat", "entity.generic.eat", SoundCategories1_8.PLAYER),
MOB_WOLF_BARK("mob.wolf.bark", "entity.wolf.ambient", SoundCategory.NEUTRAL), MOB_WOLF_BARK("mob.wolf.bark", "entity.wolf.ambient", SoundCategories1_8.NEUTRAL),
GAME_TNT_PRIMED("game.tnt.primed", "entity.creeper.primed", SoundCategory.BLOCK), GAME_TNT_PRIMED("game.tnt.primed", "entity.creeper.primed", SoundCategories1_8.BLOCK),
MOB_SHEEP_STEP("mob.sheep.step", "entity.sheep.step", SoundCategory.NEUTRAL), MOB_SHEEP_STEP("mob.sheep.step", "entity.sheep.step", SoundCategories1_8.NEUTRAL),
MOB_ZOMBIE_DEATH("mob.zombie.death", "entity.zombie.death", SoundCategory.HOSTILE), MOB_ZOMBIE_DEATH("mob.zombie.death", "entity.zombie.death", SoundCategories1_8.HOSTILE),
RANDOM_DOOR_OPEN("random.door_open", "block.wooden_door.open", SoundCategory.BLOCK), RANDOM_DOOR_OPEN("random.door_open", "block.wooden_door.open", SoundCategories1_8.BLOCK),
MOB_ENDERMEN_PORTAL("mob.endermen.portal", "entity.endermen.teleport", SoundCategory.HOSTILE), MOB_ENDERMEN_PORTAL("mob.endermen.portal", "entity.endermen.teleport", SoundCategories1_8.HOSTILE),
MOB_HORSE_ANGRY("mob.horse.angry", "entity.horse.angry", SoundCategory.NEUTRAL), MOB_HORSE_ANGRY("mob.horse.angry", "entity.horse.angry", SoundCategories1_8.NEUTRAL),
MOB_WOLF_GROWL("mob.wolf.growl", "entity.wolf.growl", SoundCategory.NEUTRAL), MOB_WOLF_GROWL("mob.wolf.growl", "entity.wolf.growl", SoundCategories1_8.NEUTRAL),
DIG_SNOW("dig.snow", "block.snow.place", SoundCategory.BLOCK), DIG_SNOW("dig.snow", "block.snow.place", SoundCategories1_8.BLOCK),
TILE_PISTON_OUT("tile.piston.out", "block.piston.extend", SoundCategory.BLOCK), TILE_PISTON_OUT("tile.piston.out", "block.piston.extend", SoundCategories1_8.BLOCK),
RANDOM_BURP("random.burp", "entity.player.burp", SoundCategory.PLAYER), RANDOM_BURP("random.burp", "entity.player.burp", SoundCategories1_8.PLAYER),
MOB_COW_STEP("mob.cow.step", "entity.cow.step", SoundCategory.NEUTRAL), MOB_COW_STEP("mob.cow.step", "entity.cow.step", SoundCategories1_8.NEUTRAL),
MOB_WITHER_HURT("mob.wither.hurt", "entity.wither.hurt", SoundCategory.HOSTILE), MOB_WITHER_HURT("mob.wither.hurt", "entity.wither.hurt", SoundCategories1_8.HOSTILE),
MOB_GUARDIAN_LAND_DEATH("mob.guardian.land.death", "entity.elder_guardian.death_land", SoundCategory.HOSTILE), MOB_GUARDIAN_LAND_DEATH("mob.guardian.land.death", "entity.elder_guardian.death_land", SoundCategories1_8.HOSTILE),
MOB_CHICKEN_HURT("mob.chicken.hurt", "entity.chicken.death", SoundCategory.NEUTRAL), MOB_CHICKEN_HURT("mob.chicken.hurt", "entity.chicken.death", SoundCategories1_8.NEUTRAL),
MOB_WOLF_STEP("mob.wolf.step", "entity.wolf.step", SoundCategory.NEUTRAL), MOB_WOLF_STEP("mob.wolf.step", "entity.wolf.step", SoundCategories1_8.NEUTRAL),
MOB_WOLF_DEATH("mob.wolf.death", "entity.wolf.death", SoundCategory.NEUTRAL), MOB_WOLF_DEATH("mob.wolf.death", "entity.wolf.death", SoundCategories1_8.NEUTRAL),
MOB_WOLF_WHINE("mob.wolf.whine", "entity.wolf.whine", SoundCategory.NEUTRAL), MOB_WOLF_WHINE("mob.wolf.whine", "entity.wolf.whine", SoundCategories1_8.NEUTRAL),
NOTE_PLING("note.pling", "block.note.pling", SoundCategory.RECORD), NOTE_PLING("note.pling", "block.note.pling", SoundCategories1_8.RECORD),
GAME_PLAYER_HURT_FALL_SMALL("game.player.hurt.fall.small", "entity.generic.small_fall", SoundCategory.PLAYER), GAME_PLAYER_HURT_FALL_SMALL("game.player.hurt.fall.small", "entity.generic.small_fall", SoundCategories1_8.PLAYER),
MOB_CAT_PURREOW("mob.cat.purreow", "entity.cat.purreow", SoundCategory.NEUTRAL), MOB_CAT_PURREOW("mob.cat.purreow", "entity.cat.purreow", SoundCategories1_8.NEUTRAL),
FIREWORKS_LARGEBLAST_FAR("fireworks.largeBlast_far", "entity.firework.large_blast_far", SoundCategory.AMBIENT), FIREWORKS_LARGEBLAST_FAR("fireworks.largeBlast_far", "entity.firework.large_blast_far", SoundCategories1_8.AMBIENT),
MOB_SKELETON_HURT("mob.skeleton.hurt", "entity.skeleton.hurt", SoundCategory.HOSTILE), MOB_SKELETON_HURT("mob.skeleton.hurt", "entity.skeleton.hurt", SoundCategories1_8.HOSTILE),
MOB_SPIDER_DEATH("mob.spider.death", "entity.spider.death", SoundCategory.HOSTILE), MOB_SPIDER_DEATH("mob.spider.death", "entity.spider.death", SoundCategories1_8.HOSTILE),
RANDOM_ANVIL_BREAK("random.anvil_break", "block.anvil.destroy", SoundCategory.BLOCK), RANDOM_ANVIL_BREAK("random.anvil_break", "block.anvil.destroy", SoundCategories1_8.BLOCK),
MOB_WITHER_IDLE("mob.wither.idle", "entity.wither.ambient", SoundCategory.HOSTILE), MOB_WITHER_IDLE("mob.wither.idle", "entity.wither.ambient", SoundCategories1_8.HOSTILE),
MOB_GUARDIAN_ELDER_HIT("mob.guardian.elder.hit", "entity.elder_guardian.hurt", SoundCategory.HOSTILE), MOB_GUARDIAN_ELDER_HIT("mob.guardian.elder.hit", "entity.elder_guardian.hurt", SoundCategories1_8.HOSTILE),
MOB_ENDERMEN_SCREAM("mob.endermen.scream", "entity.endermen.scream", SoundCategory.HOSTILE), MOB_ENDERMEN_SCREAM("mob.endermen.scream", "entity.endermen.scream", SoundCategories1_8.HOSTILE),
MOB_CAT_HITT("mob.cat.hitt", "entity.cat.hurt", SoundCategory.NEUTRAL), MOB_CAT_HITT("mob.cat.hitt", "entity.cat.hurt", SoundCategories1_8.NEUTRAL),
MOB_MAGMACUBE_SMALL("mob.magmacube.small", "entity.small_magmacube.squish", SoundCategory.HOSTILE), MOB_MAGMACUBE_SMALL("mob.magmacube.small", "entity.small_magmacube.squish", SoundCategories1_8.HOSTILE),
FIRE_IGNITE("fire.ignite", "item.flintandsteel.use", SoundCategory.BLOCK, true), FIRE_IGNITE("fire.ignite", "item.flintandsteel.use", SoundCategories1_8.BLOCK, true),
MOB_ENDERDRAGON_HIT("mob.enderdragon.hit", "entity.enderdragon.hurt", SoundCategory.HOSTILE), MOB_ENDERDRAGON_HIT("mob.enderdragon.hit", "entity.enderdragon.hurt", SoundCategories1_8.HOSTILE),
MOB_ZOMBIE_HURT("mob.zombie.hurt", "entity.zombie.hurt", SoundCategory.HOSTILE), MOB_ZOMBIE_HURT("mob.zombie.hurt", "entity.zombie.hurt", SoundCategories1_8.HOSTILE),
RANDOM_EXPLODE("random.explode", "block.end_gateway.spawn", SoundCategory.BLOCK), RANDOM_EXPLODE("random.explode", "block.end_gateway.spawn", SoundCategories1_8.BLOCK),
MOB_SLIME_ATTACK("mob.slime.attack", "entity.slime.attack", SoundCategory.HOSTILE), MOB_SLIME_ATTACK("mob.slime.attack", "entity.slime.attack", SoundCategories1_8.HOSTILE),
MOB_MAGMACUBE_JUMP("mob.magmacube.jump", "entity.magmacube.jump", SoundCategory.HOSTILE), MOB_MAGMACUBE_JUMP("mob.magmacube.jump", "entity.magmacube.jump", SoundCategories1_8.HOSTILE),
RANDOM_SPLASH("random.splash", "entity.bobber.splash", SoundCategory.PLAYER), RANDOM_SPLASH("random.splash", "entity.bobber.splash", SoundCategories1_8.PLAYER),
MOB_HORSE_SKELETON_HIT("mob.horse.skeleton.hit", "entity.skeleton_horse.hurt", SoundCategory.NEUTRAL), MOB_HORSE_SKELETON_HIT("mob.horse.skeleton.hit", "entity.skeleton_horse.hurt", SoundCategories1_8.NEUTRAL),
MOB_GHAST_MOAN("mob.ghast.moan", "entity.ghast.ambient", SoundCategory.HOSTILE), MOB_GHAST_MOAN("mob.ghast.moan", "entity.ghast.ambient", SoundCategories1_8.HOSTILE),
MOB_GUARDIAN_CURSE("mob.guardian.curse", "entity.elder_guardian.curse", SoundCategory.HOSTILE), MOB_GUARDIAN_CURSE("mob.guardian.curse", "entity.elder_guardian.curse", SoundCategories1_8.HOSTILE),
GAME_POTION_SMASH("game.potion.smash", "block.glass.break", SoundCategory.NEUTRAL), GAME_POTION_SMASH("game.potion.smash", "block.glass.break", SoundCategories1_8.NEUTRAL),
NOTE_BASSATTACK("note.bassattack", "block.note.bass", SoundCategory.RECORD), NOTE_BASSATTACK("note.bassattack", "block.note.bass", SoundCategories1_8.RECORD),
GUI_BUTTON_PRESS("gui.button.press", "block.wood_pressureplate.click_on", SoundCategory.MASTER), GUI_BUTTON_PRESS("gui.button.press", "block.wood_pressureplate.click_on", SoundCategories1_8.MASTER),
RANDOM_ORB("random.orb", "entity.experience_orb.pickup", SoundCategory.PLAYER), RANDOM_ORB("random.orb", "entity.experience_orb.pickup", SoundCategories1_8.PLAYER),
MOB_ZOMBIE_WOODBREAK("mob.zombie.woodbreak", "entity.zombie.break_door_wood", SoundCategory.HOSTILE), MOB_ZOMBIE_WOODBREAK("mob.zombie.woodbreak", "entity.zombie.break_door_wood", SoundCategories1_8.HOSTILE),
MOB_HORSE_ARMOR("mob.horse.armor", "entity.horse.armor", SoundCategory.NEUTRAL), MOB_HORSE_ARMOR("mob.horse.armor", "entity.horse.armor", SoundCategories1_8.NEUTRAL),
TILE_PISTON_IN("tile.piston.in", "block.piston.contract", SoundCategory.BLOCK), TILE_PISTON_IN("tile.piston.in", "block.piston.contract", SoundCategories1_8.BLOCK),
MOB_CAT_MEOW("mob.cat.meow", "entity.cat.ambient", SoundCategory.NEUTRAL), MOB_CAT_MEOW("mob.cat.meow", "entity.cat.ambient", SoundCategories1_8.NEUTRAL),
MOB_PIG_STEP("mob.pig.step", "entity.pig.step", SoundCategory.NEUTRAL), MOB_PIG_STEP("mob.pig.step", "entity.pig.step", SoundCategories1_8.NEUTRAL),
STEP_WOOD("step.wood", "block.wood.step", SoundCategory.NEUTRAL), STEP_WOOD("step.wood", "block.wood.step", SoundCategories1_8.NEUTRAL),
PORTAL_TRAVEL("portal.travel", "block.portal.travel", SoundCategory.PLAYER), PORTAL_TRAVEL("portal.travel", "block.portal.travel", SoundCategories1_8.PLAYER),
MOB_GUARDIAN_DEATH("mob.guardian.death", "entity.guardian.death", SoundCategory.HOSTILE), MOB_GUARDIAN_DEATH("mob.guardian.death", "entity.guardian.death", SoundCategories1_8.HOSTILE),
MOB_SKELETON_DEATH("mob.skeleton.death", "entity.skeleton.death", SoundCategory.HOSTILE), MOB_SKELETON_DEATH("mob.skeleton.death", "entity.skeleton.death", SoundCategories1_8.HOSTILE),
MOB_HORSE_HIT("mob.horse.hit", "entity.horse.hurt", SoundCategory.NEUTRAL), MOB_HORSE_HIT("mob.horse.hit", "entity.horse.hurt", SoundCategories1_8.NEUTRAL),
MOB_VILLAGER_HIT("mob.villager.hit", "entity.villager.hurt", SoundCategory.NEUTRAL), MOB_VILLAGER_HIT("mob.villager.hit", "entity.villager.hurt", SoundCategories1_8.NEUTRAL),
MOB_HORSE_SKELETON_IDLE("mob.horse.skeleton.idle", "entity.skeleton_horse.ambient", SoundCategory.NEUTRAL), MOB_HORSE_SKELETON_IDLE("mob.horse.skeleton.idle", "entity.skeleton_horse.ambient", SoundCategories1_8.NEUTRAL),
RECORDS_CHIRP("records.chirp", "record.chirp", SoundCategory.RECORD), RECORDS_CHIRP("records.chirp", "record.chirp", SoundCategories1_8.RECORD),
MOB_RABBIT_HURT("mob.rabbit.hurt", "entity.rabbit.hurt", SoundCategory.NEUTRAL), MOB_RABBIT_HURT("mob.rabbit.hurt", "entity.rabbit.hurt", SoundCategories1_8.NEUTRAL),
RECORDS_STAL("records.stal", "record.stal", SoundCategory.RECORD), RECORDS_STAL("records.stal", "record.stal", SoundCategories1_8.RECORD),
MUSIC_GAME_NETHER("music.game.nether", "music.nether", SoundCategory.MUSIC), MUSIC_GAME_NETHER("music.game.nether", "music.nether", SoundCategories1_8.MUSIC),
MUSIC_MENU("music.menu", "music.menu", SoundCategory.MUSIC), MUSIC_MENU("music.menu", "music.menu", SoundCategories1_8.MUSIC),
RECORDS_MELLOHI("records.mellohi", "record.mellohi", SoundCategory.RECORD), RECORDS_MELLOHI("records.mellohi", "record.mellohi", SoundCategories1_8.RECORD),
RECORDS_CAT("records.cat", "record.cat", SoundCategory.RECORD), RECORDS_CAT("records.cat", "record.cat", SoundCategories1_8.RECORD),
RECORDS_FAR("records.far", "record.far", SoundCategory.RECORD), RECORDS_FAR("records.far", "record.far", SoundCategories1_8.RECORD),
MUSIC_GAME_END_DRAGON("music.game.end.dragon", "music.dragon", SoundCategory.MUSIC), MUSIC_GAME_END_DRAGON("music.game.end.dragon", "music.dragon", SoundCategories1_8.MUSIC),
MOB_RABBIT_DEATH("mob.rabbit.death", "entity.rabbit.death", SoundCategory.NEUTRAL), MOB_RABBIT_DEATH("mob.rabbit.death", "entity.rabbit.death", SoundCategories1_8.NEUTRAL),
MOB_RABBIT_IDLE("mob.rabbit.idle", "entity.rabbit.ambient", SoundCategory.NEUTRAL), MOB_RABBIT_IDLE("mob.rabbit.idle", "entity.rabbit.ambient", SoundCategories1_8.NEUTRAL),
MUSIC_GAME_END("music.game.end", "music.end", SoundCategory.MUSIC), MUSIC_GAME_END("music.game.end", "music.end", SoundCategories1_8.MUSIC),
MUSIC_GAME("music.game", "music.game", SoundCategory.MUSIC), MUSIC_GAME("music.game", "music.game", SoundCategories1_8.MUSIC),
MOB_GUARDIAN_IDLE("mob.guardian.idle", "entity.elder_guardian.ambient", SoundCategory.HOSTILE), MOB_GUARDIAN_IDLE("mob.guardian.idle", "entity.elder_guardian.ambient", SoundCategories1_8.HOSTILE),
RECORDS_WARD("records.ward", "record.ward", SoundCategory.RECORD), RECORDS_WARD("records.ward", "record.ward", SoundCategories1_8.RECORD),
RECORDS_13("records.13", "record.13", SoundCategory.RECORD), RECORDS_13("records.13", "record.13", SoundCategories1_8.RECORD),
MOB_RABBIT_HOP("mob.rabbit.hop", "entity.rabbit.jump", SoundCategory.NEUTRAL), MOB_RABBIT_HOP("mob.rabbit.hop", "entity.rabbit.jump", SoundCategories1_8.NEUTRAL),
RECORDS_STRAD("records.strad", "record.strad", SoundCategory.RECORD), RECORDS_STRAD("records.strad", "record.strad", SoundCategories1_8.RECORD),
RECORDS_11("records.11", "record.11", SoundCategory.RECORD), RECORDS_11("records.11", "record.11", SoundCategories1_8.RECORD),
RECORDS_MALL("records.mall", "record.mall", SoundCategory.RECORD), RECORDS_MALL("records.mall", "record.mall", SoundCategories1_8.RECORD),
RECORDS_BLOCKS("records.blocks", "record.blocks", SoundCategory.RECORD), RECORDS_BLOCKS("records.blocks", "record.blocks", SoundCategories1_8.RECORD),
RECORDS_WAIT("records.wait", "record.wait", SoundCategory.RECORD), RECORDS_WAIT("records.wait", "record.wait", SoundCategories1_8.RECORD),
MUSIC_GAME_END_CREDITS("music.game.end.credits", "music.credits", SoundCategory.MUSIC), MUSIC_GAME_END_CREDITS("music.game.end.credits", "music.credits", SoundCategories1_8.MUSIC),
MUSIC_GAME_CREATIVE("music.game.creative", "music.creative", SoundCategory.MUSIC); MUSIC_GAME_CREATIVE("music.game.creative", "music.creative", SoundCategories1_8.MUSIC);
private final String name; private final String name;
private final String newName; private final String newName;
private final SoundCategory category; private final SoundCategories1_8 category;
private final boolean breakSound; private final boolean breakSound;
private static final Map<String, SoundEffect> effects; private static final Map<String, SoundEffects1_8> effects;
static { static {
effects = new HashMap<>(); effects = new HashMap<>();
for (SoundEffect e : SoundEffect.values()) { for (SoundEffects1_8 e : SoundEffects1_8.values()) {
effects.put(e.getName(), e); effects.put(e.getName(), e);
} }
} }
SoundEffect(String name, String newName, SoundCategory category) { SoundEffects1_8(String name, String newName, SoundCategories1_8 category) {
this.category = category; this.category = category;
this.newName = newName; this.newName = newName;
this.name = name; this.name = name;
this.breakSound = name.startsWith("dig."); this.breakSound = name.startsWith("dig.");
} }
SoundEffect(String name, String newName, SoundCategory category, boolean shouldIgnore) { SoundEffects1_8(String name, String newName, SoundCategories1_8 category, boolean shouldIgnore) {
this.category = category; this.category = category;
this.newName = newName; this.newName = newName;
this.name = name; this.name = name;
this.breakSound = name.startsWith("dig.") || shouldIgnore; this.breakSound = name.startsWith("dig.") || shouldIgnore;
} }
public static SoundEffect getByName(String name) { public static SoundEffects1_8 getByName(String name) {
return effects.get(name); return effects.get(name);
} }
@ -309,7 +309,7 @@ public enum SoundEffect {
return newName; return newName;
} }
public SoundCategory getCategory() { public SoundCategories1_8 getCategory() {
return category; return category;
} }

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8.packet; package com.viaversion.viaversion.protocols.v1_8to1_9.packet;
import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8.packet; package com.viaversion.viaversion.protocols.v1_8to1_9.packet;
import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType; import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.platform.providers.Provider; import com.viaversion.viaversion.api.platform.providers.Provider;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.nbt.tag.CompoundTag; import com.viaversion.nbt.tag.CompoundTag;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.platform.providers.Provider; import com.viaversion.viaversion.api.platform.providers.Provider;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.item.DataItem; import com.viaversion.viaversion.api.minecraft.item.DataItem;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.platform.providers.Provider; import com.viaversion.viaversion.api.platform.providers.Provider;

Datei anzeigen

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package com.viaversion.viaversion.protocols.v1_8to1_9.providers; package com.viaversion.viaversion.protocols.v1_8to1_9.provider;
import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
@ -23,7 +23,7 @@ import com.viaversion.viaversion.api.platform.providers.Provider;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.packet.State; import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_8.packet.ServerboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker;
import java.util.logging.Level; import java.util.logging.Level;

Datei anzeigen

@ -33,7 +33,7 @@ import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.api.type.types.version.Types1_8; import com.viaversion.viaversion.api.type.types.version.Types1_8;
import com.viaversion.viaversion.api.type.types.version.Types1_9; import com.viaversion.viaversion.api.type.types.version.Types1_9;
import com.viaversion.viaversion.protocols.v1_8.packet.ClientboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.MetaIndex1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.data.MetaIndex1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
@ -105,9 +105,9 @@ public class EntityPacketRewriter1_9 extends EntityRewriter<ClientboundPackets1_
@Override @Override
public void register() { public void register() {
map(Types.VAR_INT); // 0 - Entity ID map(Types.VAR_INT); // 0 - Entity ID
map(Types.INT, SpawnPackets1_9.toNewDouble); // 1 - X - Needs to be divided by 32 map(Types.INT, SpawnPacketRewriter1_9.toNewDouble); // 1 - X - Needs to be divided by 32
map(Types.INT, SpawnPackets1_9.toNewDouble); // 2 - Y - Needs to be divided by 32 map(Types.INT, SpawnPacketRewriter1_9.toNewDouble); // 2 - Y - Needs to be divided by 32
map(Types.INT, SpawnPackets1_9.toNewDouble); // 3 - Z - Needs to be divided by 32 map(Types.INT, SpawnPacketRewriter1_9.toNewDouble); // 3 - Z - Needs to be divided by 32
map(Types.BYTE); // 4 - Pitch map(Types.BYTE); // 4 - Pitch
map(Types.BYTE); // 5 - Yaw map(Types.BYTE); // 5 - Yaw
@ -393,7 +393,7 @@ public class EntityPacketRewriter1_9 extends EntityRewriter<ClientboundPackets1_
private void handleMetadata(MetaHandlerEvent event, Metadata metadata) { private void handleMetadata(MetaHandlerEvent event, Metadata metadata) {
EntityType type = event.entityType(); EntityType type = event.entityType();
MetaIndex metaIndex = MetaIndex.searchIndex(type, metadata.id()); MetaIndex1_8 metaIndex = MetaIndex1_8.searchIndex(type, metadata.id());
if (metaIndex == null) { if (metaIndex == null) {
// Almost certainly bad data, remove it // Almost certainly bad data, remove it
event.cancel(); event.cancel();
@ -419,13 +419,13 @@ public class EntityPacketRewriter1_9 extends EntityRewriter<ClientboundPackets1_
metadata.setValue(((Integer) value).byteValue()); metadata.setValue(((Integer) value).byteValue());
} }
// After writing the last one // After writing the last one
if (metaIndex == MetaIndex.ENTITY_STATUS && type == EntityTypes1_10.EntityType.PLAYER) { if (metaIndex == MetaIndex1_8.ENTITY_STATUS && type == EntityTypes1_10.EntityType.PLAYER) {
byte val = 0; byte val = 0;
if ((((Byte) value) & 0x10) == 0x10) { // Player eating/aiming/drinking if ((((Byte) value) & 0x10) == 0x10) { // Player eating/aiming/drinking
val = 1; val = 1;
} }
int newIndex = MetaIndex.PLAYER_HAND.getNewIndex(); int newIndex = MetaIndex1_8.PLAYER_HAND.getNewIndex();
MetaType metaType = MetaIndex.PLAYER_HAND.getNewType(); MetaType metaType = MetaIndex1_8.PLAYER_HAND.getNewType();
event.createExtraMeta(new Metadata(newIndex, metaType, val)); event.createExtraMeta(new Metadata(newIndex, metaType, val));
} }
break; break;

Datei anzeigen

@ -24,12 +24,11 @@ import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_8.packet.ClientboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.EntityIds; import com.viaversion.viaversion.protocols.v1_8to1_9.data.EntityIds1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.PotionIds; import com.viaversion.viaversion.protocols.v1_8to1_9.data.PotionIds1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
@ -388,7 +387,7 @@ public class ItemPacketRewriter1_9 extends ItemRewriter<ClientboundPackets1_8, S
tag = new CompoundTag(); tag = new CompoundTag();
} }
CompoundTag entityTag = new CompoundTag(); CompoundTag entityTag = new CompoundTag();
String entityName = EntityIds.ENTITY_ID_TO_NAME.get((int) item.data()); String entityName = EntityIds1_8.ENTITY_ID_TO_NAME.get((int) item.data());
if (entityName != null) { if (entityName != null) {
StringTag id = new StringTag(entityName); StringTag id = new StringTag(entityName);
entityTag.put("id", id); entityTag.put("id", id);
@ -406,7 +405,7 @@ public class ItemPacketRewriter1_9 extends ItemRewriter<ClientboundPackets1_8, S
item.setIdentifier(438); // splash id item.setIdentifier(438); // splash id
item.setData((short) (item.data() - 8192)); item.setData((short) (item.data() - 8192));
} }
String name = PotionIds.potionNameFromDamage(item.data()); String name = PotionIds1_8.potionNameFromDamage(item.data());
StringTag potion = new StringTag(Key.namespaced(name)); StringTag potion = new StringTag(Key.namespaced(name));
tag.put("Potion", potion); tag.put("Potion", potion);
item.setTag(tag); item.setTag(tag);
@ -443,8 +442,8 @@ public class ItemPacketRewriter1_9 extends ItemRewriter<ClientboundPackets1_8, S
CompoundTag entityTag = tag.getCompoundTag("EntityTag"); CompoundTag entityTag = tag.getCompoundTag("EntityTag");
StringTag id = entityTag.getStringTag("id"); StringTag id = entityTag.getStringTag("id");
if (id != null) { if (id != null) {
if (EntityIds.ENTITY_NAME_TO_ID.containsKey(id.getValue())) { if (EntityIds1_8.ENTITY_NAME_TO_ID.containsKey(id.getValue())) {
data = EntityIds.ENTITY_NAME_TO_ID.get(id.getValue()); data = EntityIds1_8.ENTITY_NAME_TO_ID.get(id.getValue());
} }
} }
tag.remove("EntityTag"); tag.remove("EntityTag");
@ -458,8 +457,8 @@ public class ItemPacketRewriter1_9 extends ItemRewriter<ClientboundPackets1_8, S
if (tag != null && tag.getStringTag("Potion") != null) { if (tag != null && tag.getStringTag("Potion") != null) {
StringTag potion = tag.getStringTag("Potion"); StringTag potion = tag.getStringTag("Potion");
String potionName = Key.stripMinecraftNamespace(potion.getValue()); String potionName = Key.stripMinecraftNamespace(potion.getValue());
if (PotionIds.POTION_NAME_TO_ID.containsKey(potionName)) { if (PotionIds1_8.POTION_NAME_TO_ID.containsKey(potionName)) {
data = PotionIds.POTION_NAME_TO_ID.get(potionName); data = PotionIds1_8.POTION_NAME_TO_ID.get(potionName);
} }
tag.remove("Potion"); tag.remove("Potion");
} }
@ -474,8 +473,8 @@ public class ItemPacketRewriter1_9 extends ItemRewriter<ClientboundPackets1_8, S
if (tag != null && tag.getStringTag("Potion") != null) { if (tag != null && tag.getStringTag("Potion") != null) {
StringTag potion = tag.getStringTag("Potion"); StringTag potion = tag.getStringTag("Potion");
String potionName = Key.stripMinecraftNamespace(potion.getValue()); String potionName = Key.stripMinecraftNamespace(potion.getValue());
if (PotionIds.POTION_NAME_TO_ID.containsKey(potionName)) { if (PotionIds1_8.POTION_NAME_TO_ID.containsKey(potionName)) {
data = PotionIds.POTION_NAME_TO_ID.get(potionName) + 8192; data = PotionIds1_8.POTION_NAME_TO_ID.get(potionName) + 8192;
} }
tag.remove("Potion"); tag.remove("Potion");
} }

Datei anzeigen

@ -28,23 +28,21 @@ import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_10;
import com.viaversion.viaversion.api.minecraft.item.Item; import com.viaversion.viaversion.api.minecraft.item.Item;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandler; import com.viaversion.viaversion.api.protocol.remapper.PacketHandler;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.v1_8.packet.ClientboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.GameMode; import com.viaversion.viaversion.protocols.v1_8to1_9.data.GameMode;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.PotionIds;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.CommandBlockProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.CommandBlockProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.CompressionProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.CompressionProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MainHandProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MainHandProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.ClientChunks; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.ClientChunks;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker;
import com.viaversion.viaversion.util.ComponentUtil; import com.viaversion.viaversion.util.ComponentUtil;
import com.viaversion.viaversion.util.SerializerVersion; import com.viaversion.viaversion.util.SerializerVersion;
public class PlayerPackets1_9 { public class PlayerPacketRewriter1_9 {
public static void register(Protocol1_8To1_9 protocol) { public static void register(Protocol1_8To1_9 protocol) {
protocol.registerClientbound(ClientboundPackets1_8.CHAT, new PacketHandlers() { protocol.registerClientbound(ClientboundPackets1_8.CHAT, new PacketHandlers() {
@Override @Override

Datei anzeigen

@ -27,19 +27,17 @@ import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_9;
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers; import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer; import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types; import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.api.type.types.version.Types1_8; import com.viaversion.viaversion.api.type.types.version.Types1_8;
import com.viaversion.viaversion.api.type.types.version.Types1_9; import com.viaversion.viaversion.api.type.types.version.Types1_9;
import com.viaversion.viaversion.protocols.v1_8.packet.ClientboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.PotionIds;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class SpawnPackets1_9 { public class SpawnPacketRewriter1_9 {
public static final ValueTransformer<Integer, Double> toNewDouble = new ValueTransformer<>(Types.DOUBLE) { public static final ValueTransformer<Integer, Double> toNewDouble = new ValueTransformer<>(Types.DOUBLE) {
@Override @Override
public Double transform(PacketWrapper wrapper, Integer inputValue) { public Double transform(PacketWrapper wrapper, Integer inputValue) {

Datei anzeigen

@ -35,15 +35,15 @@ import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.api.type.types.chunk.BulkChunkType1_8; import com.viaversion.viaversion.api.type.types.chunk.BulkChunkType1_8;
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_8; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_8;
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_1; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_1;
import com.viaversion.viaversion.protocols.v1_8.packet.ClientboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8.packet.ServerboundPackets1_8; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.PotionIds; import com.viaversion.viaversion.protocols.v1_8to1_9.data.PotionIds1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.CommandBlockProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.CommandBlockProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.EffectIds; import com.viaversion.viaversion.protocols.v1_8to1_9.data.EffectIds1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.SoundEffect; import com.viaversion.viaversion.protocols.v1_8to1_9.data.SoundEffects1_8;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.ClientChunks; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.ClientChunks;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.EntityTracker1_9;
import com.viaversion.viaversion.util.ComponentUtil; import com.viaversion.viaversion.util.ComponentUtil;
@ -77,7 +77,7 @@ public class WorldPacketRewriter1_9 {
handler(wrapper -> { handler(wrapper -> {
int id = wrapper.get(Types.INT, 0); int id = wrapper.get(Types.INT, 0);
id = EffectIds.getNewId(id); id = EffectIds1_8.getNewId(id);
wrapper.set(Types.INT, 0, id); wrapper.set(Types.INT, 0, id);
}); });
// Rewrite potion effect as it changed to use a dynamic registry // Rewrite potion effect as it changed to use a dynamic registry
@ -85,7 +85,7 @@ public class WorldPacketRewriter1_9 {
int id = wrapper.get(Types.INT, 0); int id = wrapper.get(Types.INT, 0);
if (id == 2002) { if (id == 2002) {
int data = wrapper.get(Types.INT, 1); int data = wrapper.get(Types.INT, 1);
int newData = PotionIds.getNewPotionID(data); int newData = PotionIds1_8.getNewPotionID(data);
wrapper.set(Types.INT, 1, newData); wrapper.set(Types.INT, 1, newData);
} }
}); });
@ -102,7 +102,7 @@ public class WorldPacketRewriter1_9 {
handler(wrapper -> { handler(wrapper -> {
String name = Key.stripMinecraftNamespace(wrapper.get(Types.STRING, 0)); String name = Key.stripMinecraftNamespace(wrapper.get(Types.STRING, 0));
SoundEffect effect = SoundEffect.getByName(name); SoundEffects1_8 effect = SoundEffects1_8.getByName(name);
int catid = 0; int catid = 0;
String newname = name; String newname = name;
if (effect != null) { if (effect != null) {

Datei anzeigen

@ -36,8 +36,8 @@ import com.viaversion.viaversion.data.entity.EntityTrackerBase;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.data.GameMode; import com.viaversion.viaversion.protocols.v1_8to1_9.data.GameMode;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.BossBarProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.EntityIdProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.EntityIdProvider;
import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntMap;
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMap;

Datei anzeigen

@ -21,10 +21,10 @@ import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.connection.ProtocolInfo; import com.viaversion.viaversion.api.connection.ProtocolInfo;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.Protocol1_8To1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.MovementTransmitterProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.MovementTransmitterProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker; import com.viaversion.viaversion.protocols.v1_8to1_9.storage.MovementTracker;
public class ViaIdleThread implements Runnable { public class IdlePacketTask implements Runnable {
@Override @Override
public void run() { public void run() {

Datei anzeigen

@ -38,7 +38,7 @@ import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_1;
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_3; import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_9_3;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9; import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ServerboundPackets1_9;
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.data.FakeTileEntity; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.data.FakeTileEntities1_9_1;
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ClientboundPackets1_9_3;
import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3; import com.viaversion.viaversion.protocols.v1_9_1to1_9_3.packet.ServerboundPackets1_9_3;
import java.util.List; import java.util.List;
@ -101,8 +101,8 @@ public class Protocol1_9_1To1_9_3 extends AbstractProtocol<ClientboundPackets1_9
for (int idx = 0; idx < ChunkSection.SIZE; idx++) { for (int idx = 0; idx < ChunkSection.SIZE; idx++) {
int id = blocks.idAt(idx) >> 4; int id = blocks.idAt(idx) >> 4;
if (FakeTileEntity.isTileEntity(id)) { if (FakeTileEntities1_9_1.isTileEntity(id)) {
tags.add(FakeTileEntity.createTileEntity( tags.add(FakeTileEntities1_9_1.createTileEntity(
ChunkSection.xFromIndex(idx) + (chunk.getX() << 4), ChunkSection.xFromIndex(idx) + (chunk.getX() << 4),
ChunkSection.yFromIndex(idx) + (s << 4), ChunkSection.yFromIndex(idx) + (s << 4),
ChunkSection.zFromIndex(idx) + (chunk.getZ() << 4), ChunkSection.zFromIndex(idx) + (chunk.getZ() << 4),

Datei anzeigen

@ -27,7 +27,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
* Mojang changed the way how tile entities inside chunk packets work in 1.9.3/4 * Mojang changed the way how tile entities inside chunk packets work in 1.9.3/4
* It requires now to have all tile entity data included in the chunk packet, otherwise it'll crash. * It requires now to have all tile entity data included in the chunk packet, otherwise it'll crash.
*/ */
public class FakeTileEntity { public class FakeTileEntities1_9_1 {
private static final Int2ObjectMap<CompoundTag> tileEntities = new Int2ObjectOpenHashMap<>(); private static final Int2ObjectMap<CompoundTag> tileEntities = new Int2ObjectOpenHashMap<>();
static { static {

Datei anzeigen

@ -23,7 +23,7 @@ import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.platform.ViaPlatformLoader; import com.viaversion.viaversion.api.platform.ViaPlatformLoader;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.api.protocol.version.VersionProvider;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.BossBarProvider;
import com.viaversion.viaversion.velocity.listeners.UpdateListener; import com.viaversion.viaversion.velocity.listeners.UpdateListener;
import com.viaversion.viaversion.velocity.providers.VelocityBossBarProvider; import com.viaversion.viaversion.velocity.providers.VelocityBossBarProvider;
import com.viaversion.viaversion.velocity.providers.VelocityVersionProvider; import com.viaversion.viaversion.velocity.providers.VelocityVersionProvider;

Datei anzeigen

@ -18,7 +18,7 @@
package com.viaversion.viaversion.velocity.providers; package com.viaversion.viaversion.velocity.providers;
import com.viaversion.viaversion.api.connection.UserConnection; import com.viaversion.viaversion.api.connection.UserConnection;
import com.viaversion.viaversion.protocols.v1_8to1_9.providers.BossBarProvider; import com.viaversion.viaversion.protocols.v1_8to1_9.provider.BossBarProvider;
import com.viaversion.viaversion.velocity.storage.VelocityStorage; import com.viaversion.viaversion.velocity.storage.VelocityStorage;
import java.util.UUID; import java.util.UUID;