Add magma block damage #1952
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-Minecraft feature
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#1952
Loading…
Reference in New Issue
No description provided.
Delete Branch "GuyLiner/MineClone2:magma"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR fixes #630
In minecraft mobs are damaged when they step on magma blocks, as you probably already know. This adds that functionality, however this is nowhere near being finished.
My main point in putting in this PR is to see if I'm on the right track or if this implementation is not sound. I also added some comments along the way as I was learning my way around the code.
I created a new timer called
damage_timer
and another function callednode_hurt
. When a mob steps on the block, it gets hurt. In minecraft when mobs are on magma blocks they don't try to move, so nothing AI wise has to be coded there.Certain mobs are also not affected by this damage, which wouldn't be too hard to add either.
If I get the go ahead, I'd like to add cacti, and enderman water damage as well.
Looks good, welcome merging it into MCL5, as MCL2 Mob API is under refactoring by Fleckenstein... let's do all mob-related stuff in MCL5 right now, then, after MCL2 0.72 release let's just backport it. Am I right, @EliasFleckenstein03 ?
@ -785,0 +790,4 @@
self.damage_timer = self.damage_timer - dtime
--This gets the coords of the node below the mob
cur_pos['y'] = cur_pos['y'] - 1
You can use
cur_pos.y
instead ofcur_pos['y']
here.Closed for inactivity, can be reopened if the contributor wants to resume work on this.
Forgot the original PR was closed, is there something else I need to do with this or was the original code just trash?
No idea about the code. Feel free to reopen this if you want to request this be merged.
Alright thanks
This looks like it might have to be re-done, I don't think the files are in the same place they used to be.
WIP: #630, Initial support for magma block damageto WIP: Add magma block damageWIP: Add magma block damageto Add magma block damageI think that should do it, unless I'm about to to get roasted for naming a variable nodef2 lol
Why would you be roasted? That is not how we approach things here now.
Lol I was just worried I fucked up a convention or something, but you guys are nice so I'm not really worried.
Well, hopefully in code, it is obvious what it refers too. I mean, I've seen worse variable names... if it's not, I would at least comment what it refers to. But, that's me.
Initial glances look good, but I will rebase on to a fresh branch and test, as there is stuff from a year ago that isn't needed.
Ok, I have recreated the branch here with just the final commit:
MineClone2/MineClone2#3405
@GuyLiner MineClone2/MineClone2#3405 (comment)
Approval comment in this branch. Thanks for picking it up. Welcome back! :)
Pull request closed