Glowstone-Legacy icon indicating copy to clipboard operation
Glowstone-Legacy copied to clipboard

Added some water/lava physics

Open SamNosliw opened this issue 10 years ago • 27 comments

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.

SamNosliw avatar Apr 04 '15 23:04 SamNosliw

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

turt2live avatar Apr 04 '15 23:04 turt2live

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.

ZephireNZ avatar Apr 05 '15 00:04 ZephireNZ

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?

SamNosliw avatar Apr 05 '15 00:04 SamNosliw

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

turt2live avatar Apr 05 '15 00:04 turt2live

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

SamNosliw avatar Apr 05 '15 00:04 SamNosliw

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.

ZephireNZ avatar Apr 05 '15 00:04 ZephireNZ

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. :/

SamNosliw avatar Apr 05 '15 00:04 SamNosliw

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.

turt2live avatar Apr 05 '15 00:04 turt2live

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

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

SamNosliw avatar Apr 05 '15 00:04 SamNosliw

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.

turt2live avatar Apr 05 '15 00:04 turt2live

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

SamNosliw avatar Apr 05 '15 00:04 SamNosliw

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.

turt2live avatar Apr 05 '15 00:04 turt2live

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"

bendem avatar Apr 05 '15 00:04 bendem

"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 avatar Apr 05 '15 02:04 SamNosliw

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..

SamNosliw avatar Apr 05 '15 10:04 SamNosliw

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

turt2live avatar Apr 05 '15 10:04 turt2live

Hmmm, what sort of formatting concerns do you have?

SamNosliw avatar Apr 05 '15 10:04 SamNosliw

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

turt2live avatar Apr 05 '15 10:04 turt2live

Oops, that should fix it.

SamNosliw avatar Apr 05 '15 10:04 SamNosliw

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.. :(

SamNosliw avatar Apr 05 '15 14:04 SamNosliw

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 [email protected]:

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.

Postremus avatar Apr 05 '15 15:04 Postremus

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.

SamNosliw avatar Apr 05 '15 15:04 SamNosliw

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

turt2live avatar Apr 05 '15 15:04 turt2live

Builds fine here.

gdude2002 avatar Apr 05 '15 17:04 gdude2002

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

SamNosliw avatar Apr 06 '15 03:04 SamNosliw

@SamNosliw no problems in running.. :smile:

nikosgram avatar Apr 06 '15 11:04 nikosgram

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

SamNosliw avatar Apr 06 '15 11:04 SamNosliw