Skip to content

Commit

Permalink
Fix validation particles flickering in certain situations
Browse files Browse the repository at this point in the history
In a multi-structure pack, if another structure had an empty layer (i.e. no blocks to validate), being on validation mode on that layer but with another structure would cause the animation controller state to go back and forth.
Also fixed content log issue regarding v.hologram_dir being undefined in punch-to-activate mode.
  • Loading branch information
SuperLlama88888 committed Jan 24, 2025
1 parent 02ebdae commit 83ebdd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HoloPrint.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,10 +1045,10 @@ function addBlockValidationParticles(hologramAnimationControllers, structureI, b
validateAllState["particle_effects"].push(particleEffect);
validationStates[animationStateName]["particle_effects"].push(particleEffect);
});
for(let y = 0; y < structureSize[1]; y++) {
for(let y = 0; y < structureSize[1]; y++) { // layers with no blocks to validate don't have an animation controller state, so transitions to the default state need to be added for when it's on these empty layers
if(!layersWithBlocksToValidate.includes(y)) {
Object.entries(validationStates).forEach(([validationStateName, validationState]) => {
if(validationStateName != "default") {
if(validationStateName.startsWith(`validate_${structureI}`)) {
validationState["transitions"][0]["default"] += ` || v.hologram.layer == ${y}`;
}
});
Expand Down
1 change: 1 addition & 0 deletions entityScripts.molang.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function armorStandInitialization() {
v.last_hurt_direction = q.hurt_direction;
// v.player_action_counter = t.player_action_counter ?? 0;
v.player_action_counter = 0;
v.hologram_dir = 0;

v.spawn_time = q.time_stamp;
v.player_has_interacted = false;
Expand Down

0 comments on commit 83ebdd6

Please sign in to comment.