Skip to content

Commit

Permalink
Merge branch 'MC-183'
Browse files Browse the repository at this point in the history
Conflicts:
	modules/EchoPet/pom.xml
  • Loading branch information
DSH105 committed May 10, 2015
2 parents 9b9a6fa + b780cd1 commit 4ef9cb9
Show file tree
Hide file tree
Showing 70 changed files with 4,557 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void setDefaults() {
set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".interactMenu", true);
set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".startFollowDistance", 12);
set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".stopFollowDistance", 4);
set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".teleportDistance", 30);
set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".teleportDistance", 40);

/*set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".attack.canDamagePlayers", false);
set("pets." + petType.toString().toLowerCase().replace("_", " ") + ".attack.lockRange", 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ public enum PetItem {
CREEPER(PetType.CREEPER, Material.getMaterial(383), (short) 50, "Creeper Pet", "creeper"),
ENDERDRAGON(PetType.ENDERDRAGON, Material.getMaterial(122), (short) 0, "EnderDragon Pet", "enderdragon"),
ENDERMAN(PetType.ENDERMAN, Material.getMaterial(383), (short) 58, "Enderman Pet", "enderman"),
ENDERMITE(PetType.ENDERMITE, Material.getMaterial(383), (short) 67, "Endermite Pet", "endermite"),
GHAST(PetType.GHAST, Material.getMaterial(383), (short) 56, "Ghast Pet", "ghast"),
GIANT(PetType.GIANT, Material.getMaterial(383), (short) 54, "Giant Pet", "giant"),
GUARDIAN(PetType.GUARDIAN, Material.getMaterial(383), (short) 68, "Guardian Pet", "guardian"),
HORSE(PetType.HORSE, Material.getMaterial(383), (short) 100, "Horse Pet", "horse"),
HUMAN(PetType.HUMAN, Material.SKULL_ITEM, (short) 3, "Human Pet", "human"),
IRONGOLEM(PetType.IRONGOLEM, Material.getMaterial(86), (short) 0, "Iron Golem Pet", "irongolem"),
Expand All @@ -40,6 +42,7 @@ public enum PetItem {
OCELOT(PetType.OCELOT, Material.getMaterial(383), (short) 98, "Ocelot Pet", "ocelot"),
PIG(PetType.PIG, Material.getMaterial(383), (short) 90, "Pig Pet", "pig"),
PIGZOMBIE(PetType.PIGZOMBIE, Material.getMaterial(383), (short) 57, "PigZombie Pet", "pigzombie"),
RABBIT(PetType.RABBIT, Material.getMaterial(383), (short) 101, "Rabbit Pet", "rabbit"),
SHEEP(PetType.SHEEP, Material.getMaterial(383), (short) 91, "Sheep Pet", "sheep"),
SILVERFISH(PetType.SILVERFISH, Material.getMaterial(383), (short) 60, "Silverfish Pet", "silverfish"),
SKELETON(PetType.SKELETON, Material.getMaterial(383), (short) 51, "Skeleton Pet", "skeleton"),
Expand Down Expand Up @@ -86,4 +89,4 @@ public short getData() {
public String getName() {
return name;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,9 @@ public interface IEntityPet {

public LivingEntity getTarget();

void resetEntitySize();

void setEntitySize(float width, float height);

public IPet getPet();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ public enum PetData {

ANGRY("angry", Type.BOOLEAN),
BABY("baby", Type.BOOLEAN),
BLACK("black", Type.COLOUR, Type.CAT, Type.HORSE_VARIANT),
BLACK("black", Type.COLOUR, Type.CAT, Type.HORSE_VARIANT, Type.RABBIT_TYPE),
BLACK_AND_WHITE("blackandwhite", Type.RABBIT_TYPE),
BLACKSMITH("blacksmith", Type.PROF),
BLACKSPOT("blackSpot", Type.HORSE_MARKING),
BLUE("blue", Type.COLOUR),
BROWN("brown", Type.COLOUR, Type.HORSE_VARIANT),
BROWN("brown", Type.COLOUR, Type.HORSE_VARIANT, Type.RABBIT_TYPE),
BUTCHER("butcher", Type.PROF),
CHESTED("chested", Type.BOOLEAN),
CHESTNUT("chestnut", Type.HORSE_VARIANT),
Expand All @@ -38,12 +39,14 @@ public enum PetData {
DARKBROWN("darkbrown", Type.HORSE_VARIANT),
DIAMOND("diamond", Type.HORSE_ARMOUR),
DONKEY("donkey", Type.HORSE_TYPE),
ELDER("elder", Type.BOOLEAN),
FARMER("farmer", Type.PROF),
FIRE("fire", Type.BOOLEAN),
GRAY("gray", Type.COLOUR, Type.HORSE_VARIANT),
GREEN("green", Type.COLOUR),
GOLD("gold", Type.HORSE_ARMOUR),
IRON("iron", Type.HORSE_ARMOUR),
THE_KILLER_BUNNY("killerbunny", Type.RABBIT_TYPE),
LARGE("large", Type.SIZE),
LIBRARIAN("librarian", Type.PROF),
LIGHTBLUE("lightBlue", Type.COLOUR),
Expand All @@ -61,6 +64,7 @@ public enum PetData {
PURPLE("purple", Type.COLOUR),
RED("red", Type.CAT, Type.COLOUR),
SADDLE("saddle", Type.BOOLEAN),
SALT_AND_PEPPER("saltandpepper", Type.RABBIT_TYPE),
SCREAMING("screaming", Type.BOOLEAN),
SHEARED("sheared", Type.BOOLEAN),
SHIELD("shield", Type.BOOLEAN),
Expand All @@ -73,7 +77,7 @@ public enum PetData {
VILLAGER("villager", Type.BOOLEAN),
WHITEPATCH("whitePatch", Type.HORSE_MARKING),
WHITESPOT("whiteSpot", Type.HORSE_MARKING),
WHITE("white", Type.COLOUR, Type.HORSE_VARIANT),
WHITE("white", Type.COLOUR, Type.HORSE_VARIANT, Type.RABBIT_TYPE),
WILD("wild", Type.CAT),
WITHER("wither", Type.BOOLEAN),
YELLOW("yellow", Type.COLOUR),
Expand Down Expand Up @@ -101,6 +105,6 @@ public boolean isType(Type t) {
}

public enum Type {
BOOLEAN, COLOUR, CAT, SIZE, PROF, HORSE_TYPE, HORSE_VARIANT, HORSE_MARKING, HORSE_ARMOUR
BOOLEAN, COLOUR, CAT, SIZE, PROF, HORSE_TYPE, HORSE_VARIANT, HORSE_MARKING, HORSE_ARMOUR, RABBIT_TYPE
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ public enum PetType {
CREEPER("Creeper", 50, "Creeper Pet", 20D, 6D, EntityType.CREEPER, PetData.POWER),
ENDERDRAGON("EnderDragon", 63, "EnderDragon Pet", 200D, 0D, EntityType.ENDER_DRAGON),
ENDERMAN("Enderman", 58, "Enderman Pet", 40D, 6D, EntityType.ENDERMAN, PetData.SCREAMING),
ENDERMITE("Endermite", 67, "Endermite Pet", 2D, 2D, EntityType.ENDERMITE),
GHAST("Ghast", 56, "Ghast Pet", 10D, 7D, EntityType.GHAST),
GIANT("Giant", 53, "Giant Pet", 100D, 0D, EntityType.GIANT),
GUARDIAN("Guardian", 68, "Guardian Pet", 20D, 10D, EntityType.GUARDIAN, PetData.ELDER),
MAGMACUBE("MagmaCube", 62, "Magma Cube Pet", 20D, 5D, EntityType.MAGMA_CUBE, PetData.SMALL, PetData.MEDIUM, PetData.LARGE),
PIGZOMBIE("PigZombie", 57, "Pig Zombie Pet", 20D, 6D, EntityType.PIG_ZOMBIE, PetData.BABY),
SILVERFISH("Silverfish", 60, "Silverfish Pet", 8D, 4D, EntityType.SILVERFISH),
Expand All @@ -60,6 +62,7 @@ public enum PetType {
MUSHROOMCOW("MushroomCow", 96, "Mushroom Cow Pet", 10D, 3D, EntityType.MUSHROOM_COW, PetData.BABY),
OCELOT("Ocelot", 98, "Ocelot Pet", 10D, 4D, EntityType.OCELOT, PetData.BABY, PetData.BLACK, PetData.RED, PetData.SIAMESE, PetData.WILD),
PIG("Pig", 90, "Pig Pet", 10D, 3D, EntityType.PIG, PetData.BABY, PetData.SADDLE),
RABBIT("Rabbit", 101, "Rabbit Pet", 8D, 3D, EntityType.RABBIT, PetData.BABY, PetData.BROWN, PetData.WHITE, PetData.BLACK, PetData.BLACK_AND_WHITE, PetData.SALT_AND_PEPPER, PetData.THE_KILLER_BUNNY),
SHEEP("Sheep", 91, "Sheep Pet", 8D, 3D, EntityType.SHEEP, PetData.BABY, PetData.SHEARED,
PetData.BLACK, PetData.BLUE, PetData.BROWN,
PetData.CYAN, PetData.GRAY, PetData.GREEN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@

public enum SizeCategory {

TINY(1),
REGULAR(1),
LARGE(3),
GIANT(4),
OVERSIZE(10);
TINY(1.5F),
REGULAR(1.5F),
LARGE(4),
GIANT(5),
OVERSIZE(12);

private int modifier;
private float modifier;

SizeCategory(int modifier) {
SizeCategory(float modifier) {
this.modifier = modifier;
}

Expand All @@ -42,6 +42,6 @@ public float getStopWalk(PetType petType) {
}

public float getTeleport(PetType petType) {
return (EchoPet.getConfig().getInt("pets." + petType.toString().toLowerCase().replace("_", " ") + ".teleportDistance", 30) * this.modifier) / 2;
return (EchoPet.getConfig().getInt("pets." + petType.toString().toLowerCase().replace("_", " ") + ".teleportDistance", 40) * this.modifier) / 2;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* This file is part of EchoPet.
*
* EchoPet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EchoPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EchoPet. If not, see <http://www.gnu.org/licenses/>.
*/

