Skip to content

improved compatibility #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Dynmap-mobs for 1.14x

Build:
download and compile dynmap
extract dynmap-mobs into dynmap directory
cd dynmap-mobs
gradle build

If it complains about missing tools.jar, create dynmap-mobs/gradle.properties with:
org.gradle.java.home=/path/to/your/oracle/jdk/1.8.0
26 changes: 26 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apply plugin: 'java'
apply plugin: 'maven'

group = 'dynmap-mobs'
version = '1.5-gabsoftware'

description = "Unofficial build with 1.14 support"

sourceCompatibility = 1.6
targetCompatibility = 1.6
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}



repositories {

maven { url "http://hub.spigotmc.org/nexus/content/groups/public/" }
maven { url "http://repo.mikeprimm.com/" }
maven { url "https://repo.maven.apache.org/maven2" }
}
dependencies {
compile group: 'org.bukkit', name: 'bukkit', version:'1.14.4-R0.1-SNAPSHOT'
compile group: 'us.dynmap', name: 'dynmap-api', version:'3.0-SNAPSHOT'
}
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'dynmap-mobs'
94 changes: 84 additions & 10 deletions src/main/java/org/dynmap/mobs/DynmapMobsPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ public void init() {
new MobMapping("bigcat", "org.bukkit.entity.Animals", "Big Cat", "net.minecraft.server.MoCEntityBigCat"),
new MobMapping("deer", "org.bukkit.entity.Animals", "Deer", "net.minecraft.server.MoCEntityDeer"),
new MobMapping("wildwolf", "org.bukkit.entity.Monster", "Wild Wolf", "net.minecraft.server.MoCEntityWWolf"),
new MobMapping("flamewraith", "org.bukkit.entity.Monster", "Wraith", "net.minecraft.server.MoCEntityFlameWraith"),
new MobMapping("flamewraith", "org.bukkit.entity.Monster", "Flame Wraith", "net.minecraft.server.MoCEntityFlameWraith"),
new MobMapping("wraith", "org.bukkit.entity.Monster", "Wraith", "net.minecraft.server.MoCEntityWraith"),
new MobMapping("bunny", "org.bukkit.entity.Animals", "Bunny", "net.minecraft.server.MoCEntityBunny"),
new MobMapping("bird", "org.bukkit.entity.Animals", "Bird", "net.minecraft.server.MoCEntityBird"),
new MobMapping("fox", "org.bukkit.entity.Animals", "Bird", "net.minecraft.server.MoCEntityFox"),
new MobMapping("fox", "org.bukkit.entity.Animals", "Fox", "net.minecraft.server.MoCEntityFox"),
new MobMapping("werewolf", "org.bukkit.entity.Monster", "Werewolf", "net.minecraft.server.MoCEntityWerewolf"),
new MobMapping("shark", "org.bukkit.entity.WaterMob", "Shark", "net.minecraft.server.MoCEntityShark"),
new MobMapping("dolphin", "org.bukkit.entity.WaterMob", "Shark", "net.minecraft.server.MoCEntityDolphin"),
Expand Down Expand Up @@ -173,6 +173,9 @@ public void init() {
new MobMapping("endermite", "org.bukkit.entity.Endermite", "Endermite"),
new MobMapping("guardian", "org.bukkit.entity.Guardian", "Guardian"),
new MobMapping("shulker", "org.bukkit.entity.Shulker", "Shulker"),
new MobMapping("ravager", "org.bukkit.entity.Ravager", "Ravager"),
new MobMapping("illusioner", "org.bukkit.entity.Illusioner", "Illusioner"),
new MobMapping("pillager", "org.bukkit.entity.Pillager", "Pillager"),
// Standard passive
new MobMapping("skeletonhorse", "org.bukkit.entity.SkeletonHorse", "Skeleton Horse"),
new MobMapping("zombiehorse", "org.bukkit.entity.ZombieHorse", "Zombie Horse"),
Expand All @@ -190,12 +193,14 @@ public void init() {
new MobMapping("mooshroom", "org.bukkit.entity.MushroomCow", "Mooshroom"),
new MobMapping("snowgolem", "org.bukkit.entity.Snowman", "Snow Golem"),
new MobMapping("ocelot", "org.bukkit.entity.Ocelot", "Ocelot"),
new MobMapping("cat", "org.bukkit.entity.Ocelot", "Cat"), /* Must be just after ocelot */
new MobMapping("cat", "org.bukkit.entity.Cat", "Cat"),
new MobMapping("golem", "org.bukkit.entity.IronGolem", "Iron Golem"),
new MobMapping("vanillahorse", "org.bukkit.entity.Horse", "Horse"),
new MobMapping("rabbit", "org.bukkit.entity.Rabbit", "Rabbit"),
new MobMapping("vanillapolarbear", "org.bukkit.entity.PolarBear", "Polar Bear"),
new MobMapping("llama", "org.bukkit.entity.Llama", "Llama"),
new MobMapping("traderllama", "org.bukkit.entity.TraderLlama", "Trader Llama"),
new MobMapping("wandering_trader", "org.bukkit.entity.WanderingTrader", "Wandering Trader"),
new MobMapping("villager", "org.bukkit.entity.Villager", "Villager"),
new MobMapping("vanilladolphin", "org.bukkit.entity.Dolphin", "Dolphin"),
new MobMapping("cod", "org.bukkit.entity.Cod", "Cod"),
Expand All @@ -204,6 +209,8 @@ public void init() {
new MobMapping("tropicalfish", "org.bukkit.entity.TropicalFish", "Tropical Fish"),
new MobMapping("vanillaturtle", "org.bukkit.entity.Turtle", "Turtle"),
new MobMapping("parrot", "org.bukkit.entity.Parrot", "Parrot"),
new MobMapping("panda", "org.bukkit.entity.Panda", "Panda"),
new MobMapping("vanillafox", "org.bukkit.entity.Fox", "Fox" ),
};
private MobMapping configvehicles[] = {
// Command Minecart
Expand Down Expand Up @@ -340,8 +347,8 @@ else if(mobs[i].mobid.equals("wolf")) { /* Check for tamed wolf */
}
}
}
else if(mobs[i].mobid.equals("ocelot")) { /* Check for tamed ocelot */
Ocelot cat = (Ocelot)le;
else if(mobs[i].mobid.equals("cat")) { /* Check for tamed cat */
Cat cat = (Cat)le;
if(cat.isTamed()) {
i = findNext(i, "cat");
AnimalTamer t = cat.getOwner();
Expand All @@ -350,33 +357,100 @@ else if(mobs[i].mobid.equals("ocelot")) { /* Check for tamed ocelot */
}
}
}
else if(mobs[i].mobid.equals("horse")) { /* Check for tamed horse */
Horse horse = (Horse)le;
if(horse.isTamed()) {
i = findNext(i, "horse");
AnimalTamer t = horse.getOwner();
if((t != null) && (t instanceof OfflinePlayer)) {
label = "Horse (" + ((OfflinePlayer)t).getName() + ")";
}
}
}
else if(mobs[i].mobid.equals("traderllama")) { /* Check for tamed traderllama */
TraderLlama traderllama = (TraderLlama)le;
if(traderllama.isTamed()) {
i = findNext(i, "traderllama");
AnimalTamer t = traderllama.getOwner();
if((t != null) && (t instanceof OfflinePlayer)) {
label = "TraderLlama (" + ((OfflinePlayer)t).getName() + ")";
}
}
}
else if(mobs[i].mobid.equals("llama")) { /* Check for tamed llama */
Llama llama = (Llama)le;
if(llama.isTamed()) {
i = findNext(i, "llama");
AnimalTamer t = llama.getOwner();
if((t != null) && (t instanceof OfflinePlayer)) {
label = "Llama (" + ((OfflinePlayer)t).getName() + ")";
}
}
}
else if(mobs[i].mobid.equals("parrot")) { /* Check for tamed parrot */
Parrot parrot = (Parrot)le;
if(parrot.isTamed()) {
i = findNext(i, "parrot");
AnimalTamer t = parrot.getOwner();
if((t != null) && (t instanceof OfflinePlayer)) {
label = "Parrot (" + ((OfflinePlayer)t).getName() + ")";
}
}
}
else if(mobs[i].mobid.equals("villager")) {
Villager v = (Villager)le;
Profession p = v.getProfession();
if(p != null) {
switch(p) {
case BLACKSMITH:
label = "Blacksmith";
case NONE:
label = "Villager";
break;
case ARMORER:
label = "Armorer";
break;
case BUTCHER:
label = "Butcher";
break;
case CARTOGRAPHER:
label = "Cartographer";
break;
case CLERIC:
label = "Cleric";
break;
case FARMER:
label = "Farmer";
break;
case FISHERMAN:
label = "Fisherman";
break;
case FLETCHER:
label = "Fletcher";
break;
case LEATHERWORKER:
label = "Leatherworker";
break;
case LIBRARIAN:
label = "Librarian";
break;
case MASON:
label = "Mason";
break;
case NITWIT:
label = "Nitwit";
break;
case PRIEST:
label = "Priest";
case SHEPHERD:
label = "Shepherd";
break;
case TOOLSMITH:
label = "Toolsmith";
break;
case WEAPONSMITH:
label = "Weaponsmith";
break;
}
}
}
else if(mobs[i].mobid.equals("vanillahorse") || mobs[i].mobid.equals("donkey") || mobs[i].mobid.equals("mule") || mobs[i].mobid.equals("zombiehorse") || mobs[i].mobid.equals("skeletonhorse")) { /* Check for rider */
else if(mobs[i].mobid.equals("vanillahorse") || mobs[i].mobid.equals("llama") || mobs[i].mobid.equals("traderllama") || mobs[i].mobid.equals("donkey") || mobs[i].mobid.equals("mule") || mobs[i].mobid.equals("zombiehorse") || mobs[i].mobid.equals("skeletonhorse")) { /* Check for rider */
if(le.getPassenger() != null) { /* Has passenger? */
Entity e = le.getPassenger();
if (e instanceof Player) {
Expand Down
Binary file added src/main/resources/8x8/illusioner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/8x8/panda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/8x8/pillager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/8x8/ravager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/8x8/traderllama.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/8x8/vanillafox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/8x8/wandering_trader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ mobs:
pufferfish: true
tropicalfish: true
vanillaturtle: true
vanillafox: true
panda: true
wandering_trader: true
tradderllama: true
pillager: true
illusioner: true
ravager: true
parrot: true
horse: false
fireogre: false
Expand Down
Binary file added src/main/resources/illusioner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/panda.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/pillager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/ravager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/traderllama.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/vanillafox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/wandering_trader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.