Fix Stalker texture generation #4343
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#4343
Loading…
Reference in New Issue
No description provided.
Delete Branch "teknomunk/MineClone2:fix-stalker-texture-gen"
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 fixes stalker texture generation when the stalker is standing on a node that uses a texture using a texture modifier.
Testing
This will fix one of the issues referenced in #4333 Some issues with the new update 0.87
@ -134,1 +135,3 @@
self.object:set_properties({textures={get_texture(self)}})
local new_texture = get_texture(self)
local old_texture = self._stalker_texture
if not old_texture or old_texture ~= new_texture then
Why not just do
instead if this line and the previous one?
You are right in pointing this out. There shouldn't be a difference. I'm guessing it is habit from dealing with crashes from comparing numbers with possibly nil fields.
Now using your version instead.
@ -135,0 +135,4 @@
local new_texture = get_texture(self)
local old_texture = self._stalker_texture
if not old_texture or old_texture ~= new_texture then
self.object:set_properties({textures={new_texture}})
The "2 mesh buffers" warning means it should get a second (blank) texture here, just like above, in the mob definition.
Updated this to use "mobs_mc_empty.png" like elsewhere in this file.
fba255f3f6
to7be8826c12
@ -267,1 +272,3 @@
self.object:set_properties({textures={get_texture(self), get_overloaded_aura(self._aura_timer)}})
local new_texture = get_texture(self)
if self._stalker_texture ~= new_texture then
self.object:set_properties({textures={new_texture, get_overloaded_aura(self._aura_timer)}})
Actually, this one was OK.
Firstly, you're not setting
self._stalker_texture
at any point, so this does nothing.Secondly, this should be updated every
framestep, for the aura animation. Yeah, it is stupid that we have to do animations server-side.Give me a minute, I'll revert this one.
8de73a695b
tode19549d04
de19549d04
toa256208e6b