package com.dsh105.echopet.compat.api.entity.type.nms;

import com.dsh105.echopet.compat.api.entity.IEntityPet;

public interface IEntityEndermitePet extends IEntityPet {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* This file is part of EchoPet.
*
* EchoPet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EchoPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EchoPet. If not, see <http://www.gnu.org/licenses/>.
*/

package com.dsh105.echopet.compat.api.entity.type.nms;

import com.dsh105.echopet.compat.api.entity.IEntityPet;

public interface IEntityGuardianPet extends IEntityPet {

boolean isElder();

void setElder(boolean flag);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* This file is part of EchoPet.
*
* EchoPet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EchoPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EchoPet. If not, see <http://www.gnu.org/licenses/>.
*/

package com.dsh105.echopet.compat.api.entity.type.nms;

import com.dsh105.echopet.compat.api.entity.IEntityAgeablePet;
import org.bukkit.entity.Rabbit;

public interface IEntityRabbitPet extends IEntityAgeablePet {

Rabbit.Type getRabbitType();

void setRabbitType(Rabbit.Type type);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* This file is part of EchoPet.
*
* EchoPet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EchoPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EchoPet. If not, see <http://www.gnu.org/licenses/>.
*/

package com.dsh105.echopet.compat.api.entity.type.pet;

import com.dsh105.echopet.compat.api.entity.IPet;

public interface IEndermitePet extends IPet {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* This file is part of EchoPet.
*
* EchoPet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EchoPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EchoPet. If not, see <http://www.gnu.org/licenses/>.
*/

package com.dsh105.echopet.compat.api.entity.type.pet;

import com.dsh105.echopet.compat.api.entity.IPet;

public interface IGuardianPet extends IPet {

boolean isElder();

void setElder(boolean flag);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* This file is part of EchoPet.
*
* EchoPet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EchoPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EchoPet. If not, see <http://www.gnu.org/licenses/>.
*/

package com.dsh105.echopet.compat.api.entity.type.pet;

import com.dsh105.echopet.compat.api.entity.IAgeablePet;
import org.bukkit.entity.Rabbit;

public interface IRabbitPet extends IAgeablePet {

void setRabbitType(Rabbit.Type type);

Rabbit.Type getRabbitType();
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ public static ArrayList<MenuOption> createOptionList(PetType pt) {
options.add(new MenuOption(i++, MenuItem.HORSE_VARIANT));
options.add(new MenuOption(i++, MenuItem.HORSE_MARKING));
}
if (pt == PetType.GUARDIAN) {
options.add(new MenuOption(i++, MenuItem.ELDER));
}
if (pt == PetType.RABBIT) {
options.add(new MenuOption(i++, MenuItem.BABY));
options.add(new MenuOption(i++, MenuItem.RABBIT_TYPE));
}
return options;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public enum DataMenuType {
HORSE_TYPE,
HORSE_VARIANT,
HORSE_MARKING,
HORSE_ARMOUR
HORSE_ARMOUR,
RABBIT_TYPE
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ public enum DataMenuItem {
GOLD(DataMenuType.HORSE_ARMOUR, PetData.GOLD, Material.getMaterial(418), 1, (short) 0, "Gold", "Armour"),
DIAMOND(DataMenuType.HORSE_ARMOUR, PetData.DIAMOND, Material.getMaterial(419), 1, (short) 0, "Diamond", "Armour"),

BROWN_RABBIT(DataMenuType.RABBIT_TYPE, PetData.BROWN, Material.WOOL, 1, (short) 12, "Brown", "Bunny type"),
WHITE_RABBIT(DataMenuType.RABBIT_TYPE, PetData.WHITE, Material.WOOL, 1, (short) 0, "White", "Bunny type"),
BLACK_RABBIT(DataMenuType.HORSE_ARMOUR, PetData.BLACK, Material.WOOL, 1, (short) 15, "Black", "Bunny type"),
BLACK_AND_WHITE_RABBIT(DataMenuType.RABBIT_TYPE, PetData.BLACK_AND_WHITE, Material.WOOL, 1, (short) 7, "Black and White", "Bunny type"),
SALT_AND_PEPPER_RABBIT(DataMenuType.RABBIT_TYPE, PetData.SALT_AND_PEPPER, Material.WOOL, 1, (short) 4, "Salt and Pepper", "Bunny type"),
KILLER_BUNNY(DataMenuType.RABBIT_TYPE, PetData.THE_KILLER_BUNNY, Material.WOOL, 1, (short) 14, "Killer Bunny", "Bunny type"),

BACK(DataMenuType.OTHER, null, Material.BOOK, 1, (short) 0, "Back", "Return to the main menu."),
CLOSE(DataMenuType.OTHER, null, Material.BOOK, 1, (short) 0, "Close", "Close the Pet Menu");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public enum MenuItem {
HORSE_VARIANT(Material.LEASH, 1, (short) 0, DataMenuType.HORSE_VARIANT, "Variant", "Horse"),
HORSE_MARKING(Material.INK_SACK, 1, (short) 0, DataMenuType.HORSE_MARKING, "Marking", "Horse"),
HORSE_ARMOUR(Material.IRON_CHESTPLATE, 1, (short) 0, DataMenuType.HORSE_ARMOUR, "Armour", "Horse"),
RABBIT_TYPE(Material.RABBIT_HIDE, 1, (short) 0, DataMenuType.RABBIT_TYPE, "Bunny type", "Rabbit"),
CHESTED(Material.CHEST, 1, (short) 0, DataMenuType.BOOLEAN, "Chested", "Horse"),
FIRE(Material.FIREBALL, 1, (short) 0, DataMenuType.BOOLEAN, "Fire", "Blaze"),
SADDLE(Material.SADDLE, 1, (short) 0, DataMenuType.BOOLEAN, "Saddle", "Horse", "Pig"),
Expand All @@ -48,6 +49,7 @@ public enum MenuItem {
TAMED(Material.BONE, 1, (short) 0, DataMenuType.BOOLEAN, "Tamed", "Wolf"),
WITHER(Material.getMaterial(397), 1, (short) 1, DataMenuType.BOOLEAN, "Wither", "Skeleton"),
VILLAGER(Material.EMERALD, 1, (short) 0, DataMenuType.BOOLEAN, "Villager", "Zombie", "PigZombie"),
ELDER(Material.SEA_LANTERN, 1, (short) 0, DataMenuType.BOOLEAN, "Elder", "Guardian"),
COLOR(Material.WOOL, 1, (short) 0, DataMenuType.COLOR, "Color", "Sheep", "Wolf"),
PROFESSION(Material.IRON_AXE, 1, (short) 0, DataMenuType.PROFESSION, "Profession", "Villager"),
RIDE(Material.CARROT_STICK, 1, (short) 0, DataMenuType.BOOLEAN, "Ride Pet", "Control your pet."),
Expand Down
12 changes: 12 additions & 0 deletions modules/EchoPet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,18 @@
</exclusions>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.dsh105</groupId>
<artifactId>EchoPet-v1_8_R2</artifactId>
<version>v2</version>
<exclusions>
<exclusion>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
</exclusion>
</exclusions>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand Down
Loading

0 comments on commit 4ef9cb9

Please sign in to comment.