diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_sconce.json b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_sconce.json index af52410929..10507061f7 100644 --- a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_sconce.json +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_sconce.json @@ -1,7 +1,30 @@ { "variants": { - "": { + "facing=down": { + "model": "hexcasting:block/amethyst_sconce", + "x": 180 + }, + "facing=east": { + "model": "hexcasting:block/amethyst_sconce", + "x": 90, + "y": 90 + }, + "facing=north": { + "model": "hexcasting:block/amethyst_sconce", + "x": 90 + }, + "facing=south": { + "model": "hexcasting:block/amethyst_sconce", + "x": 90, + "y": 180 + }, + "facing=up": { "model": "hexcasting:block/amethyst_sconce" + }, + "facing=west": { + "model": "hexcasting:block/amethyst_sconce", + "x": 90, + "y": 270 } } } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastResult.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastResult.kt index c0b4d4442d..dea8869286 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastResult.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastResult.kt @@ -7,7 +7,7 @@ import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation import at.petrak.hexcasting.api.casting.iota.Iota /** - * The result of doing something to a cast harness. + * The result of doing something to a casting VM. * * Contains the iota that was executed to produce this CastResult, * the next thing to execute after this is finished, the modified state of the stack, diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt index 587500355b..11503b0b6f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingVM.kt @@ -64,7 +64,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { } } - // Then write all pertinent data back to the harness for the next iteration. + // Then write all pertinent data back to the VM for the next iteration. if (image2.newData != null) { this.image = image2.newData } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt index 0221c1f36d..02d9612767 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt @@ -47,7 +47,7 @@ data class FrameForEach( ): CastResult { // If this isn't the very first Thoth step (i.e. no Thoth computations run yet)... val stack = if (baseStack == null) { - // init stack to the harness stack... + // init stack to the VM stack... harness.image.stack.toList() } else { // else save the stack to the accumulator and reuse the saved base stack. diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FunctionalData.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FunctionalData.kt index 49f3d149d0..79c48bf6bb 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FunctionalData.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FunctionalData.kt @@ -3,7 +3,7 @@ package at.petrak.hexcasting.api.casting.eval.vm import at.petrak.hexcasting.api.casting.iota.Iota /** - * A change to the data in a CastHarness after a pattern is drawn. + * A change to the data in a CastingVM after a pattern is drawn. */ data class FunctionalData( val stack: List, diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapEvalTooMuch.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapEvalTooMuch.kt index 24ecda81e8..1634cd63e1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapEvalTooMuch.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapEvalTooMuch.kt @@ -14,5 +14,5 @@ class MishapEvalTooMuch : Mishap() { } override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context) = - error("eval_too_deep") + error("eval_too_much") } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemStaff.java b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemStaff.java index c571aadf58..80e84f4a2d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemStaff.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemStaff.java @@ -37,9 +37,9 @@ public InteractionResultHolder use(Level world, Player player, Intera } if (!world.isClientSide() && player instanceof ServerPlayer serverPlayer) { - var harness = IXplatAbstractions.INSTANCE.getStaffcastVM(serverPlayer, hand); + var vm = IXplatAbstractions.INSTANCE.getStaffcastVM(serverPlayer, hand); var patterns = IXplatAbstractions.INSTANCE.getPatternsSavedInUi(serverPlayer); - var descs = harness.generateDescs(); + var descs = vm.generateDescs(); IXplatAbstractions.INSTANCE.sendPacketToPlayer(serverPlayer, new MsgOpenSpellGuiS2C(hand, patterns, descs.getFirst(), descs.getSecond(), diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java index a189fd0703..1c8886f999 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java @@ -128,8 +128,8 @@ public InteractionResultHolder use(Level world, Player player, Intera } var sPlayer = (ServerPlayer) player; var ctx = new PackagedItemCastEnv(sPlayer, usedHand); - var harness = CastingVM.empty(ctx); - var clientView = harness.queueExecuteAndWrapIotas(instrs, sPlayer.serverLevel()); + var vm = CastingVM.empty(ctx); + var clientView = vm.queueExecuteAndWrapIotas(instrs, sPlayer.serverLevel()); var patterns = instrs.stream() .filter(i -> i instanceof PatternIota) diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index 2eb861e346..1f578be3a1 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -586,6 +586,7 @@ add_segment: "Adding line", }, cast: { + fail: "Mishap crunches", normal: "Action hums", spell: "Spell boinks", hermes: "Hermes' twangs", @@ -927,7 +928,7 @@ wrong_dimension: "cannot see %s from %s", entity_too_far: "%s is out of range", immune_entity: "cannot alter %s", - eval_too_deep: "Recursively evaluated too deep", + eval_too_much: "Evaluated too many patterns", no_item: "needs %s but got nothing", "no_item.offhand": "needs %s in the other hand but got nothing", bad_entity: "needs %s but got %s", @@ -1383,8 +1384,8 @@ "retrospection.title": "Hasty Retrospection", 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.", - "too_deep.title": "Delve Too Deep", - 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.", + "too_many_patterns.title": "Lost in Thought", + 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.", "true_name.title": "Transgress Other", 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 @@ spellcircles: { "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.", - "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.", + "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.", "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.", "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.", "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).", diff --git a/Common/src/main/resources/assets/hexcasting/lang/ru_ru.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/ru_ru.flatten.json5 index 1b94caa75f..3abbcc31fd 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/ru_ru.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/ru_ru.flatten.json5 @@ -863,7 +863,7 @@ wrong_dimension: "не удается увидеть %s из %s", entity_too_far: "%s находится вне диапазона", immune_entity: "невозможно изменить %s", - eval_too_deep: "Рекурсивные вычисления слишком глубокие", + eval_too_much: "Рекурсивные вычисления слишком глубокие", no_item: "нуждается в %s, но ничего не получает", "no_item.offhand": "нуждается в %s в другой руке, но ничего не получил", bad_entity: "нуждается в %s, но получил %s", @@ -1294,8 +1294,8 @@ "retrospection.title": "Поспешная Ретроспектива", 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)Ретроспектива/$ в стек как шаблон иота.", - "too_deep.title": "Слишком глубоко", - too_deep: "Оценено слишком много заклинаний с метаоценкой от одного заклинания.$(br2)Вызывает темно-синие искры и лишает меня всего воздуха.", + "too_many_patterns.title": "Слишком глубоко", + too_many_patterns: "Оценено слишком много заклинаний с метаоценкой от одного заклинания.$(br2)Вызывает темно-синие искры и лишает меня всего воздуха.", "true_name.title": "Нарушение Законов", true_name: "Я попытался $(l:patterns/readwrite#hexcasting:write)$(action)сохранить истинное имя/$ другого игрока на постоянный носитель.$(br2)Вызывает черные искры и лишает меня зрения примерно на одну минуту.", diff --git a/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 index 7715983dec..dc41db318b 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 @@ -925,7 +925,7 @@ wrong_dimension: "无法在%2$s中影响到%1$s", entity_too_far: "%s超出影响范围", immune_entity: "无法影响到%s", - eval_too_deep: "递归深度过大", + eval_too_much: "递归深度过大", no_item: "需要%s,而实际无对应物品", "no_item.offhand": "需要在另一只手里持有%s,而实际无对应物品", bad_entity: "需要%s,而实际接受了%s", @@ -1381,8 +1381,8 @@ "retrospection.title": "反思过急", retrospection: "试图在绘制$(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)内省/$前绘制$(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)反思/$。$(br2)产生橙色火花,并压入一个$(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)反思/$对应的图案。", - "too_deep.title": "钻研过深", - too_deep: "在一个法术内以元运行方式运行过多法术。$(br2)产生暗蓝色火花,并使我窒息。", + "too_many_patterns.title": "钻研过深", + too_many_patterns: "在一个法术内以元运行方式运行过多法术。$(br2)产生暗蓝色火花,并使我窒息。", "true_name.title": "违犯他人", true_name: "试图在某种永久性媒介中$(l:patterns/readwrite#hexcasting:write)$(action)存储/$代表另一位玩家的 iota。$(br2)产生黑色火花,并致盲大约一分钟。", diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json index 08fb6d0335..5a01a51556 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json @@ -75,8 +75,8 @@ }, { "type": "patchouli:text", - "title": "hexcasting.page.mishaps.too_deep.title", - "text": "hexcasting.page.mishaps.too_deep" + "title": "hexcasting.page.mishaps.too_many_patterns.title", + "text": "hexcasting.page.mishaps.too_many_patterns" }, { "type": "patchouli:text", diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json index 9e89746d5a..8ea8dab475 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json @@ -24,6 +24,8 @@ "hexcasting:staff/crimson", "hexcasting:staff/warped", "hexcasting:staff/mangrove", + "hexcasting:staff/bamboo", + "hexcasting:staff/cherry", "hexcasting:staff/edified" ] } diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/CCStaffcastImage.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/CCStaffcastImage.java index bb6018946f..383deefaab 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/CCStaffcastImage.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/CCStaffcastImage.java @@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable; public class CCStaffcastImage implements Component { - public static final String TAG_HARNESS = "harness"; + public static final String TAG_VM = "harness"; private final ServerPlayer owner; private CompoundTag lazyLoadedTag = new CompoundTag(); @@ -39,11 +39,11 @@ public void setImage(@Nullable CastingImage image) { @Override public void readFromNbt(CompoundTag tag) { - this.lazyLoadedTag = tag.getCompound(TAG_HARNESS); + this.lazyLoadedTag = tag.getCompound(TAG_VM); } @Override public void writeToNbt(CompoundTag tag) { - tag.put(TAG_HARNESS, this.lazyLoadedTag); + tag.put(TAG_VM, this.lazyLoadedTag); } } diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java b/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java index 9d9188599d..d39a71e857 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/xplat/ForgeXplatImpl.java @@ -220,7 +220,7 @@ public void setSentinel(Player player, @Nullable Sentinel sentinel) { @Override public void setStaffcastImage(ServerPlayer player, @Nullable CastingImage image) { - player.getPersistentData().put(TAG_HARNESS, image == null ? new CompoundTag() : image.serializeToNbt()); + player.getPersistentData().put(TAG_VM, image == null ? new CompoundTag() : image.serializeToNbt()); } @Override @@ -285,9 +285,9 @@ public Sentinel getSentinel(Player player) { @Override public CastingVM getStaffcastVM(ServerPlayer player, InteractionHand hand) { - // This is always from a staff because we don't need to load the harness when casting from item + // This is always from a staff because we don't need to load the VM when casting from item var ctx = new StaffCastEnv(player, hand); - return new CastingVM(CastingImage.loadFromNbt(player.getPersistentData().getCompound(TAG_HARNESS), + return new CastingVM(CastingImage.loadFromNbt(player.getPersistentData().getCompound(TAG_VM), player.serverLevel()), ctx); } @@ -305,7 +305,7 @@ public List getPatternsSavedInUi(ServerPlayer player) { @Override public void clearCastingData(ServerPlayer player) { - player.getPersistentData().remove(TAG_HARNESS); + player.getPersistentData().remove(TAG_VM); player.getPersistentData().remove(TAG_PATTERNS); } @@ -585,6 +585,6 @@ public void setScale(Entity e, float scale) { public static final UUID ALTIORA_ATTRIBUTE_ID = UUID.fromString("91897c79-3ebb-468c-a265-40418ed01c41"); - public static final String TAG_HARNESS = "hexcasting:spell_harness"; + public static final String TAG_VM = "hexcasting:spell_harness"; public static final String TAG_PATTERNS = "hexcasting:spell_patterns"; }