blob: 160b384150490d736956e3d4bbdc04634e738acf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package gtPlusPlus.plugin.villagers;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import gtPlusPlus.core.util.Utils;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
public class VillagerEventHandler {
private static final VillagerEventHandler mInstance;
static {
mInstance = new VillagerEventHandler();
Utils.registerEvent(mInstance);
}
@SubscribeEvent
public void onEntityJoinWorld(EntityJoinWorldEvent event) {
/*try {
if (event.entity != null && event.entity instanceof EntityLivingBase && event.entity instanceof EntityVillager){
EntityVillager entity = (EntityVillager) event.entity;
World world = entity.worldObj;
int profession = entity.getProfession();
if (world != null && (profession >= 7735 && profession <= 7737)){
EntityBaseVillager mNew = new EntityBaseVillager(world, profession);
mNew.copyLocationAndAnglesFrom(entity);
if (mNew != null) {
world.removeEntity(entity);
world.spawnEntityInWorld(mNew);
}
}
}
}
catch (Throwable t) {
t.printStackTrace();
return;
}*/
}
}
|