GlowstoneMC / Glowstone-Legacy

An open-source server for the Bukkit Minecraft modding interface
Other
363 stars 122 forks source link

Added some water/lava physics #636

Open SamNosliw opened 9 years ago

SamNosliw commented 9 years ago

I've managed to get water/lava working pretty well, I believe the same as vanilla Minecraft. I don't know what your plans are, but I would just like to offer this to you.

I also added a requestPulse function into the world, this allow water to update in a similar manor to normal Minecraft, they are a way to regulate updates. A block can request to be pulsed on every X game ticks, and then unsubscribe from this list, so that it doesn't keep pulsing without need, I plan to make the world save all the pulse requests of a chunk when it unloads however, so that it can restore them on loading, and not freeze any growth when this occurs. Anyway, here is the code if you want to have a look, please tell me if I missed out any code or haven't explained it well, the lack of comments is a bad habit of mine, thanks for your time.

turt2live commented 9 years ago

@SamNosliw Your pull request does not compile due to syntax issues. Please correct the issues for further review.

ZephireNZ commented 9 years ago

Looks like you may have done this change with GitHub's editor. Using an IDE is highly recommended, and allows you to see errors far quicker, as well as test compiling and running of the code.

SamNosliw commented 9 years ago

I used an IDE to create and test it in the first place, but I don't know how to fork and etc that way, so I copied and pasted into a fork manually.. I'm not very good with github xD

I've added a new commit to the branch, do I need to create a new pull request?

turt2live commented 9 years ago

It doesn't compile, so I don't know how you tested it.

SamNosliw commented 9 years ago

The reason it doesn't compile is because I mucked up somewhere in copying the changes over..

ZephireNZ commented 9 years ago

Would be a good idea to learn how to use basic functions of git, before you try contributing to a git-based project. There's plenty of tutorials online for how to use it.

SamNosliw commented 9 years ago

I can use git fine for my previous purposes, but I have no experience using github. I mainly created this code for my own server purposes, but thought that you might find it useful here. I have no plans to do excessive learning of github to share this code in the format you prefer, I have already given enough time into formatting this and finding the exact pieces of code that allowed it to work, without using my existing framework.

I believe I have found the cause of the issue, but I cannot find (even searching online tutorials) how to edit an existing pull request, it only says push to the branch. :/

turt2live commented 9 years ago

Simply commit your changes and push them to the same branch. That's it. GitHub will auto-magically figure it out. Your current branch you should be pushing to is master.

SamNosliw commented 9 years ago

I thought that I had already done this, I made the change here:

https://github.com/SamNosliw/Glowstone/commit/8aec543e99ac7a7f7138a274487f7fe8f19bf81b

turt2live commented 9 years ago

I honestly don't know what happened in this case. GitHub seems to have screwed up or whatever you typed into the command line broke the repository.

SamNosliw commented 9 years ago

Well, your the expert on github here, what should I now do?

turt2live commented 9 years ago

I'm not a GitHub expert. I would personally either attempt to solve the problem or contact GitHub support to see if they have insight on the issue.

bendem commented 9 years ago

I'm not a github expert either, but you might want to work on another branch than master. Master have a few particularities and the fact that new commits aren't appearing might be related to that.

The easiest way would be to close this pull request, move your changes to another branch and reopen another pull request.

EDIT: From what @turt2live pointed out on irc, your fork might well be broken. Only gh support can help you figure out how it happened.

<+turt2live> bendem, his branch says "This branch is" not "This branch is X ahead of GlowstoneMC/Glowstone:master"

SamNosliw commented 9 years ago

"Hi Nosliw,

Sorry for the trouble. We made a change that accidentally resulted in PRs not updating.

We're working on a fix, and I'll let you know when we have an update."

SamNosliw commented 9 years ago

Ok, done, GitHub got back to me and then I fixed all the errors I made with copy and paste.. Using GIT and downloading then editing with IDE might have been easier..

turt2live commented 9 years ago

You still have some formatting issues, but I don't foresee them blocking review completely. It would be appreciated if they were fixed though.

SamNosliw commented 9 years ago

Hmmm, what sort of formatting concerns do you have?

turt2live commented 9 years ago

Many of your added lines are indented too far to the left. Like I said, minor enough to not impede the review process but still concerns :P

SamNosliw commented 9 years ago

Oops, that should fix it.

SamNosliw commented 9 years ago

On a side note, I am trying to fork correctly now, but am having the following issue when I run the build: "Could not find or load main class: net.flowstone.GlowServer" Could anyone assist? I have exhausted most other resources.. :(

Postremus commented 9 years ago

You propably got an import wrong. The package "net.flowstone" (look at the FLOWstone) does not exists in this project. :)

2015-04-05 16:51 GMT+02:00 Nosliw notifications@github.com:

On a side note, I am trying to fork correctly now, but am having the following issue when I run the build: "Could not find or load main class: net.flowstone.GlowServer" Could anyone assist? I have exhausted most other resources.. :(

— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowstone/pull/636#issuecomment-89787757.

SamNosliw commented 9 years ago

Sorry, that was just a typo, it doesn't say 'flowstone'. And I cloned the repo, so I didn't type any of the imports myself.

turt2live commented 9 years ago

You may get faster and more comprehensive support on irc. GitHub should not be used as an instant messenger.

gdude2002 commented 9 years ago

Builds fine here.

SamNosliw commented 9 years ago

The build is fine, the problem occurs after I run it..

nikosgram commented 9 years ago

@SamNosliw no problems in running.. :smile:

SamNosliw commented 9 years ago

Alright, I had a chat with some friendly people in IRC and everything's fine now ;D