I imported that one, but then when I import the EntityAITargetNonTamed it makes the huge error again and says the method is being used incorrectly. What does Predicate<Entity> do? Is there a replacement?
I imported everything, but Predicate has two import options and both end up causing the whole code segment you gave me into becoming an unfixable error according to Eclipse. I'm probably just missing something small, any pointers? Thank you for your help thus far by the way.
I'm making an rpg mod with a story line and quests and in order to do that I need mobs that give out quests. I thought I would do this through villager trading. However, my villagers are defenseless. I tried merging Iron golem code with Villager code, but that didn't work and my villager didn't spawn. I also tried Zombie Pigmen code but that failed even more miserably. Is there a way I can make the Villager's trade GUI appear when you right click a neutral mob?
I'm creating a rpg system in minecraft and I have an npc in mind that gives quests through villager trading, but will defend himself if attacked. Where would I begin to merge a Neutral mob's code with a Villager's code? I use 1.6.4 by the way.
Well, you should add the code:
public void onDeath(DamageSource par1DamageSource)
{
if (!this.worldObj.isRemote)
{
EntityZombie entityzombie = new EntityZombie(this.worldObj);
entityzombie.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.worldObj.spawnEntityInWorld(entityzombie);
this.setDead();
}
}
Haven't tried it myself, but this should work. If it doesn't look into zombie meta data.
I would like to add projectiles that have knockback. Unfortunately, I don't know how to add knockback to projectiles. When I try it only knocks mobs back when I aim at the positive coords but when I don't it sends them upwards. How do I fix this?