Compare commits

...
5 Commits
Author SHA1 Message Date
Myles f256309487 Bump version to 1.0.2 2016-12-20 16:07:37 +00:00
Myles 462abb1ef9 Update to snapshot 1.11.1 2016-12-15 15:39:38 +00:00
Myles a35408d14f New config option for disabling piston animation for 1.11 clients #570 2016-12-15 15:32:54 +00:00
Myles 81d4deaea7 Fix block metadata #580 2016-11-28 23:47:49 +00:00
Myles 9103f89aff 1.0.2-SNAPSHOT 2016-11-16 19:58:59 +00:00
16 changed files with 61 additions and 10 deletions

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -52,6 +52,11 @@ public class BukkitConfigAPI extends Config implements ViaVersionConfig {
return getBoolean("hologram-patch", false);
}
@Override
public boolean isPistonAnimationPatch() {
return getBoolean("piston-animation-patch", false);
}
@Override
public boolean isBossbarPatch() {
return getBoolean("bossbar-patch", true);
+2 -2
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -37,7 +37,7 @@
<dependency>
<groupId>us.myles</groupId>
<artifactId>viaversion-common</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</dependency>
</dependencies>
</project>
@@ -86,6 +86,11 @@ public class BungeeConfigAPI extends Config implements ViaVersionConfig {
return getBoolean("hologram-patch", false);
}
@Override
public boolean isPistonAnimationPatch() {
return getBoolean("piston-animation-patch", false);
}
@Override
public boolean isBossbarPatch() {
return getBoolean("bossbar-patch", true);
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -53,6 +53,13 @@ public interface ViaVersionConfig {
*/
boolean isHologramPatch();
/**
* Get if the 1.11 piston animation patch is enabled
*
* @return true if the piston patch is enabled.
*/
boolean isPistonAnimationPatch();
/**
* Get if boss bars are fixed for 1.9 &amp; 1.10 clients
*
@@ -37,7 +37,7 @@ public class ProtocolRegistry {
registerProtocol(new Protocol1_9_1_2TO1_9_3_4(), Arrays.asList(ProtocolVersion.v1_9_1.getId(), ProtocolVersion.v1_9_2.getId()), ProtocolVersion.v1_9_3.getId());
registerProtocol(new Protocol1_10To1_9_3_4(), Collections.singletonList(ProtocolVersion.v1_10.getId()), ProtocolVersion.v1_9_3.getId());
registerProtocol(new Protocol1_11To1_10(), Collections.singletonList(ProtocolVersion.v1_11.getId()), ProtocolVersion.v1_10.getId());
registerProtocol(new Protocol1_11To1_10(), Arrays.asList(ProtocolVersion.v1_11.getId(), ProtocolVersion.v1_11_1.getId()), ProtocolVersion.v1_10.getId());
}
@@ -28,6 +28,7 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_9_3;
public static final ProtocolVersion v1_10;
public static final ProtocolVersion v1_11;
public static final ProtocolVersion v1_11_1;
public static final ProtocolVersion unknown;
private final int id;
@@ -52,6 +53,7 @@ public class ProtocolVersion {
register(v1_9_3 = new ProtocolVersion(110, "1.9.3/4"));
register(v1_10 = new ProtocolVersion(210, "1.10"));
register(v1_11 = new ProtocolVersion(315, "1.11"));
register(v1_11_1 = new ProtocolVersion(316, "1.11.1"));
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
}
@@ -219,6 +219,30 @@ public class Protocol1_11To1_10 extends Protocol {
}
});
// Block action packet
registerOutgoing(State.PLAY, 0x0A, 0x0A, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.POSITION); // 0 - Position
map(Type.UNSIGNED_BYTE); // 1 - Action ID
map(Type.UNSIGNED_BYTE); // 2 - Action Param
map(Type.VAR_INT); // 3 - Block Type
// Cheap hack to ensure it's always right block
handler(new PacketHandler() {
@Override
public void handle(final PacketWrapper actionWrapper) throws Exception {
if (Via.getConfig().isPistonAnimationPatch()) {
int id = actionWrapper.get(Type.VAR_INT, 0);
if (id == 33 || id == 29) {
actionWrapper.cancel();
}
}
}
});
}
});
/*
INCOMING PACKETS
*/
@@ -72,7 +72,7 @@ public class MetadataRewriter {
id = (Short) value;
}
if (id != -1 && data != -1) {
int combined = id << 4 | data;
int combined = id | (data & 0xF);
data = -1;
id = -1;
entry.setValue(combined);
+3
View File
@@ -79,6 +79,9 @@ tracking-max-kick-msg: "You are sending too many packets, :("
hologram-patch: false
# This is the offset, should work as default when enabled.
hologram-y: -0.96
# Should we disable piston animation for 1.11/1.11.1 clients?
# In some cases when firing lots of pistons it crashes them.
piston-animation-patch: false
#
#----------------------------------------------------------#
# 1.9 & 1.10 CLIENTS ON 1.8 SERVERS OPTIONS #
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>viaversion-jar</name>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>us.myles</groupId>
<artifactId>viaversion-parent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>pom</packaging>
<name>viaversion-parent</name>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -59,6 +59,11 @@ public class SpongeConfigAPI extends Config implements ViaVersionConfig {
return getBoolean("hologram-patch", false);
}
@Override
public boolean isPistonAnimationPatch() {
return getBoolean("piston-animation-patch", false);
}
@Override
public boolean isBossbarPatch() {
return getBoolean("bossbar-patch", true);