3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00
Dieser Commit ist enthalten in:
KennyTV 2021-06-04 15:42:25 +02:00
Ursprung 2b8c5082ed
Commit 8e7606ea1b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
4 geänderte Dateien mit 44 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -52,7 +52,7 @@ public interface ViaAPI<T> {
* @return API version incremented with meaningful API changes * @return API version incremented with meaningful API changes
*/ */
default int apiVersion() { default int apiVersion() {
return 2; return 3;
} }
/** /**

Datei anzeigen

@ -27,23 +27,64 @@ import org.checkerframework.checker.nullness.qual.Nullable;
public interface Item { public interface Item {
/**
* Returns the item identifier.
*
* @return item identifier
*/
int identifier(); int identifier();
/**
* Sets the item identifier.
*
* @param identifier item identifier
*/
void setIdentifier(int identifier); void setIdentifier(int identifier);
/**
* Returns the item amount.
*
* @return item amount
*/
int amount(); int amount();
/**
* Returns the item amount.
*
* @param amount item amount
*/
void setAmount(int amount); void setAmount(int amount);
/**
* Returns the item data. Always 0 for 1.13+ items.
*
* @return item data
*/
default short data() { default short data() {
return 0; return 0;
} }
/**
* Sets the item data used in versions before 1.13.
*
* @param data item data
* @throws UnsupportedOperationException if the item implementation does not store data
*/
default void setData(short data) { default void setData(short data) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
/**
* Returns the item compound tag if present.
*
* @return item tag
*/
@Nullable CompoundTag tag(); @Nullable CompoundTag tag();
/**
* Sets the item compound tag.
*
* @param tag item tag
*/
void setTag(@Nullable CompoundTag tag); void setTag(@Nullable CompoundTag tag);
} }

Datei anzeigen

@ -76,7 +76,7 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_16_2 = register(751, "1.16.2"); public static final ProtocolVersion v1_16_2 = register(751, "1.16.2");
public static final ProtocolVersion v1_16_3 = register(753, "1.16.3"); public static final ProtocolVersion v1_16_3 = register(753, "1.16.3");
public static final ProtocolVersion v1_16_4 = register(754, "1.16.4/5", new VersionRange("1.16", 4, 5)); public static final ProtocolVersion v1_16_4 = register(754, "1.16.4/5", new VersionRange("1.16", 4, 5));
public static final ProtocolVersion v1_17 = register(755, 33, "1.17"); public static final ProtocolVersion v1_17 = register(755, 34, "1.17");
public static final ProtocolVersion unknown = register(-1, "UNKNOWN"); public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
public static ProtocolVersion register(int version, String name) { public static ProtocolVersion register(int version, String name) {

Datei anzeigen

@ -1,5 +1,5 @@
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts # Project properties - we put these here so they can be modified without causing a recompile of the build scripts
projectVersion=4.0.0-1.17-pre5-SNAPSHOT projectVersion=4.0.0-1.17-rc1-SNAPSHOT
# Gradle properties # Gradle properties
org.gradle.daemon=true org.gradle.daemon=true