Allow enabling constant burning
This commit is contained in:
parent
ecb58ffa76
commit
1dfecd54be
|
@ -8,7 +8,7 @@ maven_group=io.gitlab.jfronny
|
||||||
archives_base_name=combit
|
archives_base_name=combit
|
||||||
|
|
||||||
fabric_version=0.45.0+1.18
|
fabric_version=0.45.0+1.18
|
||||||
jfapi_version=2.2.2-1641673767
|
jfapi_version=2.3.0
|
||||||
|
|
||||||
modrinth_id=oPRrsg3M
|
modrinth_id=oPRrsg3M
|
||||||
curseforge_id=561742
|
curseforge_id=561742
|
|
@ -24,6 +24,7 @@ public class CombitConfig implements JfConfig {
|
||||||
@Entry public static Boolean zombiesBurn = true;
|
@Entry public static Boolean zombiesBurn = true;
|
||||||
@Entry public static Boolean creepersBurn = false;
|
@Entry public static Boolean creepersBurn = false;
|
||||||
@Entry public static Boolean creepersExplodeWhenBurning = false;
|
@Entry public static Boolean creepersExplodeWhenBurning = false;
|
||||||
|
@Entry public static Boolean alwaysBurn = false;
|
||||||
// Health
|
// Health
|
||||||
@Entry public static Double entityHealthFactor = 1.5;
|
@Entry public static Double entityHealthFactor = 1.5;
|
||||||
@Entry public static HashSet<String> entityHealthBlacklist = null;
|
@Entry public static HashSet<String> entityHealthBlacklist = null;
|
||||||
|
@ -82,6 +83,7 @@ public class CombitConfig implements JfConfig {
|
||||||
zombiesBurn = true;
|
zombiesBurn = true;
|
||||||
creepersBurn = false;
|
creepersBurn = false;
|
||||||
creepersExplodeWhenBurning = false;
|
creepersExplodeWhenBurning = false;
|
||||||
|
alwaysBurn = false;
|
||||||
entityHealthFactor = 1.0;
|
entityHealthFactor = 1.0;
|
||||||
entityHealthBlacklist = null;
|
entityHealthBlacklist = null;
|
||||||
cooldownProgressOverride = 0.8;
|
cooldownProgressOverride = 0.8;
|
||||||
|
@ -108,6 +110,7 @@ public class CombitConfig implements JfConfig {
|
||||||
zombiesBurn = false;
|
zombiesBurn = false;
|
||||||
creepersBurn = true;
|
creepersBurn = true;
|
||||||
creepersExplodeWhenBurning = true;
|
creepersExplodeWhenBurning = true;
|
||||||
|
alwaysBurn = true;
|
||||||
entityHealthFactor = 10d;
|
entityHealthFactor = 10d;
|
||||||
entityHealthBlacklist = null;
|
entityHealthBlacklist = null;
|
||||||
cooldownProgressOverride = 1d;
|
cooldownProgressOverride = 1d;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package io.gitlab.jfronny.combit.mixin;
|
||||||
|
|
||||||
|
import io.gitlab.jfronny.combit.CombitConfig;
|
||||||
|
import net.minecraft.entity.mob.MobEntity;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(MobEntity.class)
|
||||||
|
public class MobEntityMixin {
|
||||||
|
@Inject(method = "isAffectedByDaylight()Z", at = @At("RETURN"), cancellable = true)
|
||||||
|
private void modifyDaylight(CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
if (CombitConfig.alwaysBurn) cir.setReturnValue(true);
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,6 +26,8 @@
|
||||||
"combit.jfconfig.creepersBurn.tooltip": "Causes Creepers to burn in sunlight",
|
"combit.jfconfig.creepersBurn.tooltip": "Causes Creepers to burn in sunlight",
|
||||||
"combit.jfconfig.creepersExplodeWhenBurning": "Creepers explode when burning",
|
"combit.jfconfig.creepersExplodeWhenBurning": "Creepers explode when burning",
|
||||||
"combit.jfconfig.creepersExplodeWhenBurning.tooltip": "Causes creepers to explode when on fire. Do not combine with creepersBurn!",
|
"combit.jfconfig.creepersExplodeWhenBurning.tooltip": "Causes creepers to explode when on fire. Do not combine with creepersBurn!",
|
||||||
|
"combit.jfconfig.alwaysBurn": "Always burn",
|
||||||
|
"combit.jfconfig.alwaysBurn.tooltip": "Makes mobs that burn in sunlight burn constantly",
|
||||||
|
|
||||||
"combit.jfconfig.entityHealthFactor": "Entity Health Factor",
|
"combit.jfconfig.entityHealthFactor": "Entity Health Factor",
|
||||||
"combit.jfconfig.entityHealthFactor.tooltip": "Factor to apply to the maximum health of entities",
|
"combit.jfconfig.entityHealthFactor.tooltip": "Factor to apply to the maximum health of entities",
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
"HostileEntityMixin",
|
"HostileEntityMixin",
|
||||||
"LivingEntityMixin",
|
"LivingEntityMixin",
|
||||||
"MiningToolItemMixin",
|
"MiningToolItemMixin",
|
||||||
|
"MobEntityMixin",
|
||||||
"PlayerEntityMixin",
|
"PlayerEntityMixin",
|
||||||
"SnowballEntityMixin",
|
"SnowballEntityMixin",
|
||||||
"ZombieEntityMixin"
|
"ZombieEntityMixin"
|
||||||
|
|
Loading…
Reference in New Issue