Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Ability for areas not claimed to be automatically regenerated over time? #189

Open
StargateMC opened this issue Dec 26, 2015 · 81 comments
Open

Comments

@StargateMC
Copy link

Hi Mark,

It'd be really cool for anywhere in the wilderness to automatically reset back to the default block from the world seed over time...

Just a feature request/suggestion :)

@StargateMC
Copy link
Author

Also popped this in with massivecraft, no point you doing it if they are willing to =D

@markhughes
Copy link
Owner

Let me know if this is still required.

@StargateMC StargateMC reopened this Jan 3, 2016
@StargateMC
Copy link
Author

Hi @markehme Factions rejected this idea as they have a proprietary plugin for it.

if you can do this, this would be something that a lot of people would love!!! Allows us to have perpetual worlds without admin intervention kind of thing..

@StargateMC
Copy link
Author

Simply put this idea would be to either:

  1. On chunk unclaim revert to seed of world
  2. On a schedule do the same for unclaimed chunks (that have been modified)

If you can allow them to be configured individually I'd appreciate it :)

@markehme if you do this I'm more than happy to pay a smallish amount, especially if this works with Factions 2.5 (latest Kcauldron supported)

@markhughes
Copy link
Owner

Working on this for you. Please if you're thinking of supporting my plugin development contribute to my patreon campaign!

Does the latest version of FactionsPlus work on Factions 2.5? I always test on the latest version of Factions so I'm not too sure! If it throws errors, let me know and I'll see if it'll be easy to support! :)

https://www.patreon.com/markehme

@StargateMC
Copy link
Author

Hi Mark,

Will do some testing with the latest FactionsPlus soon as possible.
With regards to the latest factions, I'm sure you are aware of the whole We don't support KCauldron thing... that has me stuck on less than v2.6 :(
Fix that too and I'll update in a heartbeat ;)

One last thing - just quickly, if you could allow us to set a list of worlds that do not get regenerated under any circumstance, similar to the "WorldsNoPowerLoss" setting, that would be awesome too.

Will definitely look to donate some funds now!

  • Damian

@markhughes
Copy link
Owner

Absolutely! Making everything as configurable as possible is what I want most :)

@StargateMC
Copy link
Author

Donated :) Sounds great man!

@markhughes
Copy link
Owner

I appreciate it so much! I'll need to add you on Skype 👍

@StargateMC
Copy link
Author

Haha thanks man! Drakster@live.com.au is the Skype.

Some basic testing with the (second to latest) build of KCauldron + Your latest plugin results in some fun errors... :(

Taken from the errorlog.


, ----------------------------------------
Error Log started on Sat Jan 16 19:55:50 AEDT 2016
----------------------------------------
Server Version: 1.7.10-1614.174 (MC: 1.7.10)
FactionsPlus Version: 2.0.0-beta3
Factions Version: 2.5.0
MassiveCore Version: 7.3.0
----------------------------------------
Error:me/markeh/factionsframework/command/versions/FactionsCommand2XWrapper
----------------------------------------
java.lang.NoClassDefFoundError: me/markeh/factionsframework/command/versions/FactionsCommand2XWrapper
    at me.markeh.factionsframework.command.versions.FactionsCommandManager2X.addCommand(FactionsCommandManager2X.java:28)
    at me.markeh.factionsplus.commands.CommandManager.enableCmd(CommandManager.java:73)
    at me.markeh.factionsplus.commands.CommandManager.add(CommandManager.java:44)
    at me.markeh.factionsplus.FactionsPlus.enable(FactionsPlus.java:91)
    at me.markeh.factionsplus.FactionsPlusPlugin.onEnable(FactionsPlusPlugin.java:42)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410)
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:415)
    at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:349)
    at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:511)
    at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:485)
    at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:445)
    at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:336)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:631)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Failed to remap class me.markeh.factionsframework.command.versions.FactionsCommand2XWrapper
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:488)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:409)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:211)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 16 more
Caused by: java.lang.NoClassDefFoundError: com/massivecraft/factions/cmd/FactionsCommand
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.remappedFindClass(PluginClassLoader.java:476)
    ... 20 more
----------------------------------------

@markhughes
Copy link
Owner

May need to create a different compatibility layer to support that version of Factions.. let me see what I can do!

