boskee / Minecraft

Simple Minecraft-inspired program using Python and Pyglet
MIT License
207 stars 33 forks source link

water forms generates, sink in water. see discription #64

Closed ronmurphy closed 11 years ago

ronmurphy commented 11 years ago

terrain.py, lines 417, use this.

                    if y <= 32:
                        world_init_block((x, y, z), water_block)
                        world_init_block((x, y -1, z), water_block)
                        world_init_block((x, y -2, z), sand_block)
                    else:
                        world_init_block((x, y, z), grass_block)
                        world_init_block((x, y -1, z), dirt_block)
                        world_init_block((x, y -2, z), dirt_block)
                    # atleast a layer of dirt under, reguardless of top two blocks
                    world_init_block((x, y -3, z), dirt_block)
                    y -= 3

and player.py, line 168, add this >

if density <= 1 then we can walk through it. (water)

                if op not in parent.model \
                        or parent.model[op].density < 1:
                    continue

very simple. this is all that you need.

ronmurphy commented 11 years ago

thanks :)

Nebual commented 11 years ago

Uh oh, you directly merged his whole repo. Again. Man thats a confusing changelog, I think the only major damage is that 1430eb58d0ce030ecf25c114ad9a4bfcb30db377 deleted all changes in b6419df13b13ff8c4b3c97aa7b5e7b6923e2e42b but its hard to tell, could be more.

Though https://github.com/ronmurphy/Minecraft/commit/2be0d3e65b6e11da7909b47039d962bb59286606#L7R469 is a great place to put in water generation, looks good!

ronmurphy commented 11 years ago

thanks, sorry for that. git (and my internet) has issues .. i am not as familiar with git as i should be. I often just clone boskee/Minecraft repo, then do my changes, and submit them to my repo.

may not be the best thing to do...

BertrandBordage commented 11 years ago

No… Making patches may be the solution. You should be able to put uncommited changes into a patch using git diff > mypatch.patch. Not totally sure it works on Windows. If not, there should be an easy equivalent.

ronmurphy commented 11 years ago

I have a diff app for windows, i could just see if i can use that to generate a patch file. Honestly, i would much rather submit patches than worry about git...

tfaris commented 11 years ago

Git is great. This is my general workflow:

I work off of a branch. Anytime I'm going to start making any changes, I hop onto master and git pull boskee master. This brings down any changes that have been made. Then, I switch to my branch and git merge master, and fix any conflicts locally. Then I make my changes and make sure everything runs. Then merge back into master. Typically before I push, I'll do another pull just to make sure it's up to date. Keeping up to date and doing small commits on your own side is key.

ronmurphy commented 11 years ago

and i install mint 14 today, i can use that to generate patches i hope.

ronmurphy commented 11 years ago

see, the windows client, it wont let me commit to my own git repo if boskee is ahead of me, that is my main issue. even if i remove the .git folder, it stilll wont let me commit to my repo.

tfaris commented 11 years ago

That doesn't make sense. Even a forked repo is its own copy, it doesn't care or even know about the original unless you're specifically pushing to it (are we talking push or commit?) Commit especially doesn't care about remotes unless there's a case I'm not thinking of.

Nebual commented 11 years ago

You may need to use --force to push to your own repo if you've used rebase onto boskee's (or create a separate branch for each new feature, as is the "proper" way).

Edit: Never ever ever use --force on repo other people use, like boskee's. If you think you need to, you likely don't. But its fine for personal repos you're trying to PR into the main one.

BertrandBordage commented 11 years ago

Careful with --force