For proper/better handling of multiplayer, the only thing I can think of for the work queues is to make them a bag / priority queue, with the priority tag being distance from nearest player, and the "bag" effect to remove duplicates.
In other words, chunk X/Z, with priority distance, would be added only if that chunk either is not already there (so that's a concurrent hashmap check), or present with a higher cost (so the cost has to be tagged with the chunk ... but that means that the object that represents a chunk + priority value will no longer be unique, and may be duplicated in the hashmap ...)
How are you handling this in the re-write? Do you have a better way to deal with this? (Hopefully something simple I overlooked).
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
For proper/better handling of multiplayer, the only thing I can think of for the work queues is to make them a bag / priority queue, with the priority tag being distance from nearest player, and the "bag" effect to remove duplicates.
OK, so in Java, sets are "no duplicates". So I could have something that tags a dim/X/Z triple to tell which chunks need updating, and a given location won't be in the set to update twice.
I don't see a way to associate a priority with that. ...
Unless ... do java hashmaps give you the "keys are unique" property? Dim/x/y is the key, priority and chunk data is the returned value.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Re: the thing with flow rates from way further up, this is what makes lava flow slower, making it flow only every Nth tick. Approach is a bit messy, mostly because I forgot about it until way later on when I actually made it replace lava
Re: Updates etc. Keys in a hashmap are unique (more accurately, every key in a hashmap has a different hashcode and/or can be distinguished using the equals method), but given that chunkdata already has dim/x/z, sets will work fine imo.
See: this class (particularly the flagUpdates method).
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Two reasons: 1, I wanted to have the world around me display before I started playing with the fluid flow, and 2, when I was working on a mod packed for jampacked 2, and was using this to make a lava ocean flow down (it was the maps' time limit), I really, *really* wanted to disable the flow while I was adjusting the map.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
I didn't understand the download page.. i like to implement that mod in my private modpack and test it out. What i need to download exactly?
Thanks for everything
Stefan
Two choices:
1. 4Head's original proof of concept mod. Probably slightly better performance than mine.
2. Mine has rainfall, compatibility with several mods, and, at the moment, not quite so good performance wise.
I'm working on getting both performance up, and fixing the FAR queue. (4Head's rewrite solves both of those, but is not out yet.)
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
4Head: I did not see ConcurrentSet or ConcurrentLinkedDequeue in the J7 docs. Are those J8 classes?
... "Set" is abstract in J7. Which implementation to use ...
EDIT: Looks like LinkedHashSet, because of iteration.
EDIT 2: Even better, the far set no longer needs both a uniquing set and an ordering queue, it does both.
EDIT 3: So ChunkCache is where ConcurrentLinkedQueue's are used ... and where I change to LinkedHashSet, for the unique and order effect.
EDIT 4: ... and the list for the "threads" is a different list.
EDIT 5: LinkedHashSet has a concept of order, but no "removeFirst" or anything of that sort? ... A "UniquedQueue" -- a Set/Queue combo, instead of a Multiset/Queue combo.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
I started working on the old version while 4Head was away. I needed Cofh compatibility.
Then, it was some bug fixes (still have a few annoyances to fix).
Rainfall was something I wanted to work because of water resupply -- later, of course, I found that RotaryCraft reservoirs, when open in the rail, will fill up -- and that, plus a pipe and a liquid spiller, will result in water refilling without my having done that in the first place.
Right now, i just want to make what I have work better -- it will be going into an SMP server, and it won't work nice with even 2 people.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
This mod changes the behavior of blocks 8-11 (water and lava).
So your existing static liquids will start to flow if there is any hole in the ground.
... which is very, very common in minecraft.
---
Current status: Got one more annoying issue to take care of. Coding while sick is slower than normal, even if it's just a normal cold. Do not ask me how long I spent last night before I realized that while I was adding chunks to a tracking set, I was never removing them after processing the chunk.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
So I just now found that you have a uniquing version of a queue.
But you only used it for block updates to defer to the server queue.
EDIT: And, Eclipse gives this message:
- The serializable class QueueSet does not declare a static final serialVersionUID field of type long
EDIT 2: UGH. There is one delegator, and an array of worlds. I've been using a per-delegator guard set to track which chunks are already in the task queues, but that's not adequate with dimensions.
In fact ...
** How the Nether do you currently track outstanding far queue chunks when players are in multiple dimensions at the same time? The far thread queue doesn't track worlds, as far as I can tell, only chunks.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
EDIT: Nope. In an ocean (finally found one), and the far queue goes to size 0, and stays there. Failure. Gotta figure out why.
EDIT 2: FOO.
Every time the server timed out and aborted the far queue, the chunk that was being looked at would never be looked at again until it went into the near queue.
As long as I was moving, I didn't notice this.
But standing still, and it was very obvious.
Oh, and the nether isn't super-nice anymore :-)
EDIT 3: Yep, away from any rivers or oceans, it is handling an 8 chunk radius with no server slowdown. (That's the lava underground, plus lake seepage, etc.)
Moving towards rivers/oceans, it at least has these features:
1. Near is updated every tick
2. Far does not lose updates, and will eventually get to every chunk in range.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
I am prepping a release. I wanted to get it out for XMas.
But ... I have code that is commented out, and *STILL* logging debug messages. Worse, the line numbers don't match the code lines. And yes, I did a clean.
Augh.
Release will not happen until after Christmas, sorry.
Source is up on Github, but it's got all the debug spam.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
** How the Nether do you currently track outstanding far queue chunks when players are in multiple dimensions at the same time? The far thread queue doesn't track worlds, as far as I can tell, only chunks.
If we need to process a chunk, then this chunk needs to be processed, end of story. The dimension is really only important in figuring out which chunks actually need to be processed. As to which dimensions the players and chunks happen to be in, it simply doesn't matter after the chunk is queued.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
For proper/better handling of multiplayer, the only thing I can think of for the work queues is to make them a bag / priority queue, with the priority tag being distance from nearest player, and the "bag" effect to remove duplicates.
In other words, chunk X/Z, with priority distance, would be added only if that chunk either is not already there (so that's a concurrent hashmap check), or present with a higher cost (so the cost has to be tagged with the chunk ... but that means that the object that represents a chunk + priority value will no longer be unique, and may be duplicated in the hashmap ...)
How are you handling this in the re-write? Do you have a better way to deal with this? (Hopefully something simple I overlooked).
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Just a thing, for a few seconds of this mod, it will take up so much space on the console, it is just pure spam, is there anyway this can be disabled?
I thought I had removed the debug spam? Which version, and what output is it giving?
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Latest
It's giving 'block has updated at x y z' (not exact, but that's sort of what it is outputting) and it's about 10 lines per second
I'd need the actual error message.
That it is printing is significant; what it is printing will let me figure out what is going on.
Also: Which version is "latest"?
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
OK, so in Java, sets are "no duplicates". So I could have something that tags a dim/X/Z triple to tell which chunks need updating, and a given location won't be in the set to update twice.
I don't see a way to associate a priority with that. ...
Unless ... do java hashmaps give you the "keys are unique" property? Dim/x/y is the key, priority and chunk data is the returned value.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Re: the thing with flow rates from way further up, this is what makes lava flow slower, making it flow only every Nth tick. Approach is a bit messy, mostly because I forgot about it until way later on when I actually made it replace lava
Re: Updates etc. Keys in a hashmap are unique (more accurately, every key in a hashmap has a different hashcode and/or can be distinguished using the equals method), but given that chunkdata already has dim/x/z, sets will work fine imo.
See: this class (particularly the flagUpdates method).
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
OK, down to just needing to unique the backlog queues. Tomorrow?
EDIT: I like that routine.
If near then near.add(), far.remove()
else if far and not in near then far.add()
that should be really simple.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
It's disabled by default at startup.
Two reasons: 1, I wanted to have the world around me display before I started playing with the fluid flow, and 2, when I was working on a mod packed for jampacked 2, and was using this to make a lava ocean flow down (it was the maps' time limit), I really, *really* wanted to disable the flow while I was adjusting the map.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Two choices:
1. 4Head's original proof of concept mod. Probably slightly better performance than mine.
2. Mine has rainfall, compatibility with several mods, and, at the moment, not quite so good performance wise.
I'm working on getting both performance up, and fixing the FAR queue. (4Head's rewrite solves both of those, but is not out yet.)
4Heads is in the OP.
Mine is at http://minecraft.curseforge.com/projects/realistic-fluids-overhaul-compatibility-and
Alpha 4.3 is the latest version of mine.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
4Head: I did not see ConcurrentSet
or ConcurrentLinkedDequeuein the J7 docs. Are those J8 classes?... "Set" is abstract in J7. Which implementation to use ...
EDIT: Looks like LinkedHashSet, because of iteration.
EDIT 2: Even better, the far set no longer needs both a uniquing set and an ordering queue, it does both.
EDIT 3: So ChunkCache is where ConcurrentLinkedQueue's are used ... and where I change to LinkedHashSet, for the unique and order effect.
EDIT 4: ... and the list for the "threads" is a different list.
EDIT 5: LinkedHashSet has a concept of order, but no "removeFirst" or anything of that sort? ... A "UniquedQueue" -- a Set/Queue combo, instead of a Multiset/Queue combo.
EDIT 6: Time to learn how to use Iterators
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
We're working on two different things.
I started working on the old version while 4Head was away. I needed Cofh compatibility.
Then, it was some bug fixes (still have a few annoyances to fix).
Rainfall was something I wanted to work because of water resupply -- later, of course, I found that RotaryCraft reservoirs, when open in the rail, will fill up -- and that, plus a pipe and a liquid spiller, will result in water refilling without my having done that in the first place.
Right now, i just want to make what I have work better -- it will be going into an SMP server, and it won't work nice with even 2 people.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
This mod changes the behavior of blocks 8-11 (water and lava).
So your existing static liquids will start to flow if there is any hole in the ground.
... which is very, very common in minecraft.
---
Current status: Got one more annoying issue to take care of. Coding while sick is slower than normal, even if it's just a normal cold. Do not ask me how long I spent last night before I realized that while I was adding chunks to a tracking set, I was never removing them after processing the chunk.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
So I just now found that you have a uniquing version of a queue.
But you only used it for block updates to defer to the server queue.
EDIT: And, Eclipse gives this message:
- The serializable class QueueSet does not declare a static final serialVersionUID field of type long
EDIT 2: UGH. There is one delegator, and an array of worlds. I've been using a per-delegator guard set to track which chunks are already in the task queues, but that's not adequate with dimensions.
In fact ...
** How the Nether do you currently track outstanding far queue chunks when players are in multiple dimensions at the same time? The far thread queue doesn't track worlds, as far as I can tell, only chunks.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Amazing:
The nether is much nicer behaved than the overworld.
Yes, there's a lot of water. But there are not giant caves/ravines underneath it, so there's not much flow and spread.
I'm having trouble getting the "too much liquid" case to even trigger in the nether.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Oh, this is nice.
Near of 2
Far of 8
Not in an ocean
Behaves nicely.
===
EDIT: Nope. In an ocean (finally found one), and the far queue goes to size 0, and stays there. Failure. Gotta figure out why.
EDIT 2: FOO.
Every time the server timed out and aborted the far queue, the chunk that was being looked at would never be looked at again until it went into the near queue.
As long as I was moving, I didn't notice this.
But standing still, and it was very obvious.
Oh, and the nether isn't super-nice anymore :-)
EDIT 3: Yep, away from any rivers or oceans, it is handling an 8 chunk radius with no server slowdown. (That's the lava underground, plus lake seepage, etc.)
Moving towards rivers/oceans, it at least has these features:
1. Near is updated every tick
2. Far does not lose updates, and will eventually get to every chunk in range.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
AUGH.
I am prepping a release. I wanted to get it out for XMas.
But ... I have code that is commented out, and *STILL* logging debug messages. Worse, the line numbers don't match the code lines. And yes, I did a clean.
Augh.
Release will not happen until after Christmas, sorry.
Source is up on Github, but it's got all the debug spam.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
you do great work KB. hope you had a merry christmas! love your avatar BTW, my first computer was a coco.
If we need to process a chunk, then this chunk needs to be processed, end of story. The dimension is really only important in figuring out which chunks actually need to be processed. As to which dimensions the players and chunks happen to be in, it simply doesn't matter after the chunk is queued.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
how well would this mod work on servers?