RFTools

RFTools

74M Downloads

[FeatureRequest] Builder/Filter Integration with FTBUtilities Claims

Pingger opened this issue ยท 6 comments

commented

Hi,

since this is not a BugReport, I removed the Template.

Proposed Feature

A setting in the Builder/Quarry/Filter, that skips chunks, that are "claimed", "claimed by someone else" (only mine/build in chunks, that are claimed by own team/are unclaimed), "claimed by allies and own team" (allies might be tricky), "claimed by own team", "everything but own own claims".

With the option to force this setting by the server.

Reasons why this should be considered

On multiplayer servers it happens from time to time, that some accidentally quarries the base of someone else. While this might be intentional on a PvP Server, on a PvE Server this only leads to frustration.
On a small Server (~8 active players) this already happened twice within 1 week.

Alternative Idea

Add a fake Player for just the Quarries, that can be "enemied" by the Team, to prevent block manipulations by Builders. (I would consider this an ugly solution, but much simpler)

Thank you for your consideration!

commented

https://github.com/FTBTeam/FTB-Utilities/blob/be819a1f6026a1c3cc33f101bfb8815e1a330a27/src/main/java/com/feed_the_beast/ftbutilities/data/ClaimedChunks.java#L37

Here is a static reference for the current instance.
You should be able to check if the Class exists using Refelection and the access the instance field using Reflection.

I should be able to program the logic needed for this, but since I'm unfamiliar with how the UI in minecraft works and don't really plan on getting into the Minecraft-UI stuff, I would need heavy assistance on the UI-Button/-ComboBox ...

Could be integrated into:

public static boolean allowedToBreak(IBlockState state, World world, BlockPos pos, EntityPlayer entityPlayer) {

Or be put into Filter Logic, but that would make it hard for serveroverridden settings.

commented

Problem is that the builder isn't really aware of chunks and claiming. That's a bit out of scope here. Also not even sure how I could get to know that information since claiming can also be done with plugins.

commented

That might help for FTBUtilities but not for plugins

commented

Also that's internal code from FTBUtilities. I cannot simply call that

commented

From what I can tell we're throwing the event out to mods, mods just need to catch it and reject it. You need to enemie "rftools_builder" fake user. Ftb utils should support this.