@StargateMC
Copy link
Author

If you can I really appreciate it man!

My server is stargatemc.com by the way, it's a hobby project I've had going for quite some time now (Ive only just released a v1.0 server for players to play on).

If you'd like a rank on that, let me know!! :)

PS: Just so you know the main features I use in your plugin are inventory saving and hopefully the world regen, haha.. if that compatibility layer only worked for those two features I'd still be happy.. but not saying you'd do it that way :)

@markhughes
Copy link
Owner

Spent the past few hours supporting <= Factions 2.6.0 and the newer upcoming command structure thats been introduced (their API is getting painful to keep up with! )

@StargateMC
Copy link
Author

Wow, thanks Mark :D

So it looks like we're good for compatibility then?

With regards to Particle Effects and PlayerInventory by the way, I've got access to the source for KCauldron and cant find it anywhere, would that be a bad sign?
https://gitlab.prok.pw/KCauldron/KCauldron/repository/archive.zip?ref=master

@markhughes
Copy link
Owner

Sure are. I'm just trying out the development builds of Factions now.

@StargateMC
Copy link
Author

< Sorry I read your post wrong... bit unobservant! >

Fantastic news FP will soon support Factions 2.6 or lower!

I have other news - during testing I found the v0.7.1 build you gave me last year will not support v2.7.0 - but there is no reason why KCauldron cant use v2.7.0. Appears that it might be the last build that works.

Regardless, it didn't work with FP v0.7.1 and v2.0.0 beta so the supporting backwards factions versions is still absolutely awesome!

@StargateMC
Copy link
Author

@markehme Hey man, wondering if we can test the dev build with 2.6 compatibility? That is if its ready for some beta testing!! :)

@markhughes
Copy link
Owner

When a player enters a chunk we store the chunks x and z values along with a timestamp.

Every specified minutes (default, 10) we check if it is past the regeneration time.

By default it will reset using the seed.. however, as seen in the past Minecraft does change their biome generation algorithms now and then. Which is why we will hook into logblock and a few others so we can easily revert changes.

@StargateMC
Copy link
Author

Hi Mark,

I'm assuming you mean leaves a chunk?

Glad you support seed only, I understand the differences in generator code. We cant use either Prism or Logblock with forge items, so glad you've left that in.

What happens to offline players? :)

Does this do a whole chunk at once, or block by block at a slow pace to prevent lag?

@StargateMC
Copy link
Author

Hi @markehme

Is the 2.6 support finished? I'm not seeing any reasons why I cant build based on your code and run with it ( Not including wilderness regen)

@markhughes
Copy link
Owner

Serious issues with the TMap in the configuration file management. Only used for warps and warp passwords at the moment though - I don't recommend using the current version on GitHub.

If an offline player is inside a recently regenerated chunk they at the moment will be stuck inside any blocks/changes/etc.. but I could make it detect this and have them pop to the top-most block?

It will redo the chunk in a seperate thread (i.e. won't effect other actions on the server).

@StargateMC
Copy link
Author

@markehme You are a genius... Top most block is great!
If theres any chance you could do a config, would you mind adding support for that to teleport to world spawn if theyre offline? Players may find themselves disoriented if the landscape is changing after logging out... Most servers will have a world spawn that is constant and claimed... we do, it has a stargate on it too....

Separate thread is a win!

I'll hold off on testing then, super excited sorry!

@markhughes
Copy link
Owner

Sure :) I'm working on the TMap issue at the moment, should be fixed in half hour to an hour. If you wanted to test that build that would be awesome.

To use <= 2.6 you need to have an additional plugin i've made called "Factions 2.6 Patches" which just adds classes in for compatibility. :)

@StargateMC
Copy link
Author

Win!!!

I'll try Factions 2.5 with FP as soon as you post it is ready :)

@markhughes
Copy link
Owner

You do need Factions 2.6 Patches, make sure it is in your plugins folder as well!

Let me know if it works. I will trial it in a bit myself

@StargateMC
Copy link
Author

See attached logs, this is with Factions 2.5 (Testing with 2.6 now)

@StargateMC
Copy link
Author


Error Log started on Tue Jan 19 17:34:08 AEDT 2016

Server Version: 1.7.10-1614.174 (MC: 1.7.10)
FactionsPlus Version: 2.0.0-beta4
Factions Version: 2.5.0

