Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Robotgiggle committed Dec 13, 2024
1 parent 1231285 commit f33fb10
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package at.petrak.hexcasting.common.items.magic;

import at.petrak.hexcasting.api.casting.iota.Iota;
import at.petrak.hexcasting.api.casting.iota.IotaType;
import at.petrak.hexcasting.api.utils.NBTHelper;
import net.minecraft.nbt.CompoundTag;
Expand Down Expand Up @@ -54,7 +53,7 @@ public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Compo
var iotaComponent = IotaType.getDisplay(iotaTagC).copy();
storedHex.append(iotaComponent.withStyle(ChatFormatting.DARK_PURPLE));
}
pTooltipComponents.add(storedHex.withStyle(ChatFormatting.DARK_PURPLE));
pTooltipComponents.add(storedHex);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
package at.petrak.hexcasting.common.loot;

import at.petrak.hexcasting.api.casting.ActionRegistryEntry;
import at.petrak.hexcasting.api.casting.iota.PatternIota;
import at.petrak.hexcasting.api.casting.iota.IotaType;
import at.petrak.hexcasting.api.casting.math.HexDir;
import at.petrak.hexcasting.api.casting.math.HexPattern;
import at.petrak.hexcasting.api.mod.HexTags;
import at.petrak.hexcasting.api.mod.HexConfig;
import at.petrak.hexcasting.api.utils.HexUtils;
import at.petrak.hexcasting.api.item.VariantItem;
import at.petrak.hexcasting.api.misc.MediaConstants;
import at.petrak.hexcasting.common.casting.PatternRegistryManifest;
import at.petrak.hexcasting.common.items.magic.ItemAncientCypher;
import at.petrak.hexcasting.common.lib.HexLootFunctions;
import at.petrak.hexcasting.xplat.IXplatAbstractions;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import net.minecraft.util.RandomSource;
import net.minecraft.core.Registry;
import net.minecraft.nbt.Tag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.storage.loot.LootContext;
import net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction;
Expand All @@ -33,7 +25,7 @@
import java.util.ArrayList;

/**
* Add a random preset hex to the ancient cypher, and change the
* Add a random preset hex to the ancient cypher, and select a random variant.
* <p>
* The function itself is only used on Fabric but the behavior {@link AddHexToAncientCypherFunc#doStatic}
* is used on both sides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
// https://github.com/VazkiiMods/Botania/blob/1.18.x/Xplat/src/main/java/vazkii/botania/common/loot/LootHandler.java
// We need to inject dungeon loot (scrolls and lore), make amethyst drop fewer shards, and the extra dust stuff.
// On forge:
// - Scrolls and lore are done with a loot mod
// - Scrolls, lore, and cyphers are done with a loot mod
// - Amethyst drop fiddling is done with another loot mod; the shard delta is in the loot mod data and the rest of
// the stuff is loaded from TABLE_INJECT_AMETHYST_CLUSTER
// On fabric:
// - Scrolls and lore are done with a lootLoad listener and the amounts are loaded from config
// - Scrolls, lore, and cyphers are done with a lootLoad listener and the amounts are loaded from config
// - Amethyst shard reduction is done with a loot function mixed in to always be on amethyst clusters, god, cause I
// don't think it's facile to use the loot pool api to try to figure out which pool is for the amethyst and reduce it
// - Amethyst dust and crystals are done by adding the loot table Forge uses in directly via listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,6 @@
"": "Amethyst Shard Drop Rate Change",
"@Tooltip": "How much the number of amethyst shards dropped from clusters is increased/decreased.",
},

// TODO: are these used anywhere??
"fewScrollTables.@Tooltip": "Loot tables that a small number of Ancient Scrolls are injected into",
"someScrollTables.@Tooltip": "Loot tables that a decent number of Ancient Scrolls are injected into",
"manyScrollTables.@Tooltip": "Loot tables that a huge number of Ancient Scrolls are injected into",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,6 @@
"": "Amethyst Shard Drop Rate Change",
"@Tooltip": "How much the number of amethyst shards dropped from clusters is increased/decreased.",
},

// TODO: are these used anywhere??
"fewScrollTables.@Tooltip": "Loot tables that a small number of Ancient Scrolls are injected into",
"someScrollTables.@Tooltip": "Loot tables that a decent number of Ancient Scrolls are injected into",
"manyScrollTables.@Tooltip": "Loot tables that a huge number of Ancient Scrolls are injected into",
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,6 @@
"": "紫水晶碎片掉落率变化量",
"@Tooltip": "采掘紫水晶簇时紫水晶碎片掉落数量相较原版的改变量",
},

// TODO: are these used anywhere??
"option.server.fewScrollTables.@Tooltip": "会额外生成较少数量卷轴的战利品表",
"option.server.someScrollTables.@Tooltip": "会额外生成中等数量卷轴的战利品表",
"option.server.manyScrollTables.@Tooltip": "会额外生成较大数量卷轴的战利品表",
},
},
},
Expand Down
14 changes: 2 additions & 12 deletions Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,14 @@ public boolean alwaysShowListCommas() {
public static class Server implements HexConfig.ServerConfigAccess {
private static ForgeConfigSpec.IntValue opBreakHarvestLevel;
private static ForgeConfigSpec.IntValue maxOpCount;

private static ForgeConfigSpec.IntValue maxSpellCircleLength;

private static ForgeConfigSpec.ConfigValue<List<? extends String>> actionDenyList;
private static ForgeConfigSpec.ConfigValue<List<? extends String>> circleActionDenyList;

private static ForgeConfigSpec.BooleanValue villagersOffendedByMindMurder;

private static ForgeConfigSpec.ConfigValue<List<? extends String>> tpDimDenyList;

private static ForgeConfigSpec.BooleanValue doesTrueNameHaveAmbit;

private static ForgeConfigSpec.DoubleValue traderScrollChance;

private static ForgeConfigSpec.ConfigValue<List<? extends String>> fewScrollTables;
private static ForgeConfigSpec.ConfigValue<List<? extends String>> someScrollTables;
private static ForgeConfigSpec.ConfigValue<List<? extends String>> manyScrollTables;

// scroll/lore/cypher pools and chances should go here
private static ForgeConfigSpec.ConfigValue<List<? extends List<String>>> lootHexList;


Expand Down Expand Up @@ -190,7 +180,7 @@ public Server(ForgeConfigSpec.Builder builder) {
traderScrollChance = builder.comment("The chance for wandering traders to sell an Ancient Scroll")
.defineInRange("traderScrollChance", DEFAULT_TRADER_SCROLL_CHANCE, 0.0, 1.0);

// scroll/lore/cypher pools and chances should go here
// builders for scroll/lore/cypher pools and chances should go here

lootHexList = builder.comment(
"List of preset hexes found in loot cyphers. First element is the name, other elements are the patterns." +
Expand Down

0 comments on commit f33fb10

Please sign in to comment.