Jump to content

[1.7.2] Various update issues: entityId, PlayerTracker, onLeftClickEntity, etc.


WorldsEnder

Recommended Posts

I have various problems trying to update my mod from 1.6.4 to 1.7.2.

 

entityId:

I used the entityId of any entity as a Hash for my mapppings and stuff... NO I can't use extended properties because I gave the entity to openGui-method.

 

PlayerTracker:

In 1.6.4 I was able to register a PlayerTracker which featured methods like onConnect() etc.... as of now, this gives me compiler errors and I can't find another way to do it.

 

onLeftClickEntity:

I had an item that reacted in a special way when the player attacked an entity. I can't find the method onLeftClickEntity in the item-class anymore.

 

RenderLiving:

I have overridden the RenderLiving-class but a lot of code has changed. Can someone explain me what method is called when and how I (my class) am supposed to react?

 

ANSWERED:

KeyHandler:

I had registered a KeyBinding. It seems like either the classes got moved or something basic stuff changed. How can I register a key binding in the new version? Will the keyBinding persist between Minecraft starts?

Thanks Lex for all those new Events, I just found them, a big hug from me. (It's an InputEvent for everyone interested)

Link to comment
Share on other sites

Eeep, ninja'd.

 

Well, I'm poking around a bit.  What Forge build are you using?  Sometime yesterday 997 went up, which is what I'm working with.

 

entityID:

I've never messed with entityIds, so I don't know what you're looking for.  I found this.

 

net.minecraft.entity.Entity: protected java.util.UUID entityUniqueID

 

PlayerTracker:

So the interface IPlayerTracker is gone.  As far as I can tell, it's just gone.  However, it seems that all the functions you could override in it have equivalent events in cpw.mods.fml.common.gameevent.PlayerEvent.

For example, there's a PlayerChangedDimensionEvent and a PlayerLoggedInEvent.

 

onLeftClickEntity:

I didn't have any problem finding this one.  Found it first in the javadoc, and then double checked to find it in Eclipse.

 

net.minecraft.item.Item: public boolean onLeftClickEntity(ItemStack itemStack, EntityPlayer player, Entity entity)

 

RenderLiving:

I don't really know what you're looking for here, you'd have to be a bit more specific.  Maybe pastebin your modified code and I can have a look?

 


 

Mind you, on all of this, this is just me poking at Forge with a stick.  I'm just guessing.  Good luck, and let me know what does/doesn't work!

Link to comment
Share on other sites

Thank you diesieben07 for your feedback and I'll try to figure out things myself next time because this is definitly not what this forum is all about. onLeftClickEntity was my fault, it's still there. Have I said that I love how things are shifted to events? no? ok, I love it. Forum was good enough to port my alpha-version to 1.7.2, thanks guys

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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