gnembon / carpet-extra

Extra Features for Carpet Mod
GNU Lesser General Public License v3.0
292 stars 61 forks source link

[Suggestion] Minecart loading chunks #99

Open dali99 opened 4 years ago

dali99 commented 4 years ago

Let minecarts load chunks around them. On our (bukkit) server we have a plugin that lets minecarts traveling through whitelisted chunks load the area so they can move without player interaction. This allows for quite some interesting gameplay like having a postal system, automated shops, ordering items from centralized storage and so on.

As this is the only plugin we're using and since we want to go back to the vanilla minecraft jar itd be really cool if carpetmod could add something like that!

cpagentboot commented 4 years ago

But what if I don't want a minecart to load chunks? I dislike the chunk whitelist idea but I can't think of another way to have some minecarts load chunks, and some not. Perhaps something with activator rails?

The issue I'm seeing is that I have many stationary minecarts, just waiting to be used, and I don't want them to be loaded all the time. but if only moving minecarts were loaded, we couldn't have distant item-unloading stations without forcing the carts to just bounce back and forth which seems unintuitive.

Wither rose in a flower pot loads chunks, it would be funny if a wither rose in the inventory of a minecart would also load it, and also add a signifigant barrier-to-entry before you can send chest minecarts on road trips.

dali99 commented 4 years ago

i'm not sure why you would want a barrier to send minecarts on roadtrips? it's not like minecarts don't travel alone for balance reasons...

Our plugin only loads chunks while it's moving in the whitelisted chunks, areas where the minecart needs to stand still need to be forceloaded manually, (which you'd often have to do anyways because the mechanism might be bigger than 3 chunks)

bencrazyalchemist commented 4 years ago

I very much like this idea, in my opinion the best way to code it would be to have every time a minecart passes a chunk border check for and clear any previous such functions on it, then run a function that loads whatever chunk its in for 15 seconds.

One aspect of this to consider of my idea or most any is that it would make chunkloading very easy.

felix91gr commented 3 years ago

But maybe chunkloading should be easy?

At least it should be easy to do in a scalable way... otherwise, as it currently stands, triggering things at a distance requires quite a complex setup: 1 chunkloader every... chunk, pretty much, since the n-th loader loads the space in which the (n+1)th loader would be.