Jump to content

YoungErtu

Members
  • Posts

    61
  • Joined

  • Last visited

Everything posted by YoungErtu

  1. i read a tutorial about that in 1.8 and i found out that you can add this to your preInit in your main mod file and then it should work. you can add more things if you want just use this line metadata.// and then select something here is the code: /** * Mod Information */ ModMetadata metadata = e.getModMetadata(); metadata.autogenerated = false; metadata.name = //Mod name; metadata.description = //Description; metadata.credits = //credits, author; metadata.logoFile = "assets/modid/..."; metadata.url = //here url; /** ------------------------------------------------------------------------------ **/
  2. THANKS ERNIO, it works perfectly! It wasn't that hard to understand, but im wondering what uuid.getMostSignificantBits() & uuid.getLeastSignificantBits() means, does a UUID have this 2 long variables? Can anyone explain me that?
  3. Look at the EntityArrow class, there is an example, when the arrow is burning and hits a entity, the entity will be set on fire just look at that and you'll understand.
  4. i made an method to return the entity when the UUID is the same with the one that is saved to the NBT, but it seems that its not working it seems that the UUID is not the same with the saved UUID. This line isn't called, so it seems that the EntityUUID is not the same, could somebody tell me why? System.out.println("NIKORA UUID CHECKED"); and here the getUUID method: public static String getUUID(ItemStack stack){ NBTTagCompound nbtTagCompound = stack.getTagCompound(); if (nbtTagCompound != null){ return nbtTagCompound.getString("UUID"); } else return ""; }
  5. i tried to make a method how you said but im getting errors could you give me an example how you did that?
  6. yes, but the problem is, that the UUID that i save into the Item NBT-Tag, is a String, and getEntityFromUuid needs a UUID, so how can i check that?
  7. you can't use RenderLiving for Rendering a Projectile. public class RenderBlast extends [b]RenderLiving[/b]{
  8. getEntityByID needs a Int but UUID is a String, so i can't use it. is there any method to get a Entity by his UUID? because there is just a method for player UUID, i changed the item class now its saving the UUID of the Entity but i can't do anything with the UUID, when there is no Method for it.
  9. try to add an if-statement at: @Override @SideOnly(Side.CLIENT) public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { return new InvisibleArmorRender(); } do something like this: public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot) { if(player.isInvisible){ return new InvisibleArmorRender(); } else { return //and here the normal renderer } }
  10. I have one last question, how can i get the summoned Entity that if i right-click again the item, the summoned Entity will disappear?
  11. Thanks Ernio you're the best, it works, thanks for your help! And thanks to you guys for helping me too.
  12. It seems logical what you mean but i found out that this two variables are the problem, i can fix that with replacing them at applyEntityAttributes with there value, but why i can't use them as variables? private double spirit_damage = 2.0D; private double spirit_health = 20D; protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(spirit_health);} The Entity is dying because the health is 0 seems logical, but i would like to know why i can't use this 2 variables that i created. thanks for any help!
  13. That part is commented out. But back to topic. Sure about getCurrentMana() is over manacost? Yes im sure, when the current mana is lower than the manacost it will send a Chat Message and a System out print but it doesnt do.
  14. Help, I created an Entity which summonable by right-clicking an item but when i spawn it, it dies instantly and i dont know why, this just happened after i added something and changed a part of the code, before it worked fine and the entity didn't died. here the summon code in the item class: the entity: note no error, but it dies by his self. thanks for any help!
  15. How can i add an Entity which is summonable by an Item. This Entity should follow the player and fight for him, also while the entity is spawned it should consume Mana from the player and if the mana is 0 it should disappear. Also when using the item again it should disappear too. I read the code of EntityWolf but i really didn't get it, are there any examples to summon a mob that follows and fights for you with a spell? Thanks for any help, because i really don't know how i should start, at the moment i have a entity which does nothing, a model and a renderer. Everything works fine but now i need to change the entity to follow the player and fight for him.
  16. I changed the code and put it into onArmorTick Method, so if you don't want to use TickEvents you can use this
  17. because how you said before, the method is called 3 times for every armor piece, and making an if statement wouldn't solve this, because everytime when the method is called the if statement would be true and that means it would still be executed 3 times. No, it wouldn't. What he's saying is that if the player is wearing all three armor pieces, then you check if the currently-running code is from, say, just the helemet or just the chestpiece or whatever before consuming mana. This way, although the armor will check for all three pieces, only one of those pieces (whichever you test for) will actually consume the mana, not all three. ah ok got it, that would be possible
  18. because how you said before, the method is called 3 times for every armor piece, and making an if statement wouldn't solve this, because everytime when the method is called the if statement would be true and that means it would still be executed 3 times.
  19. SOLVED: Solution is creating a TickEvent with an if statement which checks if the full armor is worn and if yes what he should do. here an example for the code
  20. thanks man, packets resolved this problem!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.