Jump to content

yarinch

Members
  • Posts

    6
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

yarinch's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Hey everyone! I'm having a problem. I've been trying to solve it all day, tried many different ways to do it, looked up online and nothing helped. I have an entity I made that extends the Entity class (not EntityLivingBase). I'm trying to have it do something when iteracted with my own item. I've tried to use setSize(width, height) in the entity constructor. I've tried overriding the getBoundingBox to return return AxisAlignedBB.getBoundingBox(-2, -2, -2, 2, 2, 2); I've tried to override interactFirst in the entity class, didn't work. I've tried to override onLeftClickEntity in the item class, didn't work. Right clicking on the entity will right click on the block underneath it, and left clicking will break the block underneath. I'm trying to have the entity do something when left/right clicked (preferably right), but the methods don't seem to fire. (I've tested them by printing to the console in the start of the method) Note that I can't use itemInteractionForEntity because this method passes EntityLivingBase, but I'm using an Entity. I'm lost. Any help please? Thanks and happy holidays!
  2. WOW. It worked, I can't believe it Thank you so much!! Can you maybe explain what's the issue with setting the coordinates individually?
  3. Edit: Oops, wrong method. I think this is the right one: player.worldObj.scheduleBlockUpdate(x, y, z, block, ticksUntillUpdate); I think you should use player.worldObj.getBlock(X, Y, Z).notify(); to cause it to update.
  4. In the desired method (probably onUpdate()) I believe you can use: worldObj.getWorldTime() to get the time. It returns a long variable but I'm not sure how it's formatted (Never tested it). Probably same as commands set the time, where 0000 is the sunrise, and about 1700 is evening. You might want to set a timer though so it wouldn't check it every tick to prevent lag, though I think you should be fine.
  5. Thanks for the reply I already tried it earlier and tried it again now. It's still falling through blocks, but it shows a white box around all mob, including mine. Didn't know about that shortcut, thanks Any more ideas?
  6. PROBLEM SOLVED The solution was changing it to setLocationAndPosition when spawning instead of posX = , posY = , etc. Thanks! Hey everyone! I'm having issues with an entity I'm trying to create. I made it's model with thechne: http://pastebin.com/M88tdb2D . The entity is just falling through blocks into the void as soon as it spawns. I'm not sure why or how it happens. I also asked for help in the minecraft forums (Not sure if I'm allowed to link the post). I got alot of help, but still nothing could solve it. I tried looking at other people's code, deleting and changing my code, looking at the vanilla source code but nothing could help me. Hopefully any of you can solve my problem Thanks!
×
×
  • Create New...

Important Information

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