diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-02-09 20:55:58 -0500 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-02-09 20:55:58 -0500 |
commit | 1b1ec528261fb63265e3bfb5c3e5bb85b81336b9 (patch) | |
tree | cfb9b608fe76ddfaef3121df25f90db4b77e280e /src/main | |
parent | Merge pull request '1.7.1 - A few tweaks and bug squashes' (#5) from dev into... (diff) | |
download | kenshinshideandseek-1b1ec528261fb63265e3bfb5c3e5bb85b81336b9.tar.gz kenshinshideandseek-1b1ec528261fb63265e3bfb5c3e5bb85b81336b9.tar.bz2 kenshinshideandseek-1b1ec528261fb63265e3bfb5c3e5bb85b81336b9.zip |
fix rightclick to find hider, and fix hider potion drink
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java | 17 | ||||
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java | 1 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java b/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java index b3460d0..17ad90c 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/game/util/Disguise.java @@ -20,7 +20,7 @@ public class Disguise { final Player hider; final Material material; FallingBlock block; - Horse hitBox; + AbstractHorse hitBox; Location blockLocation; boolean solid, solidify, solidifying; static Team hidden; @@ -156,15 +156,24 @@ public class Disguise { private void respawnFallingBlock(){ block = hider.getLocation().getWorld().spawnFallingBlock(hider.getLocation().add(0, 1000, 0), material, (byte)0); - block.setGravity(false); + if (Main.getInstance().supports(10)) { + block.setGravity(false); + } block.setDropItem(false); block.setInvulnerable(true); } private void respawnHitbox(){ - hitBox = (Horse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.HORSE); + if (Main.getInstance().supports(11)) { + hitBox = (AbstractHorse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.SKELETON_HORSE); + } else { + hitBox = (AbstractHorse) hider.getLocation().getWorld().spawnEntity(hider.getLocation().add(0, 1000, 0), EntityType.HORSE); + hitBox.setVariant(Horse.Variant.SKELETON_HORSE); + } + if (Main.getInstance().supports(10)) { + hitBox.setGravity(false); + } hitBox.setAI(false); - hitBox.setGravity(false); hitBox.setInvulnerable(true); hitBox.setCanPickupItems(false); hitBox.setCollidable(false); diff --git a/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java b/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java index e5913aa..821ef63 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/world/WorldLoader.java @@ -112,7 +112,6 @@ public class WorldLoader { String[] parts = file.split("\\."); if (parts.length > 1) { - Main.getInstance().getLogger().info(file); if ( Integer.parseInt(parts[1]) < minX || Integer.parseInt(parts[1]) > maxX || Integer.parseInt(parts[2]) < minZ || Integer.parseInt(parts[2]) > maxZ ) continue; } |