diff --git a/README.md b/README.md index 82c006a..5d60c05 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,8 @@ All CraftBukkit & Spigot releases for: * 1.8.4 * 1.8.7 * 1.8.8 - -Known Bgs ----------- -* ~~The XP removal system does not function as expected - XP still drops from breeding animals.~~ +* 1.9 +* 1.9.2 To do ---------- diff --git a/WildSex/pom.xml b/WildSex/pom.xml index fec9ed2..0fb3df5 100644 --- a/WildSex/pom.xml +++ b/WildSex/pom.xml @@ -5,7 +5,7 @@ wildsex jar WildSex - 3.2 + 3.6 @@ -13,6 +13,10 @@ Another-Spigot-repo http://maven.elmakers.com/repository/ + + repo + http://73.64.253.11/repo/ + @@ -56,6 +60,30 @@ compile true + + com.cemgokmen + wildsex-v1_9_R1 + v1_9_R1 + jar + compile + true + + + com.cemgokmen + wildsex-v1_9_R2 + v1_9_R2 + jar + compile + true + + + com.cemgokmen + wildsex-v1_10_R1 + v1_10_R1 + jar + compile + true + com.cemgokmen wildsex-api @@ -75,7 +103,7 @@ com.bergerkiller.bukkit BKCommonLib - 1.67-SNAPSHOT + 1.70-SNAPSHOT jar provided true diff --git a/WildSex/src/main/java/com/cemgokmen/wildsex/WildSexTaskListener.java b/WildSex/src/main/java/com/cemgokmen/wildsex/WildSexTaskListener.java index 890dc30..25ae0fa 100644 --- a/WildSex/src/main/java/com/cemgokmen/wildsex/WildSexTaskListener.java +++ b/WildSex/src/main/java/com/cemgokmen/wildsex/WildSexTaskListener.java @@ -35,12 +35,14 @@ public void onEntityAddEvent(EntityAddEvent event) { double dist = 0.0; for (Entity e : plugin.getMatedAnimals()) { Location l = e.getLocation(); - double distance = l.distance(orbLocation); - if (distance < MAX_DISTANCE) { - isFromMatedAnimal = true; - dist = distance; - break; - } + if(l.getWorld().equals(orbLocation.getWorld())){ + double distance = l.distance(orbLocation); + if (distance < MAX_DISTANCE) { + isFromMatedAnimal = true; + dist = distance; + break; + } + } } if (isFromMatedAnimal) { orb.remove(); diff --git a/pom.xml b/pom.xml index 5497f18..aa8a6c3 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,9 @@ v1_8_R1 v1_8_R2 v1_8_R3 + v1_9_R1 + v1_9_R2 + v1_10_R1 WildSex diff --git a/v1_10_R1/.classpath b/v1_10_R1/.classpath new file mode 100644 index 0000000..0a1dadd --- /dev/null +++ b/v1_10_R1/.classpath @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v1_10_R1/pom.xml b/v1_10_R1/pom.xml new file mode 100644 index 0000000..6337967 --- /dev/null +++ b/v1_10_R1/pom.xml @@ -0,0 +1,38 @@ + + 4.0.0 + com.cemgokmen + wildsex-v1_10_R1 + jar + WildSex implementation v1_10_R1 + v1_10_R1 + + + com.cemgokmen + wildsex-parent + parent + + + + + org.bukkit + bukkit + 1.10.2-R0.1-SNAPSHOT + jar + provided + + + org.spigotmc + spigot + 1.10.2-R0.1-SNAPSHOT + jar + provided + + + com.cemgokmen + wildsex-api + API + jar + + + diff --git a/v1_10_R1/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_10_R1/WildAnimalHandler.java b/v1_10_R1/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_10_R1/WildAnimalHandler.java new file mode 100644 index 0000000..d8894ca --- /dev/null +++ b/v1_10_R1/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_10_R1/WildAnimalHandler.java @@ -0,0 +1,35 @@ +package com.cemgokmen.wildsex.wildanimal.v1_10_R1; + +import org.bukkit.craftbukkit.v1_10_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_10_R1.entity.CraftAnimals; +import net.minecraft.server.v1_10_R1.EntityAnimal; +import net.minecraft.server.v1_10_R1.EntityHuman; + +import org.bukkit.entity.Animals; + +import com.cemgokmen.wildsex.api.WildAnimal; + +public class WildAnimalHandler implements WildAnimal { +private EntityAnimal getEntityAnimal(Animals animal) { + EntityAnimal entity = (EntityAnimal) ((CraftEntity) ((CraftAnimals) animal)).getHandle(); + return entity; +} + +@Override +public boolean isInLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + return entity.isInLove(); +} + +public void startLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + EntityHuman human = null; + + entity.c(human); +} + +public void endLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + entity.resetLove(); +} +} diff --git a/v1_9_R1/.classpath b/v1_9_R1/.classpath new file mode 100644 index 0000000..0a1dadd --- /dev/null +++ b/v1_9_R1/.classpath @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v1_9_R1/pom.xml b/v1_9_R1/pom.xml new file mode 100644 index 0000000..4d39de0 --- /dev/null +++ b/v1_9_R1/pom.xml @@ -0,0 +1,38 @@ + + 4.0.0 + com.cemgokmen + wildsex-v1_9_R1 + jar + WildSex implementation v1_9_R1 + v1_9_R1 + + + com.cemgokmen + wildsex-parent + parent + + + + + org.bukkit + bukkit + 1.9.2-R0.1-SNAPSHOT + jar + provided + + + org.spigotmc + spigot + 1.9.2-R0.1-SNAPSHOT + jar + provided + + + com.cemgokmen + wildsex-api + API + jar + + + diff --git a/v1_9_R1/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_9_R1/WildAnimalHandler.java b/v1_9_R1/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_9_R1/WildAnimalHandler.java new file mode 100644 index 0000000..bb8e481 --- /dev/null +++ b/v1_9_R1/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_9_R1/WildAnimalHandler.java @@ -0,0 +1,35 @@ +package com.cemgokmen.wildsex.wildanimal.v1_9_R1; + +import org.bukkit.craftbukkit.v1_9_R1.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_9_R1.entity.CraftAnimals; +import net.minecraft.server.v1_9_R1.EntityAnimal; +import net.minecraft.server.v1_9_R1.EntityHuman; + +import org.bukkit.entity.Animals; + +import com.cemgokmen.wildsex.api.WildAnimal; + +public class WildAnimalHandler implements WildAnimal { +private EntityAnimal getEntityAnimal(Animals animal) { + EntityAnimal entity = (EntityAnimal) ((CraftEntity) ((CraftAnimals) animal)).getHandle(); + return entity; +} + +@Override +public boolean isInLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + return entity.isInLove(); +} + +public void startLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + EntityHuman human = null; + + entity.c(human); +} + +public void endLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + entity.resetLove(); +} +} diff --git a/v1_9_R2/.classpath b/v1_9_R2/.classpath new file mode 100644 index 0000000..0a1dadd --- /dev/null +++ b/v1_9_R2/.classpath @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v1_9_R2/pom.xml b/v1_9_R2/pom.xml new file mode 100644 index 0000000..232387a --- /dev/null +++ b/v1_9_R2/pom.xml @@ -0,0 +1,38 @@ + + 4.0.0 + com.cemgokmen + wildsex-v1_9_R2 + jar + WildSex implementation v1_9_R2 + v1_9_R2 + + + com.cemgokmen + wildsex-parent + parent + + + + + org.bukkit + bukkit + 1.9.4-R0.1-SNAPSHOT + jar + provided + + + org.spigotmc + spigot + 1.9.4-R0.1-SNAPSHOT + jar + provided + + + com.cemgokmen + wildsex-api + API + jar + + + diff --git a/v1_9_R2/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_9_R2/WildAnimalHandler.java b/v1_9_R2/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_9_R2/WildAnimalHandler.java new file mode 100644 index 0000000..c558d9e --- /dev/null +++ b/v1_9_R2/src/main/java/com/cemgokmen/wildsex/wildanimal/v1_9_R2/WildAnimalHandler.java @@ -0,0 +1,35 @@ +package com.cemgokmen.wildsex.wildanimal.v1_9_R2; + +import org.bukkit.craftbukkit.v1_9_R2.entity.CraftEntity; +import org.bukkit.craftbukkit.v1_9_R2.entity.CraftAnimals; +import net.minecraft.server.v1_9_R2.EntityAnimal; +import net.minecraft.server.v1_9_R2.EntityHuman; + +import org.bukkit.entity.Animals; + +import com.cemgokmen.wildsex.api.WildAnimal; + +public class WildAnimalHandler implements WildAnimal { +private EntityAnimal getEntityAnimal(Animals animal) { + EntityAnimal entity = (EntityAnimal) ((CraftEntity) ((CraftAnimals) animal)).getHandle(); + return entity; +} + +@Override +public boolean isInLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + return entity.isInLove(); +} + +public void startLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + EntityHuman human = null; + + entity.c(human); +} + +public void endLoveMode(Animals animal) { + EntityAnimal entity = getEntityAnimal(animal); + entity.resetLove(); +} +}