mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 01:55:47 +01:00
Apply IJ code reformat, rename rewriter methods, change metadata references to entity data
Doing lots of things in one commit to not muddy file history too much - almost all of these changes are fully automated
This commit is contained in:
parent
b3f0c3e9a7
commit
75d86851ce
@ -8,7 +8,7 @@ tab_width = 4
|
||||
[*.java]
|
||||
ij_java_class_count_to_use_import_on_demand = 999999
|
||||
ij_java_names_count_to_use_import_on_demand = 999999
|
||||
ij_java_imports_layout = *,|,$*
|
||||
ij_java_imports_layout = *, |, $*
|
||||
ij_java_generate_final_locals = true
|
||||
ij_java_generate_final_parameters = true
|
||||
|
||||
|
@ -27,7 +27,6 @@ import com.viaversion.viaversion.api.connection.StorableObject;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.WorldIdentifiers;
|
||||
import com.viaversion.viaversion.api.protocol.version.BlockedProtocolVersions;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public interface ViaVersionConfig extends Config {
|
||||
|
||||
|
@ -54,6 +54,15 @@ public class FullMappingsBase implements FullMappings {
|
||||
this.mappings = mappings;
|
||||
}
|
||||
|
||||
private static Object2IntMap<String> toInverseMap(final List<String> list) {
|
||||
final Object2IntMap<String> map = new Object2IntOpenHashMap<>(list.size());
|
||||
map.defaultReturnValue(-1);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
map.put(list.get(i), i);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int id(final String identifier) {
|
||||
return stringToId.getInt(Key.stripMinecraftNamespace(identifier));
|
||||
@ -119,13 +128,4 @@ public class FullMappingsBase implements FullMappings {
|
||||
public FullMappings inverse() {
|
||||
return new FullMappingsBase(mappedStringToId, stringToId, mappedIdToString, idToString, mappings.inverse());
|
||||
}
|
||||
|
||||
private static Object2IntMap<String> toInverseMap(final List<String> list) {
|
||||
final Object2IntMap<String> map = new Object2IntOpenHashMap<>(list.size());
|
||||
map.defaultReturnValue(-1);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
map.put(list.get(i), i);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,14 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.data;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonIOException;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.viaversion.nbt.io.NBTIO;
|
||||
import com.viaversion.nbt.io.TagReader;
|
||||
import com.viaversion.nbt.tag.ByteTag;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.IntArrayTag;
|
||||
@ -29,14 +37,6 @@ import com.viaversion.nbt.tag.IntTag;
|
||||
import com.viaversion.nbt.tag.ListTag;
|
||||
import com.viaversion.nbt.tag.StringTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.nbt.io.NBTIO;
|
||||
import com.viaversion.nbt.io.TagReader;
|
||||
import com.google.common.annotations.Beta;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonIOException;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.util.GsonUtil;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
|
@ -48,11 +48,11 @@ public interface TrackedEntity {
|
||||
boolean hasData();
|
||||
|
||||
/**
|
||||
* Returns whether metadata has already been sent at least once for this entity.
|
||||
* Returns whether entity data has already been sent at least once for this entity.
|
||||
*
|
||||
* @return whether metadata has already been sent at least once for this entity
|
||||
* @return whether entity data has already been sent at least once for this entity
|
||||
*/
|
||||
boolean hasSentMetadata();
|
||||
boolean hasSentEntityData();
|
||||
|
||||
void sentMetadata(boolean sentMetadata);
|
||||
void sentEntityData(boolean sentEntityData);
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata;
|
||||
package com.viaversion.viaversion.api.minecraft;
|
||||
|
||||
import java.util.Objects;
|
||||
|
@ -27,7 +27,7 @@ public enum GameMode {
|
||||
SURVIVAL("Survival Mode"),
|
||||
CREATIVE("Creative Mode"),
|
||||
ADVENTURE("Adventure Mode"),
|
||||
SPECTATOR( "Spectator Mode");
|
||||
SPECTATOR("Spectator Mode");
|
||||
|
||||
private final String text;
|
||||
|
||||
|
@ -137,6 +137,7 @@ public final class DataPaletteImpl implements DataPalette {
|
||||
|
||||
interface ChunkData {
|
||||
int get(int idx);
|
||||
|
||||
void set(int idx, int val);
|
||||
}
|
||||
|
||||
|
@ -20,15 +20,15 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.util.Objects;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public final class Metadata {
|
||||
public final class EntityData {
|
||||
private int id;
|
||||
private MetaType metaType;
|
||||
private EntityDataType metaType;
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
@ -39,7 +39,7 @@ public final class Metadata {
|
||||
* @param value value if present
|
||||
* @throws IllegalArgumentException if the value and metaType are incompatible
|
||||
*/
|
||||
public Metadata(int id, MetaType metaType, @Nullable Object value) {
|
||||
public EntityData(int id, EntityDataType metaType, @Nullable Object value) {
|
||||
this.id = id;
|
||||
this.metaType = metaType;
|
||||
this.value = checkValue(metaType, value);
|
||||
@ -53,7 +53,7 @@ public final class Metadata {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public MetaType metaType() {
|
||||
public EntityDataType dataType() {
|
||||
return metaType;
|
||||
}
|
||||
|
||||
@ -62,9 +62,9 @@ public final class Metadata {
|
||||
*
|
||||
* @param metaType metadata type
|
||||
* @throws IllegalArgumentException if the metadata type and current value are incompatible
|
||||
* @see #setTypeAndValue(MetaType, Object)
|
||||
* @see #setTypeAndValue(EntityDataType, Object)
|
||||
*/
|
||||
public void setMetaType(MetaType metaType) {
|
||||
public void setDataType(EntityDataType metaType) {
|
||||
checkValue(metaType, this.value);
|
||||
this.metaType = metaType;
|
||||
}
|
||||
@ -82,7 +82,7 @@ public final class Metadata {
|
||||
*
|
||||
* @param value value
|
||||
* @throws IllegalArgumentException if the value and current metaType are incompatible
|
||||
* @see #setTypeAndValue(MetaType, Object)
|
||||
* @see #setTypeAndValue(EntityDataType, Object)
|
||||
*/
|
||||
public void setValue(@Nullable Object value) {
|
||||
this.value = checkValue(this.metaType, value);
|
||||
@ -95,12 +95,12 @@ public final class Metadata {
|
||||
* @param value value
|
||||
* @throws IllegalArgumentException if the value and metaType are incompatible
|
||||
*/
|
||||
public void setTypeAndValue(MetaType metaType, @Nullable Object value) {
|
||||
public void setTypeAndValue(EntityDataType metaType, @Nullable Object value) {
|
||||
this.value = checkValue(metaType, value);
|
||||
this.metaType = metaType;
|
||||
}
|
||||
|
||||
private Object checkValue(MetaType metaType, @Nullable Object value) {
|
||||
private Object checkValue(EntityDataType metaType, @Nullable Object value) {
|
||||
Preconditions.checkNotNull(metaType);
|
||||
if (value != null && !metaType.type().getOutputClass().isAssignableFrom(value.getClass())) {
|
||||
throw new IllegalArgumentException("Metadata value and metaType are incompatible. Type=" + metaType
|
||||
@ -110,7 +110,7 @@ public final class Metadata {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setMetaTypeUnsafe(MetaType type) {
|
||||
public void setDataTypeUnsafe(EntityDataType type) {
|
||||
this.metaType = type;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ public final class Metadata {
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Metadata metadata = (Metadata) o;
|
||||
EntityData metadata = (EntityData) o;
|
||||
if (id != metadata.id) return false;
|
||||
if (metaType != metadata.metaType) return false;
|
||||
return Objects.equals(value, metadata.value);
|
@ -20,12 +20,12 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
|
||||
public interface MetaType {
|
||||
public interface EntityDataType {
|
||||
|
||||
/**
|
||||
* Get the write/read type
|
||||
@ -41,15 +41,15 @@ public interface MetaType {
|
||||
*/
|
||||
int typeId();
|
||||
|
||||
static MetaType create(final int typeId, final Type<?> type) {
|
||||
return new MetaTypeImpl(typeId, type);
|
||||
static EntityDataType create(final int typeId, final Type<?> type) {
|
||||
return new EntityDataTypeImpl(typeId, type);
|
||||
}
|
||||
|
||||
final class MetaTypeImpl implements MetaType {
|
||||
final class EntityDataTypeImpl implements EntityDataType {
|
||||
private final int typeId;
|
||||
private final Type<?> type;
|
||||
|
||||
MetaTypeImpl(final int typeId, final Type<?> type) {
|
||||
EntityDataTypeImpl(final int typeId, final Type<?> type) {
|
||||
Preconditions.checkNotNull(type);
|
||||
this.typeId = typeId;
|
||||
this.type = type;
|
||||
@ -67,7 +67,7 @@ public interface MetaType {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MetaType{" +
|
||||
return "EntityDataType{" +
|
||||
"typeId=" + typeId +
|
||||
", type=" + type +
|
||||
'}';
|
||||
@ -77,7 +77,7 @@ public interface MetaType {
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
final MetaTypeImpl metaType = (MetaTypeImpl) o;
|
||||
final EntityDataTypeImpl metaType = (EntityDataTypeImpl) o;
|
||||
if (typeId != metaType.typeId) return false;
|
||||
return type.equals(metaType.type);
|
||||
}
|
@ -20,31 +20,31 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
|
||||
public abstract class AbstractMetaTypes implements MetaTypes {
|
||||
public abstract class AbstractEntityDataTypes implements EntityDataTypes {
|
||||
|
||||
private final MetaType[] values;
|
||||
private final EntityDataType[] values;
|
||||
|
||||
protected AbstractMetaTypes(final int values) {
|
||||
this.values = new MetaType[values];
|
||||
protected AbstractEntityDataTypes(final int values) {
|
||||
this.values = new EntityDataType[values];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaType byId(final int id) {
|
||||
public EntityDataType byId(final int id) {
|
||||
return values[id];
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaType[] values() {
|
||||
public EntityDataType[] values() {
|
||||
return values;
|
||||
}
|
||||
|
||||
protected MetaType add(final int typeId, final Type<?> type) {
|
||||
final MetaType metaType = MetaType.create(typeId, type);
|
||||
protected EntityDataType add(final int typeId, final Type<?> type) {
|
||||
final EntityDataType metaType = EntityDataType.create(typeId, type);
|
||||
values[typeId] = metaType;
|
||||
return metaType;
|
||||
}
|
@ -20,11 +20,11 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
|
||||
public interface MetaTypes {
|
||||
public interface EntityDataTypes {
|
||||
|
||||
/**
|
||||
* Returns the meta type by the given id.
|
||||
@ -33,12 +33,12 @@ public interface MetaTypes {
|
||||
* @return meta type by id
|
||||
* @throws IndexOutOfBoundsException if id is out of bounds
|
||||
*/
|
||||
MetaType byId(int id);
|
||||
EntityDataType byId(int id);
|
||||
|
||||
/**
|
||||
* Returns an array of meta types.
|
||||
*
|
||||
* @return array of meta types
|
||||
*/
|
||||
MetaType[] values();
|
||||
EntityDataType[] values();
|
||||
}
|
@ -20,13 +20,13 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
|
||||
public enum MetaType1_12 implements MetaType {
|
||||
public enum EntityDataTypes1_12 implements EntityDataType {
|
||||
BYTE(Types.BYTE),
|
||||
VAR_INT(Types.VAR_INT),
|
||||
FLOAT(Types.FLOAT),
|
||||
@ -44,11 +44,11 @@ public enum MetaType1_12 implements MetaType {
|
||||
|
||||
private final Type<?> type;
|
||||
|
||||
MetaType1_12(Type<?> type) {
|
||||
EntityDataTypes1_12(Type<?> type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static MetaType1_12 byId(int id) {
|
||||
public static EntityDataTypes1_12 byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_13 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType floatType = add(2, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(3, Types.STRING);
|
||||
public final EntityDataType componentType = add(4, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(6, Types.ITEM1_13);
|
||||
public final EntityDataType booleanType = add(7, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(9, Types.BLOCK_POSITION1_8);
|
||||
public final EntityDataType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION1_8);
|
||||
public final EntityDataType directionType = add(11, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
|
||||
public EntityDataTypes1_13(final ParticleType particleType) {
|
||||
super(16);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_13_2 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType floatType = add(2, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(3, Types.STRING);
|
||||
public final EntityDataType componentType = add(4, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(6, Types.ITEM1_13_2);
|
||||
public final EntityDataType booleanType = add(7, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(9, Types.BLOCK_POSITION1_8);
|
||||
public final EntityDataType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION1_8);
|
||||
public final EntityDataType directionType = add(11, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
|
||||
public EntityDataTypes1_13_2(final ParticleType particleType) {
|
||||
super(16);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_14 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType floatType = add(2, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(3, Types.STRING);
|
||||
public final EntityDataType componentType = add(4, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(6, Types.ITEM1_13_2);
|
||||
public final EntityDataType booleanType = add(7, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(9, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(11, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType villagerDatatType = add(16, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(17, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(18, Types.VAR_INT);
|
||||
|
||||
public EntityDataTypes1_14(final ParticleType particleType) {
|
||||
super(19);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_19 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType floatType = add(2, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(3, Types.STRING);
|
||||
public final EntityDataType componentType = add(4, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(6, Types.ITEM1_13_2);
|
||||
public final EntityDataType booleanType = add(7, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(9, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(11, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType villagerDatatType = add(16, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(17, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(18, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(19, Types.VAR_INT);
|
||||
public final EntityDataType frogVariantType = add(20, Types.VAR_INT);
|
||||
public final EntityDataType optionalGlobalPosition = add(21, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final EntityDataType paintingVariantType = add(22, Types.VAR_INT);
|
||||
|
||||
public EntityDataTypes1_19(final ParticleType particleType) {
|
||||
super(23);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_19_3 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType longType = add(2, Types.VAR_LONG);
|
||||
public final EntityDataType floatType = add(3, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(4, Types.STRING);
|
||||
public final EntityDataType componentType = add(5, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(6, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(7, Types.ITEM1_13_2);
|
||||
public final EntityDataType booleanType = add(8, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(12, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType optionalBlockStateType = add(14, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(15, Types.NAMED_COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType villagerDatatType = add(17, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(18, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(19, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(20, Types.VAR_INT);
|
||||
public final EntityDataType frogVariantType = add(21, Types.VAR_INT);
|
||||
public final EntityDataType optionalGlobalPosition = add(22, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final EntityDataType paintingVariantType = add(23, Types.VAR_INT);
|
||||
|
||||
public EntityDataTypes1_19_3(final ParticleType particleType) {
|
||||
super(24);
|
||||
this.particleType = add(16, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_19_4 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType longType = add(2, Types.VAR_LONG);
|
||||
public final EntityDataType floatType = add(3, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(4, Types.STRING);
|
||||
public final EntityDataType componentType = add(5, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(6, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(7, Types.ITEM1_13_2);
|
||||
public final EntityDataType booleanType = add(8, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(12, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType blockStateType = add(14, Types.VAR_INT);
|
||||
public final EntityDataType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(16, Types.NAMED_COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(20, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(21, Types.VAR_INT);
|
||||
public final EntityDataType frogVariantType = add(22, Types.VAR_INT);
|
||||
public final EntityDataType optionalGlobalPosition = add(23, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final EntityDataType paintingVariantType = add(24, Types.VAR_INT);
|
||||
public final EntityDataType snifferState = add(25, Types.VAR_INT);
|
||||
public final EntityDataType vector3FType = add(26, Types.VECTOR3F);
|
||||
public final EntityDataType quaternionType = add(27, Types.QUATERNION);
|
||||
|
||||
public EntityDataTypes1_19_4(final ParticleType particleType) {
|
||||
super(28);
|
||||
this.particleType = add(17, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_20_2 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType longType = add(2, Types.VAR_LONG);
|
||||
public final EntityDataType floatType = add(3, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(4, Types.STRING);
|
||||
public final EntityDataType componentType = add(5, Types.COMPONENT);
|
||||
public final EntityDataType optionalComponentType = add(6, Types.OPTIONAL_COMPONENT);
|
||||
public final EntityDataType itemType = add(7, Types.ITEM1_20_2);
|
||||
public final EntityDataType booleanType = add(8, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(12, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType blockStateType = add(14, Types.VAR_INT);
|
||||
public final EntityDataType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(16, Types.COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(20, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(21, Types.VAR_INT);
|
||||
public final EntityDataType frogVariantType = add(22, Types.VAR_INT);
|
||||
public final EntityDataType optionalGlobalPosition = add(23, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final EntityDataType paintingVariantType = add(24, Types.VAR_INT);
|
||||
public final EntityDataType snifferState = add(25, Types.VAR_INT);
|
||||
public final EntityDataType vector3FType = add(26, Types.VECTOR3F);
|
||||
public final EntityDataType quaternionType = add(27, Types.QUATERNION);
|
||||
|
||||
public EntityDataTypes1_20_2(final ParticleType particleType) {
|
||||
super(28);
|
||||
this.particleType = add(17, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class EntityDataTypes1_20_3 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType longType = add(2, Types.VAR_LONG);
|
||||
public final EntityDataType floatType = add(3, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(4, Types.STRING);
|
||||
public final EntityDataType componentType = add(5, Types.TAG);
|
||||
public final EntityDataType optionalComponentType = add(6, Types.OPTIONAL_TAG);
|
||||
public final EntityDataType itemType = add(7, Types.ITEM1_20_2);
|
||||
public final EntityDataType booleanType = add(8, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(12, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType blockStateType = add(14, Types.VAR_INT);
|
||||
public final EntityDataType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(16, Types.COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(20, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(21, Types.VAR_INT);
|
||||
public final EntityDataType frogVariantType = add(22, Types.VAR_INT);
|
||||
public final EntityDataType optionalGlobalPosition = add(23, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final EntityDataType paintingVariantType = add(24, Types.VAR_INT);
|
||||
public final EntityDataType snifferState = add(25, Types.VAR_INT);
|
||||
public final EntityDataType vector3FType = add(26, Types.VECTOR3F);
|
||||
public final EntityDataType quaternionType = add(27, Types.QUATERNION);
|
||||
|
||||
public EntityDataTypes1_20_3(final ParticleType particleType) {
|
||||
super(28);
|
||||
this.particleType = add(17, particleType);
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.Particle;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_20_5;
|
||||
|
||||
public final class EntityDataTypes1_20_5 extends AbstractEntityDataTypes {
|
||||
|
||||
public final EntityDataType byteType = add(0, Types.BYTE);
|
||||
public final EntityDataType varIntType = add(1, Types.VAR_INT);
|
||||
public final EntityDataType longType = add(2, Types.VAR_LONG);
|
||||
public final EntityDataType floatType = add(3, Types.FLOAT);
|
||||
public final EntityDataType stringType = add(4, Types.STRING);
|
||||
public final EntityDataType componentType = add(5, Types.TAG);
|
||||
public final EntityDataType optionalComponentType = add(6, Types.OPTIONAL_TAG);
|
||||
public final EntityDataType itemType = add(7, Types1_20_5.ITEM);
|
||||
public final EntityDataType booleanType = add(8, Types.BOOLEAN);
|
||||
public final EntityDataType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final EntityDataType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final EntityDataType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final EntityDataType directionType = add(12, Types.VAR_INT);
|
||||
public final EntityDataType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final EntityDataType blockStateType = add(14, Types.VAR_INT);
|
||||
public final EntityDataType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final EntityDataType compoundTagType = add(16, Types.COMPOUND_TAG);
|
||||
public final EntityDataType particleType;
|
||||
public final EntityDataType particlesType;
|
||||
public final EntityDataType villagerDatatType = add(19, Types.VILLAGER_DATA);
|
||||
public final EntityDataType optionalVarIntType = add(20, Types.OPTIONAL_VAR_INT);
|
||||
public final EntityDataType poseType = add(21, Types.VAR_INT);
|
||||
public final EntityDataType catVariantType = add(22, Types.VAR_INT);
|
||||
public final EntityDataType wolfVariantType = add(23, Types.VAR_INT);
|
||||
public final EntityDataType frogVariantType = add(24, Types.VAR_INT);
|
||||
public final EntityDataType optionalGlobalPosition = add(25, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final EntityDataType paintingVariantType = add(26, Types.VAR_INT);
|
||||
public final EntityDataType snifferState = add(27, Types.VAR_INT);
|
||||
public final EntityDataType armadilloState = add(28, Types.VAR_INT);
|
||||
public final EntityDataType vector3FType = add(29, Types.VECTOR3F);
|
||||
public final EntityDataType quaternionType = add(30, Types.QUATERNION);
|
||||
|
||||
public EntityDataTypes1_20_5(final ParticleType particleType, final ArrayType<Particle> particlesType) {
|
||||
super(31);
|
||||
this.particleType = add(17, particleType);
|
||||
this.particlesType = add(18, particlesType);
|
||||
}
|
||||
}
|
@ -20,13 +20,13 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
|
||||
public enum MetaType1_8 implements MetaType {
|
||||
public enum EntityDataTypes1_8 implements EntityDataType {
|
||||
BYTE(Types.BYTE),
|
||||
SHORT(Types.SHORT),
|
||||
INT(Types.INT),
|
||||
@ -38,11 +38,11 @@ public enum MetaType1_8 implements MetaType {
|
||||
|
||||
private final Type<?> type;
|
||||
|
||||
MetaType1_8(Type<?> type) {
|
||||
EntityDataTypes1_8(Type<?> type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static MetaType1_8 byId(int id) {
|
||||
public static EntityDataTypes1_8 byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
@ -20,13 +20,13 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
package com.viaversion.viaversion.api.minecraft.entitydata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
|
||||
public enum MetaType1_9 implements MetaType {
|
||||
public enum EntityDataTypes1_9 implements EntityDataType {
|
||||
BYTE(Types.BYTE),
|
||||
VAR_INT(Types.VAR_INT),
|
||||
FLOAT(Types.FLOAT),
|
||||
@ -43,11 +43,11 @@ public enum MetaType1_9 implements MetaType {
|
||||
|
||||
private final Type<?> type;
|
||||
|
||||
MetaType1_9(Type<?> type) {
|
||||
EntityDataTypes1_9(Type<?> type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static MetaType1_9 byId(int id) {
|
||||
public static EntityDataTypes1_9 byId(int id) {
|
||||
return values()[id];
|
||||
}
|
||||
|
@ -22,8 +22,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredDataContainer;
|
||||
import java.util.Objects;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.HolderType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.HolderType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -22,7 +22,6 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.item.data;
|
||||
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.HolderType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_13 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType floatType = add(2, Types.FLOAT);
|
||||
public final MetaType stringType = add(3, Types.STRING);
|
||||
public final MetaType componentType = add(4, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(6, Types.ITEM1_13);
|
||||
public final MetaType booleanType = add(7, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(9, Types.BLOCK_POSITION1_8);
|
||||
public final MetaType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION1_8);
|
||||
public final MetaType directionType = add(11, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final MetaType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
|
||||
public MetaTypes1_13(final ParticleType particleType) {
|
||||
super(16);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_13_2 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType floatType = add(2, Types.FLOAT);
|
||||
public final MetaType stringType = add(3, Types.STRING);
|
||||
public final MetaType componentType = add(4, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(6, Types.ITEM1_13_2);
|
||||
public final MetaType booleanType = add(7, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(9, Types.BLOCK_POSITION1_8);
|
||||
public final MetaType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION1_8);
|
||||
public final MetaType directionType = add(11, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final MetaType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
|
||||
public MetaTypes1_13_2(final ParticleType particleType) {
|
||||
super(16);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_14 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType floatType = add(2, Types.FLOAT);
|
||||
public final MetaType stringType = add(3, Types.STRING);
|
||||
public final MetaType componentType = add(4, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(6, Types.ITEM1_13_2);
|
||||
public final MetaType booleanType = add(7, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(9, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(11, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final MetaType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType villagerDatatType = add(16, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(17, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(18, Types.VAR_INT);
|
||||
|
||||
public MetaTypes1_14(final ParticleType particleType) {
|
||||
super(19);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_19 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType floatType = add(2, Types.FLOAT);
|
||||
public final MetaType stringType = add(3, Types.STRING);
|
||||
public final MetaType componentType = add(4, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(5, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(6, Types.ITEM1_13_2);
|
||||
public final MetaType booleanType = add(7, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(8, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(9, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(10, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(11, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(12, Types.OPTIONAL_UUID);
|
||||
public final MetaType optionalBlockStateType = add(13, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(14, Types.NAMED_COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType villagerDatatType = add(16, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(17, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(18, Types.VAR_INT);
|
||||
public final MetaType catVariantType = add(19, Types.VAR_INT);
|
||||
public final MetaType frogVariantType = add(20, Types.VAR_INT);
|
||||
public final MetaType optionalGlobalPosition = add(21, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final MetaType paintingVariantType = add(22, Types.VAR_INT);
|
||||
|
||||
public MetaTypes1_19(final ParticleType particleType) {
|
||||
super(23);
|
||||
this.particleType = add(15, particleType);
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_19_3 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType longType = add(2, Types.VAR_LONG);
|
||||
public final MetaType floatType = add(3, Types.FLOAT);
|
||||
public final MetaType stringType = add(4, Types.STRING);
|
||||
public final MetaType componentType = add(5, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(6, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(7, Types.ITEM1_13_2);
|
||||
public final MetaType booleanType = add(8, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(12, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final MetaType optionalBlockStateType = add(14, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(15, Types.NAMED_COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType villagerDatatType = add(17, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(18, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(19, Types.VAR_INT);
|
||||
public final MetaType catVariantType = add(20, Types.VAR_INT);
|
||||
public final MetaType frogVariantType = add(21, Types.VAR_INT);
|
||||
public final MetaType optionalGlobalPosition = add(22, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final MetaType paintingVariantType = add(23, Types.VAR_INT);
|
||||
|
||||
public MetaTypes1_19_3(final ParticleType particleType) {
|
||||
super(24);
|
||||
this.particleType = add(16, particleType);
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_19_4 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType longType = add(2, Types.VAR_LONG);
|
||||
public final MetaType floatType = add(3, Types.FLOAT);
|
||||
public final MetaType stringType = add(4, Types.STRING);
|
||||
public final MetaType componentType = add(5, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(6, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(7, Types.ITEM1_13_2);
|
||||
public final MetaType booleanType = add(8, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(12, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final MetaType blockStateType = add(14, Types.VAR_INT);
|
||||
public final MetaType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(16, Types.NAMED_COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(20, Types.VAR_INT);
|
||||
public final MetaType catVariantType = add(21, Types.VAR_INT);
|
||||
public final MetaType frogVariantType = add(22, Types.VAR_INT);
|
||||
public final MetaType optionalGlobalPosition = add(23, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final MetaType paintingVariantType = add(24, Types.VAR_INT);
|
||||
public final MetaType snifferState = add(25, Types.VAR_INT);
|
||||
public final MetaType vector3FType = add(26, Types.VECTOR3F);
|
||||
public final MetaType quaternionType = add(27, Types.QUATERNION);
|
||||
|
||||
public MetaTypes1_19_4(final ParticleType particleType) {
|
||||
super(28);
|
||||
this.particleType = add(17, particleType);
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_20_2 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType longType = add(2, Types.VAR_LONG);
|
||||
public final MetaType floatType = add(3, Types.FLOAT);
|
||||
public final MetaType stringType = add(4, Types.STRING);
|
||||
public final MetaType componentType = add(5, Types.COMPONENT);
|
||||
public final MetaType optionalComponentType = add(6, Types.OPTIONAL_COMPONENT);
|
||||
public final MetaType itemType = add(7, Types.ITEM1_20_2);
|
||||
public final MetaType booleanType = add(8, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(12, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final MetaType blockStateType = add(14, Types.VAR_INT);
|
||||
public final MetaType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(16, Types.COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(20, Types.VAR_INT);
|
||||
public final MetaType catVariantType = add(21, Types.VAR_INT);
|
||||
public final MetaType frogVariantType = add(22, Types.VAR_INT);
|
||||
public final MetaType optionalGlobalPosition = add(23, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final MetaType paintingVariantType = add(24, Types.VAR_INT);
|
||||
public final MetaType snifferState = add(25, Types.VAR_INT);
|
||||
public final MetaType vector3FType = add(26, Types.VECTOR3F);
|
||||
public final MetaType quaternionType = add(27, Types.QUATERNION);
|
||||
|
||||
public MetaTypes1_20_2(final ParticleType particleType) {
|
||||
super(28);
|
||||
this.particleType = add(17, particleType);
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
|
||||
public final class MetaTypes1_20_3 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType longType = add(2, Types.VAR_LONG);
|
||||
public final MetaType floatType = add(3, Types.FLOAT);
|
||||
public final MetaType stringType = add(4, Types.STRING);
|
||||
public final MetaType componentType = add(5, Types.TAG);
|
||||
public final MetaType optionalComponentType = add(6, Types.OPTIONAL_TAG);
|
||||
public final MetaType itemType = add(7, Types.ITEM1_20_2);
|
||||
public final MetaType booleanType = add(8, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(12, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final MetaType blockStateType = add(14, Types.VAR_INT);
|
||||
public final MetaType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(16, Types.COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType villagerDatatType = add(18, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(19, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(20, Types.VAR_INT);
|
||||
public final MetaType catVariantType = add(21, Types.VAR_INT);
|
||||
public final MetaType frogVariantType = add(22, Types.VAR_INT);
|
||||
public final MetaType optionalGlobalPosition = add(23, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final MetaType paintingVariantType = add(24, Types.VAR_INT);
|
||||
public final MetaType snifferState = add(25, Types.VAR_INT);
|
||||
public final MetaType vector3FType = add(26, Types.VECTOR3F);
|
||||
public final MetaType quaternionType = add(27, Types.QUATERNION);
|
||||
|
||||
public MetaTypes1_20_3(final ParticleType particleType) {
|
||||
super(28);
|
||||
this.particleType = add(17, particleType);
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft.metadata.types;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.Particle;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_20_5;
|
||||
|
||||
public final class MetaTypes1_20_5 extends AbstractMetaTypes {
|
||||
|
||||
public final MetaType byteType = add(0, Types.BYTE);
|
||||
public final MetaType varIntType = add(1, Types.VAR_INT);
|
||||
public final MetaType longType = add(2, Types.VAR_LONG);
|
||||
public final MetaType floatType = add(3, Types.FLOAT);
|
||||
public final MetaType stringType = add(4, Types.STRING);
|
||||
public final MetaType componentType = add(5, Types.TAG);
|
||||
public final MetaType optionalComponentType = add(6, Types.OPTIONAL_TAG);
|
||||
public final MetaType itemType = add(7, Types1_20_5.ITEM);
|
||||
public final MetaType booleanType = add(8, Types.BOOLEAN);
|
||||
public final MetaType rotationsType = add(9, Types.ROTATIONS);
|
||||
public final MetaType blockPositionType = add(10, Types.BLOCK_POSITION1_14);
|
||||
public final MetaType optionalBlockPositionType = add(11, Types.OPTIONAL_POSITION_1_14);
|
||||
public final MetaType directionType = add(12, Types.VAR_INT);
|
||||
public final MetaType optionalUUIDType = add(13, Types.OPTIONAL_UUID);
|
||||
public final MetaType blockStateType = add(14, Types.VAR_INT);
|
||||
public final MetaType optionalBlockStateType = add(15, Types.VAR_INT);
|
||||
public final MetaType compoundTagType = add(16, Types.COMPOUND_TAG);
|
||||
public final MetaType particleType;
|
||||
public final MetaType particlesType;
|
||||
public final MetaType villagerDatatType = add(19, Types.VILLAGER_DATA);
|
||||
public final MetaType optionalVarIntType = add(20, Types.OPTIONAL_VAR_INT);
|
||||
public final MetaType poseType = add(21, Types.VAR_INT);
|
||||
public final MetaType catVariantType = add(22, Types.VAR_INT);
|
||||
public final MetaType wolfVariantType = add(23, Types.VAR_INT);
|
||||
public final MetaType frogVariantType = add(24, Types.VAR_INT);
|
||||
public final MetaType optionalGlobalPosition = add(25, Types.OPTIONAL_GLOBAL_POSITION);
|
||||
public final MetaType paintingVariantType = add(26, Types.VAR_INT);
|
||||
public final MetaType snifferState = add(27, Types.VAR_INT);
|
||||
public final MetaType armadilloState = add(28, Types.VAR_INT);
|
||||
public final MetaType vector3FType = add(29, Types.VECTOR3F);
|
||||
public final MetaType quaternionType = add(30, Types.QUATERNION);
|
||||
|
||||
public MetaTypes1_20_5(final ParticleType particleType, final ArrayType<Particle> particlesType) {
|
||||
super(31);
|
||||
this.particleType = add(17, particleType);
|
||||
this.particlesType = add(18, particlesType);
|
||||
}
|
||||
}
|
@ -24,7 +24,6 @@ package com.viaversion.viaversion.api.minecraft.signature;
|
||||
|
||||
import com.viaversion.viaversion.api.platform.providers.Provider;
|
||||
import com.viaversion.viaversion.util.Pair;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class SignableCommandArgumentsProvider implements Provider {
|
||||
|
@ -26,7 +26,6 @@ import com.viaversion.viaversion.api.minecraft.PlayerMessageSignature;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.DecoratableMessage;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.util.DataConsumer;
|
||||
import com.viaversion.viaversion.util.GsonUtil;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.minecraft.signature.model.chain.v1_19_1;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.signature.util.DataConsumer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class MessageHeader {
|
||||
|
@ -26,7 +26,6 @@ import com.google.common.primitives.Ints;
|
||||
import com.google.common.primitives.Longs;
|
||||
import com.viaversion.viaversion.api.minecraft.PlayerMessageSignature;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.util.DataConsumer;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Instant;
|
||||
|
||||
|
@ -24,7 +24,6 @@ package com.viaversion.viaversion.api.minecraft.signature.model.chain.v1_19_3;
|
||||
|
||||
import com.google.common.primitives.Ints;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.util.DataConsumer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class MessageLink {
|
||||
|
@ -25,7 +25,6 @@ package com.viaversion.viaversion.api.minecraft.signature.storage;
|
||||
import com.viaversion.viaversion.api.connection.StorableObject;
|
||||
import com.viaversion.viaversion.api.minecraft.ProfileKey;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.util.DataConsumer;
|
||||
|
||||
import java.security.PrivateKey;
|
||||
import java.security.Signature;
|
||||
import java.security.SignatureException;
|
||||
|
@ -26,7 +26,6 @@ import com.viaversion.viaversion.api.minecraft.ProfileKey;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.DecoratableMessage;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.MessageMetadata;
|
||||
import com.viaversion.viaversion.util.GsonUtil;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -28,7 +28,6 @@ import com.viaversion.viaversion.api.minecraft.signature.model.DecoratableMessag
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.MessageMetadata;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.chain.v1_19_1.MessageBody;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.chain.v1_19_1.MessageHeader;
|
||||
|
||||
import java.security.PrivateKey;
|
||||
import java.security.SignatureException;
|
||||
import java.util.UUID;
|
||||
|
@ -28,7 +28,6 @@ import com.viaversion.viaversion.api.minecraft.ProfileKey;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.MessageMetadata;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.chain.v1_19_3.MessageBody;
|
||||
import com.viaversion.viaversion.api.minecraft.signature.model.chain.v1_19_3.MessageLink;
|
||||
|
||||
import java.security.PrivateKey;
|
||||
import java.security.SignatureException;
|
||||
import java.util.UUID;
|
||||
|
@ -23,10 +23,8 @@
|
||||
package com.viaversion.viaversion.api.platform;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.ViaAPI;
|
||||
import com.viaversion.viaversion.api.command.ViaCommandSender;
|
||||
import com.viaversion.viaversion.api.configuration.ConfigurationProvider;
|
||||
import com.viaversion.viaversion.api.configuration.ViaVersionConfig;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import java.io.File;
|
||||
|
@ -31,7 +31,6 @@ import com.viaversion.viaversion.api.protocol.packet.ServerboundPacketType;
|
||||
import com.viaversion.viaversion.api.protocol.packet.VersionedPacketTransformer;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.api.protocol.version.ServerProtocolVersion;
|
||||
import com.viaversion.viaversion.api.protocol.version.VersionType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
@ -22,11 +22,10 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.protocol.packet.provider;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketType;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketType;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
final class PacketTypeArrayMap<P extends PacketType> implements PacketTypeMap<P> {
|
||||
|
@ -25,7 +25,7 @@ package com.viaversion.viaversion.api.rewriter;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.data.entity.EntityTracker;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.protocol.Protocol;
|
||||
import java.util.List;
|
||||
|
||||
@ -65,7 +65,7 @@ public interface EntityRewriter<T extends Protocol<?, ?, ?, ?>> extends Rewriter
|
||||
* @param metadataList full, mutable list of metadata
|
||||
* @param connection user connection
|
||||
*/
|
||||
void handleMetadata(int entityId, List<Metadata> metadataList, UserConnection connection);
|
||||
void handleEntityData(int entityId, List<EntityData> metadataList, UserConnection connection);
|
||||
|
||||
/**
|
||||
* Returns the entity tracker for the current protocol.
|
||||
|
@ -42,7 +42,7 @@ import com.viaversion.viaversion.api.minecraft.VillagerData;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.minecraft.item.data.Enchantments;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.ChunkPosition;
|
||||
import com.viaversion.viaversion.api.minecraft.ChunkPosition;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
import com.viaversion.viaversion.api.type.types.BitSetType;
|
||||
import com.viaversion.viaversion.api.type.types.BooleanType;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
|
@ -22,9 +22,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.BaseChunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
|
@ -22,8 +22,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk1_18;
|
||||
|
@ -22,8 +22,8 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.chunk;
|
||||
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.viaversion.api.minecraft.blockentity.BlockEntity;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk1_18;
|
||||
|
@ -33,7 +33,6 @@ import com.viaversion.viaversion.api.type.types.version.Types1_8;
|
||||
import com.viaversion.viaversion.util.ChunkUtil;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
@ -32,7 +32,6 @@ import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_9;
|
||||
import com.viaversion.viaversion.util.ChunkUtil;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.BitSet;
|
||||
import java.util.logging.Level;
|
||||
|
@ -33,7 +33,6 @@ import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_9;
|
||||
import com.viaversion.viaversion.util.ChunkUtil;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -20,27 +20,27 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class MetaListType extends MetaListTypeTemplate {
|
||||
private final Type<Metadata> type;
|
||||
public final class EntityDataListType extends EntityDataListTypeTemplate {
|
||||
private final Type<EntityData> type;
|
||||
|
||||
public MetaListType(Type<Metadata> type) {
|
||||
public EntityDataListType(Type<EntityData> type) {
|
||||
Preconditions.checkNotNull(type);
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Metadata> read(final ByteBuf buffer) {
|
||||
final List<Metadata> list = new ArrayList<>();
|
||||
Metadata meta;
|
||||
public List<EntityData> read(final ByteBuf buffer) {
|
||||
final List<EntityData> list = new ArrayList<>();
|
||||
EntityData meta;
|
||||
do {
|
||||
meta = this.type.read(buffer);
|
||||
if (meta != null) {
|
||||
@ -51,8 +51,8 @@ public final class MetaListType extends MetaListTypeTemplate {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(final ByteBuf buffer, final List<Metadata> object) {
|
||||
for (final Metadata metadata : object) {
|
||||
public void write(final ByteBuf buffer, final List<EntityData> object) {
|
||||
for (final EntityData metadata : object) {
|
||||
this.type.write(buffer, metadata);
|
||||
}
|
||||
this.type.write(buffer, null);
|
@ -20,20 +20,20 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class MetaListTypeTemplate extends Type<List<Metadata>> {
|
||||
public abstract class EntityDataListTypeTemplate extends Type<List<EntityData>> {
|
||||
|
||||
protected MetaListTypeTemplate() {
|
||||
super("MetaData List", List.class);
|
||||
protected EntityDataListTypeTemplate() {
|
||||
super("Entity data list", List.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Type> getBaseClass() {
|
||||
return MetaListTypeTemplate.class;
|
||||
return EntityDataListTypeTemplate.class;
|
||||
}
|
||||
}
|
@ -20,22 +20,20 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.ModernMetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes;
|
||||
|
||||
public final class MetadataType extends ModernMetaType {
|
||||
public final class EntityDataType extends ModernEntityDataType {
|
||||
|
||||
private final MetaTypes metaTypes;
|
||||
private final EntityDataTypes metaTypes;
|
||||
|
||||
public MetadataType(final MetaTypes metaTypes) {
|
||||
public EntityDataType(final EntityDataTypes metaTypes) {
|
||||
this.metaTypes = metaTypes;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MetaType getType(final int index) {
|
||||
protected com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType getType(final int index) {
|
||||
return metaTypes.byId(index);
|
||||
}
|
||||
}
|
@ -20,16 +20,14 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_12;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_8;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.OldMetaType;
|
||||
|
||||
public class MetadataType1_8 extends OldMetaType {
|
||||
public class EntityDataType1_12 extends ModernEntityDataType {
|
||||
@Override
|
||||
protected MetaType getType(int index) {
|
||||
return MetaType1_8.byId(index);
|
||||
protected EntityDataType getType(final int index) {
|
||||
return EntityDataTypes1_12.byId(index);
|
||||
}
|
||||
}
|
@ -20,7 +20,15 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.minecraft;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
public record Position3d(double x, double y, double z) {
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_8;
|
||||
|
||||
public class EntityDataType1_8 extends OldEntityDataType {
|
||||
@Override
|
||||
protected EntityDataType getType(int index) {
|
||||
return EntityDataTypes1_8.byId(index);
|
||||
}
|
||||
}
|
@ -20,15 +20,14 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_9;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.ModernMetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_9;
|
||||
|
||||
public class MetadataType1_9 extends ModernMetaType {
|
||||
public class EntityDataType1_9 extends ModernEntityDataType {
|
||||
@Override
|
||||
protected MetaType getType(final int index) {
|
||||
return MetaType1_9.byId(index);
|
||||
protected EntityDataType getType(final int index) {
|
||||
return EntityDataTypes1_9.byId(index);
|
||||
}
|
||||
}
|
@ -20,18 +20,18 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
|
||||
public abstract class MetaTypeTemplate extends Type<Metadata> {
|
||||
protected MetaTypeTemplate() {
|
||||
super("Metadata type", Metadata.class);
|
||||
public abstract class EntityDataTypeTemplate extends Type<EntityData> {
|
||||
protected EntityDataTypeTemplate() {
|
||||
super("Entity data type", EntityData.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Type> getBaseClass() {
|
||||
return MetaTypeTemplate.class;
|
||||
return EntityDataTypeTemplate.class;
|
||||
}
|
||||
}
|
@ -20,33 +20,33 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public abstract class ModernMetaType extends MetaTypeTemplate {
|
||||
public abstract class ModernEntityDataType extends EntityDataTypeTemplate {
|
||||
private static final int END = 255;
|
||||
|
||||
@Override
|
||||
public Metadata read(final ByteBuf buffer) {
|
||||
public EntityData read(final ByteBuf buffer) {
|
||||
final short index = buffer.readUnsignedByte();
|
||||
if (index == END) return null; // End of metadata
|
||||
final MetaType type = this.getType(Types.VAR_INT.readPrimitive(buffer));
|
||||
return new Metadata(index, type, type.type().read(buffer));
|
||||
final EntityDataType type = this.getType(Types.VAR_INT.readPrimitive(buffer));
|
||||
return new EntityData(index, type, type.type().read(buffer));
|
||||
}
|
||||
|
||||
protected abstract MetaType getType(final int index);
|
||||
protected abstract EntityDataType getType(final int index);
|
||||
|
||||
@Override
|
||||
public void write(final ByteBuf buffer, final Metadata object) {
|
||||
public void write(final ByteBuf buffer, final EntityData object) {
|
||||
if (object == null) {
|
||||
buffer.writeByte(END);
|
||||
} else {
|
||||
buffer.writeByte(object.id());
|
||||
final MetaType type = object.metaType();
|
||||
final EntityDataType type = object.dataType();
|
||||
Types.VAR_INT.writePrimitive(buffer, type.typeId());
|
||||
type.type().write(buffer, object.getValue());
|
||||
}
|
@ -20,34 +20,33 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
package com.viaversion.viaversion.api.type.types.entitydata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaTypeTemplate;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityDataType;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public abstract class OldMetaType extends MetaTypeTemplate {
|
||||
public abstract class OldEntityDataType extends EntityDataTypeTemplate {
|
||||
private static final int END = 127;
|
||||
|
||||
@Override
|
||||
public Metadata read(final ByteBuf buffer) {
|
||||
public EntityData read(final ByteBuf buffer) {
|
||||
final byte index = buffer.readByte();
|
||||
if (index == END) return null; // End of metadata
|
||||
final MetaType type = this.getType((index & 224) >> 5);
|
||||
return new Metadata(index & 31, type, type.type().read(buffer));
|
||||
final EntityDataType type = this.getType((index & 224) >> 5);
|
||||
return new EntityData(index & 31, type, type.type().read(buffer));
|
||||
}
|
||||
|
||||
protected abstract MetaType getType(final int index);
|
||||
protected abstract EntityDataType getType(final int index);
|
||||
|
||||
@Override
|
||||
public void write(final ByteBuf buffer, final Metadata object) {
|
||||
public void write(final ByteBuf buffer, final EntityData object) {
|
||||
if (object == null) {
|
||||
buffer.writeByte(END);
|
||||
} else {
|
||||
final int index = (object.metaType().typeId() << 5 | object.id() & 31) & 255;
|
||||
final int index = (object.dataType().typeId() << 5 | object.id() & 31) & 255;
|
||||
buffer.writeByte(index);
|
||||
object.metaType().type().write(buffer, object.getValue());
|
||||
object.dataType().type().write(buffer, object.getValue());
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.item;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.item;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.item;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.math;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.ChunkPosition;
|
||||
import com.viaversion.viaversion.api.minecraft.ChunkPosition;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
|
||||
* Copyright (C) 2016-2024 ViaVersion and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.metadata;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.MetaType;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_12;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.ModernMetaType;
|
||||
|
||||
public class MetadataType1_12 extends ModernMetaType {
|
||||
@Override
|
||||
protected MetaType getType(final int index) {
|
||||
return MetaType1_12.byId(index);
|
||||
}
|
||||
}
|
@ -22,9 +22,9 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.misc;
|
||||
|
||||
import com.viaversion.nbt.limiter.TagLimiter;
|
||||
import com.viaversion.nbt.tag.CompoundTag;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.nbt.limiter.TagLimiter;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
|
@ -23,7 +23,6 @@
|
||||
package com.viaversion.viaversion.api.type.types.misc;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.SoundEvent;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
|
@ -23,8 +23,8 @@
|
||||
package com.viaversion.viaversion.api.type.types.misc;
|
||||
|
||||
import com.viaversion.nbt.io.TagRegistry;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.nbt.limiter.TagLimiter;
|
||||
import com.viaversion.nbt.tag.Tag;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
|
@ -22,10 +22,10 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType1_12;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType1_12;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_12 {
|
||||
@ -33,9 +33,9 @@ public final class Types1_12 {
|
||||
/**
|
||||
* Metadata type for 1.12
|
||||
*/
|
||||
public static final Type<Metadata> METADATA = new MetadataType1_12();
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType1_12();
|
||||
/**
|
||||
* Metadata list type for 1.12
|
||||
*/
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -23,12 +23,12 @@
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_13;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_13;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkSectionType1_13;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
@ -36,7 +36,7 @@ public final class Types1_13 {
|
||||
|
||||
public static final Type<ChunkSection> CHUNK_SECTION = new ChunkSectionType1_13();
|
||||
public static final ParticleType PARTICLE = new ParticleType();
|
||||
public static final MetaTypes1_13 META_TYPES = new MetaTypes1_13(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_13 ENTITY_DATA_TYPES = new EntityDataTypes1_13(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_13_2;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_13_2;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_13_2 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType();
|
||||
public static final MetaTypes1_13_2 META_TYPES = new MetaTypes1_13_2(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_13_2 ENTITY_DATA_TYPES = new EntityDataTypes1_13_2(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_14;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_14;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_14 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType();
|
||||
public static final MetaTypes1_14 META_TYPES = new MetaTypes1_14(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_14 ENTITY_DATA_TYPES = new EntityDataTypes1_14(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -23,12 +23,12 @@
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_14;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_14;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkSectionType1_16;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
@ -36,7 +36,7 @@ public final class Types1_16 {
|
||||
|
||||
public static final Type<ChunkSection> CHUNK_SECTION = new ChunkSectionType1_16();
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_14 META_TYPES = new MetaTypes1_14(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_14 ENTITY_DATA_TYPES = new EntityDataTypes1_14(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_14;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_14;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_17 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_14 META_TYPES = new MetaTypes1_14(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_14 ENTITY_DATA_TYPES = new EntityDataTypes1_14(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_14;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_14;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_18 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_14 META_TYPES = new MetaTypes1_14(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_14 ENTITY_DATA_TYPES = new EntityDataTypes1_14(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_19;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_19;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_19 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_19 META_TYPES = new MetaTypes1_19(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_19 ENTITY_DATA_TYPES = new EntityDataTypes1_19(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_19_3;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_19_3;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_19_3 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_19_3 META_TYPES = new MetaTypes1_19_3(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_19_3 ENTITY_DATA_TYPES = new EntityDataTypes1_19_3(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_19_4;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_19_4;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_19_4 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_19_4 META_TYPES = new MetaTypes1_19_4(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_19_4 ENTITY_DATA_TYPES = new EntityDataTypes1_19_4(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_19_4;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_19_4;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_20 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_19_4 META_TYPES = new MetaTypes1_19_4(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_19_4 ENTITY_DATA_TYPES = new EntityDataTypes1_19_4(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_20_2;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_20_2;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_20_2 {
|
||||
|
||||
public static final ParticleType PARTICLE = Types1_20.PARTICLE; // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_20_2 META_TYPES = new MetaTypes1_20_2(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_20_2 ENTITY_DATA_TYPES = new EntityDataTypes1_20_2(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -22,18 +22,18 @@
|
||||
*/
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_20_3;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_20_3;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_20_3 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType(); // Only safe to use after protocol loading
|
||||
public static final MetaTypes1_20_3 META_TYPES = new MetaTypes1_20_3(PARTICLE);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_20_3 ENTITY_DATA_TYPES = new EntityDataTypes1_20_3(PARTICLE);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -25,15 +25,15 @@ package com.viaversion.viaversion.api.type.types.version;
|
||||
import com.viaversion.viaversion.api.minecraft.Particle;
|
||||
import com.viaversion.viaversion.api.minecraft.data.StructuredData;
|
||||
import com.viaversion.viaversion.api.minecraft.item.Item;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.types.MetaTypes1_20_5;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.types.EntityDataTypes1_20_5;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.ArrayType;
|
||||
import com.viaversion.viaversion.api.type.types.item.ItemCostType1_20_5;
|
||||
import com.viaversion.viaversion.api.type.types.item.ItemType1_20_5;
|
||||
import com.viaversion.viaversion.api.type.types.item.StructuredDataType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType;
|
||||
import com.viaversion.viaversion.api.type.types.misc.ParticleType;
|
||||
import java.util.List;
|
||||
|
||||
@ -49,7 +49,7 @@ public final class Types1_20_5 {
|
||||
|
||||
public static final ParticleType PARTICLE = new ParticleType();
|
||||
public static final ArrayType<Particle> PARTICLES = new ArrayType<>(PARTICLE);
|
||||
public static final MetaTypes1_20_5 META_TYPES = new MetaTypes1_20_5(PARTICLE, PARTICLES);
|
||||
public static final Type<Metadata> METADATA = new MetadataType(META_TYPES);
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final EntityDataTypes1_20_5 ENTITY_DATA_TYPES = new EntityDataTypes1_20_5(PARTICLE, PARTICLES);
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType(ENTITY_DATA_TYPES);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
}
|
||||
|
@ -23,11 +23,11 @@
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkSectionType1_8;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType1_8;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType1_8;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_8 {
|
||||
@ -35,11 +35,11 @@ public final class Types1_8 {
|
||||
/**
|
||||
* Metadata type for 1.8
|
||||
*/
|
||||
public static final Type<Metadata> METADATA = new MetadataType1_8();
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType1_8();
|
||||
/**
|
||||
* Metadata list type for 1.8
|
||||
*/
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
|
||||
public static final Type<ChunkSection> CHUNK_SECTION = new ChunkSectionType1_8();
|
||||
}
|
||||
|
@ -23,22 +23,22 @@
|
||||
package com.viaversion.viaversion.api.type.types.version;
|
||||
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.ChunkSection;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkSectionType1_9;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetaListType;
|
||||
import com.viaversion.viaversion.api.type.types.metadata.MetadataType1_9;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataListType;
|
||||
import com.viaversion.viaversion.api.type.types.entitydata.EntityDataType1_9;
|
||||
import java.util.List;
|
||||
|
||||
public final class Types1_9 {
|
||||
/**
|
||||
* Metadata type for 1.9
|
||||
*/
|
||||
public static final Type<Metadata> METADATA = new MetadataType1_9();
|
||||
public static final Type<EntityData> ENTITY_DATA = new EntityDataType1_9();
|
||||
/**
|
||||
* Metadata list type for 1.9
|
||||
*/
|
||||
public static final Type<List<Metadata>> METADATA_LIST = new MetaListType(METADATA);
|
||||
public static final Type<List<EntityData>> ENTITY_DATA_LIST = new EntityDataListType(ENTITY_DATA);
|
||||
|
||||
public static final Type<ChunkSection> CHUNK_SECTION = new ChunkSectionType1_9();
|
||||
}
|
||||
|
@ -19,11 +19,10 @@ package com.viaversion.viaversion.bukkit.listeners.protocol1_9to1_8;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
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.data.ArmorTypes1_8;
|
||||
import com.viaversion.viaversion.protocols.v1_8to1_9.packet.ClientboundPackets1_9;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -20,19 +20,18 @@ package com.viaversion.viaversion.bukkit.listeners.protocol1_9to1_8;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
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.util.ComponentUtil;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class DeathListener extends ViaBukkitListener {
|
||||
|
||||
|
@ -18,16 +18,16 @@
|
||||
package com.viaversion.viaversion.bukkit.util;
|
||||
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.AbstractList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
public class CollisionChecker {
|
||||
private static final CollisionChecker INSTANCE;
|
||||
|
||||
static {
|
||||
CollisionChecker instance = null;
|
||||
try {
|
||||
|
@ -18,17 +18,14 @@
|
||||
package com.viaversion.viaversion.bukkit.listeners.protocol1_15to1_14_4;
|
||||
|
||||
import com.viaversion.viaversion.ViaVersionPlugin;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.minecraft.metadata.Metadata;
|
||||
import com.viaversion.viaversion.api.minecraft.entitydata.EntityData;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_14;
|
||||
import com.viaversion.viaversion.bukkit.listeners.ViaBukkitListener;
|
||||
import com.viaversion.viaversion.protocols.v1_14_4to1_15.Protocol1_14_4To1_15;
|
||||
import com.viaversion.viaversion.protocols.v1_14_4to1_15.packet.ClientboundPackets1_15;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -82,7 +79,7 @@ public class EntityToggleGlideListener extends ViaBukkitListener {
|
||||
}
|
||||
|
||||
// leave 0x80 as 0 to stop gliding
|
||||
packet.write(Types1_14.METADATA_LIST, Arrays.asList(new Metadata(0, Types1_14.META_TYPES.byteType, bitmask)));
|
||||
packet.write(Types1_14.ENTITY_DATA_LIST, Arrays.asList(new EntityData(0, Types1_14.ENTITY_DATA_TYPES.byteType, bitmask)));
|
||||
packet.scheduleSend(Protocol1_14_4To1_15.class);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ package com.viaversion.viaversion.bukkit.platform;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.platform.PlatformTask;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
public record BukkitViaTask(BukkitTask task) implements PlatformTask<BukkitTask> {
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user