TheFantasyCraft / Forge-Permittor

Recoded Tekkit Permittor that automatically find blocks that need to be protected.
GNU General Public License v2.0
5 stars 8 forks source link

[Feacture]Blocking items near claims #6

Closed devryb closed 7 years ago

devryb commented 9 years ago

Is it possible for you to add a config option where we can add a list of items to block the right clicking near claims? Example firing a mining laser into the claim from outside of it could be stopped by having a setting like this.

thomas15v commented 9 years ago

Hmmm, what your asking is really messy. And will probably not get in to this plugin. Also for the record. I tried this with tekkit-permittor ages ago. And people always find a way to grief with it.

What version of industrialcraft2 are you using? Maybe if I find some time I write a bytecode patch for it :wink:.

EDIT: Oh, I see: Direwolf20 1.6.4 and 1.7.10. Hmmm I have a patch for turtles. But not for mining-lasers yet. I will see.....

devryb commented 9 years ago

I wouldn't put too much effort into that. I can list probably 30-40 items we would need to add to something like this. The mining laser I have no issues just blacklisting from use in the overworld if needed but the 30-40 other items are the challenge.

devryb commented 9 years ago

Thought I'd give a list here to show you what I mean. These are most of the major ones.

Chisel:

Applied Energistics 2:

Thaumcraft:

Minefactory Reloaded

Blood Magic:

WR-CBE Addons

Twilight Forest

Botania

QuiverBow

thomas15v commented 9 years ago

Holly cow, thats a lot of bytecode patches xD. Akward that that QuiverBow doesn't block. Probably its an event issue. Its kinda sad of thaumcraft :worried: . I like that mod. I guess I will try something with EntityMoveEvent after my exams :smiley: . Like when an entity enters claimed area's from outside, it will be removed. That is less messier that what you are asking :smile:.

devryb commented 9 years ago

That would probably solve half of the issues listed I would think. The rest we will likely have to make the hard decision on to ban/restrict

thomas15v commented 9 years ago

Hmm, As you probably know, bukkit and forge don't work good together. All these block modifying items need to be patches in the forge mod itself. This plugin has been made for mods that give forge/bukkit events and not for dirty fix mod issues. As these dirty fixes always get bypasses.

For so far I can see I can fix most of it. except these:

This is my idea.

  1. Player clicks an item and alerts the entity entering scanner.
  2. We wait 5 ticks and check if their is a new entity around the player.
  3. In case their is an entity we scan the loaded chunks around the player for claimed area's.
  4. In case of claimed area, we will track the moving entity.
  5. In case the entity enters a protected area, it will be removed and the player will be warned.
devryb commented 9 years ago

That sounds alright to me, hopefully doesn't require too much cpu time.

thomas15v commented 7 years ago

Closing this in favor of patching: https://github.com/densitycraft/Glue. Still being worked at.