From aee904200ba76d5e02105091453834682cb2d73e Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Wed, 1 Jul 2015 16:02:57 -0400 Subject: [PATCH] Fixed block data for FallingBlock disguises --- build.gradle | 12 +++++++----- .../disguise/utilities/PacketsManager.java | 3 +-- src/main/resources/plugin.yml | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 524439c2..f73f2be9 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,8 @@ println 'Compiling LibsDisguises via Gradle ver. ' + gradle.gradleVersion sourceCompatibility = '1.7' ext.spigotVersion = '1.8.7-R0.1-SNAPSHOT' +ext.disguisesVersion = '8.5.1' + [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' repositories { @@ -40,7 +42,7 @@ task sourceJar (type : Jar, dependsOn: classes) { from sourceSets.main.allSource } -task javadocJar (type: Jar, dependsOn: javadoc) { // (1) +task javadocJar (type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } @@ -60,12 +62,12 @@ publishing { mavenJava(MavenPublication) { groupId 'LibsDisguises' artifactId 'LibsDisguises' - version '8.5-SNAPSHOT' + version disguisesVersion + '-SNAPSHOT' from components.java - artifact (sourceJar) { + artifact sourceJar { classifier = 'sources' } - artifact (javadocJar) { + artifact javadocJar { classifier = 'javadoc' } } @@ -84,7 +86,7 @@ artifactory { } defaults { publications('mavenJava') - } + } } resolve { repoKey = 'repo' diff --git a/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java b/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java index c0758d37..30d33e31 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/PacketsManager.java @@ -320,13 +320,12 @@ public class PacketsManager { mods.write(9, pitch); spawnPackets[0].getDataWatcherModifier().write(0, createDataWatcher(player, WrappedDataWatcher.getEntityWatcher(disguisedEntity), disguise.getWatcher())); - } else if (disguise.getType().isMisc()) { MiscDisguise msc = (MiscDisguise)disguise; int id = disguise.getType().getEntityId(); int data = msc.getData(); if (disguise.getType() == DisguiseType.FALLING_BLOCK) { - data = msc.getData(); //No data values for now, switch to NBT only has been painful + data = msc.getId() + (msc.getData() << 12); } else if (disguise.getType() == DisguiseType.FISHING_HOOK && data == 0) { // If the MiscDisguise data isn't set. Then no entity id was provided, so default to the owners entity id data = disguisedEntity.getEntityId(); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0354c114..50a11241 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: LibsDisguises main: me.libraryaddict.disguise.LibsDisguises -version: 8.5 +version: 8.5.1 author: libraryaddict authors: [Byteflux, Navid K.] depend: [ProtocolLib]