Skip to content

Commit 196e4dd

Browse files
authored
Assorted bug fixes (#814)
great commit message
2 parents 88aabd8 + 22ff0ba commit 196e4dd

File tree

15 files changed

+56
-30
lines changed

15 files changed

+56
-30
lines changed
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
11
{
22
"variants": {
3-
"": {
3+
"facing=down": {
4+
"model": "hexcasting:block/amethyst_sconce",
5+
"x": 180
6+
},
7+
"facing=east": {
8+
"model": "hexcasting:block/amethyst_sconce",
9+
"x": 90,
10+
"y": 90
11+
},
12+
"facing=north": {
13+
"model": "hexcasting:block/amethyst_sconce",
14+
"x": 90
15+
},
16+
"facing=south": {
17+
"model": "hexcasting:block/amethyst_sconce",
18+
"x": 90,
19+
"y": 180
20+
},
21+
"facing=up": {
422
"model": "hexcasting:block/amethyst_sconce"
23+
},
24+
"facing=west": {
25+
"model": "hexcasting:block/amethyst_sconce",
26+
"x": 90,
27+
"y": 270
528
}
629
}
730
}

Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastResult.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation
77
import at.petrak.hexcasting.api.casting.iota.Iota
88

99
/**
10-
* The result of doing something to a cast harness.
10+
* The result of doing something to a casting VM.
1111
*
1212
* Contains the iota that was executed to produce this CastResult,
1313
* the next thing to execute after this is finished, the modified state of the stack,

Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) {
6464
}
6565
}
6666

67-
// Then write all pertinent data back to the harness for the next iteration.
67+
// Then write all pertinent data back to the VM for the next iteration.
6868
if (image2.newData != null) {
6969
this.image = image2.newData
7070
}

Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ data class FrameForEach(
4747
): CastResult {
4848
// If this isn't the very first Thoth step (i.e. no Thoth computations run yet)...
4949
val stack = if (baseStack == null) {
50-
// init stack to the harness stack...
50+
// init stack to the VM stack...
5151
harness.image.stack.toList()
5252
} else {
5353
// else save the stack to the accumulator and reuse the saved base stack.

Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FunctionalData.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package at.petrak.hexcasting.api.casting.eval.vm
33
import at.petrak.hexcasting.api.casting.iota.Iota
44

55
/**
6-
* A change to the data in a CastHarness after a pattern is drawn.
6+
* A change to the data in a CastingVM after a pattern is drawn.
77
*/
88
data class FunctionalData(
99
val stack: List<Iota>,

Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapEvalTooMuch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ class MishapEvalTooMuch : Mishap() {
1414
}
1515

1616
override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context) =
17-
error("eval_too_deep")
17+
error("eval_too_much")
1818
}

Common/src/main/java/at/petrak/hexcasting/common/items/ItemStaff.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public InteractionResultHolder<ItemStack> use(Level world, Player player, Intera
3737
}
3838

3939
if (!world.isClientSide() && player instanceof ServerPlayer serverPlayer) {
40-
var harness = IXplatAbstractions.INSTANCE.getStaffcastVM(serverPlayer, hand);
40+
var vm = IXplatAbstractions.INSTANCE.getStaffcastVM(serverPlayer, hand);
4141
var patterns = IXplatAbstractions.INSTANCE.getPatternsSavedInUi(serverPlayer);
42-
var descs = harness.generateDescs();
42+
var descs = vm.generateDescs();
4343

4444
IXplatAbstractions.INSTANCE.sendPacketToPlayer(serverPlayer,
4545
new MsgOpenSpellGuiS2C(hand, patterns, descs.getFirst(), descs.getSecond(),

Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ public InteractionResultHolder<ItemStack> use(Level world, Player player, Intera
128128
}
129129
var sPlayer = (ServerPlayer) player;
130130
var ctx = new PackagedItemCastEnv(sPlayer, usedHand);
131-
var harness = CastingVM.empty(ctx);
132-
var clientView = harness.queueExecuteAndWrapIotas(instrs, sPlayer.serverLevel());
131+
var vm = CastingVM.empty(ctx);
132+
var clientView = vm.queueExecuteAndWrapIotas(instrs, sPlayer.serverLevel());
133133

134134
var patterns = instrs.stream()
135135
.filter(i -> i instanceof PatternIota)

Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@
586586
add_segment: "Adding line",
587587
},
588588
cast: {
589+
fail: "Mishap crunches",
589590
normal: "Action hums",
590591
spell: "Spell boinks",
591592
hermes: "Hermes' twangs",
@@ -927,7 +928,7 @@
927928
wrong_dimension: "cannot see %s from %s",
928929
entity_too_far: "%s is out of range",
929930
immune_entity: "cannot alter %s",
930-
eval_too_deep: "Recursively evaluated too deep",
931+
eval_too_much: "Evaluated too many patterns",
931932
no_item: "needs %s but got nothing",
932933
"no_item.offhand": "needs %s in the other hand but got nothing",
933934
bad_entity: "needs %s but got %s",
@@ -1383,8 +1384,8 @@
13831384
"retrospection.title": "Hasty Retrospection",
13841385
retrospection: "I attempted to draw $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$ without first drawing $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Introspection/$.$(br2)Causes orange sparks, and pushes the pattern for $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$ to the stack as a pattern iota.",
13851386

1386-
"too_deep.title": "Delve Too Deep",
1387-
too_deep: "Evaluated too many spells with meta-evaluation from one spell.$(br2)Causes dark blue sparks, and chokes all the air out of me.",
1387+
"too_many_patterns.title": "Lost in Thought",
1388+
too_many_patterns: "I attempted to evaluate too many patterns in one _Hex. Often, this happens because I've accidentally created an infinite loop.$(br2)Causes dark blue sparks, and chokes all the air out of me.",
13881389

13891390
"true_name.title": "Transgress Other",
13901391
true_name: "I attempted to $(l:patterns/readwrite#hexcasting:write)$(action)save a reference/$ to another player to a permanent medium.$(br2)Causes black sparks, and robs me of my sight for approximately one minute.",
@@ -1557,7 +1558,7 @@
15571558

15581559
spellcircles: {
15591560
"1": "I KNOW what the $(l:items/slate)$(item)slates/$ are for. The grand assemblies lost to time. The patterns scribed on them can be actuated in sequence, automatically. Thought and power ricocheting through, one by one by one by one by one by through and through and THROUGH AND -- I must not I must not I should know better than to think that way.",
1560-
"2": "To start the ritual I need an $(l:greatwork/impetus)$(item)Impetus/$ to create a self-sustaining wave of _media. That wave travels along a track of $(l:items/slate)$(item)slates/$ or other blocks suitable for the energies, one by one, collecting any patterns it finds. Once the wave circles back around to the $(l:greatwork/impetus)$(item)Impetus/$, all the patterns encountered are cast in order.$(br2)The direction the _media exits any given block MUST be unambiguous, or the casting will fail at the block with too many neighbors.",
1561+
"2": "To start the ritual I need an $(l:greatwork/impetus)$(item)Impetus/$ to create a self-sustaining wave of _media. That wave travels along a track of $(l:items/slate)$(item)slates/$ or other suitable blocks, casting any patterns it finds.$(br2)If there is no way for the wave to return to the $(l:greatwork/impetus)$(item)Impetus/$, the casting will fail immediately. Also, the direction the wave exits any given block MUST be unambiguous, or the casting will fail at the block with too many neighbors.",
15611562
"3": "As a result, the outline of the spell \"circle\" may be any closed shape, concave or convex, and it may face any direction. In fact, with the application of certain other blocks it is possible to make a spell circle that spans all three dimensions. I doubt such an oddity has very much use, but I must allocate myself a bit of vapid levity to encourage my crude mind to continue my work.",
15621563
"4": "Miracle of miracles, the circle will withdraw _media neither from my inventory nor my mind. Instead, crystallized shards of _media must be provided to the $(l:greatwork/impetus)$(item)Impetus/$ via hopper, or other such artifice.$(br2)The application of a $(l:items/lens)$(item)Scrying Lens/$ will show how much _media is inside an $(l:greatwork/impetus)$(item)Impetus/$, in units of dust.",
15631564
"5": "However, a spell cast from a circle does have one major limitation: it is unable to affect anything outside of the circle's bounds. That is, it cannot interact with anything outside of the cuboid of minimum size which encloses every block composing it (so a concave spell circle can still affect things in the concavity).",

Common/src/main/resources/assets/hexcasting/lang/ru_ru.flatten.json5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@
863863
wrong_dimension: "не удается увидеть %s из %s",
864864
entity_too_far: "%s находится вне диапазона",
865865
immune_entity: "невозможно изменить %s",
866-
eval_too_deep: "Рекурсивные вычисления слишком глубокие",
866+
eval_too_much: "Рекурсивные вычисления слишком глубокие",
867867
no_item: "нуждается в %s, но ничего не получает",
868868
"no_item.offhand": "нуждается в %s в другой руке, но ничего не получил",
869869
bad_entity: "нуждается в %s, но получил %s",
@@ -1294,8 +1294,8 @@
12941294
"retrospection.title": "Поспешная Ретроспектива",
12951295
retrospection: "Я попытался нарисовать $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Ретроспектива/$ без предварительного рисования $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Интроспекция/$.$(br2)Вызывает оранжевые искры и помещает шаблон для $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Ретроспектива/$ в стек как шаблон иота.",
12961296

1297-
"too_deep.title": "Слишком глубоко",
1298-
too_deep: "Оценено слишком много заклинаний с метаоценкой от одного заклинания.$(br2)Вызывает темно-синие искры и лишает меня всего воздуха.",
1297+
"too_many_patterns.title": "Слишком глубоко",
1298+
too_many_patterns: "Оценено слишком много заклинаний с метаоценкой от одного заклинания.$(br2)Вызывает темно-синие искры и лишает меня всего воздуха.",
12991299

13001300
"true_name.title": "Нарушение Законов",
13011301
true_name: "Я попытался $(l:patterns/readwrite#hexcasting:write)$(action)сохранить истинное имя/$ другого игрока на постоянный носитель.$(br2)Вызывает черные искры и лишает меня зрения примерно на одну минуту.",

0 commit comments

Comments
 (0)