Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Author

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^^"

  • Author

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

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

 

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.

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

  • Author

Well i do not know if i can make a test mod for that we want to make in the modjam^^

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.

  • Author

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.

-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.

 

 

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.