Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-04 23:30:17 +01:00
Update MCPL and MCAuthLib (#4645)
* Update MCPL and MCAuthLib * Bump MCPL
Dieser Commit ist enthalten in:
Ursprung
8addcadb71
Commit
0a261f1d9d
@ -25,11 +25,11 @@
|
||||
|
||||
package org.geysermc.geyser.inventory.item;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
|
||||
import lombok.Getter;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.PotionContents;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
|
||||
@Getter
|
||||
@ -88,7 +88,7 @@ public enum Potion {
|
||||
}
|
||||
|
||||
public PotionContents toComponent() {
|
||||
return new PotionContents(this.ordinal(), -1, Int2ObjectMaps.emptyMap());
|
||||
return new PotionContents(this.ordinal(), -1, Collections.emptyList());
|
||||
}
|
||||
|
||||
public static @Nullable Potion getByJavaId(int javaId) {
|
||||
|
@ -95,8 +95,11 @@ public enum TippedArrowPotion {
|
||||
this.javaColor = arrowParticleColor.getColor();
|
||||
}
|
||||
|
||||
public static TippedArrowPotion of(int id) {
|
||||
return VALUES[id];
|
||||
public static @Nullable TippedArrowPotion of(int id) {
|
||||
if (id >= 0 && id < VALUES.length) {
|
||||
return VALUES[id];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static @Nullable TippedArrowPotion getByBedrockId(int bedrockId) {
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
package org.geysermc.geyser.item.type;
|
||||
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.cloudburstmc.protocol.bedrock.data.inventory.ItemData;
|
||||
import org.geysermc.geyser.inventory.GeyserItemStack;
|
||||
@ -36,6 +35,8 @@ import org.geysermc.geyser.registry.type.ItemMappings;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType;
|
||||
import org.geysermc.mcprotocollib.protocol.data.game.item.component.PotionContents;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
public class ArrowItem extends Item {
|
||||
public ArrowItem(String javaIdentifier, Builder builder) {
|
||||
super(javaIdentifier, builder);
|
||||
@ -47,7 +48,7 @@ public class ArrowItem extends Item {
|
||||
GeyserItemStack itemStack = super.translateToJava(itemData, mapping, mappings);
|
||||
if (tippedArrowPotion != null) {
|
||||
itemStack = Items.TIPPED_ARROW.newItemStack(itemStack.getAmount(), itemStack.getComponents());
|
||||
PotionContents contents = new PotionContents(tippedArrowPotion.ordinal(), -1, Int2ObjectMaps.emptyMap());
|
||||
PotionContents contents = new PotionContents(tippedArrowPotion.ordinal(), -1, Collections.emptyList());
|
||||
itemStack.getOrCreateComponents().put(DataComponentType.POTION_CONTENTS, contents);
|
||||
}
|
||||
return itemStack;
|
||||
|
@ -14,8 +14,8 @@ protocol = "3.0.0.Beta1-20240411.165033-129"
|
||||
protocol-connection = "3.0.0.Beta1-20240411.165033-128"
|
||||
raknet = "1.0.0.CR3-20240416.144209-1"
|
||||
blockstateupdater="1.20.80-20240411.142413-1"
|
||||
mcauthlib = "d9d773e"
|
||||
mcprotocollib = "1234962" # Revert from jitpack after release
|
||||
mcauthlib = "e5b0bcc"
|
||||
mcprotocollib = "42ea4a4" # Revert from jitpack after release
|
||||
adventure = "4.14.0"
|
||||
adventure-platform = "4.3.0"
|
||||
junit = "5.9.2"
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren