From 6e3f16412a2ab3584b04c34ab01bb1d55bc26a81 Mon Sep 17 00:00:00 2001 From: cheaterpaul Date: Sun, 11 Aug 2024 12:00:43 +0200 Subject: [PATCH] enable mod configuration screen --- .../de/teamlapen/lib/lib/util/UtilLib.java | 14 +- .../vampirism/client/ClientConfigHelper.java | 2 + .../vampirism/client/VampirismModClient.java | 5 + .../vampirism/client/config/ModFilter.java | 20 ++ .../gui/overlay/ActionCooldownOverlay.java | 36 +-- .../gui/overlay/ActionDurationOverlay.java | 38 ++- .../client/gui/overlay/BatOverlay.java | 10 +- .../client/gui/overlay/BloodBarOverlay.java | 1 - .../gui/overlay/CustomBossEventOverlay.java | 4 + .../client/gui/overlay/DisguiseOverlay.java | 16 +- .../gui/overlay/FactionLevelOverlay.java | 2 +- .../gui/overlay/NearbyVampireOverlay.java | 15 +- .../client/gui/overlay/RageOverlay.java | 7 +- .../client/gui/overlay/SunOverlay.java | 26 +- .../client/gui/overlay/TextureOverlay.java | 3 + .../vampirism/config/BalanceBuilder.java | 11 +- .../vampirism/config/BalanceConfig.java | 7 +- .../vampirism/config/ClientConfig.java | 85 +++-- .../vampirism/config/CommonConfig.java | 58 ++-- .../vampirism/config/ServerConfig.java | 72 +++-- .../vampirism/config/VampirismConfig.java | 6 +- .../vampirism/core/ModStructures.java | 5 +- .../gen/VanillaStructureModifications.java | 11 +- .../assets/vampirism/lang/en_us.json | 299 +++++++++++++++++- 24 files changed, 557 insertions(+), 196 deletions(-) create mode 100644 src/main/java/de/teamlapen/vampirism/client/config/ModFilter.java diff --git a/src/lib/java/de/teamlapen/lib/lib/util/UtilLib.java b/src/lib/java/de/teamlapen/lib/lib/util/UtilLib.java index 29638fb7c..62ab40997 100644 --- a/src/lib/java/de/teamlapen/lib/lib/util/UtilLib.java +++ b/src/lib/java/de/teamlapen/lib/lib/util/UtilLib.java @@ -12,9 +12,9 @@ import net.minecraft.core.particles.ParticleTypes; import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.core.registries.Registries; -import net.minecraft.locale.Language; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -693,6 +693,18 @@ public static boolean isValidResourceLocation(@NotNull String loc) { return ResourceLocation.tryParse(loc) != null; } + public static boolean checkRegistryObjectExistence(ResourceKey> key, Object obj) { + if (obj instanceof String string) { + ResourceLocation id = ResourceLocation.tryParse(string); + if (id != null) { + if (ServerLifecycleHooks.getCurrentServer() != null) { + return ServerLifecycleHooks.getCurrentServer().registryAccess().registryOrThrow(key).containsKey(id); + } + } + } + return false; + } + /** * Replace an entity with a new one. Removes the old ones, adds the new one to the same world. Fires the respective Forge event * diff --git a/src/main/java/de/teamlapen/vampirism/client/ClientConfigHelper.java b/src/main/java/de/teamlapen/vampirism/client/ClientConfigHelper.java index 88a427a58..89ee08812 100644 --- a/src/main/java/de/teamlapen/vampirism/client/ClientConfigHelper.java +++ b/src/main/java/de/teamlapen/vampirism/client/ClientConfigHelper.java @@ -89,6 +89,7 @@ public static void onConfigChanged(@NotNull ModConfigEvent event) { * @return true if the order is valid */ public static boolean testActions(Object string) { + if (string == null) return false; try { GSON.fromJson((String) string, ACTION_TOKEN); } catch (JsonSyntaxException | ClassCastException | IllegalArgumentException e) { @@ -103,6 +104,7 @@ public static boolean testActions(Object string) { * @return true if the order is valid */ public static boolean testTasks(Object string) { + if (string == null) return false; try { GSON.fromJson((String) string, MINION_TASK_TOKEN); } catch (JsonSyntaxException | ClassCastException | IllegalArgumentException e) { diff --git a/src/main/java/de/teamlapen/vampirism/client/VampirismModClient.java b/src/main/java/de/teamlapen/vampirism/client/VampirismModClient.java index 4e313d5b5..74b2277ef 100644 --- a/src/main/java/de/teamlapen/vampirism/client/VampirismModClient.java +++ b/src/main/java/de/teamlapen/vampirism/client/VampirismModClient.java @@ -8,6 +8,7 @@ import de.teamlapen.vampirism.api.VampirismAPI; import de.teamlapen.vampirism.api.client.VIngameOverlays; import de.teamlapen.vampirism.blocks.LogBlock; +import de.teamlapen.vampirism.client.config.ModFilter; import de.teamlapen.vampirism.client.core.*; import de.teamlapen.vampirism.client.gui.ScreenEventHandler; import de.teamlapen.vampirism.client.gui.overlay.*; @@ -25,6 +26,8 @@ import net.neoforged.fml.ModContainer; import net.neoforged.fml.common.Mod; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; +import net.neoforged.neoforge.client.gui.ConfigurationScreen; +import net.neoforged.neoforge.client.gui.IConfigScreenFactory; import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.event.AddReloadListenerEvent; import net.neoforged.neoforge.event.level.LevelEvent; @@ -57,6 +60,8 @@ public VampirismModClient(IEventBus modEventBus, ModContainer modContainer) { this.renderHandler = new RenderHandler(Minecraft.getInstance()); this.modEventBus.register(this); + this.modContainer.registerExtensionPoint(IConfigScreenFactory.class, (container, parent) -> new ConfigurationScreen(container, parent, new ModFilter())); + NeoForge.EVENT_BUS.addListener(this::onAddReloadListenerEvent); NeoForge.EVENT_BUS.addListener(this::onDataMapsUpdated); NeoForge.EVENT_BUS.register(this.overlay); diff --git a/src/main/java/de/teamlapen/vampirism/client/config/ModFilter.java b/src/main/java/de/teamlapen/vampirism/client/config/ModFilter.java new file mode 100644 index 000000000..06df2822c --- /dev/null +++ b/src/main/java/de/teamlapen/vampirism/client/config/ModFilter.java @@ -0,0 +1,20 @@ +package de.teamlapen.vampirism.client.config; + +import net.neoforged.neoforge.client.gui.ConfigurationScreen.ConfigurationSectionScreen.Context; +import net.neoforged.neoforge.client.gui.ConfigurationScreen.ConfigurationSectionScreen.Element; +import net.neoforged.neoforge.client.gui.ConfigurationScreen.ConfigurationSectionScreen.Filter; +import org.jetbrains.annotations.Nullable; + +import javax.annotation.ParametersAreNonnullByDefault; + +@ParametersAreNonnullByDefault +public class ModFilter implements Filter { + + @Override + public @Nullable Element filterEntry(Context context, String key, Element original) { + return switch (key) { + case "integrationsNotifier", "optifineBloodvisionWarning", "actionOrder", "minionTaskOrder", "infoAboutGuideAPI", "oldVampireBiomeGen" -> null; + default -> original; + }; + } +} diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionCooldownOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionCooldownOverlay.java index c8ee0eaef..604061b74 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionCooldownOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionCooldownOverlay.java @@ -18,31 +18,29 @@ public class ActionCooldownOverlay implements LayeredDraw.Layer { @Override public void render(@NotNull GuiGraphics graphics, DeltaTracker partialTicks) { - if (this.mc.player != null) { + if (this.mc.player != null && VampirismConfig.CLIENT.enableHudActionCooldownRendering.get()) { VampirismAPI.factionPlayerHandler(this.mc.player).getCurrentFactionPlayer().ifPresent(factionPlayer -> { IActionHandler actionHandler = factionPlayer.getActionHandler(); int y = this.mc.getWindow().getGuiScaledHeight() - 27; int x = this.mc.getWindow().getGuiScaledWidth() - 12 - 16; - if (!VampirismConfig.CLIENT.disableHudActionCooldownRendering.get()) { - //noinspection rawtypes - for (IAction action : factionPlayer.getActionHandler().getUnlockedActions()) { - if (!(action.showHudCooldown(this.mc.player))) continue; - // noinspection unchecked - if (!actionHandler.isActionOnCooldown(action)) continue; - ResourceLocation id = RegUtil.id(action); - ResourceLocation loc = id.withPath("textures/actions/" + id.getPath() + ".png"); - //noinspection unchecked - int perc = (int) ((1 + actionHandler.getPercentageForAction(action)) * 16); - //render gray transparent background for remaining cooldown - graphics.fillGradient(x, y + perc, x + 16, y + 16, 0x44888888/*Color.GRAY - 0xBB000000 */, 0x44888888/*Color.GRAY - 0xBB000000 */); - //render action icon transparent - graphics.setColor(1, 1, 1, 0.5f); - graphics.blit(loc, x, y, 0, 0, 0, 16, 16, 16, 16); - graphics.setColor(1, 1, 1, 1); - x -= 17; - } + //noinspection rawtypes + for (IAction action : factionPlayer.getActionHandler().getUnlockedActions()) { + if (!(action.showHudCooldown(this.mc.player))) continue; + // noinspection unchecked + if (!actionHandler.isActionOnCooldown(action)) continue; + ResourceLocation id = RegUtil.id(action); + ResourceLocation loc = id.withPath("textures/actions/" + id.getPath() + ".png"); + //noinspection unchecked + int perc = (int) ((1 + actionHandler.getPercentageForAction(action)) * 16); + //render gray transparent background for remaining cooldown + graphics.fillGradient(x, y + perc, x + 16, y + 16, 0x44888888/*Color.GRAY - 0xBB000000 */, 0x44888888/*Color.GRAY - 0xBB000000 */); + //render action icon transparent + graphics.setColor(1, 1, 1, 0.5f); + graphics.blit(loc, x, y, 0, 0, 0, 16, 16, 16, 16); + graphics.setColor(1, 1, 1, 1); + x -= 17; } }); } diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionDurationOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionDurationOverlay.java index 3d1f92551..35c1555b9 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionDurationOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/ActionDurationOverlay.java @@ -19,32 +19,30 @@ public class ActionDurationOverlay implements LayeredDraw.Layer { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker partialTicks) { - if (this.mc.player != null) { + if (this.mc.player != null && VampirismConfig.CLIENT.enableHudActionDurationRendering.get()) { VampirismAPI.factionPlayerHandler(this.mc.player).getCurrentFactionPlayer().ifPresent(factionPlayer -> { IActionHandler actionHandler = factionPlayer.getActionHandler(); int x = 12; int y = this.mc.getWindow().getGuiScaledHeight() - 27; - if (!VampirismConfig.CLIENT.disableHudActionDurationRendering.get()) { - //noinspection rawtypes - for (IAction action : factionPlayer.getActionHandler().getUnlockedActions()) { - if (!(action instanceof ILastingAction)) continue; - if (!(((ILastingAction) action).showHudDuration(this.mc.player))) continue; - //noinspection unchecked,rawtypes - if (!actionHandler.isActionActive(((ILastingAction) action))) continue; - ResourceLocation id = RegUtil.id(action); - ResourceLocation loc = id.withPath("textures/actions/" + id.getPath() + ".png"); - //noinspection unchecked - int perc = (int) ((1 - actionHandler.getPercentageForAction(action)) * 16); - //render gray transparent background for remaining duration - graphics.fillGradient(x, y + perc, x + 16, y + 16, 0x44888888/*Color.GRAY - 0xBB000000 */, 0x44888888/*Color.GRAY - 0xBB000000 */); - //render action icon transparent - graphics.setColor(1, 1, 1, 0.5f); - graphics.blit(loc, x, y, 0, 0, 0, 16, 16, 16, 16); - graphics.setColor(1, 1, 1, 1f); - x += 17; - } + //noinspection rawtypes + for (IAction action : factionPlayer.getActionHandler().getUnlockedActions()) { + if (!(action instanceof ILastingAction)) continue; + if (!(((ILastingAction) action).showHudDuration(this.mc.player))) continue; + //noinspection unchecked,rawtypes + if (!actionHandler.isActionActive(((ILastingAction) action))) continue; + ResourceLocation id = RegUtil.id(action); + ResourceLocation loc = id.withPath("textures/actions/" + id.getPath() + ".png"); + //noinspection unchecked + int perc = (int) ((1 - actionHandler.getPercentageForAction(action)) * 16); + //render gray transparent background for remaining duration + graphics.fillGradient(x, y + perc, x + 16, y + 16, 0x44888888/*Color.GRAY - 0xBB000000 */, 0x44888888/*Color.GRAY - 0xBB000000 */); + //render action icon transparent + graphics.setColor(1, 1, 1, 0.5f); + graphics.blit(loc, x, y, 0, 0, 0, 16, 16, 16, 16); + graphics.setColor(1, 1, 1, 1f); + x += 17; } }); } diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BatOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BatOverlay.java index 4f2803997..c69cfd8d7 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BatOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BatOverlay.java @@ -3,10 +3,10 @@ import de.teamlapen.vampirism.api.entity.player.actions.IActionHandler; import de.teamlapen.vampirism.api.entity.player.vampire.IVampirePlayer; import de.teamlapen.vampirism.api.util.VResourceLocation; +import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.entity.player.vampire.VampirePlayer; import de.teamlapen.vampirism.entity.player.vampire.actions.VampireActions; import net.minecraft.client.DeltaTracker; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; @@ -17,9 +17,11 @@ public class BatOverlay extends TextureOverlay { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker deltaTracker) { - IActionHandler actionHandler = VampirePlayer.get(Minecraft.getInstance().player).getActionHandler(); - if (actionHandler.isActionActive(VampireActions.BAT.get())) { - renderTextureOverlay(graphics, BAT_TEXTURE, 1.0F); + if (this.mc.player != null && VampirismConfig.CLIENT.enableHudBatOverlayRendering.get()) { + IActionHandler actionHandler = VampirePlayer.get(this.mc.player).getActionHandler(); + if (actionHandler.isActionActive(VampireActions.BAT.get())) { + renderTextureOverlay(graphics, BAT_TEXTURE, 1.0F); + } } } } \ No newline at end of file diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BloodBarOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BloodBarOverlay.java index 80119ad79..c001f0574 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BloodBarOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/BloodBarOverlay.java @@ -1,6 +1,5 @@ package de.teamlapen.vampirism.client.gui.overlay; -import de.teamlapen.vampirism.REFERENCE; import de.teamlapen.vampirism.api.entity.player.vampire.IBloodStats; import de.teamlapen.vampirism.api.util.VResourceLocation; import de.teamlapen.vampirism.entity.player.vampire.VampirePlayer; diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/CustomBossEventOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/CustomBossEventOverlay.java index c8af20078..8c5892b30 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/CustomBossEventOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/CustomBossEventOverlay.java @@ -3,6 +3,7 @@ import com.mojang.blaze3d.systems.RenderSystem; import de.teamlapen.lib.util.Color; import de.teamlapen.vampirism.api.util.VResourceLocation; +import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.mixin.client.accessor.BossHealthOverlayAccessor; import de.teamlapen.vampirism.mixin.client.accessor.BossOverlayGuiAccessor; import de.teamlapen.vampirism.network.ClientboundUpdateMultiBossEventPacket; @@ -49,6 +50,9 @@ public void read(@NotNull ClientboundUpdateMultiBossEventPacket packet) { @Override public void render(GuiGraphics graphics, DeltaTracker partialTicks) { + if (!VampirismConfig.CLIENT.enableVillageRaidOverlayRendering.get()) { + return; + } int i = Minecraft.getInstance().getWindow().getGuiScaledWidth(); int j = 12 + ((BossOverlayGuiAccessor) this.client.gui.getBossOverlay()).getMapBossInfos().size() * (10 + this.client.font.lineHeight); for (MultiBossEvent value : bossInfoMap.values()) { diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/DisguiseOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/DisguiseOverlay.java index d966c3ff4..b8f359e5d 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/DisguiseOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/DisguiseOverlay.java @@ -1,10 +1,10 @@ package de.teamlapen.vampirism.client.gui.overlay; import de.teamlapen.vampirism.api.util.VResourceLocation; +import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.entity.player.IVampirismPlayer; import de.teamlapen.vampirism.entity.player.hunter.HunterPlayerSpecialAttribute; import net.minecraft.client.DeltaTracker; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.NotNull; @@ -15,12 +15,14 @@ public class DisguiseOverlay extends TextureOverlay { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker deltaTracker) { - HunterPlayerSpecialAttribute huntSpecial = ((IVampirismPlayer) Minecraft.getInstance().player).getVampAtts().getHuntSpecial(); - if (huntSpecial.isDisguised()) { - graphics.pose().pushPose(); - scaleBy(huntSpecial.getDisguiseProgress(), 1/4f, 2F, 1.0F, graphics); - renderTextureOverlay(graphics, DISGUISE_TEXTURE, 1.0F); - graphics.pose().popPose(); + if (this.mc.player != null && VampirismConfig.CLIENT.enableDisguiseOverlayRendering.get()) { + HunterPlayerSpecialAttribute huntSpecial = ((IVampirismPlayer) this.mc.player).getVampAtts().getHuntSpecial(); + if (huntSpecial.isDisguised()) { + graphics.pose().pushPose(); + scaleBy(huntSpecial.getDisguiseProgress(), 1 / 4f, 2F, 1.0F, graphics); + renderTextureOverlay(graphics, DISGUISE_TEXTURE, 1.0F); + graphics.pose().popPose(); + } } } } \ No newline at end of file diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/FactionLevelOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/FactionLevelOverlay.java index 3dbd176b6..9f64bb2e7 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/FactionLevelOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/FactionLevelOverlay.java @@ -14,7 +14,7 @@ public class FactionLevelOverlay implements LayeredDraw.Layer { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker partialTicks) { - if (this.mc.player != null && this.mc.player.isAlive() && this.mc.player.jumpableVehicle() == null && !this.mc.options.hideGui) { + if (this.mc.player != null && this.mc.player.isAlive() && this.mc.player.jumpableVehicle() == null && !this.mc.options.hideGui && VampirismConfig.CLIENT.enableFactionLevelOverlayRendering.get()) { FactionPlayerHandler handler = FactionPlayerHandler.get(this.mc.player); IPlayableFaction faction = handler.getCurrentFaction(); if (this.mc.gameMode != null && this.mc.gameMode.hasExperience() && faction != null) { diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/NearbyVampireOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/NearbyVampireOverlay.java index 7d4c06fce..9b677edf5 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/NearbyVampireOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/NearbyVampireOverlay.java @@ -1,6 +1,7 @@ package de.teamlapen.vampirism.client.gui.overlay; import de.teamlapen.vampirism.api.util.VResourceLocation; +import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.entity.player.IVampirismPlayer; import de.teamlapen.vampirism.entity.player.hunter.HunterPlayerSpecialAttribute; import net.minecraft.client.DeltaTracker; @@ -15,12 +16,14 @@ public class NearbyVampireOverlay extends TextureOverlay { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker deltaTracker) { - HunterPlayerSpecialAttribute huntSpecial = ((IVampirismPlayer) Minecraft.getInstance().player).getVampAtts().getHuntSpecial(); - if (huntSpecial.isVampireNearby()) { - graphics.pose().pushPose(); - scaleBy(huntSpecial.getVampireNearbyProgress(), 1/4f, 2F, 1.0F, graphics); - renderTextureOverlay(graphics, AWARENESS_TEXTURE, 1.0F); - graphics.pose().popPose(); + if (this.mc.player != null && VampirismConfig.CLIENT.enableNearbyVampireOverlayRendering.get()) { + HunterPlayerSpecialAttribute huntSpecial = ((IVampirismPlayer) Minecraft.getInstance().player).getVampAtts().getHuntSpecial(); + if (huntSpecial.isVampireNearby()) { + graphics.pose().pushPose(); + scaleBy(huntSpecial.getVampireNearbyProgress(), 1 / 4f, 2F, 1.0F, graphics); + renderTextureOverlay(graphics, AWARENESS_TEXTURE, 1.0F); + graphics.pose().popPose(); + } } } } diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/RageOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/RageOverlay.java index 95e6339a6..8c805f5b3 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/RageOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/RageOverlay.java @@ -1,6 +1,7 @@ package de.teamlapen.vampirism.client.gui.overlay; import de.teamlapen.vampirism.api.util.VResourceLocation; +import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.entity.player.vampire.VampirePlayer; import de.teamlapen.vampirism.entity.player.vampire.actions.VampireActions; import net.minecraft.client.DeltaTracker; @@ -15,8 +16,10 @@ public class RageOverlay extends TextureOverlay { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker deltaTracker) { - if (VampirePlayer.get(Minecraft.getInstance().player).getActionHandler().isActionActive(VampireActions.VAMPIRE_RAGE.get())) { - renderTextureOverlay(graphics, RAGE_TEXTURE, 1.0F); + if (this.mc.player != null && VampirismConfig.CLIENT.enableRageOverlayRendering.get()) { + if (VampirePlayer.get(Minecraft.getInstance().player).getActionHandler().isActionActive(VampireActions.VAMPIRE_RAGE.get())) { + renderTextureOverlay(graphics, RAGE_TEXTURE, 1.0F); + } } } } diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/SunOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/SunOverlay.java index 1a4a665e0..9e647d07b 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/SunOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/SunOverlay.java @@ -1,10 +1,10 @@ package de.teamlapen.vampirism.client.gui.overlay; import de.teamlapen.vampirism.api.util.VResourceLocation; +import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.core.ModEffects; import de.teamlapen.vampirism.entity.player.vampire.VampirePlayer; import net.minecraft.client.DeltaTracker; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.player.LocalPlayer; import net.minecraft.resources.ResourceLocation; @@ -17,18 +17,20 @@ public class SunOverlay extends TextureOverlay { @Override public void render(@NotNull GuiGraphics graphics, @NotNull DeltaTracker deltaTracker) { - LocalPlayer player = Minecraft.getInstance().player; - VampirePlayer vampire = VampirePlayer.get(player); - MobEffectInstance effect = player.getEffect(ModEffects.SUNSCREEN); - float progress = Math.clamp(vampire.getTicksInSun() / 50f, 0f, 1f); - if (progress > 0 && (effect == null || effect.getAmplifier() < 5)) { - if (player.getAbilities().instabuild || (effect != null && effect.getAmplifier() >= 3)) { - progress = Math.min(0.5f, progress); + if (this.mc.player != null && VampirismConfig.CLIENT.enableSunOverlayRendering.get()) { + LocalPlayer player = this.mc.player; + VampirePlayer vampire = VampirePlayer.get(player); + MobEffectInstance effect = player.getEffect(ModEffects.SUNSCREEN); + float progress = Math.clamp(vampire.getTicksInSun() / 50f, 0f, 1f); + if (progress > 0 && (effect == null || effect.getAmplifier() < 5)) { + if (player.getAbilities().instabuild || (effect != null && effect.getAmplifier() >= 3)) { + progress = Math.min(0.5f, progress); + } + graphics.pose().pushPose(); + scaleBy(progress, 1 / 5f, 2F, 1.0F, graphics); + renderTextureOverlay(graphics, SUN_TEXTURE, 1.0F); + graphics.pose().popPose(); } - graphics.pose().pushPose(); - scaleBy(progress, 1/5f, 2F, 1.0F, graphics); - renderTextureOverlay(graphics, SUN_TEXTURE, 1.0F); - graphics.pose().popPose(); } } diff --git a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/TextureOverlay.java b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/TextureOverlay.java index 12db5ce2d..7d33f044d 100644 --- a/src/main/java/de/teamlapen/vampirism/client/gui/overlay/TextureOverlay.java +++ b/src/main/java/de/teamlapen/vampirism/client/gui/overlay/TextureOverlay.java @@ -1,6 +1,7 @@ package de.teamlapen.vampirism.client.gui.overlay; import com.mojang.blaze3d.systems.RenderSystem; +import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.LayeredDraw; import net.minecraft.resources.ResourceLocation; @@ -8,6 +9,8 @@ public abstract class TextureOverlay implements LayeredDraw.Layer { + protected final Minecraft mc = Minecraft.getInstance(); + protected void renderTextureOverlay(GuiGraphics pGuiGraphics, ResourceLocation pShaderLocation, float pAlpha) { RenderSystem.disableDepthTest(); RenderSystem.depthMask(false); diff --git a/src/main/java/de/teamlapen/vampirism/config/BalanceBuilder.java b/src/main/java/de/teamlapen/vampirism/config/BalanceBuilder.java index 488e3e7b0..b01495323 100644 --- a/src/main/java/de/teamlapen/vampirism/config/BalanceBuilder.java +++ b/src/main/java/de/teamlapen/vampirism/config/BalanceBuilder.java @@ -13,6 +13,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; import java.util.function.Predicate; +import java.util.function.Supplier; /** * Intermediate builder stage for Vampirism's balance configuration ({@link BalanceConfig}) @@ -172,8 +173,8 @@ public void checkFields(BalanceConfig config) throws IllegalStateException { * @return null, for drop-in replacement */ @SuppressWarnings("SameReturnValue") - public ModConfigSpec.@UnknownNullability ConfigValue> defineList(String name, @NotNull List defaultValues, Predicate validator) { - add(new BalanceBuilder.StringList(name, defaultValues, validator)); + public ModConfigSpec.@UnknownNullability ConfigValue> defineList(String name, @NotNull List defaultValues, Supplier emptyValueSupplier, Predicate validator) { + add(new BalanceBuilder.StringList(name, defaultValues, emptyValueSupplier, validator)); return null; } @@ -302,11 +303,13 @@ public void setDefaultValue(int defaultValue) { public static class StringList extends Conf { private final @NotNull List defaultValue; private final Predicate elementValidator; + private final Supplier emptyValueSupplier; - StringList(String name, @NotNull List defaultValue, Predicate validator) { + StringList(String name, @NotNull List defaultValue, Supplier emptyValueSupplier, Predicate validator) { super(name); this.defaultValue = new ArrayList<>(defaultValue); this.elementValidator = validator; + this.emptyValueSupplier = emptyValueSupplier; } public void addValue(String s) { @@ -317,7 +320,7 @@ public void addValue(String s) { @Override public ModConfigSpec.ConfigValue buildInternal(ModConfigSpec.@NotNull Builder builder) { - return builder.defineList(name, Collections.unmodifiableList(defaultValue), elementValidator); + return builder.defineList(name, Collections.unmodifiableList(defaultValue), emptyValueSupplier, elementValidator); } public void removeValue(String s) { diff --git a/src/main/java/de/teamlapen/vampirism/config/BalanceConfig.java b/src/main/java/de/teamlapen/vampirism/config/BalanceConfig.java index 3bd57ca4f..e5fb1e2ee 100644 --- a/src/main/java/de/teamlapen/vampirism/config/BalanceConfig.java +++ b/src/main/java/de/teamlapen/vampirism/config/BalanceConfig.java @@ -1,9 +1,10 @@ package de.teamlapen.vampirism.config; +import de.teamlapen.lib.lib.util.UtilLib; import de.teamlapen.vampirism.api.VReference; import de.teamlapen.vampirism.core.ModTags; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.core.registries.Registries; import net.neoforged.fml.ModList; import net.neoforged.neoforge.common.ModConfigSpec; import org.apache.logging.log4j.LogManager; @@ -355,7 +356,7 @@ public class BalanceConfig { vpFireVulnerabilityMod = builder.comment("Multiply fire damage with this for vampires" + (iceAndFire ? " - Changed due to IceAndFire" : "")).defineInRange("fireVulnerabilityMod", iceAndFire ? 1.5d : 3d, 0.1, Double.MAX_VALUE); vpFireResistanceReplace = builder.comment("Whether to replace the vanilla fire resistance potion for vampires with a custom one that only reduces damage but does not remove it" + (iceAndFire ? " - Changed due to IceAndFire" : "")).define("fireResistanceReplace", !iceAndFire); vpMaxYellowBorderPercentage = builder.comment("Defines the maximum extend the yellow border covers when the player is in the sun. 100 is default. 0 to disable completely").defineInRange("maxYellowBorderPercentage", 100, 0, 100); - vpImmortalFromDamageSources = builder.comment("List of damage source types that the player does not die from (immediately)").defineList("immortalFromDamageSources", List.of(), s -> ResourceLocation.tryParse((String) s) != null); + vpImmortalFromDamageSources = builder.comment("List of damage source types that the player does not die from (immediately)").defineList("immortalFromDamageSources", List.of(), () -> "", c -> UtilLib.checkRegistryObjectExistence(Registries.DAMAGE_TYPE, c)); vpDbnoDuration = builder.comment("Base cooldown before a downed vampire can resurrect. In sec.").defineInRange("dbnoDuration", 60, 1, 1000); vpNeonatalDuration = builder.comment("Base duration of neonatal effect after resurrection. In sec.").defineInRange("neonatalDuration", 120, 1, Integer.MAX_VALUE); vpNaturalArmorRegenDuration = builder.comment("The duration it takes for the vampire natural armor to fully regenerate after respawn. In seconds").defineInRange("naturalArmorRegenDuration", 240, 1, 2400); @@ -439,7 +440,7 @@ public class BalanceConfig { itApplicableOilPickaxeReverse = builder.comment(String.format("Determines if the '%s' item tag should work as blacklist (false) or whitelist (true)", ModTags.Items.APPLICABLE_OIL_PICKAXE.location())).define("applicableOilPickaxeReverse", false); itApplicableOilSwordReverse = builder.comment(String.format("Determines if the '%s' item tag should work as blacklist (false) or whitelist (true)", ModTags.Items.APPLICABLE_OIL_SWORD.location())).define("applicableOilSwordReverse", false); - builder.category("lord actions", "la"); + builder.category("lord_actions", "la"); laLordSpeedEnabled = builder.define("lordSpeedEnabled", true); laLordSpeedDuration = builder.comment("In seconds").defineInRange("lordSpeedDuration", 30, 0, Integer.MAX_VALUE); laLordSpeedCooldown = builder.comment("In seconds").defineInRange("lordSpeedCooldown", 120, 0, Integer.MAX_VALUE); diff --git a/src/main/java/de/teamlapen/vampirism/config/ClientConfig.java b/src/main/java/de/teamlapen/vampirism/config/ClientConfig.java index 9fe2ef3a1..a74f96a2b 100644 --- a/src/main/java/de/teamlapen/vampirism/config/ClientConfig.java +++ b/src/main/java/de/teamlapen/vampirism/config/ClientConfig.java @@ -9,56 +9,77 @@ */ public class ClientConfig { - public final ModConfigSpec.IntValue overrideGuiSkillButtonX; - public final ModConfigSpec.IntValue overrideGuiSkillButtonY; - public final ModConfigSpec.IntValue guiLevelOffsetX; - public final ModConfigSpec.IntValue guiLevelOffsetY; - public final ModConfigSpec.BooleanValue guiSkillButton; + // Entity rendering public final ModConfigSpec.BooleanValue renderAdvancedMobPlayerFaces; public final ModConfigSpec.BooleanValue renderVampireEyes; + + // World rendering public final ModConfigSpec.BooleanValue renderVampireForestFog; + + // Overlay rendering public final ModConfigSpec.BooleanValue renderScreenOverlay; + public final ModConfigSpec.BooleanValue enableHudActionCooldownRendering; + public final ModConfigSpec.BooleanValue enableHudActionDurationRendering; + public final ModConfigSpec.BooleanValue enableHudBatOverlayRendering; + public final ModConfigSpec.BooleanValue enableVillageRaidOverlayRendering; + public final ModConfigSpec.BooleanValue enableDisguiseOverlayRendering; + public final ModConfigSpec.BooleanValue enableFactionLevelOverlayRendering; + public final ModConfigSpec.IntValue guiLevelOffsetX; + public final ModConfigSpec.IntValue guiLevelOffsetY; + public final ModConfigSpec.BooleanValue enableNearbyVampireOverlayRendering; + public final ModConfigSpec.BooleanValue enableRageOverlayRendering; + public final ModConfigSpec.BooleanValue enableSunOverlayRendering; + + // Gui rendering + public final ModConfigSpec.IntValue overrideGuiSkillButtonX; + public final ModConfigSpec.IntValue overrideGuiSkillButtonY; + public final ModConfigSpec.BooleanValue guiSkillButton; public final ModConfigSpec.BooleanValue disableFovChange; public final ModConfigSpec.BooleanValue disableBloodVisionRendering; - public final ModConfigSpec.BooleanValue disableHudActionCooldownRendering; - public final ModConfigSpec.BooleanValue disableHudActionDurationRendering; + + + // Internal public final ModConfigSpec.ConfigValue actionOrder; public final ModConfigSpec.ConfigValue minionTaskOrder; ClientConfig(ModConfigSpec.@NotNull Builder builder) { - builder.comment("Client configuration settings") - .push("client"); - - - //Rendering - builder.comment("Configure rendering").push("render"); - renderAdvancedMobPlayerFaces = builder.comment("Render player faces on advanced hunter or vampires").define("advancedMobPlayerFaces", true); - renderVampireEyes = builder.comment("Render vampire eye/fang face overlay").define("vampireEyes", true); - renderVampireForestFog = builder.comment("Render fog in vampire biome. Might be enforced server side").define("vampireForestFog", true); - renderScreenOverlay = builder.comment("Render screen overlay. Don't disable").define("screenOverlay", true); + builder.comment("Entity render").push("entity-rendering"); + this.renderAdvancedMobPlayerFaces = builder.comment("Render player faces on advanced hunter or vampires").define("advancedMobPlayerFaces", true); + this.renderVampireEyes = builder.comment("Render vampire eye/fang face overlay").define("vampireEyes", true); builder.pop(); - builder.comment("Configure GUI").push("gui"); - guiLevelOffsetX = builder.comment("X-Offset of the level indicator from the center in pixels").defineInRange("levelOffsetX", 0, -250, 250); - guiLevelOffsetY = builder.comment("Y-Offset of the level indicator from the bottom in pixels. Must be > 0").defineInRange("levelOffsetY", 47, 0, 270); - guiSkillButton = builder.comment("Render skill menu button in inventory").define("skillButtonEnable", true); - overrideGuiSkillButtonX = builder.comment("Force the guiSkillButton to the following x position from the center of the inventory, default value is 125").defineInRange("overrideGuiSkillButtonX", 125, Integer.MIN_VALUE, Integer.MAX_VALUE); - overrideGuiSkillButtonY = builder.comment("Force the guiSkillButton to the following y position from the center of the inventory, default value is -22").defineInRange("overrideGuiSkillButtonY", -22, Integer.MIN_VALUE, Integer.MAX_VALUE); - - disableFovChange = builder.comment("Disable the FOV change caused by the speed buf for vampire players").define("disableFovChange", false); - disableBloodVisionRendering = builder.comment("Disable the effect of blood vision. It can still be unlocked and activated but does not have any effect").define("disableBloodVisionRendering", false); - disableHudActionCooldownRendering = builder.comment("Disable the rendering of the action cooldowns in the HUD").define("disableHudActionCooldownRendering", false); - disableHudActionDurationRendering = builder.comment("Disable the rendering of the action durations in the HUD").define("disableHudActionDurationRendering", false); - + builder.comment("World rendering").push("world-rendering"); + this.renderVampireForestFog = builder.comment("Render fog in vampire biome. Might be enforced server side").define("vampireForestFog", true); builder.pop(); - builder.push("internal"); - actionOrder = builder.comment("Action ordering").define("actionOrder", "", ClientConfigHelper::testActions); - minionTaskOrder = builder.comment("Minion task ordering").define("minionTaskOrder", "", ClientConfigHelper::testTasks); + builder.comment("Gui rendering").push("gui-rendering"); + builder.comment("Overlay rendering").push("overlay"); + this.renderScreenOverlay = builder.comment("Render full screen colored overlays for effects like vampire levelup").define("renderScreenOverlay", true); + this.enableHudActionCooldownRendering = builder.comment("Disable the rendering of the action cooldowns in the HUD").define("enableHudActionCooldownRendering", true); + this.enableHudActionDurationRendering = builder.comment("Disable the rendering of the action durations in the HUD").define("enableHudActionDurationRendering", true); + this.enableHudBatOverlayRendering = builder.comment("Disable the rendering of the bat overlay in the HUD").define("enableHudBatOverlayRendering", true); + this.enableVillageRaidOverlayRendering = builder.comment("Disable the rendering of the village raid overlay in the HUD").define("enableVillageRaidOverlayRendering", true); + this.enableDisguiseOverlayRendering = builder.comment("Disable the rendering of the disguise overlay in the HUD").define("enableDisguiseOverlayRendering", true); + this.enableFactionLevelOverlayRendering = builder.comment("Disable the rendering of the faction level overlay in the HUD").define("enableFactionLevelOverlayRendering", true); + this.guiLevelOffsetX = builder.comment("X-Offset of the level indicator from the center in pixels").defineInRange("levelOffsetX", 0, -250, 250); + this.guiLevelOffsetY = builder.comment("Y-Offset of the level indicator from the bottom in pixels").defineInRange("levelOffsetY", 47, 0, 270); + this.enableNearbyVampireOverlayRendering = builder.comment("Disable the rendering of the nearby vampire overlay in the HUD").define("enableNearbyVampireOverlayRendering", true); + this.enableRageOverlayRendering = builder.comment("Disable the rendering of the rage overlay in the HUD").define("enableRageOverlayRendering", true); + this.enableSunOverlayRendering = builder.comment("Disable the rendering of the sun overlay in the HUD").define("enableSunOverlayRendering", true); builder.pop(); + this.guiSkillButton = builder.comment("Render skill menu button in inventory").define("skillButtonEnable", true); + this.overrideGuiSkillButtonX = builder.comment("Force the guiSkillButton to the following x position from the center of the inventory, default value is 125").defineInRange("overrideGuiSkillButtonX", 125, Integer.MIN_VALUE, Integer.MAX_VALUE); + this.overrideGuiSkillButtonY = builder.comment("Force the guiSkillButton to the following y position from the center of the inventory, default value is -22").defineInRange("overrideGuiSkillButtonY", -22, Integer.MIN_VALUE, Integer.MAX_VALUE); + this.disableFovChange = builder.comment("Disable the FOV change caused by the speed buf for vampire players").define("disableFovChange", false); + this.disableBloodVisionRendering = builder.comment("Disable the effect of blood vision. It can still be unlocked and activated but does not have any effect").define("disableBloodVisionRendering", false); builder.pop(); + + // Internal - without builder push to hide in config screen + builder.comment("Internal"); + this.actionOrder = builder.comment("Action ordering").define("actionOrder", "", ClientConfigHelper::testActions); + this.minionTaskOrder = builder.comment("Minion task ordering").define("minionTaskOrder", "", ClientConfigHelper::testTasks); } } diff --git a/src/main/java/de/teamlapen/vampirism/config/CommonConfig.java b/src/main/java/de/teamlapen/vampirism/config/CommonConfig.java index edfbdbd79..39f45d939 100644 --- a/src/main/java/de/teamlapen/vampirism/config/CommonConfig.java +++ b/src/main/java/de/teamlapen/vampirism/config/CommonConfig.java @@ -6,60 +6,42 @@ public class CommonConfig { public final ModConfigSpec.BooleanValue collectStats; - public final ModConfigSpec.ConfigValue integrationsNotifier; - public final ModConfigSpec.BooleanValue optifineBloodvisionWarning; + public final ModConfigSpec.BooleanValue enableFactionLogging; + - //Common server + // Recipes server public final ModConfigSpec.BooleanValue autoConvertGlassBottles; public final ModConfigSpec.BooleanValue umbrella; - public final ModConfigSpec.BooleanValue enableFactionLogging; - //World + // World generation public final ModConfigSpec.BooleanValue addVampireForestToOverworld; public final ModConfigSpec.IntValue vampireForestWeight_terrablender; public final ModConfigSpec.BooleanValue enableHunterTentGeneration; public final ModConfigSpec.BooleanValue useVanillaCampfire; - //World village - public final ModConfigSpec.IntValue villageTotemWeight; - public final ModConfigSpec.BooleanValue villageReplaceTemples; - public final ModConfigSpec.DoubleValue villageTotemFactionChance; - public final ModConfigSpec.IntValue villageHunterTrainerWeight; - + // Internal - Hidden + public final ModConfigSpec.ConfigValue integrationsNotifier; + public final ModConfigSpec.BooleanValue optifineBloodvisionWarning; CommonConfig(ModConfigSpec.@NotNull Builder builder) { - builder.comment("Common configuration settings. Most other configuration can be found in the world (server)configuration folder") - .push("common"); - collectStats = builder.comment("Send mod version, MC version and mod count to mod author").define("collectStats", true); + this.collectStats = builder.comment("Send mod version, MC version and mod count to mod author").gameRestart().define("collectStats", true); + this.enableFactionLogging = builder.comment("Enable a custom vampirism log file that logs specific faction actions").gameRestart().define("enableFactionLogging", false); - builder.push("internal"); - integrationsNotifier = builder.comment("INTERNAL - Set to 'never' if you don't want to be notified about integration mods").define("integrationsNotifier", ""); - optifineBloodvisionWarning = builder.comment("INTERNAL").define("optifineBloodvisionWarning", false); + builder.comment("Recipe modifications").push("recipes"); + this.autoConvertGlassBottles = builder.comment("Whether glass bottles should be automatically be converted to blood bottles when needed").define("autoConvertGlassBottles", true); + this.umbrella = builder.comment("If enabled adds a craftable umbrella that can be used to slowly walk though sunlight without taking damage").define("umbrella", false); builder.pop(); + builder.comment("World generation").push("world-gen"); + this.addVampireForestToOverworld = builder.comment("Whether to inject the vampire forest into the default overworld generation and to replace some Taiga areas").gameRestart().define("addVampireForestToOverworld", true); + this.vampireForestWeight_terrablender = builder.comment("Only considered if terrablender installed. Heigher values increase Vampirism region weight (likelyhood to appear)").gameRestart().defineInRange("vampireForestWeight_terrablender", 2, 1, 1000); + this.enableHunterTentGeneration = builder.comment("Control hunter camp generation. If disabled you should set hunterSpawnChance to 75.").define("enableHunterTentGeneration", true); + this.useVanillaCampfire = builder.comment("Use the vanilla campfire block instead of Vampirism's much cooler one").define("useVanillaCampfire", false); builder.pop(); - builder.comment("Affects all worlds. This is only considered on server (or in singleplayer), but Forge requires us to put it here") - .push("common-server"); - autoConvertGlassBottles = builder.comment("Whether glass bottles should be automatically be converted to blood bottles when needed").define("autoConvertGlassBottles", true); - umbrella = builder.comment("If enabled adds a craftable umbrella that can be used to slowly walk though sunlight without taking damage").define("umbrella", false); - enableFactionLogging = builder.comment("Enable a custom vampirism log file that logs specific faction actions", "Requires restart").define("enableFactionLogging", false); - - builder.comment("Settings here require a game restart").push("world"); - addVampireForestToOverworld = builder.comment("Whether to inject the vampire forest into the default overworld generation and to replace some Taiga areas").define("addVampireForestToOverworld", true); - vampireForestWeight_terrablender = builder.comment("Only considered if terrablender installed. Heigher values increase Vampirism region weight (likelyhood to appear)").defineInRange("vampireForestWeight_terrablender", 2, 1, 1000); - enableHunterTentGeneration = builder.comment("Control hunter camp generation. If disabled you should set hunterSpawnChance to 75.").define("enableHunterTentGeneration", true); - useVanillaCampfire = builder.comment("Use the vanilla campfire block instead of Vampirism's much cooler one").define("useVanillaCampfire", false); - - builder.push("village"); - villageTotemWeight = builder.comment("Weight of the Totem Building inside the Village").defineInRange("totemWeight", 20, 0, 140); - villageTotemFactionChance = builder.comment("Chance for a totem to have a faction after generation").defineInRange("villageTotemFactionChance", 0.6, 0, 1); - villageHunterTrainerWeight = builder.comment("Weight of the Hunter Trainer Building inside the Village").defineInRange("villageHunterTrainerWeight", 50, 0, 140); - villageReplaceTemples = builder.comment("Whether village Temples should be replaced with versions that contain church altars.").define("villageReplaceTemples", true); - builder.pop(); - - builder.pop(); - builder.pop(); + // Internal - Hidden + this.integrationsNotifier = builder.comment("INTERNAL - Set to 'never' if you don't want to be notified about integration mods").define("integrationsNotifier", ""); + this.optifineBloodvisionWarning = builder.comment("INTERNAL").define("optifineBloodvisionWarning", false); } } diff --git a/src/main/java/de/teamlapen/vampirism/config/ServerConfig.java b/src/main/java/de/teamlapen/vampirism/config/ServerConfig.java index 360dadcdd..f1e02afe1 100644 --- a/src/main/java/de/teamlapen/vampirism/config/ServerConfig.java +++ b/src/main/java/de/teamlapen/vampirism/config/ServerConfig.java @@ -1,6 +1,7 @@ package de.teamlapen.vampirism.config; import de.teamlapen.lib.lib.util.UtilLib; +import net.minecraft.core.registries.Registries; import net.minecraft.world.level.Level; import net.neoforged.neoforge.common.ModConfigSpec; import org.jetbrains.annotations.NotNull; @@ -39,60 +40,69 @@ public class ServerConfig { public final ModConfigSpec.BooleanValue disableMobBiteInfection; public final ModConfigSpec.BooleanValue disableVillageGuards; - public final ModConfigSpec.BooleanValue oldVampireBiomeGen; - public final ModConfigSpec.BooleanValue infoAboutGuideAPI; + public final ModConfigSpec.IntValue villageTotemWeight; + public final ModConfigSpec.BooleanValue villageReplaceTemples; + public final ModConfigSpec.IntValue villageHunterTrainerWeight; - ServerConfig(ModConfigSpec.@NotNull Builder builder) { - builder.comment("Server configuration settings") - .push("server"); - enforceRenderForestFog = builder.comment("Prevent clients from disabling the vampire forest fog").define("enforceForestFog", true); + ServerConfig(ModConfigSpec.@NotNull Builder builder) { + builder.comment("Factions").push("factions"); pvpOnlyBetweenFactions = builder.comment("If PVP should only be allowed between factions. PVP has to be enabled in the server properties for this. Not guaranteed to always protect player from teammates").define("pvpOnlyBetweenFactions", false); pvpOnlyBetweenFactionsIncludeHumans = builder.comment("If pvpOnlyBetweenFactions is enabled, this decides whether human players can be attacked and attack others").define("pvpOnlyBetweenFactionsIncludeHumans", false); - sunscreenBeaconDistance = builder.comment("Block radius the sunscreen beacon affects").defineInRange("sunscreenBeaconDistance", 32, 1, 40000); - sunscreenBeaconMineable = builder.comment("Whether the suncreen beacon can be mined in survival").define("sunscreenBeaconMineable", false); - autoCalculateEntityBlood = builder.comment("Calculate the blood level for unknown creatures based on their size").define("autoCalculateEntityBlood", true); - playerCanTurnPlayer = builder.comment("Whether players can infect other players").define("playersCanTurnPlayers", true); factionColorInChat = builder.comment("Whether to color player names in chat based on their current faction").define("factionColorInChat", true); + playerCanTurnPlayer = builder.comment("Whether players can infect other players").define("playersCanTurnPlayers", true); lordPrefixInChat = builder.comment("Whether to add a prefix title based on the current lord level to the player names").define("lordPrefixInChat", true); - entityIMob = builder.comment("Changes if entities are recognized as hostile by other mods. See https://github.com/TeamLapen/Vampirism/issues/199. Smart falls back to Never on servers ").defineEnum("entitiesIMob", IMobOptions.SMART); - infectCreaturesSanguinare = builder.comment("If enabled, creatures are infected with Sanguinare Vampirism first instead of immediately being converted to a vampire when their blood is sucked dry").define("infectCreaturesSanguinare", false); - preventRenderingDebugBoundingBoxes = builder.comment("Prevent players from enabling the rendering of debug bounding boxes. This can allow them to see certain entities they are not supposed to see (e.g. disguised hunter").define("preventDebugBoundingBoxes", false); - batDimensionBlacklist = builder.comment("Prevent vampire players to transform into a bat").defineList("batDimensionBlacklist", Collections.singletonList(Level.END.location().toString()), string -> string instanceof String && UtilLib.isValidResourceLocation(((String) string))); - allowVillageDestroyBlocks = builder.comment("Allow players to destroy point of interest blocks in faction villages if they no not have the faction village").define("allowVillageDestroyBlocks", false); - usePermissions = builder.comment("Use the forge permission system for certain actions. Take a look at the wiki for more information").define("usePermissions", false); + builder.pop(); - builder.push("sundamage"); + builder.push("sun-damage"); sundamageUnknownDimension = builder.comment("Whether vampires should receive sundamage in unknown dimensions").define("sundamageUnknownDimension", false); - sundamageDimensionsOverridePositive = builder.comment("Add the string id in quotes of any dimension (/vampirism currentDimension) you want to enforce sundamage for to this comma-separated list. Overrides defaults and values added by other mods").defineList("sundamageDimensionsOverridePositive", Collections.emptyList(), string -> string instanceof String && UtilLib.isValidResourceLocation(((String) string))); - - sundamageDimensionsOverrideNegative = builder.comment("Add the string id in quotes of any dimension (/vampirism currentDimension) you want to disable sundamage for to this comma-separated list. Overrides defaults and values added by other mods").defineList("sundamageDimensionsOverrideNegative", Collections.emptyList(), string -> string instanceof String && UtilLib.isValidResourceLocation(((String) string))); - sundamageDisabledBiomes = builder.comment("Additional biomes the player should not get sundamage in. Use biome ids e.g. [\"minecraft:mesa\", \"minecraft:plains\"]").defineList("sundamageDisabledBiomes", Collections.emptyList(), string -> string instanceof String && UtilLib.isValidResourceLocation(((String) string))); - builder.pop(); + sundamageDimensionsOverridePositive = builder.comment("Add the string id in quotes of any dimension (/vampirism currentDimension) you want to enforce sundamage for to this comma-separated list. Overrides defaults and values added by other mods").defineList("sundamageDimensionsOverridePositive", Collections.emptyList(), () -> "", obj -> UtilLib.checkRegistryObjectExistence(Registries.DIMENSION, obj)); - builder.push("entities"); - blacklistedBloodEntity = builder.comment("Blacklist entities from predefined or auto calculated blood values").defineList("blacklistedBloodEntity", Collections.emptyList(), string -> string instanceof String && UtilLib.isValidResourceLocation(((String) string))); + sundamageDimensionsOverrideNegative = builder.comment("Add the string id in quotes of any dimension (/vampirism currentDimension) you want to disable sundamage for to this comma-separated list. Overrides defaults and values added by other mods").defineList("sundamageDimensionsOverrideNegative", Collections.emptyList(), () -> "", obj -> UtilLib.checkRegistryObjectExistence(Registries.DIMENSION, obj)); + sundamageDisabledBiomes = builder.comment("Additional biomes the player should not get sundamage in. Use biome ids e.g. [\"minecraft:mesa\", \"minecraft:plains\"]").defineList("sundamageDisabledBiomes", Collections.emptyList(), () -> "", obj -> UtilLib.checkRegistryObjectExistence(Registries.BIOME, obj)); builder.pop(); - builder.push("cheats"); - unlockAllSkills = builder.comment("CHEAT: If enabled, you will be able to unlock all skills at max level").define("allSkillsAtMaxLevel", false); + builder.push("entity-blood"); + autoCalculateEntityBlood = builder.comment("Calculate the blood level for unknown creatures based on their size").define("autoCalculateEntityBlood", true); + blacklistedBloodEntity = builder.comment("Blacklist entities from predefined or auto calculated blood values").defineList("blacklistedBloodEntity", Collections.emptyList(), () -> "", obj -> UtilLib.checkRegistryObjectExistence(Registries.ENTITY_TYPE, obj)); builder.pop(); - builder.comment("Disabling these things might reduce fun or interfere with gameplay"); - builder.push("disable"); + builder.comment("infection").push("infection"); disableFangInfection = builder.comment("Disable vampire fangs being usable to infect yourself").define("disableFangInfection", false); disableMobBiteInfection = builder.comment("Prevent vampire mobs from infecting players when attacking").define("disableMobBiteInfection", false); + infectCreaturesSanguinare = builder.comment("If enabled, creatures are infected with Sanguinare Vampirism first instead of immediately being converted to a vampire when their blood is sucked dry").define("infectCreaturesSanguinare", false); + builder.pop(); + + builder.push("village"); + villageTotemWeight = builder.comment("Weight of the Totem Building inside the Village").defineInRange("totemWeight", 20, 0, 140); + villageHunterTrainerWeight = builder.comment("Weight of the Hunter Trainer Building inside the Village").defineInRange("villageHunterTrainerWeight", 50, 0, 140); + villageReplaceTemples = builder.comment("Whether village Temples should be replaced with versions that contain church altars.").define("villageReplaceTemples", true); + allowVillageDestroyBlocks = builder.comment("Allow players to destroy point of interest blocks in faction villages if they no not have the faction village").define("allowVillageDestroyBlocks", false); disableVillageGuards = builder.comment("Prevent villagers in hunter controlled villages to turn into guard villager when the village is attacked").define("disableVillageGuards", false); builder.pop(); - builder.push("internal"); - infoAboutGuideAPI = builder.comment("Send message about Guide-API once").define("infoAboutGuideAPI", true); - oldVampireBiomeGen = builder.comment("If world was generated using the old vampirism biome").define("oldVampireBiomeGen", true); + sunscreenBeaconDistance = builder.comment("Block radius the sunscreen beacon affects").defineInRange("sunscreenBeaconDistance", 32, 1, 40000); + sunscreenBeaconMineable = builder.comment("Whether the suncreen beacon can be mined in survival").define("sunscreenBeaconMineable", false); + entityIMob = builder.comment("Changes if entities are recognized as hostile by other mods. See https://github.com/TeamLapen/Vampirism/issues/199. Smart falls back to Never on servers ").defineEnum("entitiesIMob", IMobOptions.SMART); + batDimensionBlacklist = builder.comment("Prevent vampire players to transform into a bat").defineList("batDimensionBlacklist", Collections.singletonList(Level.END.location().toString()), () -> "", obj -> UtilLib.checkRegistryObjectExistence(Registries.DIMENSION, obj)); + + builder.push("rendering"); + enforceRenderForestFog = builder.comment("Prevent clients from disabling the vampire forest fog").define("enforceForestFog", true); + preventRenderingDebugBoundingBoxes = builder.comment("Prevent players from enabling the rendering of debug bounding boxes. This can allow them to see certain entities they are not supposed to see (e.g. disguised hunter").define("preventDebugBoundingBoxes", false); builder.pop(); + builder.push("server-admin"); + usePermissions = builder.comment("Use the forge permission system for certain actions. Take a look at the wiki for more information").define("usePermissions", false); builder.pop(); + + builder.push("cheats"); + unlockAllSkills = builder.comment("If enabled, you will be able to unlock all skills at max level").define("allSkillsAtMaxLevel", false); + builder.pop(); + + builder.comment("Internal"); + infoAboutGuideAPI = builder.comment("Send message about Guide-API once").define("infoAboutGuideAPI", true); } public enum IMobOptions { diff --git a/src/main/java/de/teamlapen/vampirism/config/VampirismConfig.java b/src/main/java/de/teamlapen/vampirism/config/VampirismConfig.java index 0cbe9d2e4..68485838d 100644 --- a/src/main/java/de/teamlapen/vampirism/config/VampirismConfig.java +++ b/src/main/java/de/teamlapen/vampirism/config/VampirismConfig.java @@ -79,9 +79,7 @@ public static void buildBalanceConfig() { */ final Pair specPair = new ModConfigSpec.Builder().configure((builder) -> { builder.comment("A ton of options which allow you to balance the mod to your desire"); - builder.push("balance"); balanceBuilder.build(BALANCE, builder); - builder.pop(); return BALANCE; }); balanceSpec = specPair.getRight(); @@ -116,4 +114,8 @@ public static void onReload(final ModConfigEvent.@NotNull Reloading configEvent) } } + public static boolean isBalanceSpec(ModConfigSpec spec) { + return spec == balanceSpec; + } + } diff --git a/src/main/java/de/teamlapen/vampirism/core/ModStructures.java b/src/main/java/de/teamlapen/vampirism/core/ModStructures.java index d53d4c769..c6e260c58 100644 --- a/src/main/java/de/teamlapen/vampirism/core/ModStructures.java +++ b/src/main/java/de/teamlapen/vampirism/core/ModStructures.java @@ -6,7 +6,6 @@ import de.teamlapen.vampirism.REFERENCE; import de.teamlapen.vampirism.api.util.VResourceLocation; import de.teamlapen.vampirism.blocks.TotemTopBlock; -import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.world.gen.structure.crypt.CryptStructurePieces; import de.teamlapen.vampirism.world.gen.structure.huntercamp.HunterCampPieces; import de.teamlapen.vampirism.world.gen.structure.huntercamp.HunterCampStructure; @@ -46,8 +45,6 @@ import net.neoforged.bus.api.IEventBus; import net.neoforged.neoforge.registries.DeferredHolder; import net.neoforged.neoforge.registries.DeferredRegister; -import net.neoforged.neoforge.registries.holdersets.AndHolderSet; -import net.neoforged.neoforge.registries.holdersets.NotHolderSet; import java.util.List; import java.util.Map; @@ -126,7 +123,7 @@ static void createStructurePoolTemplates(BootstrapContext } static void createStructureProcessorLists(BootstrapContext context) { - StructureProcessor factionProcessor = new RandomStructureProcessor(ImmutableList.of(new RandomBlockStateRule(new RandomBlockMatchTest(ModBlocks.TOTEM_TOP.get(), (VampirismConfig.COMMON.villageTotemFactionChance.getDefault()).floatValue()), AlwaysTrueTest.INSTANCE, ModBlocks.TOTEM_TOP.get().defaultBlockState(), TotemTopBlock.getBlocks().stream().filter((totemx) -> totemx != ModBlocks.TOTEM_TOP.get() && !totemx.isCrafted()).map(Block::defaultBlockState).collect(Collectors.toList())))); + StructureProcessor factionProcessor = new RandomStructureProcessor(ImmutableList.of(new RandomBlockStateRule(new RandomBlockMatchTest(ModBlocks.TOTEM_TOP.get(), 0.6f), AlwaysTrueTest.INSTANCE, ModBlocks.TOTEM_TOP.get().defaultBlockState(), TotemTopBlock.getBlocks().stream().filter((totemx) -> totemx != ModBlocks.TOTEM_TOP.get() && !totemx.isCrafted()).map(Block::defaultBlockState).collect(Collectors.toList())))); StructureProcessor biomeTopBlockProcessor = new BiomeTopBlockProcessor(Blocks.DIRT.defaultBlockState()); context.register(TOTEM_FACTION, new StructureProcessorList(ImmutableList.of(factionProcessor, biomeTopBlockProcessor))); diff --git a/src/main/java/de/teamlapen/vampirism/world/gen/VanillaStructureModifications.java b/src/main/java/de/teamlapen/vampirism/world/gen/VanillaStructureModifications.java index ee45aba5e..90b5d7146 100644 --- a/src/main/java/de/teamlapen/vampirism/world/gen/VanillaStructureModifications.java +++ b/src/main/java/de/teamlapen/vampirism/world/gen/VanillaStructureModifications.java @@ -2,7 +2,6 @@ import com.google.common.collect.ImmutableMap; import com.mojang.datafixers.util.Pair; -import de.teamlapen.vampirism.REFERENCE; import de.teamlapen.vampirism.api.util.VResourceLocation; import de.teamlapen.vampirism.config.VampirismConfig; import de.teamlapen.vampirism.mixin.accessor.ProcessorListsAccessor; @@ -67,7 +66,7 @@ public static void addVillageStructures(@NotNull RegistryAccess dynamicRegistrie */ private static void replaceTemples(@NotNull RegistryAccess dynamicRegistries, @NotNull Map> patternReplacements) { // return if temples should not be modified - if (!VampirismConfig.COMMON.villageReplaceTemples.get()) return; + if (!VampirismConfig.SERVER.villageReplaceTemples.get()) return; // get jigsaw registry dynamicRegistries.registry(Registries.TEMPLATE_POOL).ifPresent(jigsawRegistry -> { // for every desired pools @@ -131,14 +130,14 @@ private static void addHunterTrainerHouse(@NotNull RegistryAccess reg, @NotNull // create trainer house piece with desired village type StructurePoolElement piece = singleJigsawPiece(reg.lookupOrThrow(Registries.PROCESSOR_LIST), "village/" + type.path + "/houses/hunter_trainer"); // add hunter trainer house with weight - for (int i = 0; i < VampirismConfig.COMMON.villageHunterTrainerWeight.get(); i++) { + for (int i = 0; i < VampirismConfig.SERVER.villageHunterTrainerWeight.get(); i++) { ((StructureTemplatePoolAccessor) pattern).getTemplates().add(piece); } // Add hunter trainer house to the weighted list for better mod compat if other mods read this field instead of templates // (ex: Repurposed Structures) List> weightedElementList = new ArrayList<>(((StructureTemplatePoolAccessor) pattern).getRawTemplates()); - weightedElementList.add(new Pair<>(piece, VampirismConfig.COMMON.villageHunterTrainerWeight.get())); + weightedElementList.add(new Pair<>(piece, VampirismConfig.SERVER.villageHunterTrainerWeight.get())); ((StructureTemplatePoolAccessor) pattern).setRawTemplates(weightedElementList); }); }); @@ -156,14 +155,14 @@ private static void addTotem(@NotNull RegistryAccess reg, @NotNull Map { // add totem with weight - for (int i = 0; i < VampirismConfig.COMMON.villageTotemWeight.get(); ++i) { + for (int i = 0; i < VampirismConfig.SERVER.villageTotemWeight.get(); ++i) { ((StructureTemplatePoolAccessor) pattern).getTemplates().add(totem); } // Add totem house to the weighted list for better mod compat if other mods read this field instead of templates // (ex: Repurposed Structures) List> weightedElementList = new ArrayList<>(((StructureTemplatePoolAccessor) pattern).getRawTemplates()); - weightedElementList.add(new Pair<>(totem, VampirismConfig.COMMON.villageTotemWeight.get())); + weightedElementList.add(new Pair<>(totem, VampirismConfig.SERVER.villageTotemWeight.get())); ((StructureTemplatePoolAccessor) pattern).setRawTemplates(weightedElementList); }); })); diff --git a/src/main/resources/assets/vampirism/lang/en_us.json b/src/main/resources/assets/vampirism/lang/en_us.json index bc102e55d..745f5f096 100644 --- a/src/main/resources/assets/vampirism/lang/en_us.json +++ b/src/main/resources/assets/vampirism/lang/en_us.json @@ -1477,12 +1477,305 @@ "subtitles.vampirism.remains_defender.hit": "Ancient Crystal crumbles", "subtitles.vampirism.remains.death": "Remains dies", "subtitles.vampirism.remains.hurt": "Remains hurts", - "__comment": "entity tags", - "entity_tag.vampirism.vampire": "Vampires", "__comment": "stat types", "stat_type.vampirism.action_used": "Action Activated", "stat_type.vampirism.action_time": "Action Active", "stat_type.vampirism.action_cooldown_time": "Action On Cooldown", "stat_type.vampirism.skill_unlocked": "Skill Unlocked", - "stat_type.vampirism.skill_forgotten": "Skill Forgotten" + "stat_type.vampirism.skill_forgotten": "Skill Forgotten", + "__comment": "configuration", + "vampirism.configuration.entity-rendering": "Entity Rendering", + "vampirism.configuration.advancedMobPlayerFaces": "Render Advanced Mob Player Faces", + "vampirism.configuration.vampireEyes": "Render Vampire Eyes", + "vampirism.configuration.internal": "Internal", + "vampirism.configuration.disableHudActionCooldownRendering": "Disable HUD Action Cooldown Rendering", + "vampirism.configuration.screenOverlay": "Screen Overlay", + "vampirism.configuration.disableFovChange": "Disable FOV Change", + "vampirism.configuration.gui-rendering": "GUI Rendering", + "vampirism.configuration.minionTaskOrder": "Minion Task Order", + "vampirism.configuration.disableBloodVisionRendering": "Disable Blood Vision Rendering", + "vampirism.configuration.levelOffsetY": "Level Offset Y", + "vampirism.configuration.levelOffsetX": "Level Offset X", + "vampirism.configuration.skillButtonEnable": "Enable Skill Button", + "vampirism.configuration.overrideGuiSkillButtonX": "Override GUI Skill Button X", + "vampirism.configuration.overrideGuiSkillButtonY": "Override GUI Skill Button Y", + "vampirism.configuration.disableHudActionDurationRendering": "Disable HUD Action Duration Rendering", + "vampirism.configuration.world-rendering": "World Rendering", + "vampirism.configuration.actionOrder": "Action Order", + "vampirism.configuration.disableSunOverlayRendering": "Disable Sun Overlay Rendering", + "vampirism.configuration.disableHudBatOverlayRendering": "Disable HUD Bat Overlay Rendering", + "vampirism.configuration.overlay": "Overlays", + "vampirism.configuration.enableNearbyVampireOverlayRendering": "Enable HUD Nearby Vampire Overlay", + "vampirism.configuration.enableDisguiseOverlayRendering": "Enable HUD Disguise Overlay", + "vampirism.configuration.enableVillageRaidOverlayRendering": "Enable HUD Village Raid Overlay", + "vampirism.configuration.enableRageOverlayRendering": "Enable HUD Rage Overlay", + "vampirism.configuration.collectStats": "Collect Stats", + "vampirism.configuration.enableFactionLogging": "Enable Faction Logging", + "vampirism.configuration.recipes": "Recipes", + "vampirism.configuration.optifineBloodvisionWarning": "Optifine Bloodvision Warning", + "vampirism.configuration.world-gen": "World Generation", + "vampirism.configuration.integrationsNotifier": "Integrations Notifier", + "vampirism.configuration.addVampireForestToOverworld": "Add Vampire Forest to Overworld", + "vampirism.configuration.useVanillaCampfire": "Use Vanilla Campfire", + "vampirism.configuration.vampireForestWeight_terrablender": "Vampire Forest Weight (Terrablender)", + "vampirism.configuration.umbrella": "Umbrella", + "vampirism.configuration.enableHunterTentGeneration": "Enable Hunter Tent Generation", + "vampirism.configuration.autoConvertGlassBottles": "Auto-convert Glass Bottles", + "vampirism.configuration.renderScreenOverlay": "Enable Screen Overlay", + "vampirism.configuration.enableHudActionDurationRendering": "Enable HUD Action Duration Overlay", + "vampirism.configuration.enableHudBatOverlayRendering": "Enable HUD Bat Overlay", + "vampirism.configuration.enableFactionLevelOverlayRendering": "Enable HUD Faction Level Overlay", + "vampirism.configuration.enableSunOverlayRendering": "Enable HUD Sun Overlay", + "vampirism.configuration.enableHudActionCooldownRendering": "Enable HUD Action Cooldown", + "vampirism.configuration.vampireForestFog": "Enable Vampire Forest Fog", + "vampirism.configuration.section.vampirism.server.toml": "Server Settings", + "vampirism.configuration.section.vampirism.balance.toml": "Balance Settings", + "vampirism.configuration.title": "Vampirism Configuration", + "vampirism.configuration.enableFactionLogging.tooltip": "Enable a custom vampirism log file that logs specific faction actions", + "vampirism.configuration.disableBloodVisionRendering.tooltip": "Disable blood vision rendering regardless of is activation or unlock state", + "vampirism.configuration.gui-rendering.tooltip": "GUI rendering config options", + "vampirism.configuration.world-gen.tooltip": "World generation config settings", + "vampirism.configuration.collectStats.tooltip": "Collect basic stats about mod version, minecraft version and mod count to mod authors", + "vampirism.configuration.vampireForestFog.tooltip": "Render fog in vampire biome. Might be enforced on the server", + "vampirism.configuration.umbrella.tooltip": "If enabled adds a craft-able umbrella that can be used to slowly walk though sunlight without taking damage", + "vampirism.configuration.autoConvertGlassBottles.tooltip": "Glass bottles are automatically converted to blood bottles when filled with blood and converted back when emptied. When disabled a blood bottles must be crafted.", + "vampirism.configuration.entity-rendering.tooltip": "Entity rendering config options", + "vampirism.configuration.advancedMobPlayerFaces.tooltip": "Render player faces on advanced hunter or vampire mobs", + "vampirism.configuration.overlay.tooltip": "HUD Overlay config options", + "vampirism.configuration.world-rendering.tooltip": "World rendering config options", + "vampirism.configuration.recipes.tooltip": "Recipes config options", + "vampirism.configuration.disableFovChange.tooltip": "Disable the FOV change caused by the speed buf for vampire players", + "vampirism.configuration.skillButtonEnable.tooltip": "Add a button to the HUD to open the skill menu", + "vampirism.configuration.vampireEyes.tooltip": "Render vampire eyes and fangs on faces", + "vampirism.configuration.enableHudActionCooldownRendering.tooltip": "Render the action cooldown overlay on the HUD", + "vampirism.configuration.enableSunOverlayRendering.tooltip": "Render the sun overlay on the HUD", + "vampirism.configuration.enableVillageRaidOverlayRendering.tooltip": "Render the village raid overlay on the HUD", + "vampirism.configuration.useVanillaCampfire.tooltip": "Use the vanilla campfire instead of the custom vampirism campfire", + "vampirism.configuration.vampireForestWeight_terrablender.tooltip": "Weight of the vampire forest biome in the terrablender world generation", + "vampirism.configuration.enableHudBatOverlayRendering.tooltip": "Render the bat overlay on the HUD", + "vampirism.configuration.enableDisguiseOverlayRendering.tooltip": "Render the disguise overlay on the HUD", + "vampirism.configuration.addVampireForestToOverworld.tooltip": "Add the vampire forest biome to the overworld", + "vampirism.configuration.enableFactionLevelOverlayRendering.tooltip": "Render the faction level overlay on the HUD", + "vampirism.configuration.enableNearbyVampireOverlayRendering.tooltip": "Render the nearby vampire overlay for the vampire awareness action on the HUD", + "vampirism.configuration.renderScreenOverlay.tooltip": "Render fullscreen colored HUD effects. E.g. when leveling up as vampire", + "vampirism.configuration.enableRageOverlayRendering.tooltip": "Render the rage overlay on the HUD", + "vampirism.configuration.enableHunterTentGeneration.tooltip": "Generate hunter tents in the world", + "vampirism.configuration.enableHudActionDurationRendering.tooltip": "Render the action duration overlay on the HUD", + "vampirism.configuration.lordPrefixInChat": "Lord Prefix in Chat", + "vampirism.configuration.infectCreaturesSanguinare": "Infect Creatures with Sanguinare", + "vampirism.configuration.batDimensionBlacklist": "Bat Dimension Blacklist", + "vampirism.configuration.villageHunterTrainerWeight": "Village Hunter Trainer Weight", + "vampirism.configuration.pvpOnlyBetweenFactions": "PvP only between factions", + "vampirism.configuration.disableVillageGuards": "Disable Village Guards", + "vampirism.configuration.pvpOnlyBetweenFactionsIncludeHumans": "PvP only between factions include humans", + "vampirism.configuration.sundamageDimensionsOverridePositive": "Enforce Sun Damage in Dimensions", + "vampirism.configuration.factionColorInChat": "Show Faction Color in Chat", + "vampirism.configuration.allSkillsAtMaxLevel": "Unlimited skill points at max level", + "vampirism.configuration.disableFangInfection": "Disable Fang Infection", + "vampirism.configuration.totemWeight": "Village Totem Weight", + "vampirism.configuration.villageReplaceTemples": "Replace village temples", + "vampirism.configuration.cheats": "Cheats", + "vampirism.configuration.autoCalculateEntityBlood": "Auto calculate entity blood", + "vampirism.configuration.blacklistedBloodEntity": "Blacklisted Blood Entity", + "vampirism.configuration.disableMobBiteInfection": "Disable Mob Bite Infection", + "vampirism.configuration.entitiesIMob": "Enable IMob", + "vampirism.configuration.sundamageUnknownDimension": "Sun Damage In Unknown Dimension", + "vampirism.configuration.allowVillageDestroyBlocks": "Allow to destroy blocks in villages", + "vampirism.configuration.usePermissions": "Use neoforge permission system", + "vampirism.configuration.enforceForestFog": "Enforce Forest Fog", + "vampirism.configuration.sunscreenBeaconDistance": "Sunscreen Beacon Distance", + "vampirism.configuration.infection": "Infection", + "vampirism.configuration.playersCanTurnPlayers": "Player infection", + "vampirism.configuration.preventDebugBoundingBoxes": "Prevent Debug Bounding Boxes", + "vampirism.configuration.village": "Village", + "vampirism.configuration.sunscreenBeaconMineable": "Sunscreen Beacon Mineable", + "vampirism.configuration.sundamageDimensionsOverrideNegative": "Enforce no Sun Damage in Dimensions", + "vampirism.configuration.sundamageDisabledBiomes": "Disable Sun Damage in Biomes", + "vampirism.configuration.factions": "Factions", + "vampirism.configuration.sun-damage": "Sun Damage", + "vampirism.configuration.entity-blood": "Entity Blood", + "vampirism.configuration.server-admin": "Server Admin", + "vampirism.configuration.rendering": "Rendering", + "vampirism.configuration.lord_actions": "Lord Actions", + "vampirism.configuration.items": "Items", + "vampirism.configuration.entityActions": "Entity Actions", + "vampirism.configuration.vampireActions": "Vampire Actions", + "vampirism.configuration.hunterActions": "Hunter Actions", + "vampirism.configuration.hunterPlayer": "Hunter Player", + "vampirism.configuration.vampire_refinements": "Vampire Refinements", + "vampirism.configuration.vampireSkills": "Vampire Skills", + "vampirism.configuration.vampirePlayer": "Vampire Player", + "vampirism.configuration.hunterSkills": "Hunter Skills", + "vampirism.configuration.minions": "Minions", + "vampirism.configuration.general": "General", + "vampirism.configuration.playerBloodSaturation": "Vampire player blood saturation", + "vampirism.configuration.awarenessEnabled": "Awareness Enabled", + "vampirism.configuration.darkBloodProjectileCooldown": "Dark Blood Projectile Cooldown", + "vampirism.configuration.armorPenalty": "Armor Penalty", + "vampirism.configuration.sundamageWeaknessMinLevel": "Minimum level for sun damage weakness", + "vampirism.configuration.garlicDiffuserStartupTime": "Garlic Diffuser Startup Time", + "vampirism.configuration.smallAttackSpeedModifier": "Attack Speed Modifier", + "vampirism.configuration.ignoreSundamageDuration": "Ignore Sun Damage Duration", + "vampirism.configuration.sundamageNausea": "Enable Sun Damage Nausea", + "vampirism.configuration.sunscreenDuration": "Sunscren Duration", + "vampirism.configuration.speedBoost": "Speed Boost", + "vampirism.configuration.bloodVisionDisabled": "Blood Vision Disabled", + "vampirism.configuration.sunscreenDurationMod": "Sunscreen Duration Modifier", + "vampirism.configuration.potionResistanceDuration": "Potion Resistance Duration", + "vampirism.configuration.awarenessRadius": "Awareness Radius", + "vampirism.configuration.vistaMod": "Vista Modifier", + "vampirism.configuration.darkProjectileCooldown": "Dark Projectile Cooldown", + "vampirism.configuration.strengthMaxMod": "Strength Maximum Modifier", + "vampirism.configuration.bloodThirstReduction1": "Blood Thirst Reduction", + "vampirism.configuration.invisibilityEnabled": "Invisibility Enabled", + "vampirism.configuration.summonBatsCooldown": "Summon Bats Cooldown", + "vampirism.configuration.naturalArmorRegenDuration": "Natural Armor Regen Duration", + "vampirism.configuration.batHealthReduction": "Bat Health Reduction", + "vampirism.configuration.holyWaterBlindnessDuration": "Holy Water Blindness Duration", + "vampirism.configuration.nightVisionDisabled": "Night Vision Disabled", + "vampirism.configuration.teleportMaxDistance": "Teleport Max Distance", + "vampirism.configuration.batspawnCooldown": "Bat Spawn Cooldown", + "vampirism.configuration.dropOrchidFromLeavesChance": "Orchid Drop Chance", + "vampirism.configuration.awarenessDuration": "Awareness Duration", + "vampirism.configuration.lordSpeedCooldown": "Lord Speed Cooldown", + "vampirism.configuration.rageCooldown": "Rage Cooldown", + "vampirism.configuration.attackSpeedMaxMod": "Attack Speed Maximum Modifier", + "vampirism.configuration.swordFinisherThresholdMod": "Swort Finisher Threshold Modifier", + "vampirism.configuration.regenerationDuration": "Regeneration Duration", + "vampirism.configuration.naturalArmorIncrease": "Natural Armor Increase", + "vampirism.configuration.halfInvulnerableThreshold": "Damage Limiter Threshold", + "vampirism.configuration.batDuration": "Bat Duration", + "vampirism.configuration.awarenessCooldown": "Awareness Cooldown", + "vampirism.configuration.sundamageReduction1": "Sun Damage Reduction", + "vampirism.configuration.neonatalDuration": "Neo-Natal Duration", + "vampirism.configuration.lordAttackSpeedEnabled": "Lord Attack Speed Enabled", + "vampirism.configuration.darkProjectileDamage": "Dark Projectile Damage", + "vampirism.configuration.vampireSwordBloodUsageFactor": "Vampire Sword Blood Usage Factor", + "vampirism.configuration.speedMaxMod": "Speed Maximum Modifier", + "vampirism.configuration.darkBloodProjectileDamage": "Dark Blood Projectile Damage", + "vampirism.configuration.disguiseEnabled": "Disguise Enabled", + "vampirism.configuration.arrowVampireKillerMaxHealth": "Arrow Vampire Killer Max Health", + "vampirism.configuration.rageDurationIncrease": "Rage Duration Increase", + "vampirism.configuration.resourceCooldown": "Resource Cooldown", + "vampirism.configuration.vampireSwordChargingFactor": "Vampire Sword Charging Factor", + "vampirism.configuration.teleportCooldown": "Teleport Cooldown", + "vampirism.configuration.holyWaterTierDamageInc": "Holy Water Tier Damage Increase", + "vampirism.configuration.skillPointsPerLevel": "Skill Points Per Level", + "vampirism.configuration.teleportDistanceMod": "Teleport Distance Modifier", + "vampirism.configuration.naturalArmorBaseValue": "Natural Armor Base Value", + "vampirism.configuration.bloodChargeSpeedMod": "Blood Charge Speed Modifier", + "vampirism.configuration.dbnoReduction": "DBNO Reduction", + "vampirism.configuration.phase1Duration": "Village Raid Phase 1 Duration", + "vampirism.configuration.immortalFromDamageSources": "Immortal Damage Sources", + "vampirism.configuration.dbnoDuration": "DBNO Duration", + "vampirism.configuration.darkProjectileIndirectDamage": "Dark Projectile Indirect Damage", + "vampirism.configuration.bloodVisionDistanceSq": "Blood Vision Distance Squared", + "vampirism.configuration.batAllowInteraction": "Bat Allow Interaction", + "vampirism.configuration.darkBloodProjectileAOECooldownMod": "Dark Blood Projectile AOE Cooldown Modifier", + "vampirism.configuration.garlicCooldown": "Garlic Cooldown", + "vampirism.configuration.hissingCooldown": "Hisssing Cooldown", + "vampirism.configuration.batExhaustion": "Bat Exhaustion", + "vampirism.configuration.halfInvulnerableCooldown": "Damage Limiter Cooldown", + "vampirism.configuration.garlicDiffuserEnhancedDist": "Garlic Diffuser Enhanced Distance", + "vampirism.configuration.smallAttackDamageModifier": "Small Attack Damage Modifier", + "vampirism.configuration.instantKill1FromBehind": "Instant Kill From Behind", + "vampirism.configuration.equipmentRepairAmount": "Equipment Repair Amount", + "vampirism.configuration.halfInvulnerableBloodCost": "Half Invulnerable Blood Cost", + "vampirism.configuration.naturalArmorToughnessIncrease": "Natural Armor Toughness Increase", + "vampirism.configuration.skillPointsPerLordLevel": "Skill Points Per Lord Level", + "vampirism.configuration.darkBloodProjectileEnabled": "Dark Blood Projectile Enabled", + "vampirism.configuration.garlicDuration": "Garlic Duration", + "vampirism.configuration.ignoreSundamageCooldown": "ignore Sun Damage Cooldown", + "vampirism.configuration.speedCooldown": "Speed Cooldown", + "vampirism.configuration.canCancelSanguinare": "Can Cancel Sanguinare", + "vampirism.configuration.randomRaidChance": "Random Raid Chance", + "vampirism.configuration.zombieIgnoreVampire": "Zombie Ignore Vampire", + "vampirism.configuration.teleportEnabled": "Teleport Enabled", + "vampirism.configuration.freezeDuration": "Freeze Duration", + "vampirism.configuration.applicableOilArmorReverse": "Applicable Oil Armor Reverse", + "vampirism.configuration.instantKill2MaxHealth": "Instant Kill Max Health", + "vampirism.configuration.disguiseInvisibleSQ": "Disguise Invisible Squared", + "vampirism.configuration.fireResistanceReplace": "Fire Resistance Replace", + "vampirism.configuration.sunscreenBuff": "Sunscreen Buff", + "vampirism.configuration.maxVillagerRespawn": "Max Villager Respawn", + "vampirism.configuration.freezeCooldown": "Freeze Cooldown", + "vampirism.configuration.disguiseVisibilityMod": "Disguise Visibility Modifier", + "vampirism.configuration.speedDuration": "Speed Duration", + "vampirism.configuration.holyWaterSplashDamage": "Holy Water Splash Damage", + "vampirism.configuration.healAmount": "Heal Amount", + "vampirism.configuration.jumpBoost": "Jump Boost", + "vampirism.configuration.freezeDurationMod": "Freeze Duration Modifier", + "vampirism.configuration.halfInvulnerableDuration": "Half Invulnerable Duration", + "vampirism.configuration.summonBatsEnabled": "Summon Bats Enabled", + "vampirism.configuration.sundamageMinLevel": "Sun Damage Min Level", + "vampirism.configuration.minionPerLordLevel": "Minion Per Lord Level", + "vampirism.configuration.golemAttackNonVillageFaction": "Golem Attack Non Village Faction", + "vampirism.configuration.applicableOilPickaxeReverse": "Applicable Oil Pickaxe Reverse", + "vampirism.configuration.taskMasterMaxTaskAmount": "Task Master Max Task Amount", + "vampirism.configuration.batCooldown": "Bat Cooldown", + "vampirism.configuration.healthMaxMod": "Health Maximum Modifier", + "vampirism.configuration.healthThreshold": "Health Threshold", + "vampirism.configuration.hissingEnabled": "Hisssing Enabled", + "vampirism.configuration.swordTrainingSpeedMod": "Swort Training Speed Modifier", + "vampirism.configuration.rageMinDuration": "Rage Min Duration", + "vampirism.configuration.freezeEnabled": "Freeze Enabled", + "vampirism.configuration.regenerationAmount": "Regeneration Amount", + "vampirism.configuration.taskDurationDedicatedServer": "Task Duration Dedicated Server", + "vampirism.configuration.lordSpeedEnabled": "Lord Speed Enabled", + "vampirism.configuration.lordSpeedDuration": "Lord Speed Duration", + "vampirism.configuration.deathRecoveryTime": "Death Recovery Time", + "vampirism.configuration.instantKill1MaxHealth": "Instant Kill Max Health", + "vampirism.configuration.swordFinisherMaxHealth": "Swort Finisher Max Health", + "vampirism.configuration.sanguinareAverageDuration": "Sanquinare Average Duration", + "vampirism.configuration.strengthType": "Strength Type", + "vampirism.configuration.disguiseDuration": "Disguise Duration", + "vampirism.configuration.resourceCooldownOfflineMult": "Resource Cooldown Offline Multiplier", + "vampirism.configuration.garlicDiffuserWeakDist": "Garlic Diffuser Weak Distance", + "vampirism.configuration.summonBatsCount": "Summon Bats Count", + "vampirism.configuration.taskDurationSinglePlayer": "Task Duration Single Player", + "vampirism.configuration.batEnabled": "Bat Enabled", + "vampirism.configuration.healCooldown": "Heal Cooldown", + "vampirism.configuration.sundamageWaterblocks": "Sun Damage Waterblocks", + "vampirism.configuration.maxYellowBorderPercentage": "Max Yellow Border Percentage", + "vampirism.configuration.hunterTentMaxSpawn": "Hunter Tent Max Spawn", + "vampirism.configuration.garlicDiffuserNormalDist": "Garlic Diffuser Normal Distance", + "vampirism.configuration.rageFuryDurationBonus": "Raage Fury Duration Bonus", + "vampirism.configuration.halfInvulnerableEnabled": "Half Invulnerable Enabled", + "vampirism.configuration.maxTotemRadius": "Max Totem Radius", + "vampirism.configuration.exhaustionMaxMod": "Exhaustion Maximum Modifier", + "vampirism.configuration.speedAmount": "Speed Amount", + "vampirism.configuration.bloodUsagePeaceful": "Blood Usage Peaceful", + "vampirism.configuration.neonatalReduction": "Neo-Natal Reduction", + "vampirism.configuration.disguiseCooldown": "Disguise Cooldown", + "vampirism.configuration.sunscreenEnabled": "Sunscreen Enabled", + "vampirism.configuration.sundamageInstantDeath": "Sun Damage Instant Death", + "vampirism.configuration.darkBloodProjectileAOERange": "Dark Blood Projectile AOE Range", + "vampirism.configuration.potionResistanceCooldown": "Potio Resistance Cooldown", + "vampirism.configuration.creeperIgnoreVampire": "Creepers Ignore Vampire", + "vampirism.configuration.fireVulnerabilityMod": "Fire Vulnerability Modifier", + "vampirism.configuration.invisibilityDuration": "Invisibility Duration", + "vampirism.configuration.crossbowDamageMult": "Crossbow Damage Multiplier", + "vampirism.configuration.regenerationEnabled": "Regeneration Enabled", + "vampirism.configuration.lordAttackSpeedCooldown": "Lord Attack Speed Cooldown", + "vampirism.configuration.regenerationCooldown": "Regeneration Cooldown", + "vampirism.configuration.skeletonIgnoreVampire": "Skeleton Ignore Vampire", + "vampirism.configuration.batFlightSpeed": "Bat Flight Speed", + "vampirism.configuration.potionResistanceEnabled": "Potio Resistance Enabled", + "vampirism.configuration.sundamage": "Sun Damage", + "vampirism.configuration.lordAttackSpeedDuration": "Lord Attack Speed Duration", + "vampirism.configuration.darkBloodProjectileDamageMod": "Dark Blood Projectile Damage Modifier", + "vampirism.configuration.sunscreenCooldown": "Sunscreen Cooldown", + "vampirism.configuration.bloodExhaustionFactor": "Blood Exhaustion Factor", + "vampirism.configuration.invisibilityCooldown": "Invibility Cooldown", + "vampirism.configuration.holyWaterNauseaDuration": "Holy Water Nausea Duration", + "vampirism.configuration.batspawnAmount": "Bat Spawn Amount", + "vampirism.configuration.allowInfiniteSpecialArrows": "Allow Infinite Special Arrows", + "vampirism.configuration.halfInvulnerableThresholdMod": "Half Invulnerable Threshold Modifier", + "vampirism.configuration.majorAttackSpeedModifier": "Major Attack Speed Modifier", + "vampirism.configuration.notifyDistanceSQ": "Notify Distance Squared", + "vampirism.configuration.forceTargetTime": "Force Target Time", + "vampirism.configuration.instantKill2OnlyNPC": "Instant Kill Only NPC", + "vampirism.configuration.applicableOilSwordReverse": "Applicable Oil Sword Reverse", + "vampirism.configuration.rageEnabled": "Raage Enabled", + "vampirism.configuration.sundamageNauseaMinLevel": "Sun Damage Nausea Min Level" }