Ghast fixes #4277
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#4277
Loading…
Reference in New Issue
No description provided.
Delete Branch "ghast_fixes"
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?
Based on Araca's PR containing a crash report (#4179), I reviewed ghast code again. It turns out the check was still insufficient, and now it should work properly (aside of not crashing). I also simplified redirection velocity calculation.
Testing
Fight ghasts, let them hit other mobs with fireballs, stuff shouldn't crash. Try that without achievement (eg. on a new world), you shouldn't get it for hitting non-ghasts with ghast fireballs.
Tested, eliminates the issues that it's supposed to.
@ -133,3 +134,3 @@
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
local ent = mob:get_luaentity()
if not ent or ent.health <= 0 then
if (not ent or ent.health <= 0) and self._puncher and name == "mobs_mc:ghast" then
My only concern is this line. Wouldn't it be more rational to check for the entity's name sooner? Like, we have no reason to perform the former two checks if the latter will most of the time turn out to be false anyway. Up to discussion, of course.
Tested and discussed. LGTM