Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 00:50:13 +01:00
Merge remote-tracking branch 'origin/master' into dev
Dieser Commit ist enthalten in:
Commit
d8d65ea989
@ -88,9 +88,8 @@ public class PlayerPackets {
|
|||||||
protocol.registerServerbound(ServerboundPackets1_14.PLAYER_DIGGING, new PacketRemapper() {
|
protocol.registerServerbound(ServerboundPackets1_14.PLAYER_DIGGING, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT);
|
map(Type.VAR_INT); // Action
|
||||||
map(Type.POSITION1_14, Type.POSITION);
|
map(Type.POSITION1_14, Type.POSITION); // Position
|
||||||
map(Type.BYTE);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -74,13 +74,13 @@ public class Protocol1_16_2To1_16_1 extends AbstractProtocol<ClientboundPackets1
|
|||||||
boolean open = wrapper.read(Type.BOOLEAN);
|
boolean open = wrapper.read(Type.BOOLEAN);
|
||||||
boolean filter = wrapper.read(Type.BOOLEAN);
|
boolean filter = wrapper.read(Type.BOOLEAN);
|
||||||
wrapper.write(Type.VAR_INT, 1); // Settings
|
wrapper.write(Type.VAR_INT, 1); // Settings
|
||||||
wrapper.write(Type.BOOLEAN, recipeType == 0); // Crafting
|
wrapper.write(Type.BOOLEAN, recipeType == 0 && open); // Crafting
|
||||||
wrapper.write(Type.BOOLEAN, filter);
|
wrapper.write(Type.BOOLEAN, filter);
|
||||||
wrapper.write(Type.BOOLEAN, recipeType == 1); // Furnace
|
wrapper.write(Type.BOOLEAN, recipeType == 1 && open); // Furnace
|
||||||
wrapper.write(Type.BOOLEAN, filter);
|
wrapper.write(Type.BOOLEAN, filter);
|
||||||
wrapper.write(Type.BOOLEAN, recipeType == 2); // Blast Furnace
|
wrapper.write(Type.BOOLEAN, recipeType == 2 && open); // Blast Furnace
|
||||||
wrapper.write(Type.BOOLEAN, filter);
|
wrapper.write(Type.BOOLEAN, filter);
|
||||||
wrapper.write(Type.BOOLEAN, recipeType == 3); // Smoker
|
wrapper.write(Type.BOOLEAN, recipeType == 3 && open); // Smoker
|
||||||
wrapper.write(Type.BOOLEAN, filter);
|
wrapper.write(Type.BOOLEAN, filter);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -282,13 +282,12 @@ public class WorldPackets {
|
|||||||
protocol.registerServerbound(ServerboundPackets1_9.PLAYER_DIGGING, new PacketRemapper() {
|
protocol.registerServerbound(ServerboundPackets1_9.PLAYER_DIGGING, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT, Type.UNSIGNED_BYTE); // 0 - Status
|
map(Type.VAR_INT); // Action
|
||||||
map(Type.POSITION); // 1 - Position
|
map(Type.POSITION); // Position
|
||||||
map(Type.BYTE); // 2 - Face
|
|
||||||
handler(new PacketHandler() {
|
handler(new PacketHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(PacketWrapper wrapper) throws Exception {
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
int status = wrapper.get(Type.UNSIGNED_BYTE, 0);
|
int status = wrapper.get(Type.VAR_INT, 0);
|
||||||
if (status == 6)
|
if (status == 6)
|
||||||
wrapper.cancel();
|
wrapper.cancel();
|
||||||
}
|
}
|
||||||
@ -297,7 +296,7 @@ public class WorldPackets {
|
|||||||
handler(new PacketHandler() {
|
handler(new PacketHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(PacketWrapper wrapper) throws Exception {
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
int status = wrapper.get(Type.UNSIGNED_BYTE, 0);
|
int status = wrapper.get(Type.VAR_INT, 0);
|
||||||
if (status == 5 || status == 4 || status == 3) {
|
if (status == 5 || status == 4 || status == 3) {
|
||||||
EntityTracker1_9 entityTracker = wrapper.user().getEntityTracker(Protocol1_9To1_8.class);
|
EntityTracker1_9 entityTracker = wrapper.user().getEntityTracker(Protocol1_9To1_8.class);
|
||||||
if (entityTracker.isBlocking()) {
|
if (entityTracker.isBlocking()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren