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:
@@ -40,6 +40,7 @@ public class GenericCrafter extends Block{
|
|||||||
public Effect craftEffect = Fx.none;
|
public Effect craftEffect = Fx.none;
|
||||||
public Effect updateEffect = Fx.none;
|
public Effect updateEffect = Fx.none;
|
||||||
public float updateEffectChance = 0.04f;
|
public float updateEffectChance = 0.04f;
|
||||||
|
public float updateEffectSpread = 4f;
|
||||||
public float warmupSpeed = 0.019f;
|
public float warmupSpeed = 0.019f;
|
||||||
/** Only used for legacy cultivator blocks. */
|
/** Only used for legacy cultivator blocks. */
|
||||||
public boolean legacyReadWarmup = false;
|
public boolean legacyReadWarmup = false;
|
||||||
@@ -233,7 +234,7 @@ public class GenericCrafter extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(wasVisible && Mathf.chanceDelta(updateEffectChance)){
|
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{
|
}else{
|
||||||
warmup = Mathf.approachDelta(warmup, 0f, warmupSpeed);
|
warmup = Mathf.approachDelta(warmup, 0f, warmupSpeed);
|
||||||
|
|||||||
Reference in New Issue
Block a user