Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanwer committed Dec 17, 2024
2 parents 94d4a68 + 64c7adc commit 951b7f5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 34 deletions.
36 changes: 12 additions & 24 deletions core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import org.cloudburstmc.protocol.bedrock.packet.MoveEntityAbsolutePacket;
import org.geysermc.geyser.entity.EntityDefinition;
import org.geysermc.geyser.entity.EntityDefinitions;
import org.geysermc.geyser.item.Items;
import org.geysermc.geyser.item.type.Item;
import org.geysermc.geyser.network.GameProtocol;
import org.geysermc.geyser.session.GeyserSession;
import org.geysermc.geyser.util.InteractionResult;
Expand Down Expand Up @@ -220,10 +218,6 @@ public long leashHolderBedrockId() {
return leashHolderBedrockId;
}

public Item getPickItem() {
return variant.pickItem;
}

private void sendAnimationPacket(GeyserSession session, Entity rower, AnimatePacket.Action action, float rowTime) {
AnimatePacket packet = new AnimatePacket();
packet.setRuntimeEntityId(rower.getGeyserId());
Expand All @@ -236,23 +230,17 @@ private void sendAnimationPacket(GeyserSession session, Entity rower, AnimatePac
* Ordered by Bedrock ordinal
*/
public enum BoatVariant {
OAK(Items.OAK_BOAT, Items.OAK_CHEST_BOAT),
SPRUCE(Items.SPRUCE_BOAT, Items.SPRUCE_CHEST_BOAT),
BIRCH(Items.BIRCH_BOAT, Items.BIRCH_CHEST_BOAT),
JUNGLE(Items.JUNGLE_BOAT, Items.JUNGLE_CHEST_BOAT),
ACACIA(Items.ACACIA_BOAT, Items.ACACIA_CHEST_BOAT),
DARK_OAK(Items.DARK_OAK_BOAT, Items.DARK_OAK_CHEST_BOAT),
MANGROVE(Items.MANGROVE_BOAT, Items.MANGROVE_CHEST_BOAT),
BAMBOO(Items.BAMBOO_RAFT, Items.BAMBOO_CHEST_RAFT),
CHERRY(Items.CHERRY_BOAT, Items.CHERRY_CHEST_BOAT),
PALE_OAK(Items.PALE_OAK_BOAT, Items.PALE_OAK_CHEST_BOAT);

private final Item pickItem;
final Item chestPickItem;

BoatVariant(Item pickItem, Item chestPickItem) {
this.pickItem = pickItem;
this.chestPickItem = chestPickItem;
}
OAK,
SPRUCE,
BIRCH,
JUNGLE,
ACACIA,
DARK_OAK,
MANGROVE,
BAMBOO,
CHERRY,
PALE_OAK;

BoatVariant() {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

import org.cloudburstmc.math.vector.Vector3f;
import org.geysermc.geyser.entity.EntityDefinition;
import org.geysermc.geyser.item.type.Item;
import org.geysermc.geyser.session.GeyserSession;
import org.geysermc.geyser.util.InteractionResult;
import org.geysermc.geyser.util.InteractiveTag;
Expand All @@ -49,9 +48,4 @@ protected InteractiveTag testInteraction(Hand hand) {
public InteractionResult interact(Hand hand) {
return passengers.isEmpty() && !session.isSneaking() ? super.interact(hand) : InteractionResult.SUCCESS;
}

@Override
public Item getPickItem() {
return this.variant.chestPickItem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public static void populate() {
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
List<DataComponents> defaultComponents;
try (InputStream stream = bootstrap.getResourceOrThrow("java/item_data_components.json")) {
JsonElement rootElement = JsonParser.parseReader(new InputStreamReader(stream));
//noinspection deprecation - 1.16.5 breaks otherwise
JsonElement rootElement = new JsonParser().parse(new InputStreamReader(stream));
JsonArray jsonArray = rootElement.getAsJsonArray();

defaultComponents = new ObjectArrayList<>(jsonArray.size());
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ netty-io-uring = "0.0.25.Final-SNAPSHOT"
guava = "29.0-jre"
gson = "2.3.1" # Provided by Spigot 1.8.8
websocket = "1.5.1"
protocol-connection = "3.0.0.Beta5-20241203.200249-19"
protocol-common = "3.0.0.Beta5-20241203.200249-19"
protocol-codec = "3.0.0.Beta5-20241203.200249-19"
protocol-connection = "3.0.0.Beta5-20241213.160944-20"
protocol-common = "3.0.0.Beta5-20241213.160944-20"
protocol-codec = "3.0.0.Beta5-20241213.160944-20"
raknet = "1.0.0.CR3-20240416.144209-1"
mcauthlib = "e5b0bcc"
minecraftauth = "4.1.1"
Expand Down

0 comments on commit 951b7f5

Please sign in to comment.