Allow updateEffect spread to be customized or disabled for GenericCrafter (#10422)

* Allow updateEffect spread to be customized or disabled for GenericCrafters

* i think that fixed it?
This commit is contained in:
overdramaticpanromantic
2025-02-05 18:50:59 -05:00
committed by GitHub
parent f9dc41efec
commit 5140c37ed4

View File

@@ -40,6 +40,7 @@ public class GenericCrafter extends Block{
public Effect craftEffect = Fx.none;
public Effect updateEffect = Fx.none;
public float updateEffectChance = 0.04f;
public float updateEffectSpread = 4f;
public float warmupSpeed = 0.019f;
/** Only used for legacy cultivator blocks. */
public boolean legacyReadWarmup = false;
@@ -233,7 +234,7 @@ public class GenericCrafter extends Block{
}
if(wasVisible && Mathf.chanceDelta(updateEffectChance)){
updateEffect.at(x + Mathf.range(size * 4f), y + Mathf.range(size * 4));
updateEffect.at(x + Mathf.range(size * updateEffectSpread), y + Mathf.range(size * updateEffectSpread));
}
}else{
warmup = Mathf.approachDelta(warmup, 0f, warmupSpeed);