Closed jaredStef closed 9 years ago
I just removed the whitespace in a recent commit. (the one you can see above)
+1 for hugs.
You can stand near the corner of cacti and not get hurt because the radius is a square but Im working on that...
Some generic method to detect hugging would be nice.
What would be the purpose of that other than for cacti? Its not hard and seems like a good idea, but I honestly don't see any other use cases.
Futurrrreee
sent from mobile On Nov 16, 2014 6:56 PM, "BigxMac" notifications@github.com wrote:
What would be the purpose of that other than for cacti?
— Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowstone/pull/550#issuecomment-63251506.
I guess I could see people wanting to make custom blocks or mini games or things. 1 commit later... Hmm thinking of a method name...
I got suffocation working as well but thats for another PR and branch...
whoops :( didn't mean to close it (clicked wrong button)
I was thinking something along the lines of isPlayerHuggingMaterial
, separating it from the damage checks. Also, while i'm a fan of hugs, that might not be the best name for it.
edit: this isn't just players - isHuggingMaterial
or maybe isTouchingMaterial
or whatever.
I prefer 'touching' to 'hugging'. Hugging is ok, but it seems very 'cutesy' more than anything.
Note that hugs are a vanilla feature, see the footer of this page for more details
lol It can be called whatever. I thought I'd add some flavor and call it hugs but if the majority doesn't want hugs I guess they won't get any lol
+1 for not trying to redo logic in the damage method
You should move isTouchingMaterial up to GlowEntity instead of LivingEntity.
Note: The cactus damage won't be as accurate as it would be in vanilla because I can't make it that precise until entity support is finished. In vanilla it looks at the bounding box.
Maybe put a TODO, so we know to go back to it once entities are implemented?
On 18 November 2014 11:02, BigxMac notifications@github.com wrote:
Note: The cactus damage won't be as accurate as it would be in vanilla because I can't make it that precise until entity support is finished. In vanilla it looks at the bounding box.
Reply to this email directly or view it on GitHub https://github.com/GlowstoneMC/Glowstone/pull/550#issuecomment-63384352.
I did.
I'll get on it
Why would I call super because I don't always want to return true I only want to do it if they are in adventure or survival, but I want all living entities such as animals to take damage
Because later there will be other reasons why a player (or any entity for that matter) cannot take damage, including invulnerability. A simple check of super.canTakeDamage() && (adventure || survival)
should be fine.
Cacti hugging kill timer is inaccurate. It should damage 1 point every half second or so (1 point for every 10 ticks). I don't know the actual numbers, I'm just guessing based off of a quick test on vanilla.
I'm found a couple bugs:
None of the detection is going to be perfect without entity hitbox support, but being damaged on a diangonal block currently looks even weirder than on a non-diagonal block.
@Aaron1011 The "weird" bounding box problem is not a bug. Because of the lack of true bounding boxes, it is perfectly expected (and desired) to have the behaviour you've mentioned.
I know, I stated that in my comment. But if you want to keep it that way for now, it's fine.
And I'm responding to let the author know that the issue is perfectly valid and does not (and should not) need a fix by any means.
Okay, then.
I'm kinda a perfectionist and I personally hate the fact its not perfect, but I guess it will have to do for now. In the future it shouldn't be too hard to fix because all you have to do is change one method. I added a todo comment also that its not finished. I'm going to submit another PR for suffocation and work on other damages stated in Issue #203
I'm not being impatient or anything but I was wondering why my PR hasn't been merged yet. I have 2 more (void damage, and suffocation) I would like to submit, but I cant because they depend on this.
The secondary review process is lengthy and the assigned reviewer has been busy for the last few weeks. It is currently on the list of things to do along with many other things.
ok :+1:
Merged in aaa3e8ab224adbdedc5beac2ded8565d3b5d6fa0. Wanted to get the bounding box stuff working because I felt the incredibly large damage zone wasn't working out.
I added a method called canTakeCactusHurt. In the living entity class it always returns true because obviously animals aren't immune to cacti. In the GlowHumanEnity class I overrode the method so it returns true if the player is in survival mode or adventure mode. In the living entity class there is a method called takeCactusDamage. It gets the block the player is standing on as well as the blocks 1 up on each side. If they are cacti and the player canTakeCactiDamage() it hurts them. In the livingEntity class I add an else clause so that if the no damage ticks aren't greater than zero they are reset so that the player can take damage again. Aaron helped me get set up and helped with the some of the logic.