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 there everyone,

 

i just wanted to ask if there is any SMP-Mod for Forge that contains functions to protect certain areas (like for example: faction does),

maybe even with the possibility to create groups.

 

I know that Forge is hook-based but since it has its own Multiplayer-Modloader (and does not work with the "old" MPLoader).

 

Maybe someone has an idea on how to protect certain areas.

 

Thanks in advance for any answers.

get bukkit is about the only current way but it would be nice to see a none bukkit area protection. Maybe someone could program a mod that is similar to area protection of spawn. Then instead of making it op only can build in the area switch it to player base.

 

http://www.mcportcentral.co.za/index.php <- link to mod version of bukkit

  • Author

Hope someone still reads this.

 

Is there any possibility to write server-side-only Forge-Mods or does there always have to be a client-sided mod?

Hope someone still reads this.

 

Is there any possibility to write server-side-only Forge-Mods or does there always have to be a client-sided mod?

yes you can write server side only mods. you just have too tell the mod that no client side mod is required. However, you are limited too what you can do since most things require client side in order to show player's things.

  • Author

yes you can write server side only mods. you just have too tell the mod that no client side mod is required. However, you are limited too what you can do since most things require client side in order to show player's things.

 

Ok, last question. Is there any mod that could serve as an example? (Preferably written with Forge) Even the smallest example could help :)

yes you can write server side only mods. you just have too tell the mod that no client side mod is required. However, you are limited too what you can do since most things require client side in order to show player's things.

 

Ok, last question. Is there any mod that could serve as an example? (Preferably written with Forge) Even the smallest example could help :)

there is a mod that does server side commands on this forum that is server side only. Another is my teams mod(click pic bellow) which is server side only too.

I had no clue myself, I just made a repository and installed the windows client, made a local copy of the repository, opened the folder and put in my mod file.

I haven't found a good tutorial myself

Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing.

width=700 height=100http://dries007.net/banner.png[/img]

For using git and github?  Github itself has tons of very useful step-by-step help guides, and Google has far far more.  It is quite simple once you see.

I'm looking into an area protection, but it's hard... I don't think there are forge hooks for that, but I have no clue on how to request them, and If I have to make it myself, how they need to be formatted,.....,

 

And the MC spawn protection is complicated as f*

Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing.

width=700 height=100http://dries007.net/banner.png[/img]

Well I found a way, but I need to edit "NetServerHandler.java" to override parts of "handleBlockDig" and "handlePlace".

 

I now bypass the spawn-protection check there and use the one in "this.playerEntity.worldObj.canMineBlock" (That is overridden by WorldServer.java's canMineBlock so the hook should be added there) , By doing this you can allow and deny block-changes in 1 loop instead of 2.

 

If your mod then wants to deny (or specifically allow) block-changes you only need to 'add' a deny (or allow) condition to the "canMineBlock" hook.

 

(I'd like it to work like the IChatHandler. Intercepting all request and forwarding them to registered handlers and if the mod doesn't deny (or allow) the block-change you let the vanilla code do it)

 

I hope my explanation was clear, I have can't express it better.

 

Ps There is already a spawn-protection in "this.playerEntity.worldObj.canMineBlock", but it doesn't do anything. (to my knowledge)

Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing.

width=700 height=100http://dries007.net/banner.png[/img]

I have just sent a Pull-request for a hook that makes stuff like this possible.

 

Now I need to figure out what the best way is to save the 'regions' and there radius.

Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing.

width=700 height=100http://dries007.net/banner.png[/img]

You could make it very simple and do protection per chunk like factions and and a few other protection mods do, just store the data in the chunk save handler.

Yea, maybe...

I'm trying to do it list-based now, saved in a .txt file (like the ops are saved) but I'm afraid that's gonna lag a lot

Does not matter, that is only saving/loading, not internal processing.

O nice, I think i wanna format the file like this:

 

Name1;PosX;PosZ;Radius
Name2;PosX;PosZ;Radius
Name3;PosX;PosZ;Radius
Name4;PosX;PosZ;Radius

 

the names would make it easier to manage i think

 

(If a permisson system is added I'dd add ";permlvl", if you are above the lvl specifyd you can edit)

Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing.

width=700 height=100http://dries007.net/banner.png[/img]

I only need the forge hook approved and make the system error proof

(make it so you can add and remove regions ingame and don't kill the server if you type the command wrong)

Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing.

width=700 height=100http://dries007.net/banner.png[/img]

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.