Skip to content

Commit

Permalink
formatting revert 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby Vestal committed Aug 20, 2024
1 parent 7ec296c commit 765ed92
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ data class CastingImage private constructor(

val userData: CompoundTag
) {

constructor() : this(listOf(), 0, listOf(), false, 0, CompoundTag())

data class ParenthesizedIota(val iota: Iota, val escaped: Boolean) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ public class HexDamageTypes {

public static void bootstrap(BootstapContext<DamageType> ctx) {
ctx.register(OVERCAST, new DamageType(
"hexcasting.overcast",
DamageScaling.WHEN_CAUSED_BY_LIVING_NON_PLAYER,
0f
"hexcasting.overcast",
DamageScaling.WHEN_CAUSED_BY_LIVING_NON_PLAYER,
0f
));

ctx.register(SHAME_ON_YOU, new DamageType(
"hexcasting.shame",
DamageScaling.WHEN_CAUSED_BY_LIVING_NON_PLAYER,
0f
"hexcasting.shame",
DamageScaling.WHEN_CAUSED_BY_LIVING_NON_PLAYER,
0f
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ protected void addTags(@NotNull HolderLookup.Provider provider) {
DamageTypeTags.BYPASSES_INVULNERABILITY,
DamageTypeTags.BYPASSES_SHIELD
);

}

@SafeVarargs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public static final class Common implements HexConfig.CommonConfigAccess, Config
private int artifactCooldown = DEFAULT_ARTIFACT_COOLDOWN;



@Override
public void validatePostLoad() throws ValidationException {
this.dustMediaAmount = Math.max(this.dustMediaAmount, 0);
Expand Down Expand Up @@ -121,7 +120,6 @@ public int trinketCooldown() {
public int artifactCooldown() {
return artifactCooldown;
}

}

@Config(name = "client")
Expand Down
69 changes: 33 additions & 36 deletions Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,26 @@ public class ForgeHexConfig implements HexConfig.CommonConfigAccess {
private static ForgeConfigSpec.IntValue trinketCooldown;
private static ForgeConfigSpec.IntValue artifactCooldown;

private static ForgeConfigSpec.IntValue stackIotaLimit;

public ForgeHexConfig(ForgeConfigSpec.Builder builder) {
builder.push("Media Amounts");
dustMediaAmount = builder.comment("How much media a single Amethyst Dust item is worth")
.defineInRange("dustMediaAmount", DEFAULT_DUST_MEDIA_AMOUNT, 0, Integer.MAX_VALUE);
.defineInRange("dustMediaAmount", DEFAULT_DUST_MEDIA_AMOUNT, 0, Integer.MAX_VALUE);
shardMediaAmount = builder.comment("How much media a single Amethyst Shard item is worth")
.defineInRange("shardMediaAmount", DEFAULT_SHARD_MEDIA_AMOUNT, 0, Integer.MAX_VALUE);
.defineInRange("shardMediaAmount", DEFAULT_SHARD_MEDIA_AMOUNT, 0, Integer.MAX_VALUE);
chargedCrystalMediaAmount = builder.comment("How much media a single Charged Amethyst Crystal item is worth")
.defineInRange("chargedCrystalMediaAmount", DEFAULT_CHARGED_MEDIA_AMOUNT, 0, Integer.MAX_VALUE);
.defineInRange("chargedCrystalMediaAmount", DEFAULT_CHARGED_MEDIA_AMOUNT, 0, Integer.MAX_VALUE);
mediaToHealthRate = builder.comment("How many points of media a half-heart is worth when casting from HP")
.defineInRange("mediaToHealthRate", DEFAULT_MEDIA_TO_HEALTH_RATE, 0.0, Double.POSITIVE_INFINITY);
.defineInRange("mediaToHealthRate", DEFAULT_MEDIA_TO_HEALTH_RATE, 0.0, Double.POSITIVE_INFINITY);
builder.pop();

builder.push("Cooldowns");
cypherCooldown = builder.comment("Cooldown in ticks of a cypher")
.defineInRange("cypherCooldown", DEFAULT_CYPHER_COOLDOWN, 0, Integer.MAX_VALUE);
.defineInRange("cypherCooldown", DEFAULT_CYPHER_COOLDOWN, 0, Integer.MAX_VALUE);
trinketCooldown = builder.comment("Cooldown in ticks of a trinket")
.defineInRange("trinketCooldown", DEFAULT_TRINKET_COOLDOWN, 0, Integer.MAX_VALUE);
.defineInRange("trinketCooldown", DEFAULT_TRINKET_COOLDOWN, 0, Integer.MAX_VALUE);
artifactCooldown = builder.comment("Cooldown in ticks of a artifact")
.defineInRange("artifactCooldown", DEFAULT_ARTIFACT_COOLDOWN, 0, Integer.MAX_VALUE);
.defineInRange("artifactCooldown", DEFAULT_ARTIFACT_COOLDOWN, 0, Integer.MAX_VALUE);
builder.pop();

}

@Override
Expand Down Expand Up @@ -88,19 +85,19 @@ public static class Client implements HexConfig.ClientConfigAccess {

public Client(ForgeConfigSpec.Builder builder) {
ctrlTogglesOffStrokeOrder = builder.comment(
"Whether the ctrl key will instead turn *off* the color gradient on patterns")
.define("ctrlTogglesOffStrokeOrder", DEFAULT_CTRL_TOGGLES_OFF_STROKE_ORDER);
"Whether the ctrl key will instead turn *off* the color gradient on patterns")
.define("ctrlTogglesOffStrokeOrder", DEFAULT_CTRL_TOGGLES_OFF_STROKE_ORDER);
invertSpellbookScrollDirection = builder.comment(
"Whether scrolling up (as opposed to down) will increase the page index of the spellbook, and " +
"vice versa")
.define("invertSpellbookScrollDirection", DEFAULT_INVERT_SPELLBOOK_SCROLL);
"Whether scrolling up (as opposed to down) will increase the page index of the spellbook, and " +
"vice versa")
.define("invertSpellbookScrollDirection", DEFAULT_INVERT_SPELLBOOK_SCROLL);
invertAbacusScrollDirection = builder.comment(
"Whether scrolling up (as opposed to down) will increase the value of the abacus, and vice versa")
.define("invertAbacusScrollDirection", DEFAULT_INVERT_ABACUS_SCROLL);
"Whether scrolling up (as opposed to down) will increase the value of the abacus, and vice versa")
.define("invertAbacusScrollDirection", DEFAULT_INVERT_ABACUS_SCROLL);
gridSnapThreshold = builder.comment(
"When using a staff, the distance from one dot you have to go to snap to the next dot, where 0.5 " +
"means 50% of the way.")
.defineInRange("gridSnapThreshold", DEFAULT_GRID_SNAP_THRESHOLD, 0.5, 1.0);
"When using a staff, the distance from one dot you have to go to snap to the next dot, where 0.5 " +
"means 50% of the way.")
.defineInRange("gridSnapThreshold", DEFAULT_GRID_SNAP_THRESHOLD, 0.5, 1.0);
}

@Override
Expand Down Expand Up @@ -147,38 +144,38 @@ public static class Server implements HexConfig.ServerConfigAccess {
public Server(ForgeConfigSpec.Builder builder) {
builder.push("Spells");
maxOpCount = builder.comment("The maximum number of actions that can be executed in one tick, to avoid " +
"hanging the server.")
.defineInRange("maxOpCount", DEFAULT_MAX_OP_COUNT, 0, Integer.MAX_VALUE);
"hanging the server.")
.defineInRange("maxOpCount", DEFAULT_MAX_OP_COUNT, 0, Integer.MAX_VALUE);
opBreakHarvestLevel = builder.comment(
"The harvest level of the Break Block spell.",
"0 = wood, 1 = stone, 2 = iron, 3 = diamond, 4 = netherite."
"The harvest level of the Break Block spell.",
"0 = wood, 1 = stone, 2 = iron, 3 = diamond, 4 = netherite."
).defineInRange("opBreakHarvestLevel", DEFAULT_OP_BREAK_HARVEST_LEVEL, 0, 4);
builder.pop();

builder.push("Spell Circles");
maxSpellCircleLength = builder.comment("The maximum number of slates in a spell circle")
.defineInRange("maxSpellCircleLength", DEFAULT_MAX_SPELL_CIRCLE_LENGTH, 4, Integer.MAX_VALUE);
.defineInRange("maxSpellCircleLength", DEFAULT_MAX_SPELL_CIRCLE_LENGTH, 4, Integer.MAX_VALUE);

circleActionDenyList = builder.comment(
"Resource locations of disallowed actions within circles. Trying to cast one of these in a circle" +
" will result in a mishap. For example: hexcasting:get_caster will prevent Mind's Reflection.")
.defineList("circleActionDenyList", List.of(), Server::isValidReslocArg);
"Resource locations of disallowed actions within circles. Trying to cast one of these in a circle" +
" will result in a mishap. For example: hexcasting:get_caster will prevent Mind's Reflection.")
.defineList("circleActionDenyList", List.of(), Server::isValidReslocArg);
builder.pop();

actionDenyList = builder.comment(
"Resource locations of disallowed actions. Trying to cast one of these will result in a mishap.")
.defineList("actionDenyList", List.of(), Server::isValidReslocArg);
"Resource locations of disallowed actions. Trying to cast one of these will result in a mishap.")
.defineList("actionDenyList", List.of(), Server::isValidReslocArg);

villagersOffendedByMindMurder = builder.comment(
"Should villagers take offense when you flay the mind of their fellow villagers?")
.define("villagersOffendedByMindMurder", true);
"Should villagers take offense when you flay the mind of their fellow villagers?")
.define("villagersOffendedByMindMurder", true);

tpDimDenyList = builder.comment("Resource locations of dimensions you can't Blink or Greater Teleport in.")
.defineList("tpDimDenyList", DEFAULT_DIM_TP_DENYLIST, Server::isValidReslocArg);
.defineList("tpDimDenyList", DEFAULT_DIM_TP_DENYLIST, Server::isValidReslocArg);

doesTrueNameHaveAmbit = builder.comment(
"when false makes player reference iotas behave as normal entity reference iotas")
.define("doesTrueNameHaveAmbit", DEFAULT_TRUE_NAME_HAS_AMBIT);
"when false makes player reference iotas behave as normal entity reference iotas")
.define("doesTrueNameHaveAmbit", DEFAULT_TRUE_NAME_HAS_AMBIT);
}

@Override
Expand Down Expand Up @@ -225,4 +222,4 @@ private static boolean isValidReslocArg(Object o) {
return o instanceof String s && ResourceLocation.isValidResourceLocation(s);
}
}
}
}

0 comments on commit 765ed92

Please sign in to comment.