Attempt balancing mesothelioma;
Prepare for addition of other cancerous blocks
This commit is contained in:
parent
ec95a21963
commit
d4efb3b45a
|
@ -20,7 +20,7 @@ public class MesotheliomaStatusEffect extends StatusEffect {
|
|||
@Override
|
||||
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
|
||||
// TODO: move into mod config
|
||||
int threshold = 50;
|
||||
int threshold = 180;
|
||||
|
||||
// for the sake of performance, non-players are immune to mesothelioma
|
||||
// and will not receive financial compensation
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package dev.agatharose.asbestos.scheduler;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import dev.agatharose.asbestos.Asbestos;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -13,7 +15,7 @@ public class MesotheliomaSched {
|
|||
// TODO: move into mod config
|
||||
int offset = 3;
|
||||
int period = 5;
|
||||
int threshold = 50;
|
||||
int threshold = 180;
|
||||
|
||||
ServerTickEvents.END_SERVER_TICK.register(server -> {
|
||||
// run every 5 seconds
|
||||
|
@ -40,7 +42,7 @@ public class MesotheliomaSched {
|
|||
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
|
||||
if (block.equals(Asbestos.ASBESTOS_BLOCK)) {
|
||||
if (Arrays.asList(Asbestos.DANGEROUS_BLOCKS).contains(block)) {
|
||||
Asbestos.MESOTHELIOMA.get(player).setMesothelioma(exposure + 1);
|
||||
|
||||
break findasbestos;
|
||||
|
|
Loading…
Reference in New Issue