Everything posted by Xawolf
-
Villager that defends himself.
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?
-
Villager that defends himself.
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.
-
Villager that defends himself.
Would this work if I had a code similar to Villager code with attack attributes added in?
-
Villager that defends himself.
It should defend itself when attacked and attack hostile mobs.
-
1.10.2 Item has wither
You can't just add an onUpdate into the item. You have to have a code that runs when, and only when the item is equipped.
-
Villager that defends himself.
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?
-
Villager AI inside 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.
-
Custom Villager death turns it into a normal zombie.
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.
-
Knockback Projectiles
Thanks a ton! I fixed it by adding a MotionY into it like you said and it worked.
-
Knockback Projectiles
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?