Posted January 6, 201510 yr public void onLivingUpdate(World world, int x, int y, int z) { if (!world.isRemote && this.getHealth() <= 15){ EntityWolf ewolf = new EntityWolf(world); ewolf.setLocationAndAngles((double)x + 0.5D, (double)y + 3D, (double)z + 0.5D, 0.0F, 0.0F); world.spawnEntityInWorld(ewolf); }if (this.getHealth() <= 15){ this.heal(0.5F); } super.onLivingUpdate(); } The title says it all My mob has 25 health so there is no trouble with the getHealth I have tried an other method .addPotionEffect(new PotionEffect(Potion.damageBoost.getId(), 30)); And it worked but not the one in the spoiler So i'm asking if someone can help me with this problem VampZ modder
January 6, 201510 yr Author Well, I need an another method because onLivingUpdate. World, int x, int y, int z doesn't work. I have been excepting that already I remember that there was a method called EntityUpdateTick or something VampZ modder
January 7, 201510 yr What doesn't work with the onLivingUpdate ? Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
January 7, 201510 yr Author I tried putting in the onLivingUpdate World world, int x, int y, int z That caused the method not to work, what i expected I tried using worldObj : EntityWerewolf entitywolf = new EntityWerewolf(worldObj); entitywolf.copyLocationAndAnglesFrom(entitywolf); worldObj.spawnEntityInWorld(entitywolf); After i tested it, it still doesn't work VampZ modder
January 7, 201510 yr Author Here's my class : https://github.com/NeoSup2130/Neo/blob/master/EntityWerewolf VampZ modder
January 7, 201510 yr Author acuatlly it makes sense because, i want it to spawn from the entity itself so if the "Real one"spawns the "Clone" it can retreat and the "Clone" can fight back VampZ modder
January 7, 201510 yr Author So there's the problem i was using entity in another class and here i'm using entitywolf but how can i set it like : entitywolf copy location from the spawner and not yourself because in my other class i used entity instead of entitywolf VampZ modder
January 7, 201510 yr Author Okay is used this method : entitywolf.setLocationAndAngles((double)2, (double)1, (double)2, 0, 0); and i found out that it spawns the mob at 2, 1, 2 well that's a begin ... is there a way that game can check how many things it can spawn the mob with this code? VampZ modder
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.