Skip to content

Commit 64c7adc

Browse files
committed
Fix: Geyser-Spigot not loading on 1.16.5, remove unused code
1 parent a5c77a7 commit 64c7adc

File tree

4 files changed

+17
-34
lines changed

4 files changed

+17
-34
lines changed

core/src/main/java/org/geysermc/geyser/entity/type/BoatEntity.java

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
import org.cloudburstmc.protocol.bedrock.packet.MoveEntityAbsolutePacket;
3333
import org.geysermc.geyser.entity.EntityDefinition;
3434
import org.geysermc.geyser.entity.EntityDefinitions;
35-
import org.geysermc.geyser.item.Items;
36-
import org.geysermc.geyser.item.type.Item;
3735
import org.geysermc.geyser.network.GameProtocol;
3836
import org.geysermc.geyser.session.GeyserSession;
3937
import org.geysermc.geyser.util.InteractionResult;
@@ -220,10 +218,6 @@ public long leashHolderBedrockId() {
220218
return leashHolderBedrockId;
221219
}
222220

223-
public Item getPickItem() {
224-
return variant.pickItem;
225-
}
226-
227221
private void sendAnimationPacket(GeyserSession session, Entity rower, AnimatePacket.Action action, float rowTime) {
228222
AnimatePacket packet = new AnimatePacket();
229223
packet.setRuntimeEntityId(rower.getGeyserId());
@@ -236,23 +230,17 @@ private void sendAnimationPacket(GeyserSession session, Entity rower, AnimatePac
236230
* Ordered by Bedrock ordinal
237231
*/
238232
public enum BoatVariant {
239-
OAK(Items.OAK_BOAT, Items.OAK_CHEST_BOAT),
240-
SPRUCE(Items.SPRUCE_BOAT, Items.SPRUCE_CHEST_BOAT),
241-
BIRCH(Items.BIRCH_BOAT, Items.BIRCH_CHEST_BOAT),
242-
JUNGLE(Items.JUNGLE_BOAT, Items.JUNGLE_CHEST_BOAT),
243-
ACACIA(Items.ACACIA_BOAT, Items.ACACIA_CHEST_BOAT),
244-
DARK_OAK(Items.DARK_OAK_BOAT, Items.DARK_OAK_CHEST_BOAT),
245-
MANGROVE(Items.MANGROVE_BOAT, Items.MANGROVE_CHEST_BOAT),
246-
BAMBOO(Items.BAMBOO_RAFT, Items.BAMBOO_CHEST_RAFT),
247-
CHERRY(Items.CHERRY_BOAT, Items.CHERRY_CHEST_BOAT),
248-
PALE_OAK(Items.PALE_OAK_BOAT, Items.PALE_OAK_CHEST_BOAT);
249-
250-
private final Item pickItem;
251-
final Item chestPickItem;
252-
253-
BoatVariant(Item pickItem, Item chestPickItem) {
254-
this.pickItem = pickItem;
255-
this.chestPickItem = chestPickItem;
256-
}
233+
OAK,
234+
SPRUCE,
235+
BIRCH,
236+
JUNGLE,
237+
ACACIA,
238+
DARK_OAK,
239+
MANGROVE,
240+
BAMBOO,
241+
CHERRY,
242+
PALE_OAK;
243+
244+
BoatVariant() {}
257245
}
258246
}

core/src/main/java/org/geysermc/geyser/entity/type/ChestBoatEntity.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
import org.cloudburstmc.math.vector.Vector3f;
2929
import org.geysermc.geyser.entity.EntityDefinition;
30-
import org.geysermc.geyser.item.type.Item;
3130
import org.geysermc.geyser.session.GeyserSession;
3231
import org.geysermc.geyser.util.InteractionResult;
3332
import org.geysermc.geyser.util.InteractiveTag;
@@ -49,9 +48,4 @@ protected InteractiveTag testInteraction(Hand hand) {
4948
public InteractionResult interact(Hand hand) {
5049
return passengers.isEmpty() && !session.isSneaking() ? super.interact(hand) : InteractionResult.SUCCESS;
5150
}
52-
53-
@Override
54-
public Item getPickItem() {
55-
return this.variant.chestPickItem;
56-
}
5751
}

core/src/main/java/org/geysermc/geyser/registry/populator/DataComponentRegistryPopulator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public static void populate() {
5555
GeyserBootstrap bootstrap = GeyserImpl.getInstance().getBootstrap();
5656
List<DataComponents> defaultComponents;
5757
try (InputStream stream = bootstrap.getResourceOrThrow("java/item_data_components.json")) {
58-
JsonElement rootElement = JsonParser.parseReader(new InputStreamReader(stream));
58+
//noinspection deprecation - 1.16.5 breaks otherwise
59+
JsonElement rootElement = new JsonParser().parse(new InputStreamReader(stream));
5960
JsonArray jsonArray = rootElement.getAsJsonArray();
6061

6162
defaultComponents = new ObjectArrayList<>(jsonArray.size());

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ netty-io-uring = "0.0.25.Final-SNAPSHOT"
1010
guava = "29.0-jre"
1111
gson = "2.3.1" # Provided by Spigot 1.8.8
1212
websocket = "1.5.1"
13-
protocol-connection = "3.0.0.Beta5-20241203.200249-19"
14-
protocol-common = "3.0.0.Beta5-20241203.200249-19"
15-
protocol-codec = "3.0.0.Beta5-20241203.200249-19"
13+
protocol-connection = "3.0.0.Beta5-20241213.160944-20"
14+
protocol-common = "3.0.0.Beta5-20241213.160944-20"
15+
protocol-codec = "3.0.0.Beta5-20241213.160944-20"
1616
raknet = "1.0.0.CR3-20240416.144209-1"
1717
minecraftauth = "4.1.1"
1818
mcprotocollib = "1.21.4-SNAPSHOT"

0 commit comments

Comments
 (0)