MassiveCore Version: 7.3.0

Error:me.markeh.factionsframework.command.versions.FactionsCommand2_6Wrapper.setHelp(java.lang.String)

java.lang.NoSuchMethodException: me.markeh.factionsframework.command.versions.FactionsCommand2_6Wrapper.setHelp(java.lang.String)
at java.lang.Class.getMethod(Unknown Source)
at me.markeh.factionsframework.command.versions.FactionsCommand2_6Wrapper.(FactionsCommand2_6Wrapper.java:55)
at me.markeh.factionsframework.command.versions.FactionsCommandManager2_6.addCommand(FactionsCommandManager2_6.java:30)
at me.markeh.factionsplus.commands.CommandManager.enableCmd(CommandManager.java:73)
at me.markeh.factionsplus.commands.CommandManager.add(CommandManager.java:44)
at me.markeh.factionsplus.FactionsPlus.enable(FactionsPlus.java:91)
at me.markeh.factionsplus.FactionsPlusPlugin.onEnable(FactionsPlusPlugin.java:42)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410)
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:415)
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:349)
at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:511)
at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:445)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:336)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:631)

at java.lang.Thread.run(Unknown Source)

@StargateMC
Copy link
Author


Error Log started on Tue Jan 19 17:34:08 AEDT 2016

Server Version: 1.7.10-1614.174 (MC: 1.7.10)
FactionsPlus Version: 2.0.0-beta4
Factions Version: 2.5.0

MassiveCore Version: 7.3.0

Error:com.massivecraft.factions.cmd.CmdFactions.addSubCommand(com.massivecraft.factions.cmd.FCommand)

java.lang.NoSuchMethodException: com.massivecraft.factions.cmd.CmdFactions.addSubCommand(com.massivecraft.factions.cmd.FCommand)
at java.lang.Class.getMethod(Unknown Source)
at me.markeh.factionsframework.command.versions.FactionsCommandManager2_6.addCommand(FactionsCommandManager2_6.java:34)
at me.markeh.factionsplus.commands.CommandManager.enableCmd(CommandManager.java:73)
at me.markeh.factionsplus.commands.CommandManager.add(CommandManager.java:44)
at me.markeh.factionsplus.FactionsPlus.enable(FactionsPlus.java:91)
at me.markeh.factionsplus.FactionsPlusPlugin.onEnable(FactionsPlusPlugin.java:42)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410)
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:415)
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:349)
at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:511)
at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:445)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:336)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:631)

at java.lang.Thread.run(Unknown Source)

@StargateMC
Copy link
Author

@markehme Happy to test for you if you're up for compiling a build :P

@markhughes
Copy link
Owner

Compiling is a bit of a handful (.. ugh) here it is. I haven't looked at it in a few days - i've been away on a holiday, it should be ok though..

FactionsPlus.jar.zip

@StargateMC
Copy link
Author

Hi @markehme Thanks for that! All good.. holidays are needed haha!
I'm getting an exception as soon as I enable Regen :/ see below

org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:338) ~[JavaPluginLoader$1.class:1.7.10-1614.184]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[RegisteredListener.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:507) [SimplePluginManager.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:492) [SimplePluginManager.class:1.7.10-1614.184]
        at me.markeh.factionsframework.events.listeners.FFListenerFactions2_X.onFactionDisband(FFListenerFactions2_X.java:89) [FactionsPlus.jar:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:334) [JavaPluginLoader$1.class:1.7.10-1614.184]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [RegisteredListener.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:507) [SimplePluginManager.class:1.7.10-1614.184]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:492) [SimplePluginManager.class:1.7.10-1614.184]
        at com.massivecraft.massivecore.event.EventMassiveCore.run(EventMassiveCore.java:30) [massivecore.jar:?]
        at com.massivecraft.factions.cmd.CmdFactionsDisband.perform(CmdFactionsDisband.java:60) [factions.jar:?]
        at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:828) [massivecore.jar:?]
        at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:785) [massivecore.jar:?]
        at com.massivecraft.massivecore.command.MassiveCommand.execute(MassiveCommand.java:869) [massivecore.jar:?]
        at com.massivecraft.massivecore.command.MassiveCoreBukkitCommand.execute(MassiveCoreBukkitCommand.java:61) [massivecore.jar:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:181) [SimpleCommandMap.class:1.7.10-1614.184]
        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.dispatchCommand(CraftServer.java:717) [CraftServer.class:1.7.10-1614.184]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:1317) [nh.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:1099) [nh.class:?]
        at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:38) [ir.class:?]
        at net.minecraft.network.play.client.C01PacketChatMessage.func_148833_a(C01PacketChatMessage.java:53) [ir.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:245) [ej.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:173) [nc.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:991) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [lt.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]
Caused by: java.lang.NullPointerException
        at me.markeh.factionsplus.listeners.CoreListener.onDisbandRemoveFromScoreboard(CoreListener.java:79) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:334) ~[JavaPluginLoader$1.class:1.7.10-1614.184]
        ... 31 more

@markhughes
Copy link
Owner

This has to do with one of the scoreboard events on disband. Shouldn't even be running it yet.

I've just started making a huge change so I can't compile it right now either - yikes, try disabling scoreboard features.. not sure if it will help though

@StargateMC
Copy link
Author

The events also don't kick in at all... I travelled 500 blocks in one direction and came back and the chunk hadn't done anything.... I set the ms to 50.. Haha

Sent from my iPhone

On 9 Feb 2016, at 11:13 PM, Mark Hughes notifications@github.com wrote:

This has to do with one of the scoreboard events on disband. Shouldn't even be running it yet, let me turn it off


Reply to this email directly or view it on GitHub.

@StargateMC
Copy link
Author

@markehme Is it possible KCauldron isn't registering your regeneration events?

@markhughes
Copy link
Owner

50ms.. jeeze. Try setting it to 5000ms :)

@StargateMC
Copy link
Author

haha... Okay :P

@markehme Is this anything to worry about? Happens on start with Regen enabled.... 5000ms doesn't help either :(

java.lang.NullPointerException
at me.markeh.factionsplus.FactionsPlus$1.run(FactionsPlus.java:163) ~[?:?]
at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[CraftTask.class:1.7.10-1614.184]
at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:346) [CraftScheduler.class:1.7.10-1614.184]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:873) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [lt.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]

@markhughes
Copy link
Owner

Yep :( i'll look into this more later. We're close though!

@StargateMC
Copy link
Author

@markehme no worries man! Happy to help in anyway I can.. lol!

@StargateMC
Copy link
Author

@markehme I know your busy with the Cauldron stuff at the moment, but is there any chance you have an ETA for this guy ? : P

@StargateMC
Copy link
Author

@markehme whoops I closed it my bad

@StargateMC StargateMC reopened this Feb 24, 2016
@StargateMC
Copy link
Author

@markehme I'd be tempted to make this into its own plugin hey. You could easily make $5-10 a hit imo... As a premium resource.

@markhughes
Copy link
Owner

No problem. It should be working in-source now though, I need to do further testing

@StargateMC
Copy link
Author

@markehme compile a copy and I'll happily help ;)

@StargateMC
Copy link
Author

@markehme This any closer to completion bro?
The Code is not working in source, the task /scheduled job you run for wilderness throws NPEs and never executes.

@StargateMC
Copy link
Author

Any luck man?
I really wish I knew Bukkit haha
Just spent the last 3 months learning Java and basic forge

@markhughes
Copy link
Owner

I've been sick all week unfortunately and haven't gotten around to my side projects much

@StargateMC
Copy link
Author

No worries bud. GWS!

@StargateMC
Copy link
Author

@markehme Hey Man, hope you're well. Has there been an update on this one?

@markhughes
Copy link
Owner

I've been changing a lot inside FactionsFramework to make this a bit easier to work with, I'll let you know. 😄

@StargateMC
Copy link
Author

Hi @markehme

I decided to learn bukkit.... https://www.spigotmc.org/resources/regenerator.21470/
Thought it is better to stop hounding you :P

@markhughes
Copy link
Owner

@DraksterAU awesome :) I'm actually abandoning the FactionsPlus project for FactionsFramework and creating all the features into modules instead. That info will come in the future though 😄

@StargateMC
Copy link
Author

Awesome to hear man, modular stuff is better... plus some of those modules can be premium paid stuff! Earn some coin for your work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant