Skip to content

Commit 54bd8fb

Browse files
committed
25w46a
1 parent 22c0ddc commit 54bd8fb

File tree

12 files changed

+213
-29
lines changed

12 files changed

+213
-29
lines changed

api/src/main/java/com/viaversion/viaversion/api/minecraft/item/data/UseEffects.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,30 @@
2727
import com.viaversion.viaversion.api.type.Types;
2828
import io.netty.buffer.ByteBuf;
2929

30-
public record UseEffects(boolean canSprint, float speedMultiplier) {
30+
public record UseEffects(boolean canSprint, boolean interactVibrations, float speedMultiplier) {
3131

3232
public static final Type<UseEffects> TYPE = new Type<>(UseEffects.class) {
3333

3434
@Override
3535
public UseEffects read(final ByteBuf buffer) {
3636
final boolean canSprint = Types.BOOLEAN.read(buffer);
37+
final boolean interactVibrations = Types.BOOLEAN.read(buffer);
3738
final float speedMultiplier = Types.FLOAT.readPrimitive(buffer);
38-
return new UseEffects(canSprint, speedMultiplier);
39+
return new UseEffects(canSprint, interactVibrations, speedMultiplier);
3940
}
4041

4142
@Override
4243
public void write(final ByteBuf buffer, final UseEffects value) {
4344
Types.BOOLEAN.write(buffer, value.canSprint());
45+
Types.BOOLEAN.write(buffer, value.interactVibrations());
4446
Types.FLOAT.writePrimitive(buffer, value.speedMultiplier());
4547
}
4648

4749
@Override
4850
public void write(final Ops ops, final UseEffects value) {
4951
ops.writeMap(map -> map
5052
.writeOptional("can_sprint", Types.BOOLEAN, value.canSprint, false)
53+
.writeOptional("interact_vibrations", Types.BOOLEAN, value.interactVibrations, true)
5154
.writeOptional("speed_multiplier", Types.FLOAT, value.speedMultiplier, 0.2F));
5255
}
5356
};

api/src/main/java/com/viaversion/viaversion/api/platform/ViaPlatform.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import com.viaversion.viaversion.api.connection.UserConnection;
2929
import java.io.File;
3030
import java.util.Collection;
31-
import java.util.Collections;
31+
import java.util.List;
3232
import java.util.logging.Logger;
3333

3434
/**
@@ -195,7 +195,7 @@ default JsonObject getDump() {
195195
* @return immutable collection of unsupported software to be checked
196196
*/
197197
default Collection<UnsupportedSoftware> getUnsupportedSoftwareClasses() {
198-
return Collections.emptyList();
198+
return List.of();
199199
}
200200

201201
/**

api/src/main/java/com/viaversion/viaversion/api/protocol/version/ProtocolVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class ProtocolVersion implements Comparable<ProtocolVersion> {
9292
public static final ProtocolVersion v1_21_6 = register(771, "1.21.6");
9393
public static final ProtocolVersion v1_21_7 = register(772, "1.21.7-1.21.8", new SubVersionRange("1.21", 7, 8));
9494
public static final ProtocolVersion v1_21_9 = register(773, "1.21.9-1.21.10", new SubVersionRange("1.21", 9, 10));
95-
public static final ProtocolVersion v1_21_11 = register(774, 277, "1.21.11");
95+
public static final ProtocolVersion v1_21_11 = register(774, 278, "1.21.11");
9696
public static final ProtocolVersion unknown = new ProtocolVersion(VersionType.SPECIAL, -1, -1, "UNKNOWN", null);
9797

9898
static {

bukkit/src/main/java/com/viaversion/viaversion/ViaVersionPlugin.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import com.viaversion.viaversion.api.ViaAPI;
2323
import com.viaversion.viaversion.api.connection.UserConnection;
2424
import com.viaversion.viaversion.api.platform.PlatformTask;
25-
import com.viaversion.viaversion.api.platform.UnsupportedSoftware;
2625
import com.viaversion.viaversion.api.platform.ViaPlatform;
2726
import com.viaversion.viaversion.bukkit.commands.BukkitCommandHandler;
2827
import com.viaversion.viaversion.bukkit.listeners.JoinListener;
@@ -35,12 +34,8 @@
3534
import com.viaversion.viaversion.bukkit.platform.FoliaViaTask;
3635
import com.viaversion.viaversion.bukkit.platform.PaperViaInjector;
3736
import com.viaversion.viaversion.dump.PluginInfo;
38-
import com.viaversion.viaversion.unsupported.UnsupportedPlugin;
39-
import com.viaversion.viaversion.unsupported.UnsupportedServerSoftware;
4037
import com.viaversion.viaversion.util.GsonUtil;
4138
import java.util.ArrayList;
42-
import java.util.Collection;
43-
import java.util.Collections;
4439
import java.util.List;
4540
import java.util.UUID;
4641
import java.util.concurrent.TimeUnit;
@@ -264,20 +259,6 @@ public ViaAPI<Player> getApi() {
264259
return api;
265260
}
266261

267-
@Override
268-
public final Collection<UnsupportedSoftware> getUnsupportedSoftwareClasses() {
269-
final List<UnsupportedSoftware> list = new ArrayList<>(ViaPlatform.super.getUnsupportedSoftwareClasses());
270-
list.add(new UnsupportedServerSoftware.Builder().name("Yatopia").reason(UnsupportedServerSoftware.Reason.DANGEROUS_SERVER_SOFTWARE)
271-
.addClassName("org.yatopiamc.yatopia.server.YatopiaConfig")
272-
.addClassName("net.yatopia.api.event.PlayerAttackEntityEvent")
273-
.addClassName("yatopiamc.org.yatopia.server.YatopiaConfig") // Only the best kind of software relocates its own classes to hide itself :tinfoilhat:
274-
.addMethod("org.bukkit.Server", "getLastTickTime").build());
275-
list.add(new UnsupportedPlugin.Builder().name("software to mess with message signing").reason(UnsupportedPlugin.Reason.SECURE_CHAT_BYPASS)
276-
.addPlugin("NoEncryption").addPlugin("NoReport")
277-
.addPlugin("NoChatReports").addPlugin("NoChatReport").build());
278-
return Collections.unmodifiableList(list);
279-
}
280-
281262
@Override
282263
public boolean hasPlugin(final String name) {
283264
return getServer().getPluginManager().getPlugin(name) != null;

common/src/main/java/com/viaversion/viaversion/protocols/v1_21_7to1_21_9/packet/ClientboundConfigurationPackets1_21_9.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
package com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet;
1919

2020
import com.viaversion.viaversion.api.protocol.packet.State;
21+
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPacket1_21_11;
2122

22-
public enum ClientboundConfigurationPackets1_21_9 implements ClientboundPacket1_21_9 {
23+
public enum ClientboundConfigurationPackets1_21_9 implements ClientboundPacket1_21_9, ClientboundPacket1_21_11 {
2324

2425
COOKIE_REQUEST, // 0x00
2526
CUSTOM_PAYLOAD, // 0x01

common/src/main/java/com/viaversion/viaversion/protocols/v1_21_9to1_21_11/Protocol1_21_9To1_21_11.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundPackets1_21_9;
5050
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundConfigurationPackets1_21_9;
5151
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ServerboundPacket1_21_9;
52+
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPacket1_21_11;
53+
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPackets1_21_11;
5254
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.rewriter.BlockItemPacketRewriter1_21_11;
5355
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.rewriter.ComponentRewriter1_21_11;
5456
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.rewriter.EntityPacketRewriter1_21_11;
@@ -65,7 +67,7 @@
6567

6668
import static com.viaversion.viaversion.util.ProtocolUtil.packetTypeMap;
6769

68-
public final class Protocol1_21_9To1_21_11 extends AbstractProtocol<ClientboundPacket1_21_9, ClientboundPacket1_21_9, ServerboundPacket1_21_9, ServerboundPacket1_21_9> {
70+
public final class Protocol1_21_9To1_21_11 extends AbstractProtocol<ClientboundPacket1_21_9, ClientboundPacket1_21_11, ServerboundPacket1_21_9, ServerboundPacket1_21_9> {
6971

7072
public static final MappingData MAPPINGS = new MappingDataBase("1.21.9", "1.21.11");
7173
private final EntityPacketRewriter1_21_11 entityRewriter = new EntityPacketRewriter1_21_11(this);
@@ -76,7 +78,7 @@ public final class Protocol1_21_9To1_21_11 extends AbstractProtocol<ClientboundP
7678
private final RegistryDataRewriter registryDataRewriter = new RegistryDataRewriter(this);
7779

7880
public Protocol1_21_9To1_21_11() {
79-
super(ClientboundPacket1_21_9.class, ClientboundPacket1_21_9.class, ServerboundPacket1_21_9.class, ServerboundPacket1_21_9.class);
81+
super(ClientboundPacket1_21_9.class, ClientboundPacket1_21_11.class, ServerboundPacket1_21_9.class, ServerboundPacket1_21_9.class);
8082
}
8183

8284
@Override
@@ -256,10 +258,10 @@ public Types1_20_5<StructuredDataKeys1_21_11, EntityDataTypes1_21_11> mappedType
256258
}
257259

258260
@Override
259-
protected PacketTypesProvider<ClientboundPacket1_21_9, ClientboundPacket1_21_9, ServerboundPacket1_21_9, ServerboundPacket1_21_9> createPacketTypesProvider() {
261+
protected PacketTypesProvider<ClientboundPacket1_21_9, ClientboundPacket1_21_11, ServerboundPacket1_21_9, ServerboundPacket1_21_9> createPacketTypesProvider() {
260262
return new SimplePacketTypesProvider<>(
261263
packetTypeMap(unmappedClientboundPacketType, ClientboundPackets1_21_9.class, ClientboundConfigurationPackets1_21_9.class),
262-
packetTypeMap(mappedClientboundPacketType, ClientboundPackets1_21_9.class, ClientboundConfigurationPackets1_21_9.class),
264+
packetTypeMap(mappedClientboundPacketType, ClientboundPackets1_21_11.class, ClientboundConfigurationPackets1_21_9.class),
263265
packetTypeMap(mappedServerboundPacketType, ServerboundPackets1_21_6.class, ServerboundConfigurationPackets1_21_9.class),
264266
packetTypeMap(unmappedServerboundPacketType, ServerboundPackets1_21_6.class, ServerboundConfigurationPackets1_21_9.class)
265267
);
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
3+
* Copyright (C) 2016-2025 ViaVersion and contributors
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
package com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet;
19+
20+
import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType;
21+
22+
public interface ClientboundPacket1_21_11 extends ClientboundPacketType {
23+
}
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
/*
2+
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
3+
* Copyright (C) 2016-2025 ViaVersion and contributors
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
package com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet;
19+
20+
public enum ClientboundPackets1_21_11 implements ClientboundPacket1_21_11 {
21+
22+
BUNDLE_DELIMITER, // 0x00
23+
ADD_ENTITY, // 0x01
24+
ANIMATE, // 0x02
25+
AWARD_STATS, // 0x03
26+
BLOCK_CHANGED_ACK, // 0x04
27+
BLOCK_DESTRUCTION, // 0x05
28+
BLOCK_ENTITY_DATA, // 0x06
29+
BLOCK_EVENT, // 0x07
30+
BLOCK_UPDATE, // 0x08
31+
BOSS_EVENT, // 0x09
32+
CHANGE_DIFFICULTY, // 0x0A
33+
CHUNK_BATCH_FINISHED, // 0x0B
34+
CHUNK_BATCH_START, // 0x0C
35+
CHUNKS_BIOMES, // 0x0D
36+
CLEAR_TITLES, // 0x0E
37+
COMMAND_SUGGESTIONS, // 0x0F
38+
COMMANDS, // 0x10
39+
CONTAINER_CLOSE, // 0x11
40+
CONTAINER_SET_CONTENT, // 0x12
41+
CONTAINER_SET_DATA, // 0x13
42+
CONTAINER_SET_SLOT, // 0x14
43+
COOKIE_REQUEST, // 0x15
44+
COOLDOWN, // 0x16
45+
CUSTOM_CHAT_COMPLETIONS, // 0x17
46+
CUSTOM_PAYLOAD, // 0x18
47+
DAMAGE_EVENT, // 0x19
48+
DEBUG_BLOCK_VALUE, // 0x1A
49+
DEBUG_CHUNK_VALUE, // 0x1B
50+
DEBUG_ENTITY_VALUE, // 0x1C
51+
DEBUG_EVENT, // 0x1D
52+
DEBUG_SAMPLE, // 0x1E
53+
DELETE_CHAT, // 0x1F
54+
DISCONNECT, // 0x20
55+
DISGUISED_CHAT, // 0x21
56+
ENTITY_EVENT, // 0x22
57+
ENTITY_POSITION_SYNC, // 0x23
58+
EXPLODE, // 0x24
59+
FORGET_LEVEL_CHUNK, // 0x25
60+
GAME_EVENT, // 0x26
61+
GAME_EVENT_TEST_HIGHLIGHT_POS, // 0x27
62+
MOUNT_SCREEN_OPEN, // 0x28
63+
HURT_ANIMATION, // 0x29
64+
INITIALIZE_BORDER, // 0x2A
65+
KEEP_ALIVE, // 0x2B
66+
LEVEL_CHUNK_WITH_LIGHT, // 0x2C
67+
LEVEL_EVENT, // 0x2D
68+
LEVEL_PARTICLES, // 0x2E
69+
LIGHT_UPDATE, // 0x2F
70+
LOGIN, // 0x30
71+
MAP_ITEM_DATA, // 0x31
72+
MERCHANT_OFFERS, // 0x32
73+
MOVE_ENTITY_POS, // 0x33
74+
MOVE_ENTITY_POS_ROT, // 0x34
75+
MOVE_MINECART_ALONG_TRACK, // 0x35
76+
MOVE_ENTITY_ROT, // 0x36
77+
MOVE_VEHICLE, // 0x37
78+
OPEN_BOOK, // 0x38
79+
OPEN_SCREEN, // 0x39
80+
OPEN_SIGN_EDITOR, // 0x3A
81+
PING, // 0x3B
82+
PONG_RESPONSE, // 0x3C
83+
PLACE_GHOST_RECIPE, // 0x3D
84+
PLAYER_ABILITIES, // 0x3E
85+
PLAYER_CHAT, // 0x3F
86+
PLAYER_COMBAT_END, // 0x40
87+
PLAYER_COMBAT_ENTER, // 0x41
88+
PLAYER_COMBAT_KILL, // 0x42
89+
PLAYER_INFO_REMOVE, // 0x43
90+
PLAYER_INFO_UPDATE, // 0x44
91+
PLAYER_LOOK_AT, // 0x45
92+
PLAYER_POSITION, // 0x46
93+
PLAYER_ROTATION, // 0x47
94+
RECIPE_BOOK_ADD, // 0x48
95+
RECIPE_BOOK_REMOVE, // 0x49
96+
RECIPE_BOOK_SETTINGS, // 0x4A
97+
REMOVE_ENTITIES, // 0x4B
98+
REMOVE_MOB_EFFECT, // 0x4C
99+
RESET_SCORE, // 0x4D
100+
RESOURCE_PACK_POP, // 0x4E
101+
RESOURCE_PACK_PUSH, // 0x4F
102+
RESPAWN, // 0x50
103+
ROTATE_HEAD, // 0x51
104+
SECTION_BLOCKS_UPDATE, // 0x52
105+
SELECT_ADVANCEMENTS_TAB, // 0x53
106+
SERVER_DATA, // 0x54
107+
SET_ACTION_BAR_TEXT, // 0x55
108+
SET_BORDER_CENTER, // 0x56
109+
SET_BORDER_LERP_SIZE, // 0x57
110+
SET_BORDER_SIZE, // 0x58
111+
SET_BORDER_WARNING_DELAY, // 0x59
112+
SET_BORDER_WARNING_DISTANCE, // 0x5A
113+
SET_CAMERA, // 0x5B
114+
SET_CHUNK_CACHE_CENTER, // 0x5C
115+
SET_CHUNK_CACHE_RADIUS, // 0x5D
116+
SET_CURSOR_ITEM, // 0x5E
117+
SET_DEFAULT_SPAWN_POSITION, // 0x5F
118+
SET_DISPLAY_OBJECTIVE, // 0x60
119+
SET_ENTITY_DATA, // 0x61
120+
SET_ENTITY_LINK, // 0x62
121+
SET_ENTITY_MOTION, // 0x63
122+
SET_EQUIPMENT, // 0x64
123+
SET_EXPERIENCE, // 0x65
124+
SET_HEALTH, // 0x66
125+
SET_HELD_SLOT, // 0x67
126+
SET_OBJECTIVE, // 0x68
127+
SET_PASSENGERS, // 0x69
128+
SET_PLAYER_INVENTORY, // 0x6A
129+
SET_PLAYER_TEAM, // 0x6B
130+
SET_SCORE, // 0x6C
131+
SET_SIMULATION_DISTANCE, // 0x6D
132+
SET_SUBTITLE_TEXT, // 0x6E
133+
SET_TIME, // 0x6F
134+
SET_TITLE_TEXT, // 0x70
135+
SET_TITLES_ANIMATION, // 0x71
136+
SOUND_ENTITY, // 0x72
137+
SOUND, // 0x73
138+
START_CONFIGURATION, // 0x74
139+
STOP_SOUND, // 0x75
140+
STORE_COOKIE, // 0x76
141+
SYSTEM_CHAT, // 0x77
142+
TAB_LIST, // 0x78
143+
TAG_QUERY, // 0x79
144+
TAKE_ITEM_ENTITY, // 0x7A
145+
TELEPORT_ENTITY, // 0x7B
146+
TEST_INSTANCE_BLOCK_STATUS, // 0x7C
147+
TICKING_STATE, // 0x7D
148+
TICKING_STEP, // 0x7E
149+
TRANSFER, // 0x7F
150+
UPDATE_ADVANCEMENTS, // 0x80
151+
UPDATE_ATTRIBUTES, // 0x81
152+
UPDATE_MOB_EFFECT, // 0x82
153+
UPDATE_RECIPES, // 0x83
154+
UPDATE_TAGS, // 0x84
155+
PROJECTILE_POWER, // 0x85
156+
CUSTOM_REPORT_DETAILS, // 0x86
157+
SERVER_LINKS, // 0x87
158+
TRACKED_WAYPOINT, // 0x88
159+
CLEAR_DIALOG, // 0x89
160+
SHOW_DIALOG; // 0x8A
161+
162+
@Override
163+
public int getId() {
164+
return ordinal();
165+
}
166+
167+
@Override
168+
public String getName() {
169+
return name();
170+
}
171+
}

common/src/main/java/com/viaversion/viaversion/protocols/v1_21_9to1_21_11/rewriter/EntityPacketRewriter1_21_11.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundPacket1_21_9;
2525
import com.viaversion.viaversion.protocols.v1_21_7to1_21_9.packet.ClientboundPackets1_21_9;
2626
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.Protocol1_21_9To1_21_11;
27+
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.packet.ClientboundPackets1_21_11;
2728
import com.viaversion.viaversion.protocols.v1_21_9to1_21_11.storage.GameTimeStorage;
2829
import com.viaversion.viaversion.rewriter.EntityRewriter;
2930
import com.viaversion.viaversion.rewriter.entitydata.EntityDataHandlerEvent;
@@ -43,6 +44,8 @@ public void registerPackets() {
4344
registerGameEvent(ClientboundPackets1_21_9.GAME_EVENT);
4445
registerLogin1_20_5(ClientboundPackets1_21_9.LOGIN);
4546
registerRespawn1_20_5(ClientboundPackets1_21_9.RESPAWN);
47+
48+
protocol.registerClientbound(ClientboundPackets1_21_9.HORSE_SCREEN_OPEN, ClientboundPackets1_21_11.MOUNT_SCREEN_OPEN);
4649
}
4750

4851
@Override
Binary file not shown.

0 commit comments

Comments
 (0)