mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
completely implement iron golem and ocelot NPCs
This commit is contained in:
parent
d2cbf96596
commit
89197d3acb
@ -16,8 +16,8 @@
|
||||
<javac srcdir="${src}" destdir="${build}" debug="on" debuglevel="lines,vars,source" includeantruntime="false" encoding="Cp1252">
|
||||
<classpath>
|
||||
<pathelement path="${lib}" />
|
||||
<pathelement location="${lib}/bukkit-1.2.2-R0-SNAPSHOT.jar" />
|
||||
<pathelement location="${lib}/craftbukkit-1.2.2-R0-SNAPSHOT.jar" />
|
||||
<pathelement location="${lib}/bukkit-1.2.2-R0.1-SNAPSHOT.jar" />
|
||||
<pathelement location="${lib}/craftbukkit-1.2.2-R0.1-SNAPSHOT.jar" />
|
||||
<pathelement location="${lib}/CitizensAPI.jar" />
|
||||
<pathelement location="${lib}/hamcrest.jar" />
|
||||
<pathelement location="${lib}/junit-dep-4.10.jar" />
|
||||
|
Binary file not shown.
Binary file not shown.
4
pom.xml
4
pom.xml
@ -11,8 +11,8 @@
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<bukkit.version>1.2.2-R0-SNAPSHOT</bukkit.version>
|
||||
<craftbukkit.version>1.2.2-R0-SNAPSHOT</craftbukkit.version>
|
||||
<bukkit.version>1.2.2-R0.1-SNAPSHOT</bukkit.version>
|
||||
<craftbukkit.version>1.2.2-R0.1-SNAPSHOT</craftbukkit.version>
|
||||
<citizensapi.version>2.0-SNAPSHOT</citizensapi.version>
|
||||
<build.number>Unknown</build.number>
|
||||
</properties>
|
||||
|
@ -6,7 +6,7 @@ import net.citizensnpcs.npc.CitizensNPCManager;
|
||||
import net.minecraft.server.EntityIronGolem;
|
||||
import net.minecraft.server.World;
|
||||
|
||||
//import org.bukkit.entity.IronGolem;
|
||||
import org.bukkit.entity.IronGolem;
|
||||
|
||||
public class CitizensIronGolemNPC extends CitizensMobNPC {
|
||||
|
||||
@ -14,10 +14,10 @@ public class CitizensIronGolemNPC extends CitizensMobNPC {
|
||||
super(manager, id, name, EntityIronGolemNPC.class);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
@Override
|
||||
public IronGolem getBukkitEntity() {
|
||||
return (IronGolem) getHandle().getBukkitEntity();
|
||||
}*/
|
||||
}
|
||||
|
||||
public static class EntityIronGolemNPC extends EntityIronGolem {
|
||||
|
||||
|
@ -6,7 +6,7 @@ import net.citizensnpcs.npc.CitizensNPCManager;
|
||||
import net.minecraft.server.EntityOcelot;
|
||||
import net.minecraft.server.World;
|
||||
|
||||
//import org.bukkit.entity.Ocelot;
|
||||
import org.bukkit.entity.Ocelot;
|
||||
|
||||
public class CitizensOcelotNPC extends CitizensMobNPC {
|
||||
|
||||
@ -14,10 +14,10 @@ public class CitizensOcelotNPC extends CitizensMobNPC {
|
||||
super(manager, id, name, EntityOcelotNPC.class);
|
||||
}
|
||||
|
||||
/*@Override
|
||||
@Override
|
||||
public Ocelot getBukkitEntity() {
|
||||
return (Ocelot) getHandle().getBukkitEntity();
|
||||
}*/
|
||||
}
|
||||
|
||||
public static class EntityOcelotNPC extends EntityOcelot {
|
||||
|
||||
|
@ -47,12 +47,13 @@ public class NPCBuilder {
|
||||
types.put(EntityType.ENDERMAN, CitizensEndermanNPC.class);
|
||||
types.put(EntityType.GHAST, CitizensGhastNPC.class);
|
||||
types.put(EntityType.GIANT, CitizensGiantNPC.class);
|
||||
// types.put(EntityType.IRON_GOLEM, CitizensIronGolemNPC.class);
|
||||
types.put(EntityType.IRON_GOLEM, CitizensIronGolemNPC.class);
|
||||
types.put(EntityType.MAGMA_CUBE, CitizensMagmaCubeNPC.class);
|
||||
types.put(EntityType.MUSHROOM_COW, CitizensMushroomCowNPC.class);
|
||||
// types.put(EntityType.OCELOT, CitizensOcelotNPC.class);
|
||||
types.put(EntityType.OCELOT, CitizensOcelotNPC.class);
|
||||
types.put(EntityType.PIG, CitizensPigNPC.class);
|
||||
types.put(EntityType.PIG_ZOMBIE, CitizensPigZombieNPC.class);
|
||||
types.put(EntityType.PLAYER, CitizensHumanNPC.class);
|
||||
types.put(EntityType.SHEEP, CitizensSheepNPC.class);
|
||||
types.put(EntityType.SILVERFISH, CitizensSilverfishNPC.class);
|
||||
types.put(EntityType.SKELETON, CitizensSkeletonNPC.class);
|
||||
@ -67,8 +68,6 @@ public class NPCBuilder {
|
||||
|
||||
public CitizensNPC getByType(EntityType type, CitizensNPCManager npcManager, int id, String name) {
|
||||
Class<? extends CitizensNPC> npcClass = types.get(type);
|
||||
if (npcClass == null)
|
||||
npcClass = CitizensHumanNPC.class;
|
||||
try {
|
||||
return npcClass.getConstructor(CitizensNPCManager.class, int.class, String.class).newInstance(npcManager,
|
||||
id, name);
|
||||
|
Loading…
Reference in New Issue
Block a user