public class HelloMath {
public static void main(String[] args) {
for (int s=1; s< 20; s++)
{
int div = 1<<s;
int res = (int) ((float)-8/ s);
System.out.printf("Bit %d, result %d\n", s, res);
}
}
}
Tested with command-line javac / java
... ICK, that spec for division is a nightmare.
Who actually thought it was useful?
... OK, I can see cases where it is useful (it has symmetry), but the mathematician in me wants more consistency.
---
I definitely see one bucket of water spread farther than one bucket of lava.
Lighting updates: Water flow spams updates. I was surprised to see that flowing lava will spam dark spots.
I'm looking at improving nether performance -- I have to call what I have now unacceptable.
===
Other status for today:
1. Rain improvements. Not yet ready to ship. Rain will now overflow a river bank (opps), and can appear in the sky instead of just the ground.
2. Bug to fix: Chunks lose their "blocks to update" list. As a quick work-around, on loading a chunk, the top 256 blocks will be tested to see if they are flowing fluid; if so, they will be ticked. NB: If you have rain in the air, this is a must.
3. At least one case of lost updates was found and fixed. (enable flow command)
4. Enable Flow command now saves its state in the config file. This permits persistence, but causes issues in single player when one config file serves multiple worlds.
5. Testing -- equalizations are disabled. They seem to mess up the oceans more than improve sea level.
6. Bug fix: java integer division did not behave as expected. Identifying fluid data from block meta was inaccurate. Still needs to be saved with each chunk (several hundred pieces of data per chunk)
7. Build system improvement thanks to Draco
8. Spam cleanup
9. Starting on code to let a server level out water when no one is online. Won't work yet. Should not crash anything either.
10. Minor cleanup to getting biome information during rain test.
(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?
0. *Fix shore overflow*.
1. Wake all chunks topblock on load. (kinda a *must* right now)
2. Verify that an out-of-range chunk does not lose queued updates.
3. Test mystcraft dims for sea level
(next alpha release)
Serious improvement:
** NETHER IS TOO SLOW **. It is unacceptably slow.
(next alpha release)
Viscosity, surface tension:
1. Needs to test in a flat world, an 8 block trench.
2. Goal: Water is 8x1, lava is 4x2
3. Fluid reaches LEVEL, not hill.
Other:
Verify that flow does reach "Stable", and stops updating.
Features:
1. Save full fluid level data.
2. Save full list of blocks to tick
Improvements:
1. Per-world save files: flow state, sea level by dimensions.
Current: Single flow state in config file, sea levels auto-determined. Barely functional.
2. Prevent diagonal flow if both straight flows are blocked. Or: prevent diagonal flow period.
NB: Vanilla gives the appearance of diagonal flow, but actually does not.
3. When no players are online, process fluid in all loaded chunks.
Optionally: Process all loaded chunks even when players are online (warning: will be slow. Will probably be unplayably flow).
Rainfall, COMPLEX:
1. Implement some sort of absorption system for tiny puddles. (idea: if the fluid level is a tiny "leftover", it goes away).
2. Implement some sort of evaporation. (Would be used to clean up deep puddles left from rainfall. Will kill off surface lakes until the next rain.)
3. Rainfall in all biomes, all heights.
Other:
Still need some idea for nether rainfall.
Still need some idea for mystcraft ages/RfDims that have lava oceans.
Heck, could use some way to detect "no seas" ...
EDIT: I need feedback on the speed of rain refill. The speed is a config tunable, and I have no clue if the value I have is a good one or not.
(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?
Most of my mods use game rules instead of config files, since that lets you have different settings on a per-world basis. Here's the basic sequence.
if (!world.getGameRules().hasRule(someString)){
world.getGameRules().setOrCreateGameRule(someString, "1");
int gr = 1;
}
else {
int gr = world.getGameRules().getGameRuleBooleanValue(someString);
}
This also has the advantage that it can be changed while the server is running, to allow playing with settings without a long cycle time. Of course, the sea level is probably not something that needs to be changeable, so the world saved data is probably a better choice for it in particular.
Can gamerules be updated in single player without cheat mode, yet restricted to ops in multiplayer? That's the goal of whatever system I use.
(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?
Git is soo nice ... so easy to back out a "bugfix" ... :-)
Took me hours to realize it wasn't a bug. Minutes to see that my fix broke everything, but I thought it was just that I had uncovered another bug. Nope -- what I thought was a chunk staying around for updating forever turned out to be the cache entry that could contain an empty list of things needing updating. Or, you know, hundreds of things to update. Not something to discard cheaply, nor even needed to discard.
On the other hand, I now have easy access to all the chunks seen so far and still loaded, so it's possible (heck, probably easy) to make sure that liquids update on a server when no players are online.
As far lava/nether: Need to test if that's just a case of lava blocks constantly being checked for "Do I update now? No, reschedule myself for checking later". Something easy enough to fix in the nether, not so easy for a lava ocean dimension.
(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 suspect single player would require cheat mode for the player to set it, I know that only OPs in multiplayer can set game rules. That said, your mod can set the game rule directly (and you probably want to do so, so that the player doesn't have to specify the sea level), so you could register a custom command that works in SSP to update this specific game rule.
Hm, updating when no players online (or no players in that dimension) sounds great. What are the odds you could provide a code snippet to point me in the right direction with that? I'll see if I can implement it in RFO2.
The key realization is that the world cache contains an entry for all chunks seen so far.
That, plus changing the far queue to process in sequential order (it's on my master commit, it went in around alpha 4 I think).
The only new thing will be to check when fluid flow is processed, if there are no players, then add ALL of the chunks to the queue. It won't add something already on the queue, and the rest will be added in order at the end.
(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?
Hm, updating when no players online (or no players in that dimension) sounds great. What are the odds you could provide a code snippet to point me in the right direction with that? I'll see if I can implement it in RFO2.
RFO2 adds something called an Observer, which is treated in a similar way to players (i.e, updates all chunks near the observer). So one option (probably the best imo) is simply to make a chunk loader and register it as an observer (which you could then place wherever you wanted to perform fluid updates).
The relevant parts of the code should be... the server tick event in the mod's container class (RFOMain or RFOCore or whatever).
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?
(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?
(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?
1. The routine for converting block height (meta-data) to fluid level when there is no data on a chunk (when a chunk is unloaded/reloaded) is returning too low of a value. Sadly, I did not comment what I was thinking, and I don't remember -- but a full block won't stay full, and the overall water level drops.
Now, given rain, that's not necessarily a problem, but it's definitely not optimal. In particular, since blocks won't stay full, rain won't stop being needed.
ETA to fix: 5 minutes to solve a math problem for something passable. Need to save full chunk data (fluid levels for every block, unless someone can tell me how to avoid storing zeroes ... kinda like, how does Minecraft avoid storing air?) for something better.
2. Rain is overflowing banks in my larger test zone. Did not in the small river test zone. Something is still not quite right.
(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?
The lillypads are broken if water flows into their block.
EDIT: I'm going to take a page from real life, and say that any biome tagged with SWAMP will act as wetlands and buffer incoming sea level -- no excess rainfall. It is a real-world way to deal with preventing floods.
(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?
My test code:
Tested with command-line javac / java
... ICK, that spec for division is a nightmare.
Who actually thought it was useful?
... OK, I can see cases where it is useful (it has symmetry), but the mathematician in me wants more consistency.
---
I definitely see one bucket of water spread farther than one bucket of lava.
Lighting updates: Water flow spams updates. I was surprised to see that flowing lava will spam dark spots.
I'm looking at improving nether performance -- I have to call what I have now unacceptable.
===
Other status for today:
1. Rain improvements. Not yet ready to ship. Rain will now overflow a river bank (opps), and can appear in the sky instead of just the ground.
2. Bug to fix: Chunks lose their "blocks to update" list. As a quick work-around, on loading a chunk, the top 256 blocks will be tested to see if they are flowing fluid; if so, they will be ticked. NB: If you have rain in the air, this is a must.
3. At least one case of lost updates was found and fixed. (enable flow command)
4. Enable Flow command now saves its state in the config file. This permits persistence, but causes issues in single player when one config file serves multiple worlds.
5. Testing -- equalizations are disabled. They seem to mess up the oceans more than improve sea level.
6. Bug fix: java integer division did not behave as expected. Identifying fluid data from block meta was inaccurate. Still needs to be saved with each chunk (several hundred pieces of data per chunk)
7. Build system improvement thanks to Draco
8. Spam cleanup
9. Starting on code to let a server level out water when no one is online. Won't work yet. Should not crash anything either.
10. Minor cleanup to getting biome information during rain test.
* 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?
Make 1.10 version
I have no current plans for 1.10.
4Head?
* 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?
My current todo list:
Rainfall, SIMPLE:
0. *Fix shore overflow*.
1. Wake all chunks topblock on load. (kinda a *must* right now)
2. Verify that an out-of-range chunk does not lose queued updates.
3. Test mystcraft dims for sea level
(next alpha release)
Serious improvement:
** NETHER IS TOO SLOW **. It is unacceptably slow.
(next alpha release)
Viscosity, surface tension:
1. Needs to test in a flat world, an 8 block trench.
2. Goal: Water is 8x1, lava is 4x2
3. Fluid reaches LEVEL, not hill.
Other:
Verify that flow does reach "Stable", and stops updating.
Features:
1. Save full fluid level data.
2. Save full list of blocks to tick
Improvements:
1. Per-world save files: flow state, sea level by dimensions.
Current: Single flow state in config file, sea levels auto-determined. Barely functional.
2. Prevent diagonal flow if both straight flows are blocked. Or: prevent diagonal flow period.
NB: Vanilla gives the appearance of diagonal flow, but actually does not.
3. When no players are online, process fluid in all loaded chunks.
Optionally: Process all loaded chunks even when players are online (warning: will be slow. Will probably be unplayably flow).
Rainfall, COMPLEX:
1. Implement some sort of absorption system for tiny puddles. (idea: if the fluid level is a tiny "leftover", it goes away).
2. Implement some sort of evaporation. (Would be used to clean up deep puddles left from rainfall. Will kill off surface lakes until the next rain.)
3. Rainfall in all biomes, all heights.
Other:
Still need some idea for nether rainfall.
Still need some idea for mystcraft ages/RfDims that have lava oceans.
Heck, could use some way to detect "no seas" ...
EDIT: I need feedback on the speed of rain refill. The speed is a config tunable, and I have no clue if the value I have is a good one or not.
* 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?
Can gamerules be updated in single player without cheat mode, yet restricted to ops in multiplayer? That's the goal of whatever system I use.
* 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?
Git is soo nice ... so easy to back out a "bugfix" ... :-)
Took me hours to realize it wasn't a bug. Minutes to see that my fix broke everything, but I thought it was just that I had uncovered another bug. Nope -- what I thought was a chunk staying around for updating forever turned out to be the cache entry that could contain an empty list of things needing updating. Or, you know, hundreds of things to update. Not something to discard cheaply, nor even needed to discard.
On the other hand, I now have easy access to all the chunks seen so far and still loaded, so it's possible (heck, probably easy) to make sure that liquids update on a server when no players are online.
As far lava/nether: Need to test if that's just a case of lava blocks constantly being checked for "Do I update now? No, reschedule myself for checking later". Something easy enough to fix in the nether, not so easy for a lava ocean dimension.
* 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?
I suspect single player would require cheat mode for the player to set it, I know that only OPs in multiplayer can set game rules. That said, your mod can set the game rule directly (and you probably want to do so, so that the player doesn't have to specify the sea level), so you could register a custom command that works in SSP to update this specific game rule.
Hm, updating when no players online (or no players in that dimension) sounds great. What are the odds you could provide a code snippet to point me in the right direction with that? I'll see if I can implement it in RFO2.
The key realization is that the world cache contains an entry for all chunks seen so far.
That, plus changing the far queue to process in sequential order (it's on my master commit, it went in around alpha 4 I think).
The only new thing will be to check when fluid flow is processed, if there are no players, then add ALL of the chunks to the queue. It won't add something already on the queue, and the rest will be added in order at the end.
* 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?
RFO2 adds something called an Observer, which is treated in a similar way to players (i.e, updates all chunks near the observer). So one option (probably the best imo) is simply to make a chunk loader and register it as an observer (which you could then place wherever you wanted to perform fluid updates).
The relevant parts of the code should be... the server tick event in the mod's container class (RFOMain or RFOCore or whatever).
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Lots of tests against block.air are being replaced by isAir/isAirBlock().
Looks like I might have rainfall fixed/working properly, too.
NB: Putting in all those air block tests is going to hurt speed, but it's kinda needed for mod compatibility.
* 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?
One typo later: Rainfall is working again. In a river biome, no significant speed change.
... eeep, why is it overflowing the banks? ** code was supposed to prevent that**
EDIT: Three hours later, another rain-destroying typo. Now to see if I duplicated that typo anywhere else. (parameter 3 is z, not x.)
EDIT: Well, found a z as parameter 1 (instead of x), and ... the same x in position 3 when testing for space left to avoid overflowing banks. Sheesh.
* 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?
How would I change the sound associated with water?
Right now, the block flowing_water causes a sound to be played, client-side, just by being present.
I want it to change to being played when the server says "there is a flow bigger than X happening", triggered by the server rather than the client.
I have no clue about anything about minecraft sounds.
* 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, new develop branch pushed. Rainfall is much faster, and bug squashed.
I will prep a release real soon now.
* 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?
Okay, so ... there's still a minor bug or two :-). Found two spots where rain is consistently messing up. Annoying.
* 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?
1. The routine for converting block height (meta-data) to fluid level when there is no data on a chunk (when a chunk is unloaded/reloaded) is returning too low of a value. Sadly, I did not comment what I was thinking, and I don't remember -- but a full block won't stay full, and the overall water level drops.
Now, given rain, that's not necessarily a problem, but it's definitely not optimal. In particular, since blocks won't stay full, rain won't stop being needed.
ETA to fix: 5 minutes to solve a math problem for something passable. Need to save full chunk data (fluid levels for every block, unless someone can tell me how to avoid storing zeroes ... kinda like, how does Minecraft avoid storing air?) for something better.
2. Rain is overflowing banks in my larger test zone. Did not in the small river test zone. Something is still not quite right.
ETA to fix: ???
* 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?
i like it also. i think it would be neat to have random (and rare) floods! maybe have a river go over a block above sea level every once in awhile.
... you like/want the flooding???
... (after spending a whole day trying to eliminate it?)
Ok, I can put in a pair of tunables for that.
EDIT: Warning: Anything that will flood riverbanks will probably destroy lillypads. Got an idea for how to prevent that?
* 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?
The lillypads are broken if water flows into their block.
EDIT: I'm going to take a page from real life, and say that any biome tagged with SWAMP will act as wetlands and buffer incoming sea level -- no excess rainfall. It is a real-world way to deal with preventing floods.
* 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?
hey keybounce will you add something like fluid pipe to transfer water from ocean to lake or to a dam