From 37310b245b1b808314c5dc66000cffcc2b777ca9 Mon Sep 17 00:00:00 2001 From: RadBuilder Date: Sat, 24 Jun 2017 18:24:29 -0700 Subject: [PATCH] Updated NMS for 1.12 Updated NMS for 1.12 that was changed after the prerelease versions. --- build.gradle | 2 +- .../v1_12_R1/customentities/CustomGuardian.java | 4 ++-- .../v1_12_R1/customentities/CustomSlime.java | 5 ++--- .../v1_12_R1/customentities/FlyingSquid.java | 4 ++-- .../ultracosmetics/v1_12_R1/customentities/Pumpling.java | 8 ++++---- .../v1_12_R1/customentities/RideableSpider.java | 9 +++------ .../isach/ultracosmetics/v1_12_R1/nms/WrapperBase.java | 1 - .../isach/ultracosmetics/v1_12_R1/nms/WrapperEntity.java | 2 +- .../ultracosmetics/v1_12_R1/nms/WrapperEntityLiving.java | 4 ++-- 9 files changed, 17 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index 803ec6cb1..cdb01467e 100644 --- a/build.gradle +++ b/build.gradle @@ -1 +1 @@ -allprojects { apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' group = 'be.isach' version = '2.4.7-RELEASE' compileJava.options.encoding = 'UTF-8' sourceCompatibility = 1.8 targetCompatibility = 1.8 configurations { shaded compile.extendsFrom shaded } afterEvaluate { jar { dependsOn configurations.shaded from configurations.shaded.collect { it.isDirectory() ? it : zipTree(it) } } } } boolean local = false if (local) libsDirName = '/Users/sacha/Documents/Development/Java/UC_1_11/testserver/plugins' dependencies { subprojects.each { p -> shaded(p) { transitive false } } } subprojects { repositories { mavenLocal() mavenCentral() // Vault maven { url 'http://nexus.hc.to/content/repositories/pub_releases' } // Lib's Disguises maven { url 'http://repo.md-5.net/content/groups/public/' } // Spigot maven { url 'http://repo.isach.be' } // BungeeCord maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } } } \ No newline at end of file +allprojects { apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' group = 'be.isach' version = '2.4.8-RELEASE' compileJava.options.encoding = 'UTF-8' sourceCompatibility = 1.8 targetCompatibility = 1.8 configurations { shaded compile.extendsFrom shaded } afterEvaluate { jar { dependsOn configurations.shaded from configurations.shaded.collect { it.isDirectory() ? it : zipTree(it) } } } } boolean local = false if (local) libsDirName = '/Users/sacha/Documents/Development/Java/UC_1_11/testserver/plugins' dependencies { subprojects.each { p -> shaded(p) { transitive false } } } subprojects { repositories { mavenLocal() mavenCentral() // Vault maven { url 'http://nexus.hc.to/content/repositories/pub_releases' } // Lib's Disguises maven { url 'http://repo.md-5.net/content/groups/public/' } // Spigot maven { url 'http://repo.isach.be' } // BungeeCord maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } } } \ No newline at end of file diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomGuardian.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomGuardian.java index 6a6960039..564c86ce5 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomGuardian.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomGuardian.java @@ -52,9 +52,9 @@ public String getName() { @Override - protected SoundEffect cd() { + protected SoundEffect cf() { if (custom) return null; - else return super.cd(); + else return super.cf(); } @Override diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomSlime.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomSlime.java index a1d79fcb7..37b3f4602 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomSlime.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/CustomSlime.java @@ -28,8 +28,8 @@ public void a(float sideMot, float forMot, float f2) { return; } EntityHuman passenger = null; - if (!bD().isEmpty()) { - passenger = (EntityHuman) bD().get(0); + if (!bF().isEmpty()) { + passenger = (EntityHuman) bF().get(0); } ride(sideMot, forMot, passenger, this); } @@ -119,7 +119,6 @@ static void ride(float sideMot, float forMot, EntityHuman passenger, EntityInsen entityBase.g_(sideMot, forMot); } - } @Override diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/FlyingSquid.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/FlyingSquid.java index 521091821..85e973c78 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/FlyingSquid.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/FlyingSquid.java @@ -28,8 +28,8 @@ public void a(float sideMot, float forMot, float f2) { return; } EntityHuman passenger = null; - if (!bD().isEmpty()) { - passenger = (EntityHuman) bD().get(0); + if (!bF().isEmpty()) { + passenger = (EntityHuman) bF().get(0); } ride(sideMot, forMot, passenger, this); } diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/Pumpling.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/Pumpling.java index 7431561bf..dfb9c645b 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/Pumpling.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/Pumpling.java @@ -53,15 +53,15 @@ protected SoundEffect d(DamageSource damageSource) { // Hurt } @Override - protected SoundEffect cd() { // Death + protected SoundEffect cf() { // Death if (isCustomEntity()) return null; - else return super.cd(); + else return super.cf(); } @Override - protected SoundEffect dk() { // Step + protected SoundEffect dm() { // Step if (isCustomEntity()) return null; - else return super.dk(); + else return super.dm(); } @Override diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/RideableSpider.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/RideableSpider.java index b100c7914..9820221bb 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/RideableSpider.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/customentities/RideableSpider.java @@ -30,8 +30,8 @@ public void a(float sideMot, float forMot, float f2) { } EntityHuman passenger = null; - if (!bD().isEmpty()) { - passenger = (EntityHuman) bD().get(0); + if (!bF().isEmpty()) { + passenger = (EntityHuman) bF().get(0); } ride(sideMot, forMot, passenger, this); } @@ -112,15 +112,12 @@ static void ride(float sideMot, float forMot, EntityHuman passenger, EntityInsen wEntity.setLimbSwingAmount(wEntity.getLimbSwingAmount() + (f4 - wEntity.getLimbSwingAmount()) * 0.4f); wEntity.setLimbSwing(wEntity.getLimbSwing() + wEntity.getLimbSwingAmount()); - } else - - { + } else { wEntity.setStepHeight(0.5f); wEntity.setJumpMovementFactor(0.02f); entityBase.g_(sideMot, forMot); } - } @Override diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperBase.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperBase.java index 8b5708925..d03d3ddc8 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperBase.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperBase.java @@ -40,5 +40,4 @@ public void setField(String name, Class fieldClass, T value) { } public Object getHandle() { return handle; } - } diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntity.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntity.java index 91e5c2e6f..b8d09f564 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntity.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntity.java @@ -19,7 +19,7 @@ public WrapperEntity(Entity handle) { public void setStepHeight(float stepHeight) { handle.P = stepHeight; } - public boolean canPassengerSteer() { return handle.bG(); } + public boolean canPassengerSteer() { return handle.bI(); } public Entity getHandle() { return handle; } diff --git a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntityLiving.java b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntityLiving.java index dfc571631..a67751b4b 100644 --- a/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntityLiving.java +++ b/v1_12_R1/src/main/java/be/isach/ultracosmetics/v1_12_R1/nms/WrapperEntityLiving.java @@ -51,9 +51,9 @@ public WrapperEntityLiving(EntityLiving handle) { public void setLimbSwing(float limbSwing) { handle.aH = limbSwing; } - public float getMoveSpeed() { return handle.cw(); } + public float getMoveSpeed() { return handle.cy(); } - public void setMoveSpeed(float moveSpeed) { handle.m(moveSpeed); } + public void setMoveSpeed(float moveSpeed) { handle.k(moveSpeed); } @Override public EntityLiving getHandle() { return handle; }