Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by nosrick

  1. This sounds a lot like a Java question, and it also sounds like you might be using the static keyword. Post some code, I'll take a look.
  2. Has anyone got any idea why this might be happening? Should I try switching the Entity to inherit from EntityTameable, and use the vanilla EntityAIFollowOwner? If I did, how would I set the owner the moment the egg hatched, rather than when it was fed a certain item?
  3. Oh, right! Now I get it. Thanks for clearing that up. I pretty much copied the way EntityAIFollowOwner does it, except I don't use data watchers because I am not familiar with them. A UUID is used in the Entity, because it is passed in from the egg it hatches from. An EntityPlayer is used in the AI, because otherwise I'd be calling worldObj.func_152378_a(UUID) all the time to get one for the information required to move towards it.
  4. Forgive my ignorance, but I'm not sure what you mean. Is it in two places?
  5. In the Entity's readFromNBT(NBTTagCompound), line 196. m_FollowAI.SetOwner(m_OwnerID, m_OwnerDimension);
  6. Here's the Entity: http://pastebin.com/QVCgMT4A And here's the following AI, where the owner is being set: http://pastebin.com/gDmMyiqa
  7. I'm not sure I can, since the loading occurs in the entity class. Is there a way for me to check when the player logs in, inside of that class? Just did the dimension saving thing; it made no difference, still returns null.
  8. World.func_152378_a(UUID) is supposed to return an EntityPlayer, but when I try to call it with a saved player ID (at world load, using NBT tags), it returns null. Does anyone know what I'm doing wrong?
  9. You shouldn't be storing the player, store their UUID, like so: protected UUID m_ownerID; Save it to NBT by writing it to a string, then load it from string and use UUID.fromString(string) to get it back.
  10. I'll elaborate: I realise there's one renderer for all entities, yes. What I'm doing is saving the age within the entity, then when the entity changes life stages, it sets a static ModelBase in the renderer to the new model, then changes the model field at the start of every render call. Feels pretty hacky, but it gets the job done. ...I also get the feeling this shouldn't work. But it does, so yay!
  11. [move]TRIPLE COMBO POST[/move] So I solved it. I just set the super's mainModel to the static model I have in my renderer, which can be changed by calling a function. It seems to work just fine.
  12. Are there any good, 1.7.10 tutorials on custom mob rendering? I'm utterly useless when it comes to graphics programming, so I could use all the help I can get. Sorry for the double post.
  13. My graphics programming skills are awful, so I call super.doRender and leave it at that. That's going to stop me changing my model, isn't it?
  14. Sorry to bring up a slightly old topic, have been ill a few days. So I've got texture swapping working, but not model swapping. How would I go about that? RenderEntityLiving's mainModel is a protected non-static value, and as far as I know, that's what's used for rendering. (Or renderPassModel, one of the two)
  15. Is it possible to change an entity's model at runtime? I'm having some trouble with my tamagotchi mod, wherein my 'gotchi has to age up and change model. Now, I have two options; change the model at runtime, or instantiate a new class and delete the old instance. So if it's not possible to change an entity's model at runtime, how would I go about deleting the old instance?
  16. My Java's a bit rusty, so that really helped me out. That did it! Thanks, Ernio.
  17. So I want to feed my creature stuff, and I've overridden the interact() function. But I need to find out if the player is currently holding food. How would I go about doing that? I thought about using Object#isAssignableFrom(Class<?>) but I don't think that will work. I hope this isn't too much of a Java question.
  18. Turns out it is possible, but it uses World.func_152378_a(UUID).
  19. I can only find World#getPlayerEntityByName(). Is it perhaps a 1.8 feature, or am I missing something?
  20. Thanks for all the help! I should be able to figure it out now, but if not, I'll report back.
  21. For my tamagotchi mod, I need to assign a player as an owner of a 'gotchi. I've got a tile entity representing the egg, which hatches into an entity, at which point it should start following a player around. So, is it possible to get the player who placed the egg down? If not, what might be a good way of assigning an owner to a new 'gotchi?
  22. No, but I figured it out. I was registering the recipe before I was registering the poop block, so it was getting nothing. I feel so stupid.
  23. More questions! So I've got a shapeless recipe, of one dirt block and one poop, but it just doesn't work. What am I doing wrong? I apologise in advance if it's something glaringly obvious. EDIT: Just to add, the code is most certainly being executed. I have a print statement above it that triggers.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.