mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
Tidy up code to make it consistent
This commit is contained in:
parent
2da9b99789
commit
0fb08be6e9
@ -6,7 +6,10 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class HandItemCache extends BukkitRunnable {
|
public class HandItemCache extends BukkitRunnable {
|
||||||
|
@ -13,12 +13,12 @@ import us.myles.ViaVersion.api.minecraft.item.Item;
|
|||||||
import us.myles.ViaVersion.api.platform.ViaPlatformLoader;
|
import us.myles.ViaVersion.api.platform.ViaPlatformLoader;
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolVersion;
|
import us.myles.ViaVersion.api.protocol.ProtocolVersion;
|
||||||
|
import us.myles.ViaVersion.bukkit.classgenerator.ClassGenerator;
|
||||||
import us.myles.ViaVersion.bukkit.listeners.UpdateListener;
|
import us.myles.ViaVersion.bukkit.listeners.UpdateListener;
|
||||||
import us.myles.ViaVersion.bukkit.listeners.protocol1_9to1_8.*;
|
import us.myles.ViaVersion.bukkit.listeners.protocol1_9to1_8.*;
|
||||||
import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
||||||
import us.myles.ViaVersion.bukkit.providers.BukkitViaBulkChunkTranslator;
|
import us.myles.ViaVersion.bukkit.providers.BukkitViaBulkChunkTranslator;
|
||||||
import us.myles.ViaVersion.bukkit.providers.BukkitViaMovementTransmitter;
|
import us.myles.ViaVersion.bukkit.providers.BukkitViaMovementTransmitter;
|
||||||
import us.myles.ViaVersion.bukkit.classgenerator.ClassGenerator;
|
|
||||||
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.providers.InventoryQuickMoveProvider;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
||||||
|
@ -1,19 +1,10 @@
|
|||||||
package us.myles.ViaVersion.bukkit.providers;
|
package us.myles.ViaVersion.bukkit.providers;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.inventory.Inventory;
|
import org.bukkit.inventory.Inventory;
|
||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
|
||||||
@ -25,6 +16,14 @@ import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.providers.InventoryQui
|
|||||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
|
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
|
||||||
import us.myles.ViaVersion.util.ReflectionUtil;
|
import us.myles.ViaVersion.util.ReflectionUtil;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class BukkitInventoryQuickMoveProvider extends InventoryQuickMoveProvider {
|
public class BukkitInventoryQuickMoveProvider extends InventoryQuickMoveProvider {
|
||||||
|
|
||||||
private static Map<UUID, BukkitInventoryUpdateTask> updateTasks = new ConcurrentHashMap<UUID, BukkitInventoryUpdateTask>();
|
private static Map<UUID, BukkitInventoryUpdateTask> updateTasks = new ConcurrentHashMap<UUID, BukkitInventoryUpdateTask>();
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
package us.myles.ViaVersion.bukkit.tasks.protocol1_12to1_11_1;
|
package us.myles.ViaVersion.bukkit.tasks.protocol1_12to1_11_1;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
||||||
|
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import us.myles.ViaVersion.bukkit.providers.BukkitInventoryQuickMoveProvider;
|
|
||||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.storage.ItemTransaction;
|
|
||||||
|
|
||||||
public class BukkitInventoryUpdateTask implements Runnable {
|
public class BukkitInventoryUpdateTask implements Runnable {
|
||||||
|
|
||||||
private BukkitInventoryQuickMoveProvider provider;
|
private BukkitInventoryQuickMoveProvider provider;
|
||||||
|
@ -4,7 +4,6 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.MessageToByteEncoder;
|
import io.netty.handler.codec.MessageToByteEncoder;
|
||||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||||
import us.myles.ViaVersion.api.Via;
|
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
@ -278,8 +278,8 @@ public class PacketWrapper {
|
|||||||
* Be careful not to send packets twice.
|
* Be careful not to send packets twice.
|
||||||
* (Sends it after current)
|
* (Sends it after current)
|
||||||
*
|
*
|
||||||
* @param packetProtocol - The protocol version of the packet.
|
* @param packetProtocol The protocol version of the packet.
|
||||||
* @param skipCurrentPipeline - Skip the current pipeline
|
* @param skipCurrentPipeline Skip the current pipeline
|
||||||
* @throws Exception if it fails to write
|
* @throws Exception if it fails to write
|
||||||
*/
|
*/
|
||||||
public void send(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline) throws Exception {
|
public void send(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline) throws Exception {
|
||||||
@ -291,9 +291,9 @@ public class PacketWrapper {
|
|||||||
* Be careful not to send packets twice.
|
* Be careful not to send packets twice.
|
||||||
* (Sends it after current)
|
* (Sends it after current)
|
||||||
*
|
*
|
||||||
* @param packetProtocol - The protocol version of the packet.
|
* @param packetProtocol The protocol version of the packet.
|
||||||
* @param skipCurrentPipeline - Skip the current pipeline
|
* @param skipCurrentPipeline Skip the current pipeline
|
||||||
* @param currentThread - Run in the same thread
|
* @param currentThread Run in the same thread
|
||||||
* @throws Exception if it fails to write
|
* @throws Exception if it fails to write
|
||||||
*/
|
*/
|
||||||
public void send(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline, boolean currentThread) throws Exception {
|
public void send(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline, boolean currentThread) throws Exception {
|
||||||
@ -306,8 +306,8 @@ public class PacketWrapper {
|
|||||||
/**
|
/**
|
||||||
* Let the packet go through the protocol pipes and write it to ByteBuf
|
* Let the packet go through the protocol pipes and write it to ByteBuf
|
||||||
*
|
*
|
||||||
* @param packetProtocol - The protocol version of the packet.
|
* @param packetProtocol The protocol version of the packet.
|
||||||
* @param skipCurrentPipeline - Skip the current pipeline
|
* @param skipCurrentPipeline Skip the current pipeline
|
||||||
* @return Packet buffer
|
* @return Packet buffer
|
||||||
* @throws Exception if it fails to write
|
* @throws Exception if it fails to write
|
||||||
*/
|
*/
|
||||||
@ -343,7 +343,7 @@ public class PacketWrapper {
|
|||||||
* Be careful not to send packets twice.
|
* Be careful not to send packets twice.
|
||||||
* (Sends it after current)
|
* (Sends it after current)
|
||||||
*
|
*
|
||||||
* @param packetProtocol - The protocol version of the packet.
|
* @param packetProtocol The protocol version of the packet.
|
||||||
* @throws Exception if it fails to write
|
* @throws Exception if it fails to write
|
||||||
*/
|
*/
|
||||||
public void send(Class<? extends Protocol> packetProtocol) throws Exception {
|
public void send(Class<? extends Protocol> packetProtocol) throws Exception {
|
||||||
@ -356,7 +356,7 @@ public class PacketWrapper {
|
|||||||
* (Sends it after current)
|
* (Sends it after current)
|
||||||
* Also returns the packets ChannelFuture
|
* Also returns the packets ChannelFuture
|
||||||
*
|
*
|
||||||
* @param packetProtocol - The protocol version of the packet.
|
* @param packetProtocol The protocol version of the packet.
|
||||||
* @return The packets ChannelFuture
|
* @return The packets ChannelFuture
|
||||||
* @throws Exception if it fails to write
|
* @throws Exception if it fails to write
|
||||||
*/
|
*/
|
||||||
@ -486,9 +486,9 @@ public class PacketWrapper {
|
|||||||
/**
|
/**
|
||||||
* Send this packet to the server.
|
* Send this packet to the server.
|
||||||
*
|
*
|
||||||
* @param packetProtocol - The protocol version of the packet.
|
* @param packetProtocol The protocol version of the packet.
|
||||||
* @param skipCurrentPipeline - Skip the current pipeline
|
* @param skipCurrentPipeline Skip the current pipeline
|
||||||
* @param currentThread - Run in the same thread
|
* @param currentThread Run in the same thread
|
||||||
* @throws Exception if it fails to write
|
* @throws Exception if it fails to write
|
||||||
*/
|
*/
|
||||||
public void sendToServer(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline, boolean currentThread) throws Exception {
|
public void sendToServer(Class<? extends Protocol> packetProtocol, boolean skipCurrentPipeline, boolean currentThread) throws Exception {
|
||||||
|
@ -244,5 +244,7 @@ public class UserConnection {
|
|||||||
*
|
*
|
||||||
* @param packet Raw packet to be sent
|
* @param packet Raw packet to be sent
|
||||||
*/
|
*/
|
||||||
public void sendRawPacketToServer(ByteBuf packet) { sendRawPacketToServer(packet, false); }
|
public void sendRawPacketToServer(ByteBuf packet) {
|
||||||
|
sendRawPacketToServer(packet, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,7 @@ import us.myles.ViaVersion.api.Via;
|
|||||||
|
|
||||||
public class Entity1_14Types {
|
public class Entity1_14Types {
|
||||||
public static EntityType getTypeFromId(int typeID, boolean isObject) {
|
public static EntityType getTypeFromId(int typeID, boolean isObject) {
|
||||||
Optional<EntityType> type;
|
Optional<EntityType> type = isObject ? ObjectTypes.getPCEntity(typeID) : EntityType.findById(typeID);
|
||||||
|
|
||||||
if (isObject)
|
|
||||||
type = ObjectTypes.getPCEntity(typeID);
|
|
||||||
else
|
|
||||||
type = EntityType.findById(typeID);
|
|
||||||
|
|
||||||
if (!type.isPresent()) {
|
if (!type.isPresent()) {
|
||||||
Via.getPlatform().getLogger().severe("Could not find type id " + typeID + " isObject=" + isObject);
|
Via.getPlatform().getLogger().severe("Could not find type id " + typeID + " isObject=" + isObject);
|
||||||
|
@ -13,6 +13,7 @@ import us.myles.ViaVersion.protocols.protocol1_11to1_10.Protocol1_11To1_10;
|
|||||||
import us.myles.ViaVersion.protocols.protocol1_12_1to1_12.Protocol1_12_1TO1_12;
|
import us.myles.ViaVersion.protocols.protocol1_12_1to1_12.Protocol1_12_1TO1_12;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_12_2to1_12_1.Protocol1_12_2TO1_12_1;
|
import us.myles.ViaVersion.protocols.protocol1_12_2to1_12_1.Protocol1_12_2TO1_12_1;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1;
|
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1;
|
||||||
|
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13_2to1_13_1.Protocol1_13_2To1_13_1;
|
import us.myles.ViaVersion.protocols.protocol1_13_2to1_13_1.Protocol1_13_2To1_13_1;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2;
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2;
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2;
|
||||||
@ -21,7 +22,6 @@ import us.myles.ViaVersion.protocols.protocol1_9_1to1_9.Protocol1_9_1TO1_9;
|
|||||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3TO1_9_1_2;
|
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3TO1_9_1_2;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_9_1.Protocol1_9TO1_9_1;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_9_1.Protocol1_9TO1_9_1;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package us.myles.ViaVersion.api.type.types.minecraft;
|
package us.myles.ViaVersion.api.type.types.minecraft;
|
||||||
|
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
|
||||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@ import us.myles.ViaVersion.api.type.Type;
|
|||||||
import us.myles.ViaVersion.api.type.types.version.Types1_13;
|
import us.myles.ViaVersion.api.type.types.version.Types1_13;
|
||||||
import us.myles.ViaVersion.packets.State;
|
import us.myles.ViaVersion.packets.State;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.MetadataRewriter;
|
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.MetadataRewriter;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.EntityTracker;
|
|
||||||
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13;
|
||||||
|
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.storage.EntityTracker;
|
||||||
|
|
||||||
public class EntityPackets {
|
public class EntityPackets {
|
||||||
|
|
||||||
|
@ -97,7 +97,6 @@ public class Protocol1_13To1_12_2 extends Protocol {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// @formatter:off
|
|
||||||
// These are arbitrary rewrite values, it just needs an invalid color code character.
|
// These are arbitrary rewrite values, it just needs an invalid color code character.
|
||||||
protected static EnumMap<ChatColor, String> SCOREBOARD_TEAM_NAME_REWRITE = new EnumMap<ChatColor, String>(ChatColor.class) {{
|
protected static EnumMap<ChatColor, String> SCOREBOARD_TEAM_NAME_REWRITE = new EnumMap<ChatColor, String>(ChatColor.class) {{
|
||||||
put(ChatColor.BLACK, ChatColor.COLOR_CHAR + "g");
|
put(ChatColor.BLACK, ChatColor.COLOR_CHAR + "g");
|
||||||
@ -117,7 +116,6 @@ public class Protocol1_13To1_12_2 extends Protocol {
|
|||||||
put(ChatColor.YELLOW, ChatColor.COLOR_CHAR + "!");
|
put(ChatColor.YELLOW, ChatColor.COLOR_CHAR + "!");
|
||||||
put(ChatColor.WHITE, ChatColor.COLOR_CHAR + "?");
|
put(ChatColor.WHITE, ChatColor.COLOR_CHAR + "?");
|
||||||
}};
|
}};
|
||||||
// @formatter:on
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
MappingData.init();
|
MappingData.init();
|
||||||
|
@ -6,97 +6,93 @@ import com.google.common.base.Optional;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
// Constant type changes to stop depending on names (the EntityTypes1_13 will be auto-generated so some fields can be obfuscated)
|
|
||||||
public class EntityTypeRewriter {
|
public class EntityTypeRewriter {
|
||||||
private static Map<Integer, Integer> entityTypes = new ConcurrentHashMap<>();
|
private static Map<Integer, Integer> entityTypes = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Generated by codename Bevet
|
registerEntity(1, 32); // item - ajl
|
||||||
|
registerEntity(2, 22); // xp_orb - abx
|
||||||
// Entities 1.12 -> 18w15a
|
registerEntity(3, 0); // area_effect_cloud - abp
|
||||||
regEnt(1, 32); // item - ajl
|
registerEntity(4, 15); // elder_guardian - aju
|
||||||
regEnt(2, 22); // xp_orb - abx
|
registerEntity(5, 84); // wither_skeleton - aku
|
||||||
regEnt(3, 0); // area_effect_cloud - abp
|
registerEntity(6, 71); // stray - akq
|
||||||
regEnt(4, 15); // elder_guardian - aju
|
registerEntity(7, 74); // egg - alz
|
||||||
regEnt(5, 84); // wither_skeleton - aku
|
registerEntity(8, 35); // leash_knot - ajb
|
||||||
regEnt(6, 71); // stray - akq
|
registerEntity(9, 49); // painting - ajd
|
||||||
regEnt(7, 74); // egg - alz
|
registerEntity(10, 2); // arrow - all
|
||||||
regEnt(8, 35); // leash_knot - ajb
|
registerEntity(11, 67); // snowball - alw
|
||||||
regEnt(9, 49); // painting - ajd
|
registerEntity(12, 34); // fireball - alq
|
||||||
regEnt(10, 2); // arrow - all
|
registerEntity(13, 65); // small_fireball - alv
|
||||||
regEnt(11, 67); // snowball - alw
|
registerEntity(14, 75); // ender_pearl - ama
|
||||||
regEnt(12, 34); // fireball - alq
|
registerEntity(15, 23); // eye_of_ender_signal - alo
|
||||||
regEnt(13, 65); // small_fireball - alv
|
registerEntity(16, 77); // potion - amc
|
||||||
regEnt(14, 75); // ender_pearl - ama
|
registerEntity(17, 76); // xp_bottle - amb
|
||||||
regEnt(15, 23); // eye_of_ender_signal - alo
|
registerEntity(18, 33); // item_frame - aja
|
||||||
regEnt(16, 77); // potion - amc
|
registerEntity(19, 85); // wither_skull - ame
|
||||||
regEnt(17, 76); // xp_bottle - amb
|
registerEntity(20, 55); // tnt - ajm
|
||||||
regEnt(18, 33); // item_frame - aja
|
registerEntity(21, 24); // falling_block - ajk
|
||||||
regEnt(19, 85); // wither_skull - ame
|
registerEntity(22, 25); // fireworks_rocket - alp
|
||||||
regEnt(20, 55); // tnt - ajm
|
registerEntity(23, 30); // husk - akc
|
||||||
regEnt(21, 24); // falling_block - ajk
|
registerEntity(24, 68); // spectral_arrow - alx
|
||||||
regEnt(22, 25); // fireworks_rocket - alp
|
registerEntity(25, 60); // shulker_bullet - alu
|
||||||
regEnt(23, 30); // husk - akc
|
registerEntity(26, 13); // dragon_fireball - alm
|
||||||
regEnt(24, 68); // spectral_arrow - alx
|
registerEntity(27, 89); // zombie_villager - akw
|
||||||
regEnt(25, 60); // shulker_bullet - alu
|
registerEntity(28, 63); // skeleton_horse - aht
|
||||||
regEnt(26, 13); // dragon_fireball - alm
|
registerEntity(29, 88); // zombie_horse - ahv
|
||||||
regEnt(27, 89); // zombie_villager - akw
|
registerEntity(30, 1); // armor_stand - aiy
|
||||||
regEnt(28, 63); // skeleton_horse - aht
|
registerEntity(31, 11); // donkey - aho
|
||||||
regEnt(29, 88); // zombie_horse - ahv
|
registerEntity(32, 46); // mule - ahs
|
||||||
regEnt(30, 1); // armor_stand - aiy
|
registerEntity(33, 20); // evocation_fangs - aln
|
||||||
regEnt(31, 11); // donkey - aho
|
registerEntity(34, 21); // evocation_illager - ajy
|
||||||
regEnt(32, 46); // mule - ahs
|
registerEntity(35, 78); // vex - akr
|
||||||
regEnt(33, 20); // evocation_fangs - aln
|
registerEntity(36, 81); // vindication_illager - aks
|
||||||
regEnt(34, 21); // evocation_illager - ajy
|
registerEntity(37, 31); // illusion_illager - akd
|
||||||
regEnt(35, 78); // vex - akr
|
registerEntity(40, 41); // commandblock_minecart - aml
|
||||||
regEnt(36, 81); // vindication_illager - aks
|
registerEntity(41, 5); // boat - ami
|
||||||
regEnt(37, 31); // illusion_illager - akd
|
registerEntity(42, 39); // minecart - amj
|
||||||
regEnt(40, 41); // commandblock_minecart - aml
|
registerEntity(43, 40); // chest_minecart - amk
|
||||||
regEnt(41, 5); // boat - ami
|
registerEntity(44, 42); // furnace_minecart - amm
|
||||||
regEnt(42, 39); // minecart - amj
|
registerEntity(45, 45); // tnt_minecart - amp
|
||||||
regEnt(43, 40); // chest_minecart - amk
|
registerEntity(46, 43); // hopper_minecart - amn
|
||||||
regEnt(44, 42); // furnace_minecart - amm
|
registerEntity(47, 44); // spawner_minecart - amo
|
||||||
regEnt(45, 45); // tnt_minecart - amp
|
registerEntity(50, 10); // creeper - ajs
|
||||||
regEnt(46, 43); // hopper_minecart - amn
|
registerEntity(51, 62); // skeleton - akm
|
||||||
regEnt(47, 44); // spawner_minecart - amo
|
registerEntity(52, 69); // spider - akp
|
||||||
regEnt(50, 10); // creeper - ajs
|
registerEntity(53, 27); // giant - aka
|
||||||
regEnt(51, 62); // skeleton - akm
|
registerEntity(54, 87); // zombie - akv
|
||||||
regEnt(52, 69); // spider - akp
|
registerEntity(55, 64); // slime - akn
|
||||||
regEnt(53, 27); // giant - aka
|
registerEntity(56, 26); // ghast - ajz
|
||||||
regEnt(54, 87); // zombie - akv
|
registerEntity(57, 53); // zombie_pigman - akh
|
||||||
regEnt(55, 64); // slime - akn
|
registerEntity(58, 18); // enderman - ajv
|
||||||
regEnt(56, 26); // ghast - ajz
|
registerEntity(59, 6); // cave_spider - ajr
|
||||||
regEnt(57, 53); // zombie_pigman - akh
|
registerEntity(60, 61); // silverfish - akl
|
||||||
regEnt(58, 18); // enderman - ajv
|
registerEntity(61, 4); // blaze - ajq
|
||||||
regEnt(59, 6); // cave_spider - ajr
|
registerEntity(62, 38); // magma_cube - ake
|
||||||
regEnt(60, 61); // silverfish - akl
|
registerEntity(63, 17); // ender_dragon - aic
|
||||||
regEnt(61, 4); // blaze - ajq
|
registerEntity(64, 83); // wither - aiw
|
||||||
regEnt(62, 38); // magma_cube - ake
|
registerEntity(65, 3); // bat - agl
|
||||||
regEnt(63, 17); // ender_dragon - aic
|
registerEntity(66, 82); // witch - akt
|
||||||
regEnt(64, 83); // wither - aiw
|
registerEntity(67, 19); // endermite - ajw
|
||||||
regEnt(65, 3); // bat - agl
|
registerEntity(68, 28); // guardian - akb
|
||||||
regEnt(66, 82); // witch - akt
|
registerEntity(69, 59); // shulker - akk
|
||||||
regEnt(67, 19); // endermite - ajw
|
registerEntity(200, 16); // ender_crystal - aib
|
||||||
regEnt(68, 28); // guardian - akb
|
registerEntity(90, 51); // pig - agy
|
||||||
regEnt(69, 59); // shulker - akk
|
registerEntity(91, 58); // sheep - ahd
|
||||||
regEnt(200, 16); // ender_crystal - aib
|
registerEntity(92, 9); // cow - ags
|
||||||
regEnt(90, 51); // pig - agy
|
registerEntity(93, 7); // chicken - agq
|
||||||
regEnt(91, 58); // sheep - ahd
|
registerEntity(94, 70); // squid - ahg
|
||||||
regEnt(92, 9); // cow - ags
|
registerEntity(95, 86); // wolf - ahl
|
||||||
regEnt(93, 7); // chicken - agq
|
registerEntity(96, 47); // mooshroom - agv
|
||||||
regEnt(94, 70); // squid - ahg
|
registerEntity(97, 66); // snowman - ahf
|
||||||
regEnt(95, 86); // wolf - ahl
|
registerEntity(98, 48); // ocelot - agw
|
||||||
regEnt(96, 47); // mooshroom - agv
|
registerEntity(99, 80); // villager_golem - ahj
|
||||||
regEnt(97, 66); // snowman - ahf
|
registerEntity(100, 29); // horse - ahp
|
||||||
regEnt(98, 48); // ocelot - agw
|
registerEntity(101, 56); // rabbit - ahb
|
||||||
regEnt(99, 80); // villager_golem - ahj
|
registerEntity(102, 54); // polar_bear - agz
|
||||||
regEnt(100, 29); // horse - ahp
|
registerEntity(103, 36); // llama - ahr
|
||||||
regEnt(101, 56); // rabbit - ahb
|
registerEntity(104, 37); // llama_spit - alr
|
||||||
regEnt(102, 54); // polar_bear - agz
|
registerEntity(105, 50); // parrot - agx
|
||||||
regEnt(103, 36); // llama - ahr
|
registerEntity(120, 79); // villager - ala
|
||||||
regEnt(104, 37); // llama_spit - alr
|
|
||||||
regEnt(105, 50); // parrot - agx
|
|
||||||
regEnt(120, 79); // villager - ala
|
|
||||||
|
|
||||||
|
|
||||||
// OBJECTS
|
// OBJECTS
|
||||||
@ -104,7 +100,7 @@ public class EntityTypeRewriter {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void regEnt(int type1_12, int type1_13) {
|
private static void registerEntity(int type1_12, int type1_13) {
|
||||||
entityTypes.put(type1_12, type1_13);
|
entityTypes.put(type1_12, type1_13);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ public class Chunk1_13Type extends PartialType<Chunk, ClientWorld> {
|
|||||||
if (groundUp) {
|
if (groundUp) {
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
// todo use int in Chunk?
|
// todo use int in Chunk?
|
||||||
biomeData[i] = (byte) input.readInt();;
|
biomeData[i] = (byte) input.readInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import us.myles.ViaVersion.api.PacketWrapper;
|
import us.myles.ViaVersion.api.PacketWrapper;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.minecraft.Position;
|
import us.myles.ViaVersion.api.minecraft.Position;
|
||||||
|
import us.myles.ViaVersion.api.minecraft.chunks.Chunk1_8;
|
||||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||||
import us.myles.ViaVersion.api.protocol.Protocol;
|
import us.myles.ViaVersion.api.protocol.Protocol;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
||||||
@ -16,7 +17,6 @@ import us.myles.ViaVersion.api.type.Type;
|
|||||||
import us.myles.ViaVersion.packets.State;
|
import us.myles.ViaVersion.packets.State;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.ItemRewriter;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9TO1_8;
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk1_8;
|
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.BulkChunkTranslatorProvider;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.CommandBlockProvider;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.CommandBlockProvider;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.sounds.Effect;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.sounds.Effect;
|
||||||
|
@ -4,6 +4,7 @@ import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
||||||
|
import us.myles.ViaVersion.api.minecraft.chunks.Chunk1_8;
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
|
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
|
||||||
import us.myles.ViaVersion.api.type.PartialType;
|
import us.myles.ViaVersion.api.type.PartialType;
|
||||||
import us.myles.ViaVersion.api.type.Type;
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
@ -12,7 +13,6 @@ import us.myles.ViaVersion.api.type.types.version.Types1_8;
|
|||||||
import us.myles.ViaVersion.api.type.types.version.Types1_9;
|
import us.myles.ViaVersion.api.type.types.version.Types1_9;
|
||||||
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
import us.myles.ViaVersion.protocols.base.ProtocolInfo;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4;
|
import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4;
|
||||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk1_8;
|
|
||||||
import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.ClientChunks;
|
import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.ClientChunks;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -42,7 +42,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<!-- We only run lombok and not sponge in-built mcmod.info generator due to issues with multiversion -->
|
<!-- We only run lombok and not sponge in-built mcmod.info generator due to issues with multiversion -->
|
||||||
<annotationProcessors>
|
<annotationProcessors>
|
||||||
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</annotationProcessor>
|
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor
|
||||||
|
</annotationProcessor>
|
||||||
</annotationProcessors>
|
</annotationProcessors>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -17,7 +17,6 @@ import org.spongepowered.api.plugin.PluginContainer;
|
|||||||
import org.spongepowered.api.scheduler.Task;
|
import org.spongepowered.api.scheduler.Task;
|
||||||
import org.spongepowered.api.text.serializer.TextSerializers;
|
import org.spongepowered.api.text.serializer.TextSerializers;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.ViaAPI;
|
|
||||||
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
import us.myles.ViaVersion.api.command.ViaCommandSender;
|
||||||
import us.myles.ViaVersion.api.configuration.ConfigurationProvider;
|
import us.myles.ViaVersion.api.configuration.ConfigurationProvider;
|
||||||
import us.myles.ViaVersion.api.platform.TaskId;
|
import us.myles.ViaVersion.api.platform.TaskId;
|
||||||
@ -32,10 +31,8 @@ import us.myles.ViaVersion.util.GsonUtil;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@Plugin(id = "viaversion",
|
@Plugin(id = "viaversion",
|
||||||
|
Loading…
Reference in New Issue
Block a user