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

Posted

Hello,

 

I want my mod to SMP compatible, but it edits base classes.

Is it possible to make this mod for SMP?

I know how to make SMP mods without base class edits, just so you know.

Hope you can help me.

 

ElConquistador

Your question isn't very clear. You say that you know how to make SMP mods that don't edit base classes, so just do that.

  • Author

That is for other sorts of mods. But the mod I'm currently working on DOES edit base classes.

And there is no way to do it without base class edits.

So I want to know if there is a way to create a server mod that is able to edit base classes.

 

ElConquistador

Don't edit base classes.

We're not gunna support people who edit base classes as that a antiquated shitty method that should never be used.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

[me=luacs1998]promptly points at NEI.[/me]

Base classes are edited, but yet NEI can be outside the jar.

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

  • Author

I will try to look at NEI.

And yes I understand that base class edits is not the prefered way of doing stuff.

But is tjere for instance a way to edit the max health of mobs or a way to change/replace the current inventory?

 

ElCon

Yes. The players inventory is EntityPlayer.inventory

 

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

for the mobs, this is not the best way,but u can use EntityRegistry.removeSpawn then u create a new entity using vannila model and render with your new healt or whatever.

 

ps: sorry the bad english.

[me=luacs1998]promptly points at NEI.[/me]

Base classes are edited, but yet NEI can be outside the jar.

 

Doesn't NEI use some sort of reflection in order to load in CB's own versions of vanilla classes, or something?

NEI uses asm, which is why it is a coremod

 

asm is not always better, if done poorly. Lately i have seen a few mods do a complete class replacement, which defeats the point entirely.  the key is to squeeze your hooks in and leave the rest as intact as possible, so other mods have a chance of modifying the same class successfully. If everyone does complete class overrides, the the whole thing is utterly pointless.

 

bytecode is basically a type of assembly, and is not even recongnizable to a java programmer(it is not meant to be human readable), but ask around and help can be found. NEI even needed help on that one ;)

 

However, simple functions, like changing privates to publics, is very easy.

 

 

  • Author

Thanks, any ideas for places where I can find good tutorials about asm.

I saw there was one on the wiki, but that is only private to public fields.

 

ElConquistador

Chickenbones distributed the source, just see how he did it

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

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.