Jump to content

Recommended Posts

Posted

By the way i found a way to override indereclty tile entities.

I just copy the class and add my functions.

because we make our own dimension i just need to override the block^^".

In the createTileEntity function of forge i have the metadata and what is more important the world. i can still access it. And with that i can tell when the dimensionID is my one than load my overriden tile entities. Else load the normal tileentities^^"

 

That is a way^^"

Posted

Another Reply. I readed this thread about 5 times. And i saw that we talk in diferend ways:

 

First Mazetar: I make another dim. You already know that.

 

You asked: How do you want override/edit vannilla classes when you can not do that?

 

My answer: I do not need to override/edit vannilla classes. For the most blocks we make a replacement block. Like: For a furnace we have a realistic furnace.

 

Another thing: We exchange the whole inventory of a player which is joining/leaving the dimension so we have no trouble with other blocks.

 

Now to my problem(Half solved): I want to make out of mod blocks realistic blocks. Like a Buildcraft engine. With an addon we will replace the old engine with our one. How? read the last post.

 

But we can not access every class. Like Ic2 is hiding his code. Thats kind of a trouble. Thats why the question how can i override classes without extends their mod.

 

I hope i made everything understandable

Posted

As mentioned above You don't override a class, you override methods.

 

  Quote
Like Ic2 is hiding his code. Thats kind of a trouble. Thats why the question how can i override classes without extends their mod.

The simple answer is, if it's not in their API you can't :P

 

And to my knowledge without knowing anything about the code for the thing you want to extend and change, well then it simply ain't possible to do such a thing.

  Quote

If you guys dont get it.. then well ya.. try harder...

Posted

Wasn't Modjam finished, like, weeks ago ?

 

Anyway, to change classes without using them directly, use a class reader and bytecode manipulation.

If you can do it on Mojang classes, you can do it on other mods classes too.

Posted

The last modjam was in the summer. I do not know when the next is.

And gotoLink you did not read every post. Then you should know my plans.

 

First we do not override any Vanilla class. We just exchange the inventory when someone join the dimenion.

 

Another thing is we make the core mod at the modjam. And after the modjam we make the addons for it. And these addons override other mods.

Posted
  On 10/9/2013 at 3:12 PM, Moritz said:

-snip -

You didn't read his post correctly, he did tell you exactly how to change other mod's classes without changing them directly and that's the only way to do it as well.

 

 

  Quote

If you guys dont get it.. then well ya.. try harder...

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.