add new entities, wont work until Bukkit adds API for them

This commit is contained in:
aPunch 2012-03-01 10:13:37 -06:00
parent d2e7064d44
commit d2cbf96596
31 changed files with 97 additions and 5 deletions

5
README
View File

@ -4,6 +4,7 @@ Citizens is an NPC plugin for the Bukkit API. It was first released on March 5,
provides an API itself, which developers can use to create their own NPC characters.
Compatible With:
-Bukkit 1.2.2-R1
-CitizensAPI 2.0
-Bukkit 1.1-R5
-CraftBukkit 1.1-R5
-CraftBukkit 1.2.2-R1
-Minecraft 1.2.2

View File

@ -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.1-R5-SNAPSHOT.jar" />
<pathelement location="${lib}/craftbukkit-1.1-R5-SNAPSHOT.jar" />
<pathelement location="${lib}/bukkit-1.2.2-R0-SNAPSHOT.jar" />
<pathelement location="${lib}/craftbukkit-1.2.2-R0-SNAPSHOT.jar" />
<pathelement location="${lib}/CitizensAPI.jar" />
<pathelement location="${lib}/hamcrest.jar" />
<pathelement location="${lib}/junit-dep-4.10.jar" />

View File

@ -55,7 +55,7 @@ import org.bukkit.plugin.java.JavaPlugin;
import com.google.common.collect.Iterators;
public class Citizens extends JavaPlugin {
private static final String COMPATIBLE_MC_VERSION = "1.1";
private static final String COMPATIBLE_MC_VERSION = "1.2.2";
private volatile CitizensNPCManager npcManager;
private final InstanceFactory<Character> characterManager = DefaultInstanceFactory.create();

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityBlaze;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityCaveSpider;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityChicken;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityCow;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityCreeper;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityEnderDragon;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityEnderman;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityGhast;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityGiantZombie;
import net.minecraft.server.World;

View File

@ -0,0 +1,32 @@
package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityIronGolem;
import net.minecraft.server.World;
//import org.bukkit.entity.IronGolem;
public class CitizensIronGolemNPC extends CitizensMobNPC {
public CitizensIronGolemNPC(CitizensNPCManager manager, int id, String name) {
super(manager, id, name, EntityIronGolemNPC.class);
}
/*@Override
public IronGolem getBukkitEntity() {
return (IronGolem) getHandle().getBukkitEntity();
}*/
public static class EntityIronGolemNPC extends EntityIronGolem {
public EntityIronGolemNPC(World world) {
super(world);
}
@Override
public void d_() {
}
}
}

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityMagmaCube;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityMushroomCow;
import net.minecraft.server.World;

View File

@ -0,0 +1,32 @@
package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityOcelot;
import net.minecraft.server.World;
//import org.bukkit.entity.Ocelot;
public class CitizensOcelotNPC extends CitizensMobNPC {
public CitizensOcelotNPC(CitizensNPCManager manager, int id, String name) {
super(manager, id, name, EntityOcelotNPC.class);
}
/*@Override
public Ocelot getBukkitEntity() {
return (Ocelot) getHandle().getBukkitEntity();
}*/
public static class EntityOcelotNPC extends EntityOcelot {
public EntityOcelotNPC(World world) {
super(world);
}
@Override
public void d_() {
}
}
}

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityPig;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityPigZombie;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySheep;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySilverfish;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySkeleton;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySlime;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySnowman;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySpider;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntitySquid;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityVillager;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityWolf;
import net.minecraft.server.World;

View File

@ -2,6 +2,7 @@ package net.citizensnpcs.npc.entity;
import net.citizensnpcs.npc.CitizensMobNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
import net.minecraft.server.EntityZombie;
import net.minecraft.server.World;

View File

@ -15,8 +15,10 @@ import net.citizensnpcs.npc.entity.CitizensEndermanNPC;
import net.citizensnpcs.npc.entity.CitizensGhastNPC;
import net.citizensnpcs.npc.entity.CitizensGiantNPC;
import net.citizensnpcs.npc.entity.CitizensHumanNPC;
import net.citizensnpcs.npc.entity.CitizensIronGolemNPC;
import net.citizensnpcs.npc.entity.CitizensMagmaCubeNPC;
import net.citizensnpcs.npc.entity.CitizensMushroomCowNPC;
import net.citizensnpcs.npc.entity.CitizensOcelotNPC;
import net.citizensnpcs.npc.entity.CitizensPigNPC;
import net.citizensnpcs.npc.entity.CitizensPigZombieNPC;
import net.citizensnpcs.npc.entity.CitizensSheepNPC;
@ -45,8 +47,10 @@ 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.MAGMA_CUBE, CitizensMagmaCubeNPC.class);
types.put(EntityType.MUSHROOM_COW, CitizensMushroomCowNPC.class);
// types.put(EntityType.OCELOT, CitizensOcelotNPC.class);
types.put(EntityType.PIG, CitizensPigNPC.class);
types.put(EntityType.PIG_ZOMBIE, CitizensPigZombieNPC.class);
types.put(EntityType.SHEEP, CitizensSheepNPC.class);