From cd64f6394e29496a8073b79dc382f5c63a016d81 Mon Sep 17 00:00:00 2001 From: Alwinfy <20421383+Alwinfy@users.noreply.github.com> Date: Tue, 15 Nov 2022 20:06:25 -0500 Subject: [PATCH 01/48] add eval/cc, aka continuation, aka OpEvalBreakable, aka Iris --- .../hexcasting/api/spell/OperatorUtils.kt | 5 +- .../api/spell/casting/CastingHarness.kt | 8 +++ .../api/spell/casting/SpellContinuation.kt | 35 +++++++++++ .../api/spell/iota/ContinuationIota.java | 62 +++++++++++++++++++ .../common/casting/RegisterPatterns.java | 3 + .../common/casting/operators/eval/OpEval.kt | 2 +- .../casting/operators/eval/OpEvalBreakable.kt | 41 ++++++++++++ .../hexcasting/common/lib/HexIotaTypes.java | 1 + .../assets/hexcasting/lang/en_us.json | 4 ++ .../en_us/entries/patterns/meta.json | 12 ++++ 10 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ContinuationIota.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/OperatorUtils.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/OperatorUtils.kt index 6389208f..dc3bcfdb 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/OperatorUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/OperatorUtils.kt @@ -275,9 +275,10 @@ fun List.getLongOrList(idx: Int, argc: Int = 0): Either { ) } -fun evaluatable(datum: Iota, reverseIdx: Int): Either = +fun evaluatable(datum: Iota, reverseIdx: Int): Either = when (datum) { - is PatternIota -> Either.left(datum.pattern) + is PatternIota -> Either.left(datum) + is ContinuationIota -> Either.left(datum) is ListIota -> Either.right(datum.list) else -> throw MishapInvalidIota( datum, diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt index fc62f6b2..d9a1f9db 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt @@ -15,6 +15,7 @@ import at.petrak.hexcasting.api.spell.SpellList import at.petrak.hexcasting.api.spell.iota.Iota import at.petrak.hexcasting.api.spell.iota.ListIota import at.petrak.hexcasting.api.spell.iota.PatternIota +import at.petrak.hexcasting.api.spell.iota.ContinuationIota import at.petrak.hexcasting.api.spell.math.HexDir import at.petrak.hexcasting.api.spell.math.HexPattern import at.petrak.hexcasting.api.spell.mishaps.* @@ -150,6 +151,13 @@ class CastingHarness private constructor( return if (iota is PatternIota) { updateWithPattern(iota.pattern, world, continuation) + } else if (iota is ContinuationIota) { + CastResult( + iota.continuation, + null, + ResolvedPatternType.EVALUATED, + listOf() + ) } else { CastResult( continuation, diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/SpellContinuation.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/SpellContinuation.kt index b1fc6efe..dfee470c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/SpellContinuation.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/SpellContinuation.kt @@ -1,5 +1,12 @@ package at.petrak.hexcasting.api.spell.casting +import at.petrak.hexcasting.api.utils.NBTBuilder +import at.petrak.hexcasting.api.utils.getList +import at.petrak.hexcasting.api.utils.serializeToNBT +import net.minecraft.nbt.CompoundTag +import net.minecraft.nbt.Tag +import net.minecraft.server.level.ServerLevel + /** * A continuation during the execution of a spell. */ @@ -9,4 +16,32 @@ sealed interface SpellContinuation { data class NotDone(val frame: ContinuationFrame, val next: SpellContinuation) : SpellContinuation fun pushFrame(frame: ContinuationFrame): SpellContinuation = NotDone(frame, this) + + fun serializeToNBT() = NBTBuilder { + TAG_FRAME %= list(getNBTFrames()) + } + fun getNBTFrames(): List { + var self = this + val frames = mutableListOf() + while (self is NotDone) { + frames.add(self.frame.serializeToNBT()) + self = self.next + } + return frames + } + companion object { + const val TAG_FRAME = "frame" + + @JvmStatic + fun fromNBT(nbt: CompoundTag, world: ServerLevel): SpellContinuation { + val frames = nbt.getList(TAG_FRAME, Tag.TAG_COMPOUND) + var result: SpellContinuation = Done + for (frame in frames.asReversed()) { + if (frame is CompoundTag) { + result = result.pushFrame(ContinuationFrame.fromNBT(frame, world)) + } + } + return result + } + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ContinuationIota.java b/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ContinuationIota.java new file mode 100644 index 00000000..fb447dc4 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/iota/ContinuationIota.java @@ -0,0 +1,62 @@ +package at.petrak.hexcasting.api.spell.iota; + +import at.petrak.hexcasting.api.spell.casting.SpellContinuation; +import at.petrak.hexcasting.api.utils.HexUtils; +import at.petrak.hexcasting.common.lib.HexIotaTypes; +import net.minecraft.ChatFormatting; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.Tag; +import net.minecraft.network.chat.Component; +import net.minecraft.server.level.ServerLevel; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * An iota storing a continuation (in essence an execution state). + */ +public class ContinuationIota extends Iota { + public static final Component DISPLAY = Component.translatable("hexcasting.tooltip.jump_iota").withStyle(ChatFormatting.RED); + + public ContinuationIota(SpellContinuation cont) { + super(HexIotaTypes.CONTINUATION, cont); + } + + public SpellContinuation getContinuation() { + return (SpellContinuation) this.payload; + } + + @Override + public boolean isTruthy() { + return true; + } + + @Override + public boolean toleratesOther(Iota that) { + return typesMatch(this, that) && that instanceof ContinuationIota cont && cont.getContinuation().equals(getContinuation()); + } + + @Override + public @NotNull + Tag serialize() { + return getContinuation().serializeToNBT(); + } + + public static IotaType TYPE = new IotaType<>() { + @Nullable + @Override + public ContinuationIota deserialize(Tag tag, ServerLevel world) throws IllegalArgumentException { + var compoundTag = HexUtils.downcast(tag, CompoundTag.TYPE); + return new ContinuationIota(SpellContinuation.fromNBT(compoundTag, world)); + } + + @Override + public Component display(Tag tag) { + return DISPLAY; + } + + @Override + public int color() { + return 0xff_cc0000; + } + }; +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java index d875493a..84dc4509 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java @@ -18,6 +18,7 @@ import at.petrak.hexcasting.common.casting.operators.circles.OpCircleBounds; import at.petrak.hexcasting.common.casting.operators.circles.OpImpetusDir; import at.petrak.hexcasting.common.casting.operators.circles.OpImpetusPos; import at.petrak.hexcasting.common.casting.operators.eval.OpEval; +import at.petrak.hexcasting.common.casting.operators.eval.OpEvalBreakable; import at.petrak.hexcasting.common.casting.operators.eval.OpForEach; import at.petrak.hexcasting.common.casting.operators.eval.OpHalt; import at.petrak.hexcasting.common.casting.operators.lists.*; @@ -343,6 +344,8 @@ public class RegisterPatterns { // eval being a space filling curve feels apt doesn't it PatternRegistry.mapPattern(HexPattern.fromAngles("deaqq", HexDir.SOUTH_EAST), modLoc("eval"), OpEval.INSTANCE); + PatternRegistry.mapPattern(HexPattern.fromAngles("deaqqdaa", HexDir.SOUTH_EAST), modLoc("eval/cc"), + OpEvalBreakable.INSTANCE); PatternRegistry.mapPattern(HexPattern.fromAngles("aqdee", HexDir.SOUTH_WEST), modLoc("halt"), OpHalt.INSTANCE); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt index 66349963..7ae7aec4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt @@ -33,7 +33,7 @@ object OpEval : Action { continuation.pushFrame(ContinuationFrame.FinishEval) // install a break-boundary after eval } - val instrsList = instrs.map({ SpellList.LList(0, listOf(PatternIota(it))) }, { it }) + val instrsList = instrs.map({ SpellList.LList(0, listOf(it)) }, { it }) val frame = ContinuationFrame.Evaluate(instrsList) return OperationResult(newCont.pushFrame(frame), stack, ravenmind, listOf()) } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt new file mode 100644 index 00000000..394fca89 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt @@ -0,0 +1,41 @@ +package at.petrak.hexcasting.common.casting.operators.eval + +import at.petrak.hexcasting.api.spell.Action +import at.petrak.hexcasting.api.spell.OperationResult +import at.petrak.hexcasting.api.spell.SpellList +import at.petrak.hexcasting.api.spell.casting.CastingContext +import at.petrak.hexcasting.api.spell.casting.ContinuationFrame +import at.petrak.hexcasting.api.spell.casting.SpellContinuation +import at.petrak.hexcasting.api.spell.evaluatable +import at.petrak.hexcasting.api.spell.iota.Iota +import at.petrak.hexcasting.api.spell.iota.ContinuationIota + +object OpEvalBreakable : Action { + override fun operate( + continuation: SpellContinuation, + stack: MutableList, + ravenmind: Iota?, + ctx: CastingContext + ): OperationResult { + val datum = stack.removeLast() + val instrs = evaluatable(datum, 0) + + instrs.ifRight { + ctx.incDepth() + } + + // if not installed already... + // also, never make a break boundary when evaluating just one pattern + val newCont = + if (instrs.left().isPresent || (continuation is SpellContinuation.NotDone && continuation.frame is ContinuationFrame.FinishEval)) { + continuation + } else { + continuation.pushFrame(ContinuationFrame.FinishEval) // install a break-boundary after eval + } + + val instrsList = instrs.map({ SpellList.LList(0, listOf(it)) }, { it }) + val frame = ContinuationFrame.Evaluate(instrsList) + stack.add(ContinuationIota(continuation)) + return OperationResult(newCont.pushFrame(frame), stack, ravenmind, listOf()) + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexIotaTypes.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexIotaTypes.java index 5f6cb251..38dede74 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexIotaTypes.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexIotaTypes.java @@ -188,6 +188,7 @@ public class HexIotaTypes { public static final IotaType PATTERN = type("pattern", PatternIota.TYPE); public static final IotaType GARBAGE = type("garbage", GarbageIota.TYPE); public static final IotaType VEC3 = type("vec3", Vec3Iota.TYPE); + public static final IotaType CONTINUATION = type("continuation", ContinuationIota.TYPE); private static > T type(String name, T type) { diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.json b/Common/src/main/resources/assets/hexcasting/lang/en_us.json index 0bdf1d9b..04ff528b 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.json +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.json @@ -149,6 +149,7 @@ "hexcasting.tooltip.list_contents": "[%s]", "hexcasting.tooltip.pattern_iota": "HexPattern(%s)", "hexcasting.tooltip.null_iota": "NULL", + "hexcasting.tooltip.jump_iota": "[JUMP]", "hexcasting.tooltip.boolean_true": "True", "hexcasting.tooltip.boolean_false": "False", @@ -448,6 +449,7 @@ "hexcasting.spell.hexcasting:close_paren": "Retrospection", "hexcasting.spell.hexcasting:escape": "Consideration", "hexcasting.spell.hexcasting:eval": "Hermes' Gambit", + "hexcasting.spell.hexcasting:eval/cc": "Iris' Gambit", "hexcasting.spell.hexcasting:for_each": "Thoth's Gambit", "hexcasting.spell.hexcasting:halt": "Charon's Gambit", "hexcasting.spell.hexcasting:number": "Numerical Reflection: %s", @@ -994,6 +996,8 @@ "hexcasting.page.meta.for_each.2": "More specifically, for each element in the second list, it will:$(li)Create a new stack, with everything on the current stack plus that element$(li)Draw all the patterns in the first list$(li)Save all the iotas remaining on the stack to a list$(br)Then, after all is said and done, pushes the list of saved iotas onto the main stack.$(br2)No wonder all the practitioners of this art go mad.", "hexcasting.page.meta.halt.1": "This pattern forcibly halts a _Hex. This is mostly useless on its own, as I could simply just stop writing patterns, or put down my staff.", "hexcasting.page.meta.halt.2": "But when combined with $(l:patterns/meta#hexcasting:eval)$(action)Hermes'/$ or $(l:patterns/meta#hexcasting:for_each)$(action)Thoth's Gambits/$, it becomes $(italics)far/$ more interesting. Those patterns serve to 'contain' that halting, and rather than ending the entire _Hex, those gambits end instead. This can be used to cause $(l:patterns/meta#hexcasting:for_each)$(action)Thoth's Gambit/$ not to operate on every iota it's given. An escape from the madness, as it were.", + "hexcasting.page.meta.eval/cc.1": "Cast a pattern or list of patterns from the stack exactly like $(l:patterns/meta#hexcasting:eval)$(action)Hermes' Gambit/$, except that a unique \"Jump\" iota is pushed to the stack beforehand. ", + "hexcasting.page.meta.eval/cc.2": "When the \"Jump\"-iota is executed, it'll skip the rest of the patterns and jump directly to the end of the pattern list.$(p)While this may seem redundant given $(l:patterns/meta#hexcasting:halt)$(action)Charon's Gambit/$ exists, this allows you to exit $(italic)nested/$ $(l:patterns/meta#hexcasting:eval)$(action)Hermes'/$ invocations in a controlled way, where Charon only allows you to exit one.$(p)The \"Jump\" iota will apparently stay on the stack even after execution is finished... better not think about the implications of that.", "hexcasting.entry.circle_patterns": "Spell Circle Patterns", "hexcasting.page.circle_patterns.disclaimer": "These patterns must be cast from a $(l:greatwork/spellcircles)$(item)Spell Circle/$; trying to cast them through a $(l:items/staff)$(item)Staff/$ will fail rather spectacularly.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json index b38c35e0..4c022573 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json @@ -18,6 +18,18 @@ "type": "patchouli:text", "text": "hexcasting.page.meta.eval.2" }, + { + "type": "hexcasting:pattern", + "op_id": "hexcasting:eval/cc", + "anchor": "hexcasting:eval/cc", + "input": "[pattern] | pattern", + "output": "many", + "text": "hexcasting.page.meta.eval/cc.1" + }, + { + "type": "patchouli:text", + "text": "hexcasting.page.meta.eval/cc.2" + }, { "type": "hexcasting:pattern", "op_id": "hexcasting:for_each", From 7467687fad911e7d01f8ff85cd837597239b109e Mon Sep 17 00:00:00 2001 From: Alwinfy <20421383+Alwinfy@users.noreply.github.com> Date: Wed, 16 Nov 2022 00:58:29 -0500 Subject: [PATCH 02/48] DRY eval/cc --- .../casting/operators/eval/OpEvalBreakable.kt | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt index 394fca89..9b08dac1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt @@ -17,25 +17,7 @@ object OpEvalBreakable : Action { ravenmind: Iota?, ctx: CastingContext ): OperationResult { - val datum = stack.removeLast() - val instrs = evaluatable(datum, 0) - - instrs.ifRight { - ctx.incDepth() - } - - // if not installed already... - // also, never make a break boundary when evaluating just one pattern - val newCont = - if (instrs.left().isPresent || (continuation is SpellContinuation.NotDone && continuation.frame is ContinuationFrame.FinishEval)) { - continuation - } else { - continuation.pushFrame(ContinuationFrame.FinishEval) // install a break-boundary after eval - } - - val instrsList = instrs.map({ SpellList.LList(0, listOf(it)) }, { it }) - val frame = ContinuationFrame.Evaluate(instrsList) stack.add(ContinuationIota(continuation)) - return OperationResult(newCont.pushFrame(frame), stack, ravenmind, listOf()) + return OpEval.operate(continuation, stack, ravenmind, ctx) } } From 3b367dcd9bbb1c831438bc2727db06f499426acd Mon Sep 17 00:00:00 2001 From: Alwinfy <20421383+Alwinfy@users.noreply.github.com> Date: Wed, 16 Nov 2022 00:58:51 -0500 Subject: [PATCH 03/48] Pay a cost for every continuation jump --- .../at/petrak/hexcasting/api/spell/casting/CastingHarness.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt index c18a47d7..eb1663a2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt @@ -154,6 +154,7 @@ class CastingHarness private constructor( return if (iota is PatternIota) { updateWithPattern(iota.pattern, world, continuation) } else if (iota is ContinuationIota) { + ctx.incDepth() CastResult( iota.continuation, null, From f76d71bfe00786af8eb179265eced3e53dd078b6 Mon Sep 17 00:00:00 2001 From: Alwinfy <20421383+Alwinfy@users.noreply.github.com> Date: Wed, 16 Nov 2022 01:08:36 -0500 Subject: [PATCH 04/48] oops fix the audio thing --- .../at/petrak/hexcasting/api/spell/casting/CastingHarness.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt index eb1663a2..8bd7cf59 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/spell/casting/CastingHarness.kt @@ -159,7 +159,8 @@ class CastingHarness private constructor( iota.continuation, null, ResolvedPatternType.EVALUATED, - listOf() + listOf(), + EvalSound.GENERIC ) } else { CastResult( From cec40696d12df5ec2f75e65f1e14f60ef2860f21 Mon Sep 17 00:00:00 2001 From: Alwinfy <20421383+Alwinfy@users.noreply.github.com> Date: Wed, 16 Nov 2022 13:39:24 -0500 Subject: [PATCH 05/48] oops --- .../hexcasting/common/casting/operators/eval/OpEval.kt | 9 +++++++++ .../common/casting/operators/eval/OpEvalBreakable.kt | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt index 7ae7aec4..7488b4bf 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt @@ -18,6 +18,15 @@ object OpEval : Action { ctx: CastingContext ): OperationResult { val datum = stack.removeLast() + return exec(continuation, datum, stack, ravenmind, ctx) + } + fun exec( + continuation: SpellContinuation, + datum: Iota, + stack: MutableList, + ravenmind: Iota?, + ctx: CastingContext + ): OperationResult { val instrs = evaluatable(datum, 0) instrs.ifRight { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt index 9b08dac1..235fedad 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEvalBreakable.kt @@ -17,7 +17,8 @@ object OpEvalBreakable : Action { ravenmind: Iota?, ctx: CastingContext ): OperationResult { + val datum = stack.removeLast() stack.add(ContinuationIota(continuation)) - return OpEval.operate(continuation, stack, ravenmind, ctx) + return OpEval.exec(continuation, datum, stack, ravenmind, ctx) } } From 7e4ca87a912ecd534e0da1c6ccabaff9434ec1b9 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 15:43:41 +1000 Subject: [PATCH 06/48] started porting all the things from https://github.com/Alwinfy/ArithmeticDemo --- .../api/casting/arithmetic/Arithmetic.java | 25 +++++++ .../arithmetic/IotaMultiPredicate.java | 50 +++++++++++++ .../api/casting/arithmetic/IotaPredicate.java | 31 ++++++++ .../api/casting/arithmetic/IterPair.java | 24 ++++++ .../arithmetic/engine/ArithmeticEngine.java | 74 +++++++++++++++++++ .../casting/arithmetic/engine/HashCons.java | 12 +++ .../arithmetic/impls/DoubleArithmetic.java | 69 +++++++++++++++++ .../arithmetic/impls/StringArithmetic.java | 47 ++++++++++++ .../arithmetic/impls/Vec3Arithmetic.java | 58 +++++++++++++++ .../casting/arithmetic/operator/Operator.java | 26 +++++++ .../arithmetic/operator/OperatorBinary.java | 22 ++++++ .../arithmetic/operator/OperatorPack.java | 27 +++++++ .../arithmetic/operator/OperatorUnary.java | 21 ++++++ .../operator/OperatorVec3Delegating.java | 47 ++++++++++++ 14 files changed, 533 insertions(+) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IterPair.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/HashCons.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java new file mode 100644 index 00000000..1adbd44a --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -0,0 +1,25 @@ +package at.petrak.hexcasting.api.casting.arithmetic; + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.math.HexDir; +import at.petrak.hexcasting.api.casting.math.HexPattern; + +public interface Arithmetic { + public String arithName(); + + public abstract Iterable opTypes(); + + public abstract Operator getOperator(HexPattern pattern); + + public static HexPattern ADD = HexPattern.fromAngles("waaw", HexDir.NORTH_EAST); + public static HexPattern SUB = HexPattern.fromAngles("wddw", HexDir.NORTH_WEST); + public static HexPattern MUL = HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST); + public static HexPattern DIV = HexPattern.fromAngles("wdedw", HexDir.NORTH_EAST); + public static HexPattern ABS = HexPattern.fromAngles("wqaqw", HexDir.NORTH_EAST); + public static HexPattern POW = HexPattern.fromAngles("wedew", HexDir.NORTH_WEST); + public static HexPattern FLOOR = HexPattern.fromAngles("ewq", HexDir.EAST); + public static HexPattern CEIL = HexPattern.fromAngles("qwe", HexDir.EAST); + public static HexPattern MOD = HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST); + public static HexPattern PACK = HexPattern.fromAngles("eqqqqq", HexDir.EAST); + public static HexPattern UNPACK = HexPattern.fromAngles("qeeeee", HexDir.EAST); +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java new file mode 100644 index 00000000..8f9ea2dc --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java @@ -0,0 +1,50 @@ +package at.petrak.hexcasting.api.casting.arithmetic; + +import at.petrak.hexcasting.api.casting.iota.Iota; + +@FunctionalInterface +public interface IotaMultiPredicate { + boolean test(Iterable iotas); + + static IotaMultiPredicate all(IotaPredicate child) { + return new All(child); + } + static IotaMultiPredicate bofa(IotaPredicate first, IotaPredicate second) { + return new Any(first, second); + } + static IotaMultiPredicate any(IotaPredicate needs, IotaPredicate fallback) { + return new Any(needs, fallback); + } + record Bofa(IotaPredicate first, IotaPredicate second) implements IotaMultiPredicate { + @Override + public boolean test(Iterable iotas) { + var it = iotas.iterator(); + return it.hasNext() && first.test(it.next()) && it.hasNext() && second.test(it.next()) && !it.hasNext(); + } + } + record Any(IotaPredicate needs, IotaPredicate fallback) implements IotaMultiPredicate { + @Override + public boolean test(Iterable iotas) { + var ok = false; + for (var iota : iotas) { + if (needs.test(iota)) { + ok = true; + } else if (!fallback.test(iota)) { + return false; + } + } + return ok; + } + } + record All(IotaPredicate inner) implements IotaMultiPredicate { + @Override + public boolean test(Iterable iotas) { + for (var iota : iotas) { + if (!inner.test(iota)) { + return false; + } + } + return true; + } + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java new file mode 100644 index 00000000..635869f9 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java @@ -0,0 +1,31 @@ +package at.petrak.hexcasting.api.casting.arithmetic; + +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.iota.IotaType; + +@FunctionalInterface +public interface IotaPredicate { + boolean test(Iota iota); + + static IotaPredicate or(IotaPredicate left, IotaPredicate right) { + return new Or(left, right); + } + + static IotaPredicate ofType(IotaType type) { + return new OfType(type); + } + + record Or(IotaPredicate left, IotaPredicate right) implements IotaPredicate { + @Override + public boolean test(Iota iota) { + return left.test(iota) || right.test(iota); + } + } + + record OfType(IotaType type) implements IotaPredicate { + @Override + public boolean test(Iota iota) { + return iota.getType().equals(this.type); + } + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IterPair.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IterPair.java new file mode 100644 index 00000000..64ff91fb --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IterPair.java @@ -0,0 +1,24 @@ +package at.petrak.hexcasting.api.casting.arithmetic; + +import java.util.Iterator; + +public record IterPair(T left, T right) implements Iterable { + @Override + public Iterator iterator() { + return new Iterator() { + int ix; + @Override + public boolean hasNext() { + return ix < 2; + } + @Override + public T next() { + switch (ix++) { + case 0: return left; + case 1: return right; + } + return null; + } + }; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java new file mode 100644 index 00000000..7a898051 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java @@ -0,0 +1,74 @@ +package at.petrak.hexcasting.api.casting.arithmetic.engine; + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.math.HexPattern; +import org.jetbrains.annotations.Nullable; + +import java.util.*; + +public class ArithmeticEngine { + private record OpCandidates(HexPattern pattern, int arity, List operators) { + public void addOp(Operator next) { + if (next.arity != arity) { + throw new IllegalArgumentException("Operators exist of differing arity!"); + } + operators.add(next); + } + } + + public final Arithmetic[] arithmetics; + private final Map operators = new HashMap<>(); + private final Map cache = new HashMap<>(); + + public ArithmeticEngine(Arithmetic... arithmetics) { + this.arithmetics = arithmetics; + for (var arith : arithmetics) { + for (var op : arith.opTypes()) { + operators.compute(op, ($, info) -> { + var operator = arith.getOperator(op); + if (info == null) { + info = new OpCandidates(op, operator.arity, new ArrayList<>()); + } + info.addOp(operator); + return info; + }); + } + } + } + + public Iterable operatorSyms() { + return operators.keySet(); + } + + public @Nullable Iota run(HexPattern operator, Stack iotas) { + var candidates = operators.get(operator); + if (candidates == null) + return null; // not an operator + HashCons hash = new HashCons.Pattern(operator); + var args = new ArrayList(candidates.arity()); + for (var i = 0; i < candidates.arity(); i++) { + if (iotas.isEmpty()) { + throw new IllegalStateException("Not enough args on stack for operator: " + operator); + } + var iota = iotas.pop(); + hash = new HashCons.Pair(iota.getType(), hash); + args.add(iota); + } + Collections.reverse(args); + var op = resolveCandidates(args, hash, candidates); + return op.apply(args); + } + + public Operator resolveCandidates(List args, HashCons hash, OpCandidates candidates) { + return cache.computeIfAbsent(hash, $ -> { + for (var op : candidates.operators()) { + if (op.accepts.test(args)) { + return op; + } + } + throw new IllegalArgumentException("No implementation candidates for op " + candidates.pattern() + " on args: " + args); + }); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/HashCons.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/HashCons.java new file mode 100644 index 00000000..c7566e78 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/HashCons.java @@ -0,0 +1,12 @@ +package at.petrak.hexcasting.api.casting.arithmetic.engine; + + +import at.petrak.hexcasting.api.casting.iota.IotaType; +import at.petrak.hexcasting.api.casting.math.HexPattern; + +// Helper type for hashing lists of types. +public sealed interface HashCons { + public record Pattern(HexPattern operator) implements HashCons {} + + public record Pair(IotaType head, HashCons tail) implements HashCons {} +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java new file mode 100644 index 00000000..1035c79d --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java @@ -0,0 +1,69 @@ +package at.petrak.hexcasting.api.casting.arithmetic.impls; + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; +import at.petrak.hexcasting.api.casting.iota.DoubleIota; +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; + +import java.util.List; +import java.util.function.DoubleBinaryOperator; +import java.util.function.DoubleUnaryOperator; + +import static at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast; +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; + +public enum DoubleArithmetic implements Arithmetic { + INSTANCE; + + public static final List OPS = List.of( + ADD, + SUB, + MUL, + DIV, + ABS, + POW, + FLOOR, + CEIL, + MOD + ); + + public static final IotaMultiPredicate ACCEPTS = IotaMultiPredicate.all(IotaPredicate.ofType(DOUBLE)); + + @Override + public String arithName() { + return "double_math"; + } + + @Override + public Iterable opTypes() { + return OPS; + } + + @Override + public Operator getOperator(HexPattern pattern) { + switch (pattern) { + case ADD: return make2(Double::sum); + case SUB: return make2((p, q) -> p - q); + case MUL: return make2((p, q) -> p * q); + case DIV: return make2((p, q) -> p / q); + case ABS: return make1(Math::abs); + case POW: return make2(Math::pow); + case FLOOR: return make1(Math::floor); + case CEIL: return make1(Math::ceil); + case MOD: return make2((p, q) -> p % q); + } + return null; + } + public static OperatorUnary make1(DoubleUnaryOperator op) { + return new OperatorUnary(ACCEPTS, i -> new DoubleIota(op.applyAsDouble(downcast(i, DOUBLE).getDouble()))); + } + public static OperatorBinary make2(DoubleBinaryOperator op) { + return new OperatorBinary(ACCEPTS, (i, j) -> new DoubleIota(op.applyAsDouble(downcast(i, DOUBLE).getDouble(), downcast(j, DOUBLE).getDouble()))); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java new file mode 100644 index 00000000..4f6be300 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java @@ -0,0 +1,47 @@ +package at.petrak.hexcasting.api.casting.arithmetic.impls; + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; +import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; + +import java.util.List; + +public enum StringArithmetic implements Arithmetic { + INSTANCE; + + public static final List OPS = List.of( + new ADD, + new MUL, + new ABS + ); + + @Override + public String arithName() { + return "string_math"; + } + + @Override + public Iterable opTypes() { + return OPS; + } + + @Override + public Operator getOperator(HexPattern pattern) { + switch (pattern) { + case ADD: return new OperatorBinary( + IotaMultiPredicate.all(IotaPredicate.ofType(HexIotaTypes.BOOLEAN)), + (p, q) -> new Iota(p.downcast(String.class) + q.downcast(String.class))); + case MUL: return new OperatorBinary( + IotaMultiPredicate.bofa(IotaPredicate.ofClass(String.class), IotaPredicate.ofClass(Double.class)), + (p, q) -> new Iota(new String(new char[q.downcast(Double.class).intValue()]).replace("\0", p.downcast(String.class)))); + case ABS: return new OperatorUnary( + IotaMultiPredicate.all(IotaPredicate.ofClass(String.class)), + s -> new Iota((double) s.downcast(String.class).length())); + } + return null; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java new file mode 100644 index 00000000..cb14098d --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java @@ -0,0 +1,58 @@ +package at.petrak.hexcasting.api.casting.arithmetic.impls; + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.math.HexPattern; + +import java.util.ArrayList; +import java.util.List; + +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; + +public enum Vec3Arithmetic implements Arithmetic { + INSTANCE; + + public static final List OPS; + static { + var ops = new ArrayList<>(DoubleArithmetic.OPS); + ops.add(PACK); + ops.add(UNPACK); + ops.remove(FLOOR); + ops.remove(CEIL); + OPS = ops; + } + + public static final IotaMultiPredicate ACCEPTS = IotaMultiPredicate.any(IotaPredicate.ofType(VEC3), IotaPredicate.ofType(DOUBLE)); + + @Override + public String arithName() { + return "vec3_math"; + } + + @Override + public Iterable opTypes() { + return OPS; + } + + @Override + public Operator getOperator(Symbol name) { + switch (name.inner()) { + case "pack": return OperatorPack.INSTANCE; + case "add": return make2(name, null); + case "sub": return make2(name, null); + case "mul": return make2(name, Vec3::dot); + case "div": return make2(name, Vec3::cross); + case "abs": return make1(Vec3::len); + case "pow": return make2(name, Vec3::proj); + case "mod": return make2(name, null); + } + return null; + } + public static OperatorUnary make1(Function op) { + return new OperatorUnary(ACCEPTS, i -> new Iota(op.apply(i.downcast(Vec3.class)))); + } + public static OperatorVec3Delegating make2(Symbol name, BiFunction op) { + return new OperatorVec3Delegating(op, name); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java new file mode 100644 index 00000000..cd4e249c --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java @@ -0,0 +1,26 @@ +package at.petrak.hexcasting.api.casting.arithmetic.operator; + +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.iota.IotaType; +import at.petrak.hexcasting.api.casting.mishaps.MishapInvalidIota; + +public abstract class Operator { + public final int arity; + + public final IotaMultiPredicate accepts; + + public Operator(int arity, IotaMultiPredicate accepts) { + this.arity = arity; + this.accepts = accepts; + } + + public abstract Iota apply(Iterable iotas); + + @SuppressWarnings("unchecked") + public static T downcast(Iota iota, IotaType iotaType) { + if (iota.getType() != iotaType) + throw new IllegalStateException("Attempting to downcast " + iota + " to type: " + iotaType); + return (T) iota; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java new file mode 100644 index 00000000..f5eb41b6 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java @@ -0,0 +1,22 @@ +package at.petrak.hexcasting.api.casting.arithmetic.operator; + + +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.iota.Iota; + +import java.util.function.BinaryOperator; + +public class OperatorBinary extends Operator { + public BinaryOperator inner; + + public OperatorBinary(IotaMultiPredicate accepts, BinaryOperator inner) { + super(2, accepts); + this.inner = inner; + } + + @Override + public Iota apply(Iterable iotas) { + var it = iotas.iterator(); + return inner.apply(it.next(), it.next()); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java new file mode 100644 index 00000000..95dc3656 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java @@ -0,0 +1,27 @@ +package at.petrak.hexcasting.api.casting.arithmetic.operator; + + +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.iota.Vec3Iota; +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; +import net.minecraft.world.phys.Vec3; + +public class OperatorPack extends Operator { + private OperatorPack() { + super(3, IotaMultiPredicate.all(IotaPredicate.ofType(HexIotaTypes.DOUBLE))); + } + + public static OperatorPack INSTANCE = new OperatorPack(); + + @Override + public Iota apply(Iterable iotas) { + var it = iotas.iterator(); + return new Vec3Iota(new Vec3( + downcast(it.next(), HexIotaTypes.DOUBLE).getDouble(), + downcast(it.next(), HexIotaTypes.DOUBLE).getDouble(), + downcast(it.next(), HexIotaTypes.DOUBLE).getDouble() + )); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java new file mode 100644 index 00000000..550848ee --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java @@ -0,0 +1,21 @@ +package at.petrak.hexcasting.api.casting.arithmetic.operator; + + +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.iota.Iota; + +import java.util.function.UnaryOperator; + +public class OperatorUnary extends Operator { + public UnaryOperator inner; + + public OperatorUnary(IotaMultiPredicate accepts, UnaryOperator inner) { + super(1, accepts); + this.inner = inner; + } + + @Override + public Iota apply(Iterable iotas) { + return inner.apply(iotas.iterator().next()); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java new file mode 100644 index 00000000..e0bec5b6 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java @@ -0,0 +1,47 @@ +package at.petrak.hexcasting.api.casting.arithmetic.operator; + +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IterPair; +import at.petrak.hexcasting.api.casting.arithmetic.impls.DoubleArithmetic; +import at.petrak.hexcasting.api.casting.iota.DoubleIota; +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.iota.Vec3Iota; +import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; +import kotlin.Pair; +import net.minecraft.world.phys.Vec3; + +import java.util.Objects; +import java.util.function.BiFunction; + +public class OperatorVec3Delegating extends Operator { + private final BiFunction op; + private final Operator fb; + public OperatorVec3Delegating(BiFunction core, HexPattern fallback) { + super(2, IotaMultiPredicate.any(IotaPredicate.ofType(HexIotaTypes.VEC3), IotaPredicate.ofType(HexIotaTypes.DOUBLE))); + op = core; + fb = Objects.requireNonNull(DoubleArithmetic.INSTANCE.getOperator(fallback)); + } + + @Override + public Iota apply(Iterable iotas) { + var it = iotas.iterator(); + var left = it.next(); + var right = it.next(); + if (op != null && left instanceof Vec3Iota lh && right instanceof Vec3Iota rh) { + return op.apply(lh.getVec3(), rh.getVec3()); + } + var lh = left instanceof Vec3Iota l ? l.getVec3() : triplicate(downcast(left, HexIotaTypes.DOUBLE).getDouble()); + var rh = right instanceof Vec3Iota r ? r.getVec3() : triplicate(downcast(right, HexIotaTypes.DOUBLE).getDouble()); + return new Vec3Iota(new Vec3( + downcast(fb.apply(new IterPair<>(new DoubleIota(lh.x()), new DoubleIota(rh.x()))), HexIotaTypes.DOUBLE).getDouble(), + downcast(fb.apply(new IterPair<>(new DoubleIota(lh.y()), new DoubleIota(rh.y()))), HexIotaTypes.DOUBLE).getDouble(), + downcast(fb.apply(new IterPair<>(new DoubleIota(lh.z()), new DoubleIota(rh.z()))), HexIotaTypes.DOUBLE).getDouble() + )); + } + + public static Vec3 triplicate(double in) { + return new Vec3(in, in, in); + } +} From c276d4c6000bff0aa7bb8413d07a3570ef485c01 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 15:43:56 +1000 Subject: [PATCH 07/48] delete StringArithmetic since base hex casting has no strings --- .../arithmetic/impls/StringArithmetic.java | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java deleted file mode 100644 index 4f6be300..00000000 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/StringArithmetic.java +++ /dev/null @@ -1,47 +0,0 @@ -package at.petrak.hexcasting.api.casting.arithmetic.impls; - -import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; -import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; -import at.petrak.hexcasting.api.casting.math.HexPattern; -import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; - -import java.util.List; - -public enum StringArithmetic implements Arithmetic { - INSTANCE; - - public static final List OPS = List.of( - new ADD, - new MUL, - new ABS - ); - - @Override - public String arithName() { - return "string_math"; - } - - @Override - public Iterable opTypes() { - return OPS; - } - - @Override - public Operator getOperator(HexPattern pattern) { - switch (pattern) { - case ADD: return new OperatorBinary( - IotaMultiPredicate.all(IotaPredicate.ofType(HexIotaTypes.BOOLEAN)), - (p, q) -> new Iota(p.downcast(String.class) + q.downcast(String.class))); - case MUL: return new OperatorBinary( - IotaMultiPredicate.bofa(IotaPredicate.ofClass(String.class), IotaPredicate.ofClass(Double.class)), - (p, q) -> new Iota(new String(new char[q.downcast(Double.class).intValue()]).replace("\0", p.downcast(String.class)))); - case ABS: return new OperatorUnary( - IotaMultiPredicate.all(IotaPredicate.ofClass(String.class)), - s -> new Iota((double) s.downcast(String.class).length())); - } - return null; - } -} From 6f5c652554b507161547900b9b8ff0a1ea15bffb Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 17:49:22 +1000 Subject: [PATCH 08/48] ArithmeticEngine successfully working! --- .../casting/arithmetic/TripleIterable.java | 43 +++++++++++++ .../arithmetic/engine/ArithmeticEngine.java | 35 +++++++++-- .../engine/InvalidOperatorException.java | 18 ++++++ .../engine/NoOperatorCandidatesException.java | 23 +++++++ .../arithmetic/impls/DoubleArithmetic.java | 32 ++++++---- .../arithmetic/impls/Vec3Arithmetic.java | 52 +++++++++++----- .../casting/arithmetic/operator/Operator.java | 3 +- .../arithmetic/operator/OperatorBinary.java | 5 +- .../arithmetic/operator/OperatorPack.java | 8 ++- .../arithmetic/operator/OperatorUnary.java | 5 +- .../arithmetic/operator/OperatorUnpack.java | 27 +++++++++ .../operator/OperatorVec3Delegating.java | 28 +++++---- .../hexcasting/api/casting/iota/Iota.java | 5 ++ .../api/casting/iota/PatternIota.java | 60 ++++++++++--------- .../api/casting/mishaps/MishapInvalidIotas.kt | 32 ++++++++++ .../common/lib/hex/HexArithmetics.java | 9 +++ 16 files changed, 305 insertions(+), 80 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/TripleIterable.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/InvalidOperatorException.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapInvalidIotas.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/TripleIterable.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/TripleIterable.java new file mode 100644 index 00000000..e066a106 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/TripleIterable.java @@ -0,0 +1,43 @@ +package at.petrak.hexcasting.api.casting.arithmetic; + +import org.apache.commons.lang3.function.TriFunction; +import org.jetbrains.annotations.NotNull; + +import java.util.Iterator; + +public class TripleIterable implements Iterable { + private final Iterable iterableA; + private final Iterable iterableB; + private final Iterable iterableC; + + private final TriFunction map; + + public TripleIterable(Iterable iterableA, Iterable iterableB, Iterable iterableC, TriFunction map) { + this.iterableA = iterableA; + this.iterableB = iterableB; + this.iterableC = iterableC; + this.map = map; + } + + @NotNull + @Override + public Iterator iterator() { + return new TripleIterator(); + } + + class TripleIterator implements Iterator { + private final Iterator iteratorA = iterableA.iterator(); + private final Iterator iteratorB = iterableB.iterator(); + private final Iterator iteratorC = iterableC.iterator(); + + @Override + public boolean hasNext() { + return iteratorA.hasNext() && iteratorB.hasNext() && iteratorC.hasNext(); + } + + @Override + public D next() { + return map.apply(iteratorA.next(), iteratorB.next(), iteratorC.next()); + } + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java index 7a898051..cd1cac0b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java @@ -2,8 +2,17 @@ package at.petrak.hexcasting.api.casting.arithmetic.engine; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.eval.CastingEnvironment; +import at.petrak.hexcasting.api.casting.eval.OperationResult; +import at.petrak.hexcasting.api.casting.eval.vm.CastingImage; +import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.api.casting.mishaps.Mishap; +import at.petrak.hexcasting.api.casting.mishaps.MishapInvalidOperatorArgs; +import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughArgs; +import at.petrak.hexcasting.common.lib.hex.HexEvalSounds; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; @@ -42,15 +51,33 @@ public class ArithmeticEngine { return operators.keySet(); } - public @Nullable Iota run(HexPattern operator, Stack iotas) { + @Nullable + public OperationResult operate(@NotNull HexPattern operator, @NotNull CastingEnvironment env, @NotNull CastingImage image, @NotNull SpellContinuation continuation) throws Mishap { + var stackList = image.getStack(); + var stack = new Stack(); + stack.addAll(stackList); + var startingLength = stackList.size(); + try { + var ret = run(operator, stack, startingLength); + ret.forEach(stack::add); + var image2 = image.copy(stack, image.getParenCount(), image.getParenthesized(), image.getEscapeNext(), image.getOpsConsumed() + 1, image.getUserData()); + return new OperationResult(image2, List.of(), continuation, HexEvalSounds.NORMAL_EXECUTE); + } catch (InvalidOperatorException e) { + return null; + } catch (NoOperatorCandidatesException e) { + throw new MishapInvalidOperatorArgs(e.args, e.pattern); + } + } + + public Iterable run(HexPattern operator, Stack iotas, int startingLength) throws Mishap { var candidates = operators.get(operator); if (candidates == null) - return null; // not an operator + throw new InvalidOperatorException("the pattern " + operator + " is not an operator."); // HashCons hash = new HashCons.Pattern(operator); var args = new ArrayList(candidates.arity()); for (var i = 0; i < candidates.arity(); i++) { if (iotas.isEmpty()) { - throw new IllegalStateException("Not enough args on stack for operator: " + operator); + throw new MishapNotEnoughArgs(candidates.arity, startingLength); } var iota = iotas.pop(); hash = new HashCons.Pair(iota.getType(), hash); @@ -68,7 +95,7 @@ public class ArithmeticEngine { return op; } } - throw new IllegalArgumentException("No implementation candidates for op " + candidates.pattern() + " on args: " + args); + throw new NoOperatorCandidatesException(candidates.pattern(), args, "No implementation candidates for op " + candidates.pattern() + " on args: " + args); }); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/InvalidOperatorException.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/InvalidOperatorException.java new file mode 100644 index 00000000..1d826da6 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/InvalidOperatorException.java @@ -0,0 +1,18 @@ +package at.petrak.hexcasting.api.casting.arithmetic.engine; + +public class InvalidOperatorException extends RuntimeException { + public InvalidOperatorException() { + } + + public InvalidOperatorException(String s) { + super(s); + } + + public InvalidOperatorException(String message, Throwable cause) { + super(message, cause); + } + + public InvalidOperatorException(Throwable cause) { + super(cause); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java new file mode 100644 index 00000000..479b9bd0 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java @@ -0,0 +1,23 @@ +package at.petrak.hexcasting.api.casting.arithmetic.engine; + +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.casting.math.HexPattern; + +import java.util.List; + +public class NoOperatorCandidatesException extends RuntimeException { + HexPattern pattern; + List args; + + public NoOperatorCandidatesException(HexPattern pattern, List args) { + this.pattern = pattern; + this.args = args; + } + + public NoOperatorCandidatesException(HexPattern pattern, List args, String s) { + super(s); + this.pattern = pattern; + this.args = args; + } + +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java index 1035c79d..47fe2654 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java @@ -7,16 +7,14 @@ import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; import at.petrak.hexcasting.api.casting.iota.DoubleIota; -import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; -import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import java.util.List; import java.util.function.DoubleBinaryOperator; import java.util.function.DoubleUnaryOperator; import static at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast; -import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.DOUBLE; public enum DoubleArithmetic implements Arithmetic { INSTANCE; @@ -47,16 +45,24 @@ public enum DoubleArithmetic implements Arithmetic { @Override public Operator getOperator(HexPattern pattern) { - switch (pattern) { - case ADD: return make2(Double::sum); - case SUB: return make2((p, q) -> p - q); - case MUL: return make2((p, q) -> p * q); - case DIV: return make2((p, q) -> p / q); - case ABS: return make1(Math::abs); - case POW: return make2(Math::pow); - case FLOOR: return make1(Math::floor); - case CEIL: return make1(Math::ceil); - case MOD: return make2((p, q) -> p % q); + if (pattern.equals(ADD)) { + return make2(Double::sum); + } else if (pattern.equals(SUB)) { + return make2((p, q) -> p - q); + } else if (pattern.equals(MUL)) { + return make2((p, q) -> p * q); + } else if (pattern.equals(DIV)) { + return make2((p, q) -> p / q); + } else if (pattern.equals(ABS)) { + return make1(Math::abs); + } else if (pattern.equals(POW)) { + return make2(Math::pow); + } else if (pattern.equals(FLOOR)) { + return make1(Math::floor); + } else if (pattern.equals(CEIL)) { + return make1(Math::ceil); + } else if (pattern.equals(MOD)) { + return make2((p, q) -> p % q); } return null; } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java index cb14098d..1fbd0275 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java @@ -3,11 +3,18 @@ package at.petrak.hexcasting.api.casting.arithmetic.impls; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.operator.*; +import at.petrak.hexcasting.api.casting.iota.DoubleIota; +import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; +import net.minecraft.world.phys.Vec3; import java.util.ArrayList; import java.util.List; +import java.util.function.BiFunction; +import java.util.function.Function; +import static at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast; import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; public enum Vec3Arithmetic implements Arithmetic { @@ -31,28 +38,43 @@ public enum Vec3Arithmetic implements Arithmetic { } @Override - public Iterable opTypes() { + public Iterable opTypes() { return OPS; } @Override - public Operator getOperator(Symbol name) { - switch (name.inner()) { - case "pack": return OperatorPack.INSTANCE; - case "add": return make2(name, null); - case "sub": return make2(name, null); - case "mul": return make2(name, Vec3::dot); - case "div": return make2(name, Vec3::cross); - case "abs": return make1(Vec3::len); - case "pow": return make2(name, Vec3::proj); - case "mod": return make2(name, null); + public Operator getOperator(HexPattern pattern) { + if (pattern.equals(PACK)) { + return OperatorPack.INSTANCE; + } else if (pattern.equals(UNPACK)) { + return OperatorUnpack.INSTANCE; + } else if (pattern.equals(ADD)) { + return make2Fallback(pattern); + } else if (pattern.equals(SUB)) { + return make2Fallback(pattern); + } else if (pattern.equals(MUL)) { + return make2Double(pattern, Vec3::dot); + } else if (pattern.equals(DIV)) { + return make2Vec(pattern, Vec3::cross); + } else if (pattern.equals(ABS)) { + return make1Double(Vec3::length); + } else if (pattern.equals(POW)) { + return make2Vec(pattern, (u, v) -> v.normalize().scale(u.dot(v.normalize()))); + } else if (pattern.equals(MOD)) { + return make2Fallback(pattern); } return null; } - public static OperatorUnary make1(Function op) { - return new OperatorUnary(ACCEPTS, i -> new Iota(op.apply(i.downcast(Vec3.class)))); + public static OperatorUnary make1Double(Function op) { + return new OperatorUnary(ACCEPTS, i -> new DoubleIota(op.apply(downcast(i, VEC3).getVec3()))); } - public static OperatorVec3Delegating make2(Symbol name, BiFunction op) { - return new OperatorVec3Delegating(op, name); + public static OperatorVec3Delegating make2Fallback(HexPattern pattern) { + return new OperatorVec3Delegating(null, pattern); + } + public static OperatorVec3Delegating make2Double(HexPattern pattern, BiFunction op) { + return new OperatorVec3Delegating(op.andThen(DoubleIota::new), pattern); + } + public static OperatorVec3Delegating make2Vec(HexPattern pattern, BiFunction op) { + return new OperatorVec3Delegating(op.andThen(Vec3Iota::new), pattern); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java index cd4e249c..0be915f0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java @@ -3,7 +3,6 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; -import at.petrak.hexcasting.api.casting.mishaps.MishapInvalidIota; public abstract class Operator { public final int arity; @@ -15,7 +14,7 @@ public abstract class Operator { this.accepts = accepts; } - public abstract Iota apply(Iterable iotas); + public abstract Iterable apply(Iterable iotas); @SuppressWarnings("unchecked") public static T downcast(Iota iota, IotaType iotaType) { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java index f5eb41b6..af7aff8e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java @@ -4,6 +4,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; +import java.util.List; import java.util.function.BinaryOperator; public class OperatorBinary extends Operator { @@ -15,8 +16,8 @@ public class OperatorBinary extends Operator { } @Override - public Iota apply(Iterable iotas) { + public Iterable apply(Iterable iotas) { var it = iotas.iterator(); - return inner.apply(it.next(), it.next()); + return List.of(inner.apply(it.next(), it.next())); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java index 95dc3656..4e558c7b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java @@ -8,6 +8,8 @@ import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import net.minecraft.world.phys.Vec3; +import java.util.List; + public class OperatorPack extends Operator { private OperatorPack() { super(3, IotaMultiPredicate.all(IotaPredicate.ofType(HexIotaTypes.DOUBLE))); @@ -16,12 +18,12 @@ public class OperatorPack extends Operator { public static OperatorPack INSTANCE = new OperatorPack(); @Override - public Iota apply(Iterable iotas) { + public Iterable apply(Iterable iotas) { var it = iotas.iterator(); - return new Vec3Iota(new Vec3( + return List.of(new Vec3Iota(new Vec3( downcast(it.next(), HexIotaTypes.DOUBLE).getDouble(), downcast(it.next(), HexIotaTypes.DOUBLE).getDouble(), downcast(it.next(), HexIotaTypes.DOUBLE).getDouble() - )); + ))); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java index 550848ee..8ea1fa2a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java @@ -4,6 +4,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; +import java.util.List; import java.util.function.UnaryOperator; public class OperatorUnary extends Operator { @@ -15,7 +16,7 @@ public class OperatorUnary extends Operator { } @Override - public Iota apply(Iterable iotas) { - return inner.apply(iotas.iterator().next()); + public Iterable apply(Iterable iotas) { + return List.of(inner.apply(iotas.iterator().next())); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java new file mode 100644 index 00000000..b1faf7f0 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java @@ -0,0 +1,27 @@ +package at.petrak.hexcasting.api.casting.arithmetic.operator; + + +import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.iota.DoubleIota; +import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; + +import java.util.List; + +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.VEC3; + +public class OperatorUnpack extends Operator { + private OperatorUnpack() { + super(1, IotaMultiPredicate.all(IotaPredicate.ofType(HexIotaTypes.DOUBLE))); + } + + public static OperatorUnpack INSTANCE = new OperatorUnpack(); + + @Override + public Iterable apply(Iterable iotas) { + var it = iotas.iterator(); + var vec = downcast(it.next(), VEC3).getVec3(); + return List.of(new DoubleIota(vec.x), new DoubleIota(vec.y), new DoubleIota(vec.z)); + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java index e0bec5b6..54cb332e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java @@ -3,42 +3,46 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; import at.petrak.hexcasting.api.casting.arithmetic.IterPair; +import at.petrak.hexcasting.api.casting.arithmetic.TripleIterable; import at.petrak.hexcasting.api.casting.arithmetic.impls.DoubleArithmetic; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; -import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; -import kotlin.Pair; import net.minecraft.world.phys.Vec3; +import java.util.List; import java.util.Objects; import java.util.function.BiFunction; +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.DOUBLE; +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.VEC3; + public class OperatorVec3Delegating extends Operator { private final BiFunction op; private final Operator fb; public OperatorVec3Delegating(BiFunction core, HexPattern fallback) { - super(2, IotaMultiPredicate.any(IotaPredicate.ofType(HexIotaTypes.VEC3), IotaPredicate.ofType(HexIotaTypes.DOUBLE))); + super(2, IotaMultiPredicate.any(IotaPredicate.ofType(VEC3), IotaPredicate.ofType(DOUBLE))); op = core; fb = Objects.requireNonNull(DoubleArithmetic.INSTANCE.getOperator(fallback)); } @Override - public Iota apply(Iterable iotas) { + public Iterable apply(Iterable iotas) { var it = iotas.iterator(); var left = it.next(); var right = it.next(); if (op != null && left instanceof Vec3Iota lh && right instanceof Vec3Iota rh) { - return op.apply(lh.getVec3(), rh.getVec3()); + return List.of(op.apply(lh.getVec3(), rh.getVec3())); } - var lh = left instanceof Vec3Iota l ? l.getVec3() : triplicate(downcast(left, HexIotaTypes.DOUBLE).getDouble()); - var rh = right instanceof Vec3Iota r ? r.getVec3() : triplicate(downcast(right, HexIotaTypes.DOUBLE).getDouble()); - return new Vec3Iota(new Vec3( - downcast(fb.apply(new IterPair<>(new DoubleIota(lh.x()), new DoubleIota(rh.x()))), HexIotaTypes.DOUBLE).getDouble(), - downcast(fb.apply(new IterPair<>(new DoubleIota(lh.y()), new DoubleIota(rh.y()))), HexIotaTypes.DOUBLE).getDouble(), - downcast(fb.apply(new IterPair<>(new DoubleIota(lh.z()), new DoubleIota(rh.z()))), HexIotaTypes.DOUBLE).getDouble() - )); + var lh = left instanceof Vec3Iota l ? l.getVec3() : triplicate(downcast(left, DOUBLE).getDouble()); + var rh = right instanceof Vec3Iota r ? r.getVec3() : triplicate(downcast(right, DOUBLE).getDouble()); + return new TripleIterable<>( + fb.apply(new IterPair<>(new DoubleIota(lh.x()), new DoubleIota(rh.x()))), + fb.apply(new IterPair<>(new DoubleIota(lh.y()), new DoubleIota(rh.y()))), + fb.apply(new IterPair<>(new DoubleIota(lh.z()), new DoubleIota(rh.z()))), + (x, y, z) -> new Vec3Iota(new Vec3(downcast(x, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble())) + ); } public static Vec3 triplicate(double in) { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java index de3d6b30..fb625e46 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java @@ -97,4 +97,9 @@ public abstract class Iota { public static boolean tolerates(Iota a, Iota b) { return a.toleratesOther(b) || b.toleratesOther(a); } + + @Override + public int hashCode() { + return payload.hashCode(); + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java index 18b94041..47c9e28e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java @@ -17,6 +17,7 @@ import at.petrak.hexcasting.api.mod.HexConfig; import at.petrak.hexcasting.api.mod.HexTags; import at.petrak.hexcasting.api.utils.HexUtils; import at.petrak.hexcasting.common.casting.PatternRegistryManifest; +import at.petrak.hexcasting.common.lib.hex.HexArithmetics; import at.petrak.hexcasting.common.lib.hex.HexEvalSounds; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import at.petrak.hexcasting.xplat.IXplatAbstractions; @@ -68,38 +69,43 @@ public class PatternIota extends Iota { public @NotNull CastResult execute(CastingVM vm, ServerLevel world, SpellContinuation continuation) { @Nullable Component castedName = null; try { - var lookup = PatternRegistryManifest.matchPattern(this.getPattern(), world, false); - vm.getEnv().precheckAction(lookup); + var result = HexArithmetics.ENGINE.operate(this.getPattern(), vm.getEnv(), vm.getImage(), continuation); - Action action; - if (lookup instanceof PatternShapeMatch.Normal || lookup instanceof PatternShapeMatch.PerWorld) { - ResourceKey key; - if (lookup instanceof PatternShapeMatch.Normal normal) { - key = normal.key; - } else { - PatternShapeMatch.PerWorld perWorld = (PatternShapeMatch.PerWorld) lookup; - key = perWorld.key; - } + if (result == null) { + var lookup = PatternRegistryManifest.matchPattern(this.getPattern(), world, false); + vm.getEnv().precheckAction(lookup); - var reqsEnlightenment = isOfTag(IXplatAbstractions.INSTANCE.getActionRegistry(), key, - HexTags.Actions.REQUIRES_ENLIGHTENMENT); + Action action; + if (lookup instanceof PatternShapeMatch.Normal || lookup instanceof PatternShapeMatch.PerWorld) { + ResourceKey key; + if (lookup instanceof PatternShapeMatch.Normal normal) { + key = normal.key; + } else { + PatternShapeMatch.PerWorld perWorld = (PatternShapeMatch.PerWorld) lookup; + key = perWorld.key; + } - castedName = HexAPI.instance().getActionI18n(key, reqsEnlightenment); + var reqsEnlightenment = isOfTag(IXplatAbstractions.INSTANCE.getActionRegistry(), key, + HexTags.Actions.REQUIRES_ENLIGHTENMENT); - action = Objects.requireNonNull(IXplatAbstractions.INSTANCE.getActionRegistry().get(key)).action(); - } else if (lookup instanceof PatternShapeMatch.Special special) { - castedName = special.handler.getName(); - action = special.handler.act(); - } else if (lookup instanceof PatternShapeMatch.Nothing) { - throw new MishapInvalidPattern(); - } else throw new IllegalStateException(); + castedName = HexAPI.instance().getActionI18n(key, reqsEnlightenment); + + action = Objects.requireNonNull(IXplatAbstractions.INSTANCE.getActionRegistry().get(key)).action(); + } else if (lookup instanceof PatternShapeMatch.Special special) { + castedName = special.handler.getName(); + action = special.handler.act(); + } else if (lookup instanceof PatternShapeMatch.Nothing) { + throw new MishapInvalidPattern(); + } else throw new IllegalStateException(); + + // do the actual calculation!! + result = action.operate( + vm.getEnv(), + vm.getImage(), + continuation + ); + } - // do the actual calculation!! - var result = action.operate( - vm.getEnv(), - vm.getImage(), - continuation - ); if (result.getNewImage().getOpsConsumed() > HexConfig.server().maxOpCount()) { throw new MishapEvalTooMuch(); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapInvalidIotas.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapInvalidIotas.kt new file mode 100644 index 00000000..34a13f7a --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapInvalidIotas.kt @@ -0,0 +1,32 @@ +package at.petrak.hexcasting.api.casting.mishaps + +import at.petrak.hexcasting.api.casting.eval.CastingEnvironment +import at.petrak.hexcasting.api.casting.iota.GarbageIota +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.api.pigment.FrozenPigment +import net.minecraft.network.chat.ComponentContents +import net.minecraft.network.chat.MutableComponent +import net.minecraft.world.item.DyeColor + +/** + * The value failed some kind of predicate. + */ +class MishapInvalidOperatorArgs( + val perpetrators: List, + val operator: HexPattern +) : Mishap() { + override fun accentColor(ctx: CastingEnvironment, errorCtx: Context): FrozenPigment = + dyeColor(DyeColor.GRAY) + + override fun execute(ctx: CastingEnvironment, errorCtx: Context, stack: MutableList) { + for (i in perpetrators.indices) { + stack[stack.size - 1 - i] = GarbageIota() + } + } + + override fun errorMessage(ctx: CastingEnvironment, errorCtx: Context) = + error( + "invalid_operator_args", operator, perpetrators.fold(MutableComponent.create(ComponentContents.EMPTY)) { mc, iota -> mc.append(iota.display()) } + ) +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java new file mode 100644 index 00000000..8f283e19 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java @@ -0,0 +1,9 @@ +package at.petrak.hexcasting.common.lib.hex; + +import at.petrak.hexcasting.api.casting.arithmetic.engine.ArithmeticEngine; +import at.petrak.hexcasting.api.casting.arithmetic.impls.DoubleArithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.impls.Vec3Arithmetic; + +public class HexArithmetics { + public static ArithmeticEngine ENGINE = new ArithmeticEngine(DoubleArithmetic.INSTANCE, Vec3Arithmetic.INSTANCE); +} From cf91914f520b392cddeb8fe452f7107b8ce317eb Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 18:01:29 +1000 Subject: [PATCH 09/48] make ArithmeticEngine take a list --- .../api/casting/arithmetic/Arithmetic.java | 28 +++++++++---------- .../arithmetic/engine/ArithmeticEngine.java | 4 +-- .../common/lib/hex/HexArithmetics.java | 4 ++- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java index 1adbd44a..d345f492 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -5,21 +5,21 @@ import at.petrak.hexcasting.api.casting.math.HexDir; import at.petrak.hexcasting.api.casting.math.HexPattern; public interface Arithmetic { - public String arithName(); + String arithName(); - public abstract Iterable opTypes(); + Iterable opTypes(); - public abstract Operator getOperator(HexPattern pattern); + Operator getOperator(HexPattern pattern); - public static HexPattern ADD = HexPattern.fromAngles("waaw", HexDir.NORTH_EAST); - public static HexPattern SUB = HexPattern.fromAngles("wddw", HexDir.NORTH_WEST); - public static HexPattern MUL = HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST); - public static HexPattern DIV = HexPattern.fromAngles("wdedw", HexDir.NORTH_EAST); - public static HexPattern ABS = HexPattern.fromAngles("wqaqw", HexDir.NORTH_EAST); - public static HexPattern POW = HexPattern.fromAngles("wedew", HexDir.NORTH_WEST); - public static HexPattern FLOOR = HexPattern.fromAngles("ewq", HexDir.EAST); - public static HexPattern CEIL = HexPattern.fromAngles("qwe", HexDir.EAST); - public static HexPattern MOD = HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST); - public static HexPattern PACK = HexPattern.fromAngles("eqqqqq", HexDir.EAST); - public static HexPattern UNPACK = HexPattern.fromAngles("qeeeee", HexDir.EAST); + HexPattern ADD = HexPattern.fromAngles("waaw", HexDir.NORTH_EAST); + HexPattern SUB = HexPattern.fromAngles("wddw", HexDir.NORTH_WEST); + HexPattern MUL = HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST); + HexPattern DIV = HexPattern.fromAngles("wdedw", HexDir.NORTH_EAST); + HexPattern ABS = HexPattern.fromAngles("wqaqw", HexDir.NORTH_EAST); + HexPattern POW = HexPattern.fromAngles("wedew", HexDir.NORTH_WEST); + HexPattern FLOOR = HexPattern.fromAngles("ewq", HexDir.EAST); + HexPattern CEIL = HexPattern.fromAngles("qwe", HexDir.EAST); + HexPattern MOD = HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST); + HexPattern PACK = HexPattern.fromAngles("eqqqqq", HexDir.EAST); + HexPattern UNPACK = HexPattern.fromAngles("qeeeee", HexDir.EAST); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java index cd1cac0b..4fa1de0f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java @@ -31,8 +31,8 @@ public class ArithmeticEngine { private final Map operators = new HashMap<>(); private final Map cache = new HashMap<>(); - public ArithmeticEngine(Arithmetic... arithmetics) { - this.arithmetics = arithmetics; + public ArithmeticEngine(List arithmetics) { + this.arithmetics = arithmetics.toArray(new Arithmetic[0]); for (var arith : arithmetics) { for (var op : arith.opTypes()) { operators.compute(op, ($, info) -> { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java index 8f283e19..ab837c77 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java @@ -4,6 +4,8 @@ import at.petrak.hexcasting.api.casting.arithmetic.engine.ArithmeticEngine; import at.petrak.hexcasting.api.casting.arithmetic.impls.DoubleArithmetic; import at.petrak.hexcasting.api.casting.arithmetic.impls.Vec3Arithmetic; +import java.util.List; + public class HexArithmetics { - public static ArithmeticEngine ENGINE = new ArithmeticEngine(DoubleArithmetic.INSTANCE, Vec3Arithmetic.INSTANCE); + public static ArithmeticEngine ENGINE = new ArithmeticEngine(List.of(DoubleArithmetic.INSTANCE, Vec3Arithmetic.INSTANCE)); } From 24dcfb414bdf72651602dc3fe6010f3435f9b5e4 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 18:11:37 +1000 Subject: [PATCH 10/48] swapped ArithmeticEngine access to a new castable called OperationAction so that they can use the existing systems for rendering patterns in the patchouli book. --- .../arithmetic/engine/ArithmeticEngine.java | 26 ---------------- .../engine/NoOperatorCandidatesException.java | 17 ++++++++++ .../api/casting/castables/OperationAction.kt | 31 +++++++++++++++++++ .../api/casting/iota/PatternIota.java | 4 +-- .../hexcasting/common/lib/hex/HexActions.java | 30 ++++++++++++------ 5 files changed, 70 insertions(+), 38 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java index 4fa1de0f..73ed333b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java @@ -2,18 +2,10 @@ package at.petrak.hexcasting.api.casting.arithmetic.engine; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; -import at.petrak.hexcasting.api.casting.eval.CastingEnvironment; -import at.petrak.hexcasting.api.casting.eval.OperationResult; -import at.petrak.hexcasting.api.casting.eval.vm.CastingImage; -import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; import at.petrak.hexcasting.api.casting.mishaps.Mishap; -import at.petrak.hexcasting.api.casting.mishaps.MishapInvalidOperatorArgs; import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughArgs; -import at.petrak.hexcasting.common.lib.hex.HexEvalSounds; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.util.*; @@ -51,24 +43,6 @@ public class ArithmeticEngine { return operators.keySet(); } - @Nullable - public OperationResult operate(@NotNull HexPattern operator, @NotNull CastingEnvironment env, @NotNull CastingImage image, @NotNull SpellContinuation continuation) throws Mishap { - var stackList = image.getStack(); - var stack = new Stack(); - stack.addAll(stackList); - var startingLength = stackList.size(); - try { - var ret = run(operator, stack, startingLength); - ret.forEach(stack::add); - var image2 = image.copy(stack, image.getParenCount(), image.getParenthesized(), image.getEscapeNext(), image.getOpsConsumed() + 1, image.getUserData()); - return new OperationResult(image2, List.of(), continuation, HexEvalSounds.NORMAL_EXECUTE); - } catch (InvalidOperatorException e) { - return null; - } catch (NoOperatorCandidatesException e) { - throw new MishapInvalidOperatorArgs(e.args, e.pattern); - } - } - public Iterable run(HexPattern operator, Stack iotas, int startingLength) throws Mishap { var candidates = operators.get(operator); if (candidates == null) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java index 479b9bd0..5b742fc1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/NoOperatorCandidatesException.java @@ -20,4 +20,21 @@ public class NoOperatorCandidatesException extends RuntimeException { this.args = args; } + public HexPattern getPattern() { + return pattern; + } + + public HexPattern setPattern(HexPattern pattern) { + this.pattern = pattern; + return this.pattern; + } + + public List getArgs() { + return args; + } + + public List setArgs(List args) { + this.args = args; + return this.args; + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt new file mode 100644 index 00000000..5667b2f3 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt @@ -0,0 +1,31 @@ +package at.petrak.hexcasting.api.casting.castables + +import at.petrak.hexcasting.api.casting.arithmetic.engine.NoOperatorCandidatesException +import at.petrak.hexcasting.api.casting.eval.CastingEnvironment +import at.petrak.hexcasting.api.casting.eval.OperationResult +import at.petrak.hexcasting.api.casting.eval.vm.CastingImage +import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.api.casting.mishaps.MishapInvalidOperatorArgs +import at.petrak.hexcasting.common.lib.hex.HexArithmetics +import at.petrak.hexcasting.common.lib.hex.HexEvalSounds +import java.util.* +import java.util.function.Consumer + +data class OperationAction(val pattern: HexPattern) : Action { + override fun operate(env: CastingEnvironment, image: CastingImage, continuation: SpellContinuation): OperationResult { + val stackList = image.stack + val stack = Stack() + stack.addAll(stackList) + val startingLength = stackList.size + return try { + val ret: Iterable = HexArithmetics.ENGINE.run(pattern, stack, startingLength) + ret.forEach(Consumer { e: Iota -> stack.add(e) }) + val image2 = image.copy(stack = stack, opsConsumed = image.opsConsumed + 1) + OperationResult(image2, listOf(), continuation, HexEvalSounds.NORMAL_EXECUTE) + } catch (e: NoOperatorCandidatesException) { + throw MishapInvalidOperatorArgs(e.args, e.pattern) + } + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java index 47c9e28e..c0d84221 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/PatternIota.java @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.casting.ActionRegistryEntry; import at.petrak.hexcasting.api.casting.PatternShapeMatch; import at.petrak.hexcasting.api.casting.castables.Action; import at.petrak.hexcasting.api.casting.eval.CastResult; +import at.petrak.hexcasting.api.casting.eval.OperationResult; import at.petrak.hexcasting.api.casting.eval.ResolvedPatternType; import at.petrak.hexcasting.api.casting.eval.sideeffects.OperatorSideEffect; import at.petrak.hexcasting.api.casting.eval.vm.CastingVM; @@ -17,7 +18,6 @@ import at.petrak.hexcasting.api.mod.HexConfig; import at.petrak.hexcasting.api.mod.HexTags; import at.petrak.hexcasting.api.utils.HexUtils; import at.petrak.hexcasting.common.casting.PatternRegistryManifest; -import at.petrak.hexcasting.common.lib.hex.HexArithmetics; import at.petrak.hexcasting.common.lib.hex.HexEvalSounds; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import at.petrak.hexcasting.xplat.IXplatAbstractions; @@ -69,7 +69,7 @@ public class PatternIota extends Iota { public @NotNull CastResult execute(CastingVM vm, ServerLevel world, SpellContinuation continuation) { @Nullable Component castedName = null; try { - var result = HexArithmetics.ENGINE.operate(this.getPattern(), vm.getEnv(), vm.getImage(), continuation); + OperationResult result = null; // HexArithmetics.ENGINE.operate(this.getPattern(), vm.getEnv(), vm.getImage(), continuation); if (result == null) { var lookup = PatternRegistryManifest.matchPattern(this.getPattern(), world, false); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index 877a0a27..78ec54b9 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -2,6 +2,7 @@ package at.petrak.hexcasting.common.lib.hex; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; import at.petrak.hexcasting.api.casting.castables.Action; +import at.petrak.hexcasting.api.casting.castables.OperationAction; import at.petrak.hexcasting.api.casting.iota.BooleanIota; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.NullIota; @@ -140,26 +141,26 @@ public class HexActions { // == Math == public static final ActionRegistryEntry ADD = make("add", - new ActionRegistryEntry(HexPattern.fromAngles("waaw", HexDir.NORTH_EAST), OpAdd.INSTANCE)); + new OperationAction(HexPattern.fromAngles("waaw", HexDir.NORTH_EAST))); public static final ActionRegistryEntry SUB = make("sub", - new ActionRegistryEntry(HexPattern.fromAngles("wddw", HexDir.NORTH_WEST), OpSub.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wddw", HexDir.NORTH_WEST))); public static final ActionRegistryEntry MUL_DOT = make("mul_dot", - new ActionRegistryEntry(HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST), OpMulDot.INSTANCE)); + new OperationAction(HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST))); public static final ActionRegistryEntry DIV_CROSS = make("div_cross", - new ActionRegistryEntry(HexPattern.fromAngles("wdedw", HexDir.NORTH_EAST), OpDivCross.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wdedw", HexDir.NORTH_EAST))); public static final ActionRegistryEntry ABS_LEN = make("abs_len", - new ActionRegistryEntry(HexPattern.fromAngles("wqaqw", HexDir.NORTH_EAST), OpAbsLen.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wqaqw", HexDir.NORTH_EAST))); public static final ActionRegistryEntry POW_PROJ = make("pow_proj", - new ActionRegistryEntry(HexPattern.fromAngles("wedew", HexDir.NORTH_WEST), OpPowProj.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wedew", HexDir.NORTH_WEST))); public static final ActionRegistryEntry FLOOR = make("floor", - new ActionRegistryEntry(HexPattern.fromAngles("ewq", HexDir.EAST), OpFloor.INSTANCE)); + new OperationAction(HexPattern.fromAngles("ewq", HexDir.EAST))); public static final ActionRegistryEntry CEIL = make("ceil", - new ActionRegistryEntry(HexPattern.fromAngles("qwe", HexDir.EAST), OpCeil.INSTANCE)); + new OperationAction(HexPattern.fromAngles("qwe", HexDir.EAST))); public static final ActionRegistryEntry CONSTRUCT_VEC = make("construct_vec", - new ActionRegistryEntry(HexPattern.fromAngles("eqqqqq", HexDir.EAST), OpConstructVec.INSTANCE)); + new OperationAction(HexPattern.fromAngles("eqqqqq", HexDir.EAST))); public static final ActionRegistryEntry DECONSTRUCT_VEC = make("deconstruct_vec", - new ActionRegistryEntry(HexPattern.fromAngles("qeeeee", HexDir.EAST), OpDeconstructVec.INSTANCE)); + new OperationAction(HexPattern.fromAngles("qeeeee", HexDir.EAST))); public static final ActionRegistryEntry COERCE_AXIAL = make("coerce_axial", new ActionRegistryEntry(HexPattern.fromAngles("qqqqqaww", HexDir.NORTH_WEST), OpCoerceToAxial.INSTANCE)); @@ -580,6 +581,15 @@ public class HexActions { return are; } + public static ActionRegistryEntry make(String name, OperationAction oa) { + var are = new ActionRegistryEntry(oa.getPattern(), oa); + var old = ACTIONS.put(modLoc(name), are); + if (old != null) { + throw new IllegalArgumentException("Typo? Duplicate id " + name); + } + return are; + } + public static void register(BiConsumer r) { for (var e : ACTIONS.entrySet()) { r.accept(e.getValue(), e.getKey()); From e67c61a23e1356f8f5deed7bffbf20c43be5772d Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 18:40:44 +1000 Subject: [PATCH 11/48] started making list ops, about to come up with new patterns for things --- .../api/casting/arithmetic/Arithmetic.java | 8 ++++ .../arithmetic/impls/ListArithmetic.java | 37 +++++++++++++++++++ .../operator/OperatorVec3Delegating.java | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java index d345f492..7e2ee6d5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -22,4 +22,12 @@ public interface Arithmetic { HexPattern MOD = HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST); HexPattern PACK = HexPattern.fromAngles("eqqqqq", HexDir.EAST); HexPattern UNPACK = HexPattern.fromAngles("qeeeee", HexDir.EAST); + + // Lists + HexPattern INDEX = HexPattern.fromAngles("deeed", HexDir.NORTH_WEST); + HexPattern SLICE = HexPattern.fromAngles("qaeaqwded", HexDir.NORTH_WEST); + HexPattern REV = HexPattern.fromAngles("qqqaede", HexDir.EAST); + HexPattern INDEX_OF = HexPattern.fromAngles("dedqde", HexDir.EAST); + HexPattern REMOVE = HexPattern.fromAngles("edqdewaqa", HexDir.SOUTH_WEST); + HexPattern REPLACE = HexPattern.fromAngles("wqaeaqw", HexDir.NORTH_WEST); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java new file mode 100644 index 00000000..0d9549b2 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java @@ -0,0 +1,37 @@ +package at.petrak.hexcasting.api.casting.arithmetic.impls; + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.math.HexPattern; + +import java.util.List; + +public enum ListArithmetic implements Arithmetic { + INSTANCE; + + public static final List OPS = List.of( + INDEX, + SLICE, + ADD, + ABS, + REV, + INDEX_OF, + REMOVE, + REPLACE + ); + + @Override + public String arithName() { + return null; + } + + @Override + public Iterable opTypes() { + return null; + } + + @Override + public Operator getOperator(HexPattern pattern) { + return null; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java index 54cb332e..511f05e2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java @@ -41,7 +41,7 @@ public class OperatorVec3Delegating extends Operator { fb.apply(new IterPair<>(new DoubleIota(lh.x()), new DoubleIota(rh.x()))), fb.apply(new IterPair<>(new DoubleIota(lh.y()), new DoubleIota(rh.y()))), fb.apply(new IterPair<>(new DoubleIota(lh.z()), new DoubleIota(rh.z()))), - (x, y, z) -> new Vec3Iota(new Vec3(downcast(x, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble())) + (x, y, z) -> new Vec3Iota(new Vec3(downcast(x, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble(), downcast(z, DOUBLE).getDouble())) ); } From 07cc51871959e514af7de2bee2cf13297104e468 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 20:17:04 +1000 Subject: [PATCH 12/48] partway through getting a bunch of list stuff converted to Operators. --- .../{OperatorUtils.kt => ActionUtils.kt} | 0 .../api/casting/arithmetic/Arithmetic.java | 4 + .../arithmetic/impls/ListArithmetic.java | 37 --------- .../casting/arithmetic/operator/Operator.java | 2 +- .../arithmetic/operator/OperatorBinary.java | 2 +- .../arithmetic/operator/OperatorUnary.java | 2 +- .../{ => predicates}/IotaMultiPredicate.java | 18 ++++- .../{ => predicates}/IotaPredicate.java | 4 +- .../casting/arithmetic}/DoubleArithmetic.java | 6 +- .../casting/arithmetic/ListArithmetic.java | 75 +++++++++++++++++++ .../casting/arithmetic}/Vec3Arithmetic.java | 9 ++- .../arithmetic/operator/OperatorUtils.kt | 30 ++++++++ .../operator/list/OperatorAppend.kt | 18 +++++ .../operator/list/OperatorConcat.kt | 19 +++++ .../arithmetic/operator/list/OperatorIndex.kt | 19 +++++ .../arithmetic/operator/list/OperatorSlice.kt | 25 +++++++ .../operator/list/OperatorUnappend.kt | 19 +++++ .../operator/vec}/OperatorPack.java | 7 +- .../operator/vec}/OperatorUnpack.java | 7 +- .../operator/vec}/OperatorVec3Delegating.java | 9 ++- .../common/lib/hex/HexArithmetics.java | 7 +- 21 files changed, 255 insertions(+), 64 deletions(-) rename Common/src/main/java/at/petrak/hexcasting/api/casting/{OperatorUtils.kt => ActionUtils.kt} (100%) delete mode 100644 Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java rename Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/{ => predicates}/IotaMultiPredicate.java (61%) rename Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/{ => predicates}/IotaPredicate.java (87%) rename Common/src/main/java/at/petrak/hexcasting/{api/casting/arithmetic/impls => common/casting/arithmetic}/DoubleArithmetic.java (91%) create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.java rename Common/src/main/java/at/petrak/hexcasting/{api/casting/arithmetic/impls => common/casting/arithmetic}/Vec3Arithmetic.java (84%) create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorAppend.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndex.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorSlice.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnappend.kt rename Common/src/main/java/at/petrak/hexcasting/{api/casting/arithmetic/operator => common/casting/arithmetic/operator/vec}/OperatorPack.java (71%) rename Common/src/main/java/at/petrak/hexcasting/{api/casting/arithmetic/operator => common/casting/arithmetic/operator/vec}/OperatorUnpack.java (70%) rename Common/src/main/java/at/petrak/hexcasting/{api/casting/arithmetic/operator => common/casting/arithmetic/operator/vec}/OperatorVec3Delegating.java (84%) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/OperatorUtils.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/ActionUtils.kt similarity index 100% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/OperatorUtils.kt rename to Common/src/main/java/at/petrak/hexcasting/api/casting/ActionUtils.kt diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java index 7e2ee6d5..8e36ee6e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -26,8 +26,12 @@ public interface Arithmetic { // Lists HexPattern INDEX = HexPattern.fromAngles("deeed", HexDir.NORTH_WEST); HexPattern SLICE = HexPattern.fromAngles("qaeaqwded", HexDir.NORTH_WEST); + HexPattern APPEND = HexPattern.fromAngles("edqde", HexDir.SOUTH_WEST); + HexPattern UNAPPEND = HexPattern.fromAngles("qaeaq", HexDir.NORTH_WEST); HexPattern REV = HexPattern.fromAngles("qqqaede", HexDir.EAST); HexPattern INDEX_OF = HexPattern.fromAngles("dedqde", HexDir.EAST); HexPattern REMOVE = HexPattern.fromAngles("edqdewaqa", HexDir.SOUTH_WEST); HexPattern REPLACE = HexPattern.fromAngles("wqaeaqw", HexDir.NORTH_WEST); + HexPattern CONS = HexPattern.fromAngles("ddewedd", HexDir.SOUTH_EAST); + HexPattern UNCONS = HexPattern.fromAngles("aaqwqaa", HexDir.SOUTH_WEST); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java deleted file mode 100644 index 0d9549b2..00000000 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/ListArithmetic.java +++ /dev/null @@ -1,37 +0,0 @@ -package at.petrak.hexcasting.api.casting.arithmetic.impls; - -import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; -import at.petrak.hexcasting.api.casting.math.HexPattern; - -import java.util.List; - -public enum ListArithmetic implements Arithmetic { - INSTANCE; - - public static final List OPS = List.of( - INDEX, - SLICE, - ADD, - ABS, - REV, - INDEX_OF, - REMOVE, - REPLACE - ); - - @Override - public String arithName() { - return null; - } - - @Override - public Iterable opTypes() { - return null; - } - - @Override - public Operator getOperator(HexPattern pattern) { - return null; - } -} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java index 0be915f0..6fcbaae8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java @@ -1,6 +1,6 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java index af7aff8e..975924d7 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java @@ -1,7 +1,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; import java.util.List; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java index 8ea1fa2a..5fc8cd61 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java @@ -1,7 +1,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; import java.util.List; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java similarity index 61% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java rename to Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java index 8f9ea2dc..3ec5b5ea 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaMultiPredicate.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.api.casting.arithmetic; +package at.petrak.hexcasting.api.casting.arithmetic.predicates; import at.petrak.hexcasting.api.casting.iota.Iota; @@ -9,19 +9,29 @@ public interface IotaMultiPredicate { static IotaMultiPredicate all(IotaPredicate child) { return new All(child); } - static IotaMultiPredicate bofa(IotaPredicate first, IotaPredicate second) { - return new Any(first, second); + static IotaMultiPredicate pair(IotaPredicate first, IotaPredicate second) { + return new Pair(first, second); + } + static IotaMultiPredicate triple(IotaPredicate first, IotaPredicate second, IotaPredicate third) { + return new Triple(first, second, third); } static IotaMultiPredicate any(IotaPredicate needs, IotaPredicate fallback) { return new Any(needs, fallback); } - record Bofa(IotaPredicate first, IotaPredicate second) implements IotaMultiPredicate { + record Pair(IotaPredicate first, IotaPredicate second) implements IotaMultiPredicate { @Override public boolean test(Iterable iotas) { var it = iotas.iterator(); return it.hasNext() && first.test(it.next()) && it.hasNext() && second.test(it.next()) && !it.hasNext(); } } + record Triple(IotaPredicate first, IotaPredicate second, IotaPredicate third) implements IotaMultiPredicate { + @Override + public boolean test(Iterable iotas) { + var it = iotas.iterator(); + return it.hasNext() && first.test(it.next()) && it.hasNext() && second.test(it.next()) && it.hasNext() && third.test(it.next()) && !it.hasNext(); + } + } record Any(IotaPredicate needs, IotaPredicate fallback) implements IotaMultiPredicate { @Override public boolean test(Iterable iotas) { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java similarity index 87% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java rename to Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java index 635869f9..b91d2265 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/IotaPredicate.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.api.casting.arithmetic; +package at.petrak.hexcasting.api.casting.arithmetic.predicates; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; @@ -28,4 +28,6 @@ public interface IotaPredicate { return iota.getType().equals(this.type); } } + + IotaPredicate TRUE = iota -> true; } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java index 47fe2654..34e4bbfe 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/DoubleArithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java @@ -1,8 +1,8 @@ -package at.petrak.hexcasting.api.casting.arithmetic.impls; +package at.petrak.hexcasting.common.casting.arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.java new file mode 100644 index 00000000..1e1847f0 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.java @@ -0,0 +1,75 @@ +package at.petrak.hexcasting.common.casting.arithmetic; + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.iota.DoubleIota; +import at.petrak.hexcasting.api.casting.iota.ListIota; +import at.petrak.hexcasting.common.casting.arithmetic.operator.list.*; +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; +import at.petrak.hexcasting.api.casting.math.HexPattern; + +import java.util.List; + +import static at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast; +import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; + +public enum ListArithmetic implements Arithmetic { + INSTANCE; + + public static final List OPS = List.of( + INDEX, + SLICE, + APPEND, + UNAPPEND, + ADD, + ABS, + REV, + INDEX_OF, + REMOVE, + REPLACE, + CONS, + UNCONS + ); + + @Override + public String arithName() { + return "list_ops"; + } + + @Override + public Iterable opTypes() { + return OPS; + } + + @Override + public Operator getOperator(HexPattern pattern) { + if (pattern.equals(INDEX)) { + return OperatorIndex.INSTANCE; + } else if (pattern.equals(SLICE)) { + return OperatorSlice.INSTANCE; + } else if (pattern.equals(APPEND)) { + return OperatorAppend.INSTANCE; + } else if (pattern.equals(UNAPPEND)) { + return OperatorUnappend.INSTANCE; + } else if (pattern.equals(ADD)) { + return OperatorConcat.INSTANCE; + } else if (pattern.equals(ABS)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> new DoubleIota(downcast(iota, LIST).getList().size())); + } else if (pattern.equals(REV)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> new ListIota(downcast(iota, LIST).getList())); + } else if (pattern.equals(INDEX_OF)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); + } else if (pattern.equals(REMOVE)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); + } else if (pattern.equals(REPLACE)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); + } else if (pattern.equals(CONS)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); + } else if (pattern.equals(UNCONS)) { + return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); + } + return null; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java similarity index 84% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java index 1fbd0275..e125a869 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/impls/Vec3Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java @@ -1,12 +1,15 @@ -package at.petrak.hexcasting.api.casting.arithmetic.impls; +package at.petrak.hexcasting.common.casting.arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; import at.petrak.hexcasting.api.casting.arithmetic.operator.*; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.common.casting.arithmetic.operator.vec.OperatorPack; +import at.petrak.hexcasting.common.casting.arithmetic.operator.vec.OperatorUnpack; +import at.petrak.hexcasting.common.casting.arithmetic.operator.vec.OperatorVec3Delegating; import net.minecraft.world.phys.Vec3; import java.util.ArrayList; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt new file mode 100644 index 00000000..89798afa --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt @@ -0,0 +1,30 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator + +import at.petrak.hexcasting.api.casting.SpellList +import at.petrak.hexcasting.api.casting.iota.DoubleIota +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.iota.ListIota +import at.petrak.hexcasting.api.casting.mishaps.MishapInvalidIota +import kotlin.math.abs +import kotlin.math.roundToInt + +fun Iterator>.nextList(argc: Int = 0): SpellList { + val (idx, x) = this.next() + if (x is ListIota) { + return x.list + } else { + throw MishapInvalidIota.ofType(x, if (argc == 0) idx else argc - (idx + 1), "list") + } +} + +fun Iterator>.nextPositiveIntUnderInclusive(max: Int, argc: Int = 0): Int { + val (idx, x) = this.next() + if (x is DoubleIota) { + val double = x.double + val rounded = double.roundToInt() + if (abs(double - rounded) <= DoubleIota.TOLERANCE && rounded in 0..max) { + return rounded + } + } + throw MishapInvalidIota.of(x, if (argc == 0) idx else argc - (idx + 1), "int.positive.less.equal", max) +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorAppend.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorAppend.kt new file mode 100644 index 00000000..2cb59ab4 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorAppend.kt @@ -0,0 +1,18 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* + +object OperatorAppend : Operator(2, IotaMultiPredicate.pair(IotaPredicate.ofType(LIST), IotaPredicate.TRUE)) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity).toMutableList() + list.add(it.next().value) + return list.asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt new file mode 100644 index 00000000..f1168eb1 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt @@ -0,0 +1,19 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* + +object OperatorConcat : Operator(2, IotaMultiPredicate.all(IotaPredicate.ofType(LIST))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val lhs = it.nextList(arity).toMutableList() + val rhs = it.nextList(arity) + lhs.addAll(rhs) + return lhs.asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndex.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndex.kt new file mode 100644 index 00000000..6d696c5c --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndex.kt @@ -0,0 +1,19 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.iota.NullIota +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* +import kotlin.math.roundToInt + +object OperatorIndex : Operator(2, IotaMultiPredicate.pair(IotaPredicate.ofType(LIST), IotaPredicate.ofType(DOUBLE))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator() + val list = downcast(it.next(), LIST).list.toMutableList() + val index = downcast(it.next(), DOUBLE).double + val x = list.getOrElse(index.roundToInt()) { NullIota() } + return listOf(x) + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorSlice.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorSlice.kt new file mode 100644 index 00000000..092a1123 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorSlice.kt @@ -0,0 +1,25 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextPositiveIntUnderInclusive +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* +import kotlin.math.max +import kotlin.math.min + +object OperatorSlice : Operator(3, IotaMultiPredicate.triple(IotaPredicate.ofType(LIST), IotaPredicate.ofType(DOUBLE), IotaPredicate.ofType(DOUBLE))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity).toList() + val index0 = it.nextPositiveIntUnderInclusive(list.size, arity) + val index1 = it.nextPositiveIntUnderInclusive(list.size, arity) + + if (index0 == index1) + return emptyList().asActionResult + return list.subList(min(index0, index1), max(index0, index1)).asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnappend.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnappend.kt new file mode 100644 index 00000000..0721f18d --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnappend.kt @@ -0,0 +1,19 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.iota.ListIota +import at.petrak.hexcasting.api.casting.iota.NullIota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* + +object OperatorUnappend : Operator(1, IotaMultiPredicate.all(IotaPredicate.ofType(LIST))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity).toMutableList() + val last = list.removeLastOrNull() ?: NullIota() + return listOf(ListIota(list), last) + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java similarity index 71% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java index 4e558c7b..e4f6b218 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorPack.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java @@ -1,8 +1,9 @@ -package at.petrak.hexcasting.api.casting.arithmetic.operator; +package at.petrak.hexcasting.common.casting.arithmetic.operator.vec; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java similarity index 70% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java index b1faf7f0..93a977b1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnpack.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java @@ -1,8 +1,9 @@ -package at.petrak.hexcasting.api.casting.arithmetic.operator; +package at.petrak.hexcasting.common.casting.arithmetic.operator.vec; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java similarity index 84% rename from Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java index 511f05e2..8d135f83 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorVec3Delegating.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java @@ -1,10 +1,11 @@ -package at.petrak.hexcasting.api.casting.arithmetic.operator; +package at.petrak.hexcasting.common.casting.arithmetic.operator.vec; -import at.petrak.hexcasting.api.casting.arithmetic.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.IotaPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; import at.petrak.hexcasting.api.casting.arithmetic.IterPair; import at.petrak.hexcasting.api.casting.arithmetic.TripleIterable; -import at.petrak.hexcasting.api.casting.arithmetic.impls.DoubleArithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.common.casting.arithmetic.DoubleArithmetic; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.Vec3Iota; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java index ab837c77..6b559a09 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java @@ -1,11 +1,12 @@ package at.petrak.hexcasting.common.lib.hex; import at.petrak.hexcasting.api.casting.arithmetic.engine.ArithmeticEngine; -import at.petrak.hexcasting.api.casting.arithmetic.impls.DoubleArithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.impls.Vec3Arithmetic; +import at.petrak.hexcasting.common.casting.arithmetic.DoubleArithmetic; +import at.petrak.hexcasting.common.casting.arithmetic.ListArithmetic; +import at.petrak.hexcasting.common.casting.arithmetic.Vec3Arithmetic; import java.util.List; public class HexArithmetics { - public static ArithmeticEngine ENGINE = new ArithmeticEngine(List.of(DoubleArithmetic.INSTANCE, Vec3Arithmetic.INSTANCE)); + public static ArithmeticEngine ENGINE = new ArithmeticEngine(List.of(DoubleArithmetic.INSTANCE, Vec3Arithmetic.INSTANCE, ListArithmetic.INSTANCE)); } From a7f89b0776f81ac1068e8ffd7207571b8312e3b0 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 20:38:18 +1000 Subject: [PATCH 13/48] Rename .java to .kt --- .../casting/arithmetic/{ListArithmetic.java => ListArithmetic.kt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/{ListArithmetic.java => ListArithmetic.kt} (100%) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt similarity index 100% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt From e62816eff535dd898d50e253244407cdbf148abf Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 20:38:19 +1000 Subject: [PATCH 14/48] list arithmetic fully implemented --- .../casting/arithmetic/operator/Operator.java | 3 +- .../arithmetic/operator/OperatorBinary.java | 3 +- .../arithmetic/operator/OperatorUnary.java | 3 +- .../casting/arithmetic/ListArithmetic.kt | 116 ++++++++---------- .../arithmetic/operator/OperatorUtils.kt | 23 ++++ .../operator/list/OperatorIndexOf.kt | 17 +++ .../operator/list/OperatorRemove.kt | 22 ++++ .../operator/list/OperatorReplace.kt | 21 ++++ .../operator/list/OperatorUnCons.kt | 21 ++++ .../arithmetic/operator/vec/OperatorPack.java | 3 +- .../operator/vec/OperatorUnpack.java | 3 +- .../operator/vec/OperatorVec3Delegating.java | 3 +- 12 files changed, 165 insertions(+), 73 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndexOf.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorRemove.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorReplace.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnCons.kt diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java index 6fcbaae8..37381842 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; +import org.jetbrains.annotations.NotNull; public abstract class Operator { public final int arity; @@ -14,7 +15,7 @@ public abstract class Operator { this.accepts = accepts; } - public abstract Iterable apply(Iterable iotas); + public abstract @NotNull Iterable apply(@NotNull Iterable iotas); @SuppressWarnings("unchecked") public static T downcast(Iota iota, IotaType iotaType) { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java index 975924d7..bb748408 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; +import org.jetbrains.annotations.NotNull; import java.util.List; import java.util.function.BinaryOperator; @@ -16,7 +17,7 @@ public class OperatorBinary extends Operator { } @Override - public Iterable apply(Iterable iotas) { + public @NotNull Iterable apply(@NotNull Iterable iotas) { var it = iotas.iterator(); return List.of(inner.apply(it.next(), it.next())); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java index 5fc8cd61..e8f02b27 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; +import org.jetbrains.annotations.NotNull; import java.util.List; import java.util.function.UnaryOperator; @@ -16,7 +17,7 @@ public class OperatorUnary extends Operator { } @Override - public Iterable apply(Iterable iotas) { + public @NotNull Iterable apply(@NotNull Iterable iotas) { return List.of(inner.apply(iotas.iterator().next())); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt index 1e1847f0..957458d1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt @@ -1,75 +1,57 @@ -package at.petrak.hexcasting.common.casting.arithmetic; +package at.petrak.hexcasting.common.casting.arithmetic -import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; -import at.petrak.hexcasting.api.casting.iota.DoubleIota; -import at.petrak.hexcasting.api.casting.iota.ListIota; -import at.petrak.hexcasting.common.casting.arithmetic.operator.list.*; -import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; -import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.api.casting.SpellList +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic.* +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate.all +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate.pair +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.iota.DoubleIota +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.iota.ListIota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.common.casting.arithmetic.operator.list.* +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST -import java.util.List; +object ListArithmetic : Arithmetic { + private val OPS = listOf( + INDEX, + SLICE, + APPEND, + UNAPPEND, + ADD, + ABS, + REV, + INDEX_OF, + REMOVE, + REPLACE, + CONS, + UNCONS + ) -import static at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast; -import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; + override fun arithName() = "list_ops" -public enum ListArithmetic implements Arithmetic { - INSTANCE; + override fun opTypes(): Iterable = OPS - public static final List OPS = List.of( - INDEX, - SLICE, - APPEND, - UNAPPEND, - ADD, - ABS, - REV, - INDEX_OF, - REMOVE, - REPLACE, - CONS, - UNCONS - ); - - @Override - public String arithName() { - return "list_ops"; - } - - @Override - public Iterable opTypes() { - return OPS; - } - - @Override - public Operator getOperator(HexPattern pattern) { - if (pattern.equals(INDEX)) { - return OperatorIndex.INSTANCE; - } else if (pattern.equals(SLICE)) { - return OperatorSlice.INSTANCE; - } else if (pattern.equals(APPEND)) { - return OperatorAppend.INSTANCE; - } else if (pattern.equals(UNAPPEND)) { - return OperatorUnappend.INSTANCE; - } else if (pattern.equals(ADD)) { - return OperatorConcat.INSTANCE; - } else if (pattern.equals(ABS)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> new DoubleIota(downcast(iota, LIST).getList().size())); - } else if (pattern.equals(REV)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> new ListIota(downcast(iota, LIST).getList())); - } else if (pattern.equals(INDEX_OF)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); - } else if (pattern.equals(REMOVE)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); - } else if (pattern.equals(REPLACE)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); - } else if (pattern.equals(CONS)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); - } else if (pattern.equals(UNCONS)) { - return new OperatorUnary(IotaMultiPredicate.any(IotaPredicate.ofType(LIST), IotaPredicate.ofType(LIST)), iota -> iota); + override fun getOperator(pattern: HexPattern): Operator? { + return when (pattern) { + INDEX -> OperatorIndex + SLICE -> OperatorSlice + APPEND -> OperatorAppend + UNAPPEND -> OperatorUnappend + ADD -> OperatorConcat + ABS -> OperatorUnary(all(IotaPredicate.ofType(LIST))) { iota: Iota -> DoubleIota(downcast(iota, LIST).list.size().toDouble()) } + REV -> OperatorUnary(all(IotaPredicate.ofType(LIST))) { iota: Iota -> ListIota(downcast(iota, LIST).list.toList().asReversed()) } + INDEX_OF -> OperatorIndexOf + REMOVE -> OperatorRemove + REPLACE -> OperatorReplace + CONS -> OperatorBinary(pair(IotaPredicate.ofType(LIST), IotaPredicate.TRUE)) { list, iota -> ListIota(SpellList.LPair(iota, downcast(list, LIST).list)) } + UNCONS -> OperatorUnCons + else -> null } - return null; } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt index 89798afa..f2015fed 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt @@ -16,6 +16,29 @@ fun Iterator>.nextList(argc: Int = 0): SpellList { throw MishapInvalidIota.ofType(x, if (argc == 0) idx else argc - (idx + 1), "list") } } +fun Iterator>.nextInt(argc: Int = 0): Int { + val (idx, x) = this.next() + if (x is DoubleIota) { + val double = x.double + val rounded = double.roundToInt() + if (abs(double - rounded) <= DoubleIota.TOLERANCE) { + return rounded + } + } + throw MishapInvalidIota.of(x, if (argc == 0) idx else argc - (idx + 1), "int") +} + +fun Iterator>.nextPositiveIntUnder(max: Int, argc: Int = 0): Int { + val (idx, x) = this.next() + if (x is DoubleIota) { + val double = x.double + val rounded = double.roundToInt() + if (abs(double - rounded) <= DoubleIota.TOLERANCE && rounded in 0 until max) { + return rounded + } + } + throw MishapInvalidIota.of(x, if (argc == 0) idx else argc - (idx + 1), "int.positive.less.equal", max) +} fun Iterator>.nextPositiveIntUnderInclusive(max: Int, argc: Int = 0): Int { val (idx, x) = this.next() diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndexOf.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndexOf.kt new file mode 100644 index 00000000..b8f0b372 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorIndexOf.kt @@ -0,0 +1,17 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* + +object OperatorIndexOf : Operator(2, IotaMultiPredicate.pair(IotaPredicate.ofType(LIST), IotaPredicate.TRUE)) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity).toList() + return list.indexOf(it.next().value).asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorRemove.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorRemove.kt new file mode 100644 index 00000000..f7c54ff3 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorRemove.kt @@ -0,0 +1,22 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextInt +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* + +object OperatorRemove : Operator(2, IotaMultiPredicate.pair(IotaPredicate.ofType(LIST), IotaPredicate.ofType(DOUBLE))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity).toMutableList() + val index = it.nextInt(arity) + if (index < 0 || index >= list.size) + return list.asActionResult + list.removeAt(index) + return list.asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorReplace.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorReplace.kt new file mode 100644 index 00000000..65f93976 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorReplace.kt @@ -0,0 +1,21 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.SpellList +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextPositiveIntUnder +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* + +object OperatorReplace : Operator(3, IotaMultiPredicate.triple(IotaPredicate.ofType(LIST), IotaPredicate.ofType(DOUBLE), IotaPredicate.TRUE)) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity) + val index = it.nextPositiveIntUnder(list.size(), arity) + val iota = it.next().value + return list.modifyAt(index) { SpellList.LPair(iota, it.cdr) }.asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnCons.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnCons.kt new file mode 100644 index 00000000..4971d9f4 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnCons.kt @@ -0,0 +1,21 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator.list + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.iota.ListIota +import at.petrak.hexcasting.api.casting.iota.NullIota +import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST + +object OperatorUnCons : Operator(1, IotaMultiPredicate.all(IotaPredicate.ofType(LIST))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val list = it.nextList(arity) + if (list.nonEmpty) { + return listOf(ListIota(list.cdr), list.car) + } + return listOf(ListIota(list), NullIota()) + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java index e4f6b218..cbfc28e8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorPack.java @@ -8,6 +8,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.NotNull; import java.util.List; @@ -19,7 +20,7 @@ public class OperatorPack extends Operator { public static OperatorPack INSTANCE = new OperatorPack(); @Override - public Iterable apply(Iterable iotas) { + public @NotNull Iterable apply(@NotNull Iterable iotas) { var it = iotas.iterator(); return List.of(new Vec3Iota(new Vec3( downcast(it.next(), HexIotaTypes.DOUBLE).getDouble(), diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java index 93a977b1..d569dad5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorUnpack.java @@ -7,6 +7,7 @@ import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; +import org.jetbrains.annotations.NotNull; import java.util.List; @@ -20,7 +21,7 @@ public class OperatorUnpack extends Operator { public static OperatorUnpack INSTANCE = new OperatorUnpack(); @Override - public Iterable apply(Iterable iotas) { + public @NotNull Iterable apply(@NotNull Iterable iotas) { var it = iotas.iterator(); var vec = downcast(it.next(), VEC3).getVec3(); return List.of(new DoubleIota(vec.x), new DoubleIota(vec.y), new DoubleIota(vec.z)); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java index 8d135f83..7448d350 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java @@ -11,6 +11,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.Vec3Iota; import at.petrak.hexcasting.api.casting.math.HexPattern; import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.NotNull; import java.util.List; import java.util.Objects; @@ -29,7 +30,7 @@ public class OperatorVec3Delegating extends Operator { } @Override - public Iterable apply(Iterable iotas) { + public @NotNull Iterable apply(@NotNull Iterable iotas) { var it = iotas.iterator(); var left = it.next(); var right = it.next(); From 9c830ef0829db019ce247afa7d334af402611e8e Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 21:15:43 +1000 Subject: [PATCH 15/48] renamed some things to be more general, got the book working again --- .../casting/arithmetic/ListArithmetic.kt | 24 +++++++------- .../hexcasting/common/lib/hex/HexActions.java | 32 ++++++++++--------- .../hexcasting/lang/en_us.flatten.json5 | 8 ++--- .../en_us/entries/patterns/lists.json | 28 ++++++++++------ 4 files changed, 51 insertions(+), 41 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt index 957458d1..2d5d5177 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt @@ -19,18 +19,18 @@ import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST object ListArithmetic : Arithmetic { private val OPS = listOf( - INDEX, - SLICE, - APPEND, - UNAPPEND, - ADD, - ABS, - REV, - INDEX_OF, - REMOVE, - REPLACE, - CONS, - UNCONS + INDEX, + SLICE, + APPEND, + UNAPPEND, + ADD, + ABS, + REV, + INDEX_OF, + REMOVE, + REPLACE, + CONS, + UNCONS ) override fun arithName() = "list_ops" diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index 78ec54b9..b6275142 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -531,37 +531,39 @@ public class HexActions { // == Lists == public static final ActionRegistryEntry APPEND = make("append", - new ActionRegistryEntry(HexPattern.fromAngles("edqde", HexDir.SOUTH_WEST), OpAppend.INSTANCE)); - public static final ActionRegistryEntry CONCAT = make("concat", - new ActionRegistryEntry(HexPattern.fromAngles("qaeaq", HexDir.NORTH_WEST), OpConcat.INSTANCE)); + new OperationAction(HexPattern.fromAngles("edqde", HexDir.SOUTH_WEST))); + public static final ActionRegistryEntry UNAPPEND = make("unappend", + new OperationAction(HexPattern.fromAngles("qaeaq", HexDir.NORTH_WEST))); +// public static final ActionRegistryEntry CONCAT = make("concat", +// new ActionRegistryEntry(HexPattern.fromAngles("qaeaq", HexDir.NORTH_WEST), OpConcat.INSTANCE)); public static final ActionRegistryEntry INDEX = make("index", - new ActionRegistryEntry(HexPattern.fromAngles("deeed", HexDir.NORTH_WEST), OpIndex.INSTANCE)); + new OperationAction(HexPattern.fromAngles("deeed", HexDir.NORTH_WEST))); public static final ActionRegistryEntry FOR_EACH = make("for_each", new ActionRegistryEntry(HexPattern.fromAngles("dadad", HexDir.NORTH_EAST), OpForEach.INSTANCE)); - public static final ActionRegistryEntry LIST_SIZE = make("list_size", - new ActionRegistryEntry(HexPattern.fromAngles("aqaeaq", HexDir.EAST), OpListSize.INSTANCE)); +// public static final ActionRegistryEntry LIST_SIZE = make("list_size", +// new ActionRegistryEntry(HexPattern.fromAngles("aqaeaq", HexDir.EAST), OpListSize.INSTANCE)); public static final ActionRegistryEntry SINGLETON = make("singleton", new ActionRegistryEntry(HexPattern.fromAngles("adeeed", HexDir.EAST), OpSingleton.INSTANCE)); public static final ActionRegistryEntry EMPTY_LIST = make("empty_list", new ActionRegistryEntry(HexPattern.fromAngles("qqaeaae", HexDir.NORTH_EAST), OpEmptyList.INSTANCE)); - public static final ActionRegistryEntry REVERSE_LIST = make("reverse_list", - new ActionRegistryEntry(HexPattern.fromAngles("qqqaede", HexDir.EAST), OpReverski.INSTANCE)); + public static final ActionRegistryEntry REVERSE = make("reverse", + new OperationAction(HexPattern.fromAngles("qqqaede", HexDir.EAST))); public static final ActionRegistryEntry LAST_N_LIST = make("last_n_list", new ActionRegistryEntry(HexPattern.fromAngles("ewdqdwe", HexDir.SOUTH_WEST), OpLastNToList.INSTANCE)); public static final ActionRegistryEntry SPLAT = make("splat", new ActionRegistryEntry(HexPattern.fromAngles("qwaeawq", HexDir.NORTH_WEST), OpSplat.INSTANCE)); public static final ActionRegistryEntry INDEX_OF = make("index_of", - new ActionRegistryEntry(HexPattern.fromAngles("dedqde", HexDir.EAST), OpIndexOf.INSTANCE)); - public static final ActionRegistryEntry LIST_REMOVE = make("list_remove", - new ActionRegistryEntry(HexPattern.fromAngles("edqdewaqa", HexDir.SOUTH_WEST), OpRemove.INSTANCE)); + new OperationAction(HexPattern.fromAngles("dedqde", HexDir.EAST))); + public static final ActionRegistryEntry REMOVE_FROM = make("remove_from", + new OperationAction(HexPattern.fromAngles("edqdewaqa", HexDir.SOUTH_WEST))); public static final ActionRegistryEntry SLICE = make("slice", - new ActionRegistryEntry(HexPattern.fromAngles("qaeaqwded", HexDir.NORTH_WEST), OpSlice.INSTANCE)); + new OperationAction(HexPattern.fromAngles("qaeaqwded", HexDir.NORTH_WEST))); public static final ActionRegistryEntry MODIFY_IN_PLACE = make("modify_in_place", - new ActionRegistryEntry(HexPattern.fromAngles("wqaeaqw", HexDir.NORTH_WEST), OpModifyInPlace.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wqaeaqw", HexDir.NORTH_WEST))); public static final ActionRegistryEntry CONSTRUCT = make("construct", - new ActionRegistryEntry(HexPattern.fromAngles("ddewedd", HexDir.SOUTH_EAST), OpCons.INSTANCE)); + new OperationAction(HexPattern.fromAngles("ddewedd", HexDir.SOUTH_EAST))); public static final ActionRegistryEntry DECONSTRUCT = make("deconstruct", - new ActionRegistryEntry(HexPattern.fromAngles("aaqwqaa", HexDir.SOUTH_WEST), OpUnCons.INSTANCE)); + new OperationAction(HexPattern.fromAngles("aaqwqaa", HexDir.SOUTH_WEST))); // Xplat interops static { 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 94635f24..81d034b7 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 @@ -385,11 +385,11 @@ "list_size": "Abacus Purification", "singleton": "Single's Purification", "empty_list": "Vacant Reflection", - "reverse_list": "Retrograde Purification", + "reverse": "Retrograde Purification", "last_n_list": "Flock's Gambit", "splat": "Flock's Disintegration", "index_of": "Locator's Distillation", - "list_remove": "Excisor's Distillation", + "remove_from": "Excisor's Distillation", "slice": "Selection Exaltation", "modify_in_place": "Surgeon's Exaltation", "construct": "Speaker's Distillation", @@ -1252,9 +1252,9 @@ "lists.empty_list": "Push an empty list to the top of the stack.", "lists.singleton": "Remove the top of the stack, then push a list containing only that element.", "lists.list_size": "Remove the list at the top of the stack, then push the number of elements in the list to the stack.", - "lists.reverse_list": "Reverse the list at the top of the stack.", + "lists.reverse": "Reverse the list at the top of the stack.", "lists.index_of": "Remove the iota at the top of the stack, then replace the list at the top with the first index of that iota within the list (starting from 0). Replaces the list with -1 if the iota doesn't exist in the list.", - "lists.list_remove": "Remove the number at the top of the stack, then remove the nth element of the list at the top of the stack (where n is the number you removed).", + "lists.remove_from": "Remove the number at the top of the stack, then remove the nth element of the list at the top of the stack (where n is the number you removed).", "lists.modify_in_place": "Remove the top iota of the stack and the number at the top, then set the nth element of the list at the top of the stack to that iota (where n is the number you removed). Does nothing if the number is out of bounds.", "lists.last_n_list": "Remove $(italic)num/$ elements from the stack, then add them to a list at the top of the stack.", "lists.splat": "Remove the list at the top of the stack, then push its contents to the stack.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json index e154ea97..25ddace2 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json @@ -32,8 +32,16 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:concat", - "anchor": "hexcasting:concat", + "op_id": "hexcasting:unappend", + "anchor": "hexcasting:unappend", + "input": "list", + "output": "list, any", + "text": "hexcasting.page.lists.unappend" + }, + { + "type": "hexcasting:pattern", + "op_id": "hexcasting:add", + "anchor": "hexcasting:add", "input": "list, list", "output": "list", "text": "hexcasting.page.lists.concat" @@ -56,19 +64,19 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:list_size", - "anchor": "hexcasting:list_size", + "op_id": "hexcasting:abs_len", + "anchor": "hexcasting:abs_len", "input": "list", "output": "num", "text": "hexcasting.page.lists.list_size" }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:reverse_list", - "anchor": "hexcasting:reverse_list", + "op_id": "hexcasting:reverse", + "anchor": "hexcasting:reverse", "input": "list", "output": "list", - "text": "hexcasting.page.lists.reverse_list" + "text": "hexcasting.page.lists.reverse" }, { "type": "hexcasting:pattern", @@ -80,11 +88,11 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:list_remove", - "anchor": "hexcasting:list_remove", + "op_id": "hexcasting:remove_from", + "anchor": "hexcasting:remove_from", "input": "list, num", "output": "list", - "text": "hexcasting.page.lists.list_remove" + "text": "hexcasting.page.lists.remove_from" }, { "type": "hexcasting:pattern", From 99a1ad6528c859d883be920a3c907820d9db6cd0 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 22:03:38 +1000 Subject: [PATCH 16/48] made a proper registry for the Arithmetics, made it so media flow can enter/exit from the bottom of slates --- .../api/casting/castables/OperationAction.kt | 2 +- .../common/blocks/circles/BlockSlate.java | 4 +- .../common/lib/hex/HexArithmetics.java | 43 ++++++++++++++++++- .../hexcasting/xplat/IXplatAbstractions.java | 3 ++ .../hexcasting/fabric/FabricHexInitializer.kt | 4 +- .../fabric/xplat/FabricXplatImpl.java | 15 ++++++- .../hexcasting/forge/ForgeHexInitializer.java | 6 +-- .../forge/xplat/ForgeXplatImpl.java | 10 +++++ 8 files changed, 76 insertions(+), 11 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt index 5667b2f3..19f9ee0f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt @@ -20,7 +20,7 @@ data class OperationAction(val pattern: HexPattern) : Action { stack.addAll(stackList) val startingLength = stackList.size return try { - val ret: Iterable = HexArithmetics.ENGINE.run(pattern, stack, startingLength) + val ret: Iterable = HexArithmetics.getEngine().run(pattern, stack, startingLength) ret.forEach(Consumer { e: Iota -> stack.add(e) }) val image2 = image.copy(stack = stack, opsConsumed = image.opsConsumed + 1) OperationResult(image2, listOf(), continuation, HexEvalSounds.NORMAL_EXECUTE) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java index e28c72ca..371b36da 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java @@ -104,7 +104,7 @@ public class BlockSlate extends BlockCircleComponent implements EntityBlock, Sim @Override public boolean canEnterFromDirection(Direction enterDir, BlockPos pos, BlockState bs, ServerLevel world) { var thisNormal = this.normalDir(pos, bs, world); - return enterDir != thisNormal && enterDir != thisNormal.getOpposite(); + return enterDir != thisNormal.getOpposite(); // && enterDir != thisNormal; } @Override @@ -112,7 +112,7 @@ public class BlockSlate extends BlockCircleComponent implements EntityBlock, Sim var allDirs = EnumSet.allOf(Direction.class); var normal = this.normalDir(pos, bs, world); allDirs.remove(normal); - allDirs.remove(normal.getOpposite()); +// allDirs.remove(normal.getOpposite()); return allDirs; } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java index 6b559a09..27d59115 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java @@ -1,12 +1,51 @@ package at.petrak.hexcasting.common.lib.hex; +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.engine.ArithmeticEngine; import at.petrak.hexcasting.common.casting.arithmetic.DoubleArithmetic; import at.petrak.hexcasting.common.casting.arithmetic.ListArithmetic; import at.petrak.hexcasting.common.casting.arithmetic.Vec3Arithmetic; +import at.petrak.hexcasting.xplat.IXplatAbstractions; +import net.minecraft.core.Holder; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; -import java.util.List; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.stream.Collectors; + +import static at.petrak.hexcasting.api.HexAPI.modLoc; public class HexArithmetics { - public static ArithmeticEngine ENGINE = new ArithmeticEngine(List.of(DoubleArithmetic.INSTANCE, Vec3Arithmetic.INSTANCE, ListArithmetic.INSTANCE)); + private static ArithmeticEngine ENGINE; + + public static ArithmeticEngine getEngine() { + if (ENGINE == null) { + ENGINE = new ArithmeticEngine(REGISTRY.holders().map(Holder.Reference::value).collect(Collectors.toList())); + } + return ENGINE; + } + + public static final Registry REGISTRY = IXplatAbstractions.INSTANCE.getArithmeticRegistry(); + + public static void register(BiConsumer r) { + for (var e : ARITHMETICS.entrySet()) { + r.accept(e.getValue(), e.getKey()); + } + } + + private static final Map ARITHMETICS = new LinkedHashMap<>(); + + public static DoubleArithmetic DOUBLE = make("double", DoubleArithmetic.INSTANCE); + public static Vec3Arithmetic VEC3 = make("vec3", Vec3Arithmetic.INSTANCE); + public static ListArithmetic LIST = make("list", ListArithmetic.INSTANCE); + + private static T make(String name, T arithmetic) { + var old = ARITHMETICS.put(modLoc(name), arithmetic); + if (old != null) { + throw new IllegalArgumentException("Typo? Duplicate id " + name); + } + return arithmetic; + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java b/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java index c8eb4231..c8a0bcc9 100644 --- a/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java +++ b/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.addldata.ADIotaHolder; import at.petrak.hexcasting.api.addldata.ADMediaHolder; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; import at.petrak.hexcasting.api.casting.eval.ResolvedPattern; import at.petrak.hexcasting.api.casting.eval.sideeffects.EvalSound; @@ -168,6 +169,8 @@ public interface IXplatAbstractions { Registry> getIotaTypeRegistry(); + Registry getArithmeticRegistry(); + Registry getEvalSoundRegistry(); boolean isBreakingAllowed(Level world, BlockPos pos, BlockState state, Player player); diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt index 7590b798..bee371d9 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt @@ -16,6 +16,7 @@ import at.petrak.hexcasting.common.entities.HexEntities import at.petrak.hexcasting.common.items.ItemJewelerHammer import at.petrak.hexcasting.common.lib.* import at.petrak.hexcasting.common.lib.hex.HexActions +import at.petrak.hexcasting.common.lib.hex.HexArithmetics import at.petrak.hexcasting.common.lib.hex.HexEvalSounds import at.petrak.hexcasting.common.lib.hex.HexIotaTypes import at.petrak.hexcasting.common.lib.hex.HexSpecialHandlers @@ -53,7 +54,7 @@ import net.minecraft.world.entity.player.Player import java.util.function.BiConsumer object FabricHexInitializer : ModInitializer { - public lateinit var CONFIG: FabricHexConfig + lateinit var CONFIG: FabricHexConfig override fun onInitialize() { this.CONFIG = FabricHexConfig.setup() @@ -142,6 +143,7 @@ object FabricHexInitializer : ModInitializer { HexIotaTypes.registerTypes(bind(IXplatAbstractions.INSTANCE.iotaTypeRegistry)) HexActions.register(bind(IXplatAbstractions.INSTANCE.actionRegistry)) HexSpecialHandlers.register(bind(IXplatAbstractions.INSTANCE.specialHandlerRegistry)) + HexArithmetics.register(bind(IXplatAbstractions.INSTANCE.arithmeticRegistry)) HexEvalSounds.register(bind(IXplatAbstractions.INSTANCE.evalSoundRegistry)) // Because of Java's lazy-loading of classes, can't use Kotlin static initialization for diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java index 535c04fe..5da5f45d 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/xplat/FabricXplatImpl.java @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.addldata.ADIotaHolder; import at.petrak.hexcasting.api.addldata.ADMediaHolder; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; import at.petrak.hexcasting.api.casting.eval.ResolvedPattern; import at.petrak.hexcasting.api.casting.eval.sideeffects.EvalSound; @@ -321,7 +322,7 @@ public class FabricXplatImpl implements IXplatAbstractions { return FabricUnsealedIngredient.of(stack); } - private static Supplier TAB = Suppliers.memoize(() -> FabricItemGroupBuilder.create( + private static final Supplier TAB = Suppliers.memoize(() -> FabricItemGroupBuilder.create( modLoc("creative_tab")) .icon(HexItems::tabIcon) .build()); @@ -423,6 +424,13 @@ public class FabricXplatImpl implements IXplatAbstractions { Lifecycle.stable(), null)) .buildAndRegister() ); + + private static final Supplier> ARITHMETIC_REGISTRY = Suppliers.memoize(() -> + FabricRegistryBuilder.from(new DefaultedRegistry( + HexAPI.MOD_ID + ":null", ResourceKey.createRegistryKey(modLoc("arithmetic")), + Lifecycle.stable(), null)) + .buildAndRegister() + ); private static final Supplier> EVAL_SOUNDS_REGISTRY = Suppliers.memoize(() -> FabricRegistryBuilder.from(new DefaultedRegistry( HexAPI.MOD_ID + ":nothing", ResourceKey.createRegistryKey(modLoc("eval_sound")), @@ -445,6 +453,11 @@ public class FabricXplatImpl implements IXplatAbstractions { return IOTA_TYPE_REGISTRY.get(); } + @Override + public Registry getArithmeticRegistry() { + return ARITHMETIC_REGISTRY.get(); + } + @Override public Registry getEvalSoundRegistry() { return EVAL_SOUNDS_REGISTRY.get(); diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java index c35752b5..a28a51af 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java @@ -12,10 +12,7 @@ import at.petrak.hexcasting.common.casting.operators.spells.great.OpAltiora; import at.petrak.hexcasting.common.entities.HexEntities; import at.petrak.hexcasting.common.items.ItemJewelerHammer; import at.petrak.hexcasting.common.lib.*; -import at.petrak.hexcasting.common.lib.hex.HexActions; -import at.petrak.hexcasting.common.lib.hex.HexEvalSounds; -import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; -import at.petrak.hexcasting.common.lib.hex.HexSpecialHandlers; +import at.petrak.hexcasting.common.lib.hex.*; import at.petrak.hexcasting.common.misc.AkashicTreeGrower; import at.petrak.hexcasting.common.misc.BrainsweepingEvents; import at.petrak.hexcasting.common.misc.PlayerPositionRecorder; @@ -115,6 +112,7 @@ public class ForgeHexInitializer { bind(IXplatAbstractions.INSTANCE.getIotaTypeRegistry().key(), HexIotaTypes::registerTypes); bind(IXplatAbstractions.INSTANCE.getActionRegistry().key(), HexActions::register); bind(IXplatAbstractions.INSTANCE.getSpecialHandlerRegistry().key(), HexSpecialHandlers::register); + bind(IXplatAbstractions.INSTANCE.getArithmeticRegistry().key(), HexArithmetics::register); bind(IXplatAbstractions.INSTANCE.getEvalSoundRegistry().key(), HexEvalSounds::register); ForgeHexArgumentTypeRegistry.ARGUMENT_TYPES.register(getModEventBus()); 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 5932752e..f3822e50 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 @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.addldata.ADIotaHolder; import at.petrak.hexcasting.api.addldata.ADMediaHolder; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; import at.petrak.hexcasting.api.casting.eval.ResolvedPattern; import at.petrak.hexcasting.api.casting.eval.env.StaffCastEnv; @@ -472,6 +473,10 @@ public class ForgeXplatImpl implements IXplatAbstractions { ResourceKey.createRegistryKey(modLoc("iota_type")), HexAPI.MOD_ID + ":null", registry -> HexIotaTypes.NULL) ); + private static final Supplier> ARITHMETIC_REGISTRY = Suppliers.memoize(() -> + ForgeAccessorRegistry.hex$registerSimple( + ResourceKey.createRegistryKey(modLoc("arithmetic")), null) + ); private static final Supplier> EVAL_SOUND_REGISTRY = Suppliers.memoize(() -> ForgeAccessorRegistry.hex$registerDefaulted( ResourceKey.createRegistryKey(modLoc("eval_sound")), @@ -493,6 +498,11 @@ public class ForgeXplatImpl implements IXplatAbstractions { return IOTA_TYPE_REGISTRY.get(); } + @Override + public Registry getArithmeticRegistry() { + return ARITHMETIC_REGISTRY.get(); + } + @Override public Registry getEvalSoundRegistry() { return EVAL_SOUND_REGISTRY.get(); From 6fdee9e541a1335d65457e90f2eeb43d3f75f761 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 23:09:42 +1000 Subject: [PATCH 17/48] made bools and sets Arithmetic as well, did the documentation --- .../api/casting/arithmetic/Arithmetic.java | 11 ++++ .../arithmetic/BitwiseSetArithmetic.kt | 47 ++++++++++++++ .../casting/arithmetic/BoolArithmetic.kt | 61 +++++++++++++++++++ .../casting/arithmetic/ListArithmetic.kt | 13 +++- .../casting/arithmetic/ListSetArithmetic.kt | 43 +++++++++++++ .../casting/arithmetic/Vec3Arithmetic.java | 3 +- .../{OperatorConcat.kt => OperatorUnique.kt} | 19 ++++-- .../hexcasting/common/lib/hex/HexActions.java | 55 +++++++---------- .../common/lib/hex/HexArithmetics.java | 7 ++- .../hexcasting/lang/en_us.flatten.json5 | 39 ++++++------ .../en_us/entries/patterns/lists.json | 4 +- .../en_us/entries/patterns/logic.json | 8 +-- .../en_us/entries/patterns/math.json | 32 +++++----- .../en_us/entries/patterns/sets.json | 20 +++--- 14 files changed, 263 insertions(+), 99 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BitwiseSetArithmetic.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BoolArithmetic.kt create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListSetArithmetic.kt rename Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/{OperatorConcat.kt => OperatorUnique.kt} (57%) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java index 8e36ee6e..bac8c63f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -34,4 +34,15 @@ public interface Arithmetic { HexPattern REPLACE = HexPattern.fromAngles("wqaeaqw", HexDir.NORTH_WEST); HexPattern CONS = HexPattern.fromAngles("ddewedd", HexDir.SOUTH_EAST); HexPattern UNCONS = HexPattern.fromAngles("aaqwqaa", HexDir.SOUTH_WEST); + + // Boolean Logic, Comparisons, & Sets + HexPattern AND = HexPattern.fromAngles("wdw", HexDir.NORTH_EAST); + HexPattern OR = HexPattern.fromAngles("waw", HexDir.SOUTH_EAST); + HexPattern XOR = HexPattern.fromAngles("dwa", HexDir.NORTH_WEST); + HexPattern GREATER = HexPattern.fromAngles("e", HexDir.SOUTH_EAST); + HexPattern LESS = HexPattern.fromAngles("q", HexDir.SOUTH_WEST); + HexPattern GREATER_EQ = HexPattern.fromAngles("ee", HexDir.SOUTH_EAST); + HexPattern LESS_EQ = HexPattern.fromAngles("qq", HexDir.SOUTH_WEST); + HexPattern NOT = HexPattern.fromAngles("dw", HexDir.NORTH_WEST); + HexPattern UNIQUE = HexPattern.fromAngles("aweaqa", HexDir.NORTH_EAST); } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BitwiseSetArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BitwiseSetArithmetic.kt new file mode 100644 index 00000000..1063f298 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BitwiseSetArithmetic.kt @@ -0,0 +1,47 @@ +package at.petrak.hexcasting.common.casting.arithmetic + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic.* +import at.petrak.hexcasting.api.casting.arithmetic.engine.InvalidOperatorException +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary +import at.petrak.hexcasting.api.casting.iota.DoubleIota +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.DOUBLE +import java.util.function.LongBinaryOperator +import java.util.function.LongUnaryOperator +import kotlin.math.roundToLong + +object BitwiseSetArithmetic : Arithmetic { + private val OPS = listOf( + AND, + OR, + XOR, + NOT + ) + + override fun arithName() = "bitwise_set_ops" + + override fun opTypes() = OPS + + override fun getOperator(pattern: HexPattern): Operator = when (pattern) { + AND -> make2 { x, y -> x and y } + OR -> make2 { x, y -> x or y } + XOR -> make2 { x, y -> x xor y } + NOT -> make1 { x -> x.inv() } + else -> throw InvalidOperatorException("$pattern is not a valid operator in Arithmetic $this.") + } + + private fun make1(op: LongUnaryOperator): OperatorUnary = OperatorUnary(DoubleArithmetic.ACCEPTS) + { i: Iota -> DoubleIota(op.applyAsLong(downcast(i, DOUBLE).double.roundToLong()).toDouble()) } + + private fun make2(op: LongBinaryOperator): OperatorBinary = OperatorBinary(DoubleArithmetic.ACCEPTS) + { i: Iota, j: Iota -> DoubleIota( + op.applyAsLong( + downcast(i, DOUBLE).double.roundToLong(), + downcast(j, DOUBLE).double.roundToLong() + ).toDouble()) } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BoolArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BoolArithmetic.kt new file mode 100644 index 00000000..79e58793 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/BoolArithmetic.kt @@ -0,0 +1,61 @@ +package at.petrak.hexcasting.common.casting.arithmetic + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic.* +import at.petrak.hexcasting.api.casting.arithmetic.engine.InvalidOperatorException +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.iota.BooleanIota +import at.petrak.hexcasting.api.casting.iota.DoubleIota +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* +import it.unimi.dsi.fastutil.booleans.BooleanBinaryOperator +import it.unimi.dsi.fastutil.booleans.BooleanUnaryOperator +import java.util.function.BiFunction + +object BoolArithmetic : Arithmetic { + private val OPS = listOf( + AND, + OR, + XOR, + GREATER, + LESS, + GREATER_EQ, + LESS_EQ, + NOT, + ABS + ) + + override fun arithName(): String = "bool_math" + + override fun opTypes() = OPS + + override fun getOperator(pattern: HexPattern): Operator = when (pattern) { + AND -> make2 { a, b -> a and b } + OR -> make2 { a, b -> a or b } + XOR -> make2 { a, b -> a xor b } + GREATER -> makeComp { x, y -> x > y } + LESS -> makeComp { x, y -> x < y } + GREATER_EQ -> makeComp { x, y -> DoubleIota.tolerates(x, y) || x >= y } + LESS_EQ -> makeComp { x, y -> DoubleIota.tolerates(x, y) || x <= y } + NOT -> make1 { a -> !a } + ABS -> OperatorUnary(ALL_BOOLS) { i: Iota -> DoubleIota( if (Operator.downcast(i, BOOLEAN).bool) 1.0 else 0.0 ) } + else -> throw InvalidOperatorException("$pattern is not a valid operator in Arithmetic $this.") + } + val ALL_BOOLS: IotaMultiPredicate = IotaMultiPredicate.all(IotaPredicate.ofType(BOOLEAN)) + + private fun make1(op: BooleanUnaryOperator): OperatorUnary { + return OperatorUnary(ALL_BOOLS) { i: Iota -> BooleanIota(op.apply(Operator.downcast(i, BOOLEAN).bool)) } + } + private fun make2(op: BooleanBinaryOperator): OperatorBinary { + return OperatorBinary(ALL_BOOLS) { i: Iota, j: Iota -> BooleanIota(op.apply(Operator.downcast(i, BOOLEAN).bool, Operator.downcast(j, BOOLEAN).bool)) } + } + private fun makeComp(op: BiFunction): OperatorBinary { + return OperatorBinary(DoubleArithmetic.ACCEPTS) + { i: Iota, j: Iota -> BooleanIota(op.apply(Operator.downcast(i, DOUBLE).double, Operator.downcast(j, DOUBLE).double)) } + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt index 2d5d5177..ddfb3a40 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListArithmetic.kt @@ -3,6 +3,7 @@ package at.petrak.hexcasting.common.casting.arithmetic import at.petrak.hexcasting.api.casting.SpellList import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic.* +import at.petrak.hexcasting.api.casting.arithmetic.engine.InvalidOperatorException import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary @@ -16,6 +17,7 @@ import at.petrak.hexcasting.api.casting.iota.ListIota import at.petrak.hexcasting.api.casting.math.HexPattern import at.petrak.hexcasting.common.casting.arithmetic.operator.list.* import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST +import java.util.function.BinaryOperator object ListArithmetic : Arithmetic { private val OPS = listOf( @@ -37,13 +39,13 @@ object ListArithmetic : Arithmetic { override fun opTypes(): Iterable = OPS - override fun getOperator(pattern: HexPattern): Operator? { + override fun getOperator(pattern: HexPattern): Operator { return when (pattern) { INDEX -> OperatorIndex SLICE -> OperatorSlice APPEND -> OperatorAppend UNAPPEND -> OperatorUnappend - ADD -> OperatorConcat + ADD -> make2 { list0, list1 -> list0 + list1 } ABS -> OperatorUnary(all(IotaPredicate.ofType(LIST))) { iota: Iota -> DoubleIota(downcast(iota, LIST).list.size().toDouble()) } REV -> OperatorUnary(all(IotaPredicate.ofType(LIST))) { iota: Iota -> ListIota(downcast(iota, LIST).list.toList().asReversed()) } INDEX_OF -> OperatorIndexOf @@ -51,7 +53,12 @@ object ListArithmetic : Arithmetic { REPLACE -> OperatorReplace CONS -> OperatorBinary(pair(IotaPredicate.ofType(LIST), IotaPredicate.TRUE)) { list, iota -> ListIota(SpellList.LPair(iota, downcast(list, LIST).list)) } UNCONS -> OperatorUnCons - else -> null + else -> throw InvalidOperatorException("$pattern is not a valid operator in Arithmetic $this.") } } + + private fun make2(op: BinaryOperator>): OperatorBinary = OperatorBinary(all(IotaPredicate.ofType(LIST))) + { i: Iota, j: Iota -> ListIota( + op.apply(downcast(i, LIST).list.toList(), downcast(j, LIST).list.toList()) + ) } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListSetArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListSetArithmetic.kt new file mode 100644 index 00000000..4209952b --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/ListSetArithmetic.kt @@ -0,0 +1,43 @@ +package at.petrak.hexcasting.common.casting.arithmetic + +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic.* +import at.petrak.hexcasting.api.casting.arithmetic.engine.InvalidOperatorException +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.* +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate.* +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.iota.ListIota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.common.casting.arithmetic.operator.list.OperatorUnique +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST +import java.util.function.BinaryOperator + +object ListSetArithmetic : Arithmetic { + private val OPS = listOf( + AND, + OR, + XOR, + UNIQUE + ) + + override fun arithName() = "list_set_ops" + + override fun opTypes() = OPS + + override fun getOperator(pattern: HexPattern): Operator = when (pattern) { + AND -> make2 { list0, list1 -> list0.filter { x -> list1.any { Iota.tolerates(x, it) } } } + OR -> make2 { list0, list1 -> list0 + list1.filter { x -> list0.none { Iota.tolerates(x, it) } } } + XOR -> make2 { list0, list1 -> list0.filter { x0 -> list1.none {Iota.tolerates(x0, it) } } + list1.filter { x1 -> list0.none { Iota.tolerates(x1, it) } } } + UNIQUE -> OperatorUnique + else -> throw InvalidOperatorException("$pattern is not a valid operator in Arithmetic $this.") + } + + + private fun make2(op: BinaryOperator>): OperatorBinary = OperatorBinary(all(IotaPredicate.ofType(LIST))) + { i: Iota, j: Iota -> ListIota( + op.apply(downcast(i, LIST).list.toList(), downcast(j, LIST).list.toList()) + ) } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java index e125a869..f79abd50 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java @@ -1,6 +1,7 @@ package at.petrak.hexcasting.common.casting.arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; +import at.petrak.hexcasting.api.casting.arithmetic.engine.InvalidOperatorException; import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; import at.petrak.hexcasting.api.casting.arithmetic.operator.*; @@ -66,7 +67,7 @@ public enum Vec3Arithmetic implements Arithmetic { } else if (pattern.equals(MOD)) { return make2Fallback(pattern); } - return null; + throw new InvalidOperatorException(pattern + " is not a valid operator in Arithmetic " + this + "."); } public static OperatorUnary make1Double(Function op) { return new OperatorUnary(ACCEPTS, i -> new DoubleIota(op.apply(downcast(i, VEC3).getVec3()))); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt similarity index 57% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt index f1168eb1..5695e61a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorConcat.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt @@ -6,14 +6,21 @@ import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList -import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.* +import at.petrak.hexcasting.common.casting.operators.math.bit.OpToSet +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST -object OperatorConcat : Operator(2, IotaMultiPredicate.all(IotaPredicate.ofType(LIST))) { +object OperatorUnique : Operator(1, IotaMultiPredicate.all(IotaPredicate.ofType(LIST))) { override fun apply(iotas: Iterable): Iterable { val it = iotas.iterator().withIndex() - val lhs = it.nextList(arity).toMutableList() - val rhs = it.nextList(arity) - lhs.addAll(rhs) - return lhs.asActionResult + val list = it.nextList(OpToSet.argc) + val out = mutableListOf() + + for (subiota in list) { + if (out.none { Iota.tolerates(it, subiota) }) { + out.add(subiota) + } + } + + return out.asActionResult } } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index b6275142..15470047 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -27,7 +27,6 @@ import at.petrak.hexcasting.common.casting.operators.lists.*; import at.petrak.hexcasting.common.casting.operators.local.OpPeekLocal; import at.petrak.hexcasting.common.casting.operators.local.OpPushLocal; import at.petrak.hexcasting.common.casting.operators.math.*; -import at.petrak.hexcasting.common.casting.operators.math.bit.*; import at.petrak.hexcasting.common.casting.operators.math.logic.*; import at.petrak.hexcasting.common.casting.operators.math.trig.*; import at.petrak.hexcasting.common.casting.operators.raycast.OpBlockAxisRaycast; @@ -144,13 +143,13 @@ public class HexActions { new OperationAction(HexPattern.fromAngles("waaw", HexDir.NORTH_EAST))); public static final ActionRegistryEntry SUB = make("sub", new OperationAction(HexPattern.fromAngles("wddw", HexDir.NORTH_WEST))); - public static final ActionRegistryEntry MUL_DOT = make("mul_dot", + public static final ActionRegistryEntry MUL_DOT = make("mul", new OperationAction(HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST))); - public static final ActionRegistryEntry DIV_CROSS = make("div_cross", + public static final ActionRegistryEntry DIV_CROSS = make("div", new OperationAction(HexPattern.fromAngles("wdedw", HexDir.NORTH_EAST))); - public static final ActionRegistryEntry ABS_LEN = make("abs_len", + public static final ActionRegistryEntry ABS = make("abs", new OperationAction(HexPattern.fromAngles("wqaqw", HexDir.NORTH_EAST))); - public static final ActionRegistryEntry POW_PROJ = make("pow_proj", + public static final ActionRegistryEntry POW_PROJ = make("pow", new OperationAction(HexPattern.fromAngles("wedew", HexDir.NORTH_WEST))); public static final ActionRegistryEntry FLOOR = make("floor", new OperationAction(HexPattern.fromAngles("ewq", HexDir.EAST))); @@ -167,23 +166,23 @@ public class HexActions { // == Logic == public static final ActionRegistryEntry AND = make("and", - new ActionRegistryEntry(HexPattern.fromAngles("wdw", HexDir.NORTH_EAST), OpBoolAnd.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wdw", HexDir.NORTH_EAST))); public static final ActionRegistryEntry OR = make("or", - new ActionRegistryEntry(HexPattern.fromAngles("waw", HexDir.SOUTH_EAST), OpBoolOr.INSTANCE)); + new OperationAction(HexPattern.fromAngles("waw", HexDir.SOUTH_EAST))); public static final ActionRegistryEntry XOR = make("xor", - new ActionRegistryEntry(HexPattern.fromAngles("dwa", HexDir.NORTH_WEST), OpBoolXor.INSTANCE)); - public static final ActionRegistryEntry GREATER = make("greater", new ActionRegistryEntry( - HexPattern.fromAngles("e", HexDir.SOUTH_EAST), new OpCompare(false, (a, b) -> a > b) - )); - public static final ActionRegistryEntry LESS = make("less", new ActionRegistryEntry( - HexPattern.fromAngles("q", HexDir.SOUTH_WEST), new OpCompare(false, (a, b) -> a < b) - )); - public static final ActionRegistryEntry GREATER_EQ = make("greater_eq", new ActionRegistryEntry( - HexPattern.fromAngles("ee", HexDir.SOUTH_EAST), new OpCompare(true, (a, b) -> a >= b) - )); - public static final ActionRegistryEntry LESS_EQ = make("less_eq", new ActionRegistryEntry( - HexPattern.fromAngles("qq", HexDir.SOUTH_WEST), new OpCompare(true, (a, b) -> a <= b) - )); + new OperationAction(HexPattern.fromAngles("dwa", HexDir.NORTH_WEST))); + public static final ActionRegistryEntry GREATER = make("greater", new OperationAction( + HexPattern.fromAngles("e", HexDir.SOUTH_EAST)) + ); + public static final ActionRegistryEntry LESS = make("less", new OperationAction( + HexPattern.fromAngles("q", HexDir.SOUTH_WEST)) + ); + public static final ActionRegistryEntry GREATER_EQ = make("greater_eq", new OperationAction( + HexPattern.fromAngles("ee", HexDir.SOUTH_EAST)) + ); + public static final ActionRegistryEntry LESS_EQ = make("less_eq", new OperationAction( + HexPattern.fromAngles("qq", HexDir.SOUTH_WEST)) + ); public static final ActionRegistryEntry EQUALS = make("equals", new ActionRegistryEntry(HexPattern.fromAngles("ad", HexDir.EAST), new OpEquality(false))); public static final ActionRegistryEntry NOT_EQUALS = make("not_equals", @@ -192,8 +191,6 @@ public class HexActions { new ActionRegistryEntry(HexPattern.fromAngles("dw", HexDir.NORTH_WEST), OpBoolNot.INSTANCE)); public static final ActionRegistryEntry BOOL_COERCE = make("bool_coerce", new ActionRegistryEntry(HexPattern.fromAngles("aw", HexDir.NORTH_EAST), OpCoerceToBool.INSTANCE)); - public static final ActionRegistryEntry BOOL_TO_NUMBER = make("bool_to_number", - new ActionRegistryEntry(HexPattern.fromAngles("awd", HexDir.SOUTH_EAST), OpBoolToNumber.INSTANCE)); public static final ActionRegistryEntry IF = make("if", new ActionRegistryEntry(HexPattern.fromAngles("awdd", HexDir.SOUTH_EAST), OpBoolIf.INSTANCE)); @@ -219,20 +216,12 @@ public class HexActions { public static final ActionRegistryEntry LOGARITHM = make("logarithm", new ActionRegistryEntry(HexPattern.fromAngles("eqaqe", HexDir.NORTH_WEST), OpLog.INSTANCE)); public static final ActionRegistryEntry MODULO = make("modulo", - new ActionRegistryEntry(HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST), OpModulo.INSTANCE)); + new OperationAction(HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST))); // == Sets == - public static final ActionRegistryEntry BIT$AND = make("bit/and", - new ActionRegistryEntry(HexPattern.fromAngles("wdweaqa", HexDir.NORTH_EAST), OpAnd.INSTANCE)); - public static final ActionRegistryEntry BIT$OR = make("bit/or", - new ActionRegistryEntry(HexPattern.fromAngles("waweaqa", HexDir.SOUTH_EAST), OpOr.INSTANCE)); - public static final ActionRegistryEntry BIT$XOR = make("bit/xor", - new ActionRegistryEntry(HexPattern.fromAngles("dwaeaqa", HexDir.NORTH_WEST), OpXor.INSTANCE)); - public static final ActionRegistryEntry BIT$NOT = make("bit/not", - new ActionRegistryEntry(HexPattern.fromAngles("dweaqa", HexDir.NORTH_WEST), OpNot.INSTANCE)); - public static final ActionRegistryEntry BIT$TO_SET = make("bit/to_set", - new ActionRegistryEntry(HexPattern.fromAngles("aweaqa", HexDir.NORTH_EAST), OpToSet.INSTANCE)); + public static final ActionRegistryEntry UNIQUE = make("unique", + new OperationAction(HexPattern.fromAngles("aweaqa", HexDir.NORTH_EAST))); // == Spells == diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java index 27d59115..f3feb0da 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexArithmetics.java @@ -2,9 +2,7 @@ package at.petrak.hexcasting.common.lib.hex; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.arithmetic.engine.ArithmeticEngine; -import at.petrak.hexcasting.common.casting.arithmetic.DoubleArithmetic; -import at.petrak.hexcasting.common.casting.arithmetic.ListArithmetic; -import at.petrak.hexcasting.common.casting.arithmetic.Vec3Arithmetic; +import at.petrak.hexcasting.common.casting.arithmetic.*; import at.petrak.hexcasting.xplat.IXplatAbstractions; import net.minecraft.core.Holder; import net.minecraft.core.Registry; @@ -40,6 +38,9 @@ public class HexArithmetics { public static DoubleArithmetic DOUBLE = make("double", DoubleArithmetic.INSTANCE); public static Vec3Arithmetic VEC3 = make("vec3", Vec3Arithmetic.INSTANCE); public static ListArithmetic LIST = make("list", ListArithmetic.INSTANCE); + public static BoolArithmetic BOOL = make("bool", BoolArithmetic.INSTANCE); + public static ListSetArithmetic LIST_SET = make("list_set", ListSetArithmetic.INSTANCE); + public static BitwiseSetArithmetic BITWISE_SET = make("bitwise_set", BitwiseSetArithmetic.INSTANCE); private static T make(String name, T arithmetic) { var old = ARITHMETICS.put(modLoc(name), arithmetic); 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 81d034b7..768dc47e 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 @@ -378,8 +378,9 @@ "circle/impetus_dir": "Lodestone Reflection", "circle/bounds/min": "Lesser Fold Reflection", "circle/bounds/max": "Greater Fold Reflection", - + "append": "Integration Distillation", + "unappend": "Derivation Distillation", "concat": "Combination Distillation", "index": "Selection Distillation", "list_size": "Abacus Purification", @@ -426,11 +427,7 @@ "fisherman/copy": "Fisherman's Gambit II", "swizzle": "Swindler's Gambit", - "bit/and": "Intersection Distillation", - "bit/or": "Unifying Distillation", - "bit/xor": "Exclusionary Distillation", - "bit/not": "Inversion Purification", - "bit/to_set": "Uniqueness Purification", + "unique": "Uniqueness Purification", "and": "Conjunction Distillation", "or": "Disjunction Distillation", "xor": "Exclusion Distillation", @@ -443,15 +440,14 @@ "not_equals": "Inequality Distillation", "not": "Negation Purification", "bool_coerce": "Augur's Purification", - "bool_to_number": "Numerologist's Purification", "if": "Augur's Exaltation", "add": "Additive Distillation", "sub": "Subtractive Distillation", - "mul_dot": "Multiplicative Dstl.", - "div_cross": "Division Dstl.", - "abs_len": "Length Purification", - "pow_proj": "Power Distillation", + "mul": "Multiplicative Dstl.", + "div": "Division Dstl.", + "abs": "Length Purification", + "pow": "Power Distillation", "floor": "Floor Purification", "ceil": "Ceiling Purification", "modulo": "Modulus Distillation", @@ -561,8 +557,8 @@ "zone_entity/not_item": "Zone Dstl.: Non-Item", "zone_entity/not_player": "Zone Dstl.: Non-Player", "zone_entity/not_living": "Zone Dstl.: Non-Living", - "mul_dot": "Multiplicative Dstl.", - "div_cross": "Division Dstl.", + "mul": "Multiplicative Dstl.", + "div": "Division Dstl.", "arcsin": "Inverse Sine Prfn.", "arccos": "Inverse Cosine Prfn.", "arctan": "Inverse Tangent Prfn.", @@ -1141,14 +1137,14 @@ "math.add.2": "As such:$(li)With two numbers at the top of the stack, combines them into their sum.$(li)With a number and a vector, removes the number from the stack and adds it to each element of the vector.$(li)With two vectors, combines them by summing corresponding components into a new vector (i.e. [1, 2, 3] + [0, 4, -1] = [1, 6, 2]).", "math.sub.1": "Perform subtraction.", "math.sub.2": "As such:$(li)With two numbers at the top of the stack, combines them into their difference.$(li)With a number and a vector, removes the number from the stack and subtracts it from each element of the vector.$(li)With two vectors, combines them by subtracting each component.$(br2)In all cases, the top of the stack or its components are subtracted $(italic)from/$ the second-from-the-top.", - "math.mul_dot.1": "Perform multiplication or the dot product.", - "math.mul_dot.2": "As such:$(li)With two numbers, combines them into their product.$(li)With a number and a vector, removes the number from the stack and multiplies each component of the vector by that number.$(li)With two vectors, combines them into their $(l:https://www.mathsisfun.com/algebra/vectors-dot-product.html)dot product/$.", - "math.div_cross.1": "Perform division or the cross product.", - "math.div_cross.2": "As such:$(li)With two numbers, combines them into their quotient.$(li)With a number and a vector, removes the number and divides it by each element of the vector.$(li)With two vectors, combines them into their $(l:https://www.mathsisfun.com/algebra/vectors-cross-product.html)cross product/$.$(br2)In the first and second cases, the top of the stack or its components comprise the dividend, and the second-from-the-top or its components are the divisor.$(p)WARNING: Never divide by zero!", - "math.abs_len.1": "Compute the absolute value or length.", - "math.abs_len.2": "Replaces a number with its absolute value, or a vector with its length.", - "math.pow_proj.1": "Perform exponentiation or vector projection.", - "math.pow_proj.2": "With two numbers, combines them by raising the first to the power of the second.$(li)With a number and a vector, removes the number and raises each component of the vector to the number's power.$(li)With two vectors, combines them into the $(l:https://en.wikipedia.org/wiki/Vector_projection)vector projection/$ of the top of the stack onto the second-from-the-top.$(br2)In the first and second cases, the first argument or its components are the base, and the second argument or its components are the exponent.", + "math.mul.1": "Perform multiplication or the dot product.", + "math.mul.2": "As such:$(li)With two numbers, combines them into their product.$(li)With a number and a vector, removes the number from the stack and multiplies each component of the vector by that number.$(li)With two vectors, combines them into their $(l:https://www.mathsisfun.com/algebra/vectors-dot-product.html)dot product/$.", + "math.div.1": "Perform division or the cross product.", + "math.div.2": "As such:$(li)With two numbers, combines them into their quotient.$(li)With a number and a vector, removes the number and divides it by each element of the vector.$(li)With two vectors, combines them into their $(l:https://www.mathsisfun.com/algebra/vectors-cross-product.html)cross product/$.$(br2)In the first and second cases, the top of the stack or its components comprise the dividend, and the second-from-the-top or its components are the divisor.$(p)WARNING: Never divide by zero!", + "math.abs.1": "Compute the absolute value or length.", + "math.abs.2": "Replaces a number with its absolute value, or a vector with its length.", + "math.pow.1": "Perform exponentiation or vector projection.", + "math.pow.2": "With two numbers, combines them by raising the first to the power of the second.$(li)With a number and a vector, removes the number and raises each component of the vector to the number's power.$(li)With two vectors, combines them into the $(l:https://en.wikipedia.org/wiki/Vector_projection)vector projection/$ of the top of the stack onto the second-from-the-top.$(br2)In the first and second cases, the first argument or its components are the base, and the second argument or its components are the exponent.", "math.floor": "\"Floors\" a number, cutting off the fractional component and leaving an integer value.", "math.ceil": "\"Ceilings\" a number, raising it to the next integer value if it has a fractional component.", "math.construct_vec": "Combine three numbers at the top of the stack into a vector's X, Y, and Z components (top to bottom).", @@ -1248,6 +1244,7 @@ "lists.index": "Remove the number at the top of the stack, then replace the list at the top with the nth element of that list (where n is the number you removed). Replaces the list with $(l:casting/influences)$(thing)Null/$ if the number is out of bounds.", "lists.slice": "Remove the two numbers at the top of the stack, then take a sublist of the list at the top of the stack between those indices, lower bound inclusive, upper bound exclusive. For example, the 0, 2 sublist of [0, 1, 2, 3, 4] would be [0, 1].", "lists.append": "Remove the top of the stack, then add it to the end of the list at the top of the stack.", + "lists.unappend": "Remove the iota on the end of the list at the top of the stack, and add it to the top of the stack.", "lists.concat": "Remove the list at the top of the stack, then add all its elements to the end of the list at the top of the stack.", "lists.empty_list": "Push an empty list to the top of the stack.", "lists.singleton": "Remove the top of the stack, then push a list containing only that element.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json index 25ddace2..397515fe 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json @@ -64,8 +64,8 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:abs_len", - "anchor": "hexcasting:abs_len", + "op_id": "hexcasting:abs", + "anchor": "hexcasting:abs", "input": "list", "output": "num", "text": "hexcasting.page.lists.list_size" diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json index 5a26c280..5bc549db 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json @@ -16,8 +16,8 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:bool_to_number", - "anchor": "hexcasting:bool_to_number", + "op_id": "hexcasting:abs", + "anchor": "hexcasting:abs", "input": "bool", "output": "number", "text": "hexcasting.page.logic.bool_to_number" @@ -26,8 +26,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:not", "anchor": "hexcasting:not", - "input": "any", - "output": "number", + "input": "bool", + "output": "bool", "text": "hexcasting.page.logic.not" }, { diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json index 10a2526a..59203d0e 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json @@ -39,51 +39,51 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:mul_dot", - "anchor": "hexcasting:mul_dot", + "op_id": "hexcasting:mul", + "anchor": "hexcasting:mul", "input": "num/vec, num/vec", "output": "num/vec", - "text": "hexcasting.page.math.mul_dot.1" + "text": "hexcasting.page.math.mul.1" }, { "type": "patchouli:text", - "text": "hexcasting.page.math.mul_dot.2" + "text": "hexcasting.page.math.mul.2" }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:div_cross", - "anchor": "hexcasting:div_cross", + "op_id": "hexcasting:div", + "anchor": "hexcasting:div", "input": "num/vec, num/vec", "output": "num/vec", - "text": "hexcasting.page.math.div_cross.1" + "text": "hexcasting.page.math.div.1" }, { "type": "patchouli:text", - "text": "hexcasting.page.math.div_cross.2" + "text": "hexcasting.page.math.div.2" }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:abs_len", - "anchor": "hexcasting:abs_len", + "op_id": "hexcasting:abs", + "anchor": "hexcasting:abs", "input": "num/vec", "output": "number", - "text": "hexcasting.page.math.abs_len.1" + "text": "hexcasting.page.math.abs.1" }, { "type": "patchouli:text", - "text": "hexcasting.page.math.abs_len.2" + "text": "hexcasting.page.math.abs.2" }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:pow_proj", - "anchor": "hexcasting:pow_proj", + "op_id": "hexcasting:pow", + "anchor": "hexcasting:pow", "input": "num/vec, num/vec", "output": "num/vec", - "text": "hexcasting.page.math.pow_proj.1" + "text": "hexcasting.page.math.pow.1" }, { "type": "patchouli:text", - "text": "hexcasting.page.math.pow_proj.2" + "text": "hexcasting.page.math.pow.2" }, { "type": "hexcasting:pattern", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json index 7d6a397e..10010d64 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json @@ -15,8 +15,8 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:bit/or", - "anchor": "hexcasting:bit/or", + "op_id": "hexcasting:or", + "anchor": "hexcasting:or", "input": "num, num/list, list", "output": "num/list", "text": "hexcasting.page.sets.or.1" @@ -27,8 +27,8 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:bit/and", - "anchor": "hexcasting:bit/and", + "op_id": "hexcasting:and", + "anchor": "hexcasting:and", "input": "num, num/list, list", "output": "num/list", "text": "hexcasting.page.sets.and.1" @@ -39,8 +39,8 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:bit/xor", - "anchor": "hexcasting:bit/xor", + "op_id": "hexcasting:xor", + "anchor": "hexcasting:xor", "input": "num, num/list, list", "output": "num/list", "text": "hexcasting.page.sets.xor.1" @@ -51,16 +51,16 @@ }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:bit/not", - "anchor": "hexcasting:bit/not", + "op_id": "hexcasting:not", + "anchor": "hexcasting:not", "input": "num", "output": "num", "text": "hexcasting.page.sets.not" }, { "type": "hexcasting:pattern", - "op_id": "hexcasting:bit/to_set", - "anchor": "hexcasting:bit/to_set", + "op_id": "hexcasting:unique", + "anchor": "hexcasting:unique", "input": "list", "output": "list", "text": "hexcasting.page.sets.to_set" From 9ef5a8d15fb2833f196138844dbcad496eb1d0ae Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Wed, 31 May 2023 23:22:55 +1000 Subject: [PATCH 18/48] Fix #465, tooltips for lists, null iotas, and patterns not being setup properly. --- .../resources/assets/hexcasting/lang/en_us.flatten.json5 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 768dc47e..42453684 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 @@ -296,7 +296,11 @@ "brainsweep.level": "Level %s", "brainsweep.product": "Mindless Body", - "media": "%d dust" + "media": "%d dust", + + "list_contents": "[%s]", + "null_iota": "Null", + "pattern_iota": "HexPattern(%s)" }, // ^ tooltip spelldata: { From 67fd933397cc65bf008e7050b2ff0579071bc8ad Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 17:08:29 +1000 Subject: [PATCH 19/48] made all the maths stuff operators. --- .../api/casting/arithmetic/Arithmetic.java | 11 ++++ .../casting/arithmetic/DoubleArithmetic.java | 25 +++++++++ .../arithmetic/operator/OperatorLog.kt | 21 ++++++++ .../arithmetic/operator/OperatorUtils.kt | 7 +++ .../hexcasting/common/lib/hex/HexActions.java | 53 ++++++------------- 5 files changed, 81 insertions(+), 36 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorLog.kt diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java index bac8c63f..f9c2ad09 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -19,7 +19,18 @@ public interface Arithmetic { HexPattern POW = HexPattern.fromAngles("wedew", HexDir.NORTH_WEST); HexPattern FLOOR = HexPattern.fromAngles("ewq", HexDir.EAST); HexPattern CEIL = HexPattern.fromAngles("qwe", HexDir.EAST); + HexPattern SIN = HexPattern.fromAngles("qqqqqaa", HexDir.SOUTH_EAST); + HexPattern COS = HexPattern.fromAngles("qqqqqad", HexDir.SOUTH_EAST); + HexPattern TAN = HexPattern.fromAngles("wqqqqqadq", HexDir.SOUTH_WEST); + HexPattern ARCSIN = HexPattern.fromAngles("ddeeeee", HexDir.SOUTH_EAST); + HexPattern ARCCOS = HexPattern.fromAngles("adeeeee", HexDir.NORTH_EAST); + HexPattern ARCTAN = HexPattern.fromAngles("eadeeeeew", HexDir.NORTH_EAST); + HexPattern ARCTAN2 = HexPattern.fromAngles("deadeeeeewd", HexDir.WEST); + HexPattern LOG = HexPattern.fromAngles("eqaqe", HexDir.NORTH_WEST); HexPattern MOD = HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST); + + + // Vecs HexPattern PACK = HexPattern.fromAngles("eqqqqq", HexDir.EAST); HexPattern UNPACK = HexPattern.fromAngles("qeeeee", HexDir.EAST); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java index 34e4bbfe..d5ff8030 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java @@ -8,6 +8,7 @@ import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.math.HexPattern; +import at.petrak.hexcasting.common.casting.arithmetic.operator.OperatorLog; import java.util.List; import java.util.function.DoubleBinaryOperator; @@ -28,6 +29,14 @@ public enum DoubleArithmetic implements Arithmetic { POW, FLOOR, CEIL, + SIN, + COS, + TAN, + ARCSIN, + ARCCOS, + ARCTAN, + ARCTAN2, + LOG, MOD ); @@ -61,6 +70,22 @@ public enum DoubleArithmetic implements Arithmetic { return make1(Math::floor); } else if (pattern.equals(CEIL)) { return make1(Math::ceil); + } else if (pattern.equals(SIN)) { + return make1(Math::sin); + } else if (pattern.equals(COS)) { + return make1(Math::cos); + } else if (pattern.equals(TAN)) { + return make1(Math::tan); + } else if (pattern.equals(ARCSIN)) { + return make1(Math::asin); + } else if (pattern.equals(ARCCOS)) { + return make1(Math::acos); + } else if (pattern.equals(ARCTAN)) { + return make1(Math::atan); + } else if (pattern.equals(ARCTAN2)) { + return make2(Math::atan2); + } else if (pattern.equals(LOG)) { + return OperatorLog.INSTANCE; } else if (pattern.equals(MOD)) { return make2((p, q) -> p % q); } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorLog.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorLog.kt new file mode 100644 index 00000000..8af623e4 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorLog.kt @@ -0,0 +1,21 @@ +package at.petrak.hexcasting.common.casting.arithmetic.operator + +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.mishaps.MishapDivideByZero +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.DOUBLE +import kotlin.math.log + +object OperatorLog : Operator(2, IotaMultiPredicate.all(IotaPredicate.ofType(DOUBLE))) { + override fun apply(iotas: Iterable): Iterable { + val it = iotas.iterator().withIndex() + val value = it.nextDouble(arity) + val base = it.nextDouble(arity) + if (value <= 0.0 || base <= 0.0 || base == 1.0) + throw MishapDivideByZero.of(iotas.first(), iotas.last(), "logarithm") + return log(value, base).asActionResult + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt index f2015fed..ffbcc042 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt @@ -16,6 +16,13 @@ fun Iterator>.nextList(argc: Int = 0): SpellList { throw MishapInvalidIota.ofType(x, if (argc == 0) idx else argc - (idx + 1), "list") } } + +fun Iterator>.nextDouble(argc: Int = 0): Double { + val (idx, x) = this.next() + if (x is DoubleIota) return x.double + throw MishapInvalidIota.of(x, if (argc == 0) idx else argc - (idx + 1), "double") +} + fun Iterator>.nextInt(argc: Int = 0): Int { val (idx, x) = this.next() if (x is DoubleIota) { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index 15470047..9abeda8e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -11,42 +11,23 @@ import at.petrak.hexcasting.api.casting.math.HexDir; import at.petrak.hexcasting.api.casting.math.HexPattern; import at.petrak.hexcasting.api.misc.MediaConstants; import at.petrak.hexcasting.api.utils.HexUtils; -import at.petrak.hexcasting.common.casting.operators.OpEntityHeight; -import at.petrak.hexcasting.common.casting.operators.OpEntityLook; -import at.petrak.hexcasting.common.casting.operators.OpEntityPos; -import at.petrak.hexcasting.common.casting.operators.OpEntityVelocity; -import at.petrak.hexcasting.common.casting.operators.akashic.OpAkashicRead; -import at.petrak.hexcasting.common.casting.operators.akashic.OpAkashicWrite; -import at.petrak.hexcasting.common.casting.operators.circles.OpCircleBounds; -import at.petrak.hexcasting.common.casting.operators.circles.OpImpetusDir; -import at.petrak.hexcasting.common.casting.operators.circles.OpImpetusPos; -import at.petrak.hexcasting.common.casting.operators.eval.OpEval; -import at.petrak.hexcasting.common.casting.operators.eval.OpForEach; -import at.petrak.hexcasting.common.casting.operators.eval.OpHalt; +import at.petrak.hexcasting.common.casting.operators.*; +import at.petrak.hexcasting.common.casting.operators.akashic.*; +import at.petrak.hexcasting.common.casting.operators.circles.*; +import at.petrak.hexcasting.common.casting.operators.eval.*; import at.petrak.hexcasting.common.casting.operators.lists.*; -import at.petrak.hexcasting.common.casting.operators.local.OpPeekLocal; -import at.petrak.hexcasting.common.casting.operators.local.OpPushLocal; +import at.petrak.hexcasting.common.casting.operators.local.*; import at.petrak.hexcasting.common.casting.operators.math.*; import at.petrak.hexcasting.common.casting.operators.math.logic.*; -import at.petrak.hexcasting.common.casting.operators.math.trig.*; -import at.petrak.hexcasting.common.casting.operators.raycast.OpBlockAxisRaycast; -import at.petrak.hexcasting.common.casting.operators.raycast.OpBlockRaycast; -import at.petrak.hexcasting.common.casting.operators.raycast.OpEntityRaycast; +import at.petrak.hexcasting.common.casting.operators.raycast.*; import at.petrak.hexcasting.common.casting.operators.rw.*; -import at.petrak.hexcasting.common.casting.operators.selectors.OpGetCaster; -import at.petrak.hexcasting.common.casting.operators.selectors.OpGetEntitiesBy; -import at.petrak.hexcasting.common.casting.operators.selectors.OpGetEntityAt; +import at.petrak.hexcasting.common.casting.operators.selectors.*; import at.petrak.hexcasting.common.casting.operators.spells.*; import at.petrak.hexcasting.common.casting.operators.spells.great.*; -import at.petrak.hexcasting.common.casting.operators.spells.sentinel.OpCreateSentinel; -import at.petrak.hexcasting.common.casting.operators.spells.sentinel.OpDestroySentinel; -import at.petrak.hexcasting.common.casting.operators.spells.sentinel.OpGetSentinelPos; -import at.petrak.hexcasting.common.casting.operators.spells.sentinel.OpGetSentinelWayfind; +import at.petrak.hexcasting.common.casting.operators.spells.sentinel.*; import at.petrak.hexcasting.common.casting.operators.stack.*; import at.petrak.hexcasting.common.lib.HexItems; -import at.petrak.hexcasting.interop.pehkui.OpGetScale; -import at.petrak.hexcasting.interop.pehkui.OpSetScale; -import at.petrak.hexcasting.interop.pehkui.PehkuiInterop; +import at.petrak.hexcasting.interop.pehkui.*; import at.petrak.hexcasting.xplat.IXplatAbstractions; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; @@ -200,21 +181,21 @@ public class HexActions { // == Advanced Math == public static final ActionRegistryEntry SIN = make("sin", - new ActionRegistryEntry(HexPattern.fromAngles("qqqqqaa", HexDir.SOUTH_EAST), OpSin.INSTANCE)); + new OperationAction(HexPattern.fromAngles("qqqqqaa", HexDir.SOUTH_EAST))); public static final ActionRegistryEntry COS = make("cos", - new ActionRegistryEntry(HexPattern.fromAngles("qqqqqad", HexDir.SOUTH_EAST), OpCos.INSTANCE)); + new OperationAction(HexPattern.fromAngles("qqqqqad", HexDir.SOUTH_EAST))); public static final ActionRegistryEntry TAN = make("tan", - new ActionRegistryEntry(HexPattern.fromAngles("wqqqqqadq", HexDir.SOUTH_WEST), OpTan.INSTANCE)); + new OperationAction(HexPattern.fromAngles("wqqqqqadq", HexDir.SOUTH_WEST))); public static final ActionRegistryEntry ARCSIN = make("arcsin", - new ActionRegistryEntry(HexPattern.fromAngles("ddeeeee", HexDir.SOUTH_EAST), OpArcSin.INSTANCE)); + new OperationAction(HexPattern.fromAngles("ddeeeee", HexDir.SOUTH_EAST))); public static final ActionRegistryEntry ARCCOS = make("arccos", - new ActionRegistryEntry(HexPattern.fromAngles("adeeeee", HexDir.NORTH_EAST), OpArcCos.INSTANCE)); + new OperationAction(HexPattern.fromAngles("adeeeee", HexDir.NORTH_EAST))); public static final ActionRegistryEntry ARCTAN = make("arctan", - new ActionRegistryEntry(HexPattern.fromAngles("eadeeeeew", HexDir.NORTH_EAST), OpArcTan.INSTANCE)); + new OperationAction(HexPattern.fromAngles("eadeeeeew", HexDir.NORTH_EAST))); public static final ActionRegistryEntry ARCTAN2 = make("arctan2", - new ActionRegistryEntry(HexPattern.fromAngles("deadeeeeewd", HexDir.WEST), OpArcTan2.INSTANCE)); + new OperationAction(HexPattern.fromAngles("deadeeeeewd", HexDir.WEST))); public static final ActionRegistryEntry LOGARITHM = make("logarithm", - new ActionRegistryEntry(HexPattern.fromAngles("eqaqe", HexDir.NORTH_WEST), OpLog.INSTANCE)); + new OperationAction(HexPattern.fromAngles("eqaqe", HexDir.NORTH_WEST))); public static final ActionRegistryEntry MODULO = make("modulo", new OperationAction(HexPattern.fromAngles("addwaad", HexDir.NORTH_EAST))); From d7b2946f55f22047f23db39b1319fbf9e09f5380 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 17:44:56 +1000 Subject: [PATCH 20/48] added a bunch of comments to all the out-facing parts of the Arithmetic system. --- .../api/casting/arithmetic/Arithmetic.java | 13 +++++++ .../arithmetic/engine/ArithmeticEngine.java | 37 ++++++++++++++++--- .../casting/arithmetic/operator/Operator.java | 24 ++++++++++++ .../arithmetic/operator/OperatorBinary.java | 3 ++ .../arithmetic/operator/OperatorUnary.java | 3 ++ .../predicates/IotaMultiPredicate.java | 16 ++++++++ .../arithmetic/predicates/IotaPredicate.java | 13 +++++++ .../api/casting/castables/OperationAction.kt | 4 ++ .../casting/arithmetic/DoubleArithmetic.java | 4 ++ 9 files changed, 111 insertions(+), 6 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java index f9c2ad09..10f9f9cd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/Arithmetic.java @@ -4,13 +4,26 @@ import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; import at.petrak.hexcasting.api.casting.math.HexDir; import at.petrak.hexcasting.api.casting.math.HexPattern; +/** + * This is the interface to implement if you want to override the behaviour of an Operator pattern like ADD, SUB, etc. for some type/s of + * iotas for which that Operator pattern is not yet defined. + */ public interface Arithmetic { String arithName(); + /** + * @return All the HexPatterns for which this Arithmetic has defined Operators. + */ Iterable opTypes(); + /** + * @param pattern The HexPattern that would be drawn by the caster. + * @return The Operator that this Arithmetic has defined for that pattern. + */ Operator getOperator(HexPattern pattern); + // Below are some common Operator patterns that you can make use of in your Arithmetic: + HexPattern ADD = HexPattern.fromAngles("waaw", HexDir.NORTH_EAST); HexPattern SUB = HexPattern.fromAngles("wddw", HexDir.NORTH_WEST); HexPattern MUL = HexPattern.fromAngles("waqaw", HexDir.SOUTH_EAST); diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java index 73ed333b..515631e2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/engine/ArithmeticEngine.java @@ -9,11 +9,23 @@ import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughArgs; import java.util.*; +/** + * This is the class responsible for managing the various Arithmetics that are in use, deciding based on the current + * stack which Operator should be called, etc. + */ public class ArithmeticEngine { + /** + * Data structure for mapping the pattern that gets drawn on the stack to the list of Operators that + * are overloading that pattern. + * @param pattern The pattern that the caster will need to draw to cast one of these operators. + * @param arity The number of arguments that all of these operators must consume from the stack. + * @param operators The list of all operators that overload this pattern. + */ private record OpCandidates(HexPattern pattern, int arity, List operators) { public void addOp(Operator next) { if (next.arity != arity) { - throw new IllegalArgumentException("Operators exist of differing arity!"); + throw new IllegalArgumentException("Operators exist of differing arity! The pattern " + pattern + + " already had arity " + arity + " when the operator with arity " + next.arity + ", " + next + " was added."); } operators.add(next); } @@ -21,6 +33,11 @@ public class ArithmeticEngine { public final Arithmetic[] arithmetics; private final Map operators = new HashMap<>(); + + /** + * A cache mapping specific sets of Pattern, IotaType, IotaType, ..., IotaType to Operators so that the Operators don't need to be + * queried for what types they accept every time they are used. + */ private final Map cache = new HashMap<>(); public ArithmeticEngine(List arithmetics) { @@ -43,11 +60,19 @@ public class ArithmeticEngine { return operators.keySet(); } - public Iterable run(HexPattern operator, Stack iotas, int startingLength) throws Mishap { - var candidates = operators.get(operator); + /** + * Runs one of the contained Operators assigned to the given pattern, modifying the passed stack of iotas. + * @param pattern The pattern that was drawn, used to determine which operators are candidates. + * @param iotas The current stack. + * @param startingLength The length of the stack before the operator executes (used for errors). + * @return The iotas to be added to the stack. + * @throws Mishap mishaps if invalid input to the operators is given by the caster. + */ + public Iterable run(HexPattern pattern, Stack iotas, int startingLength) throws Mishap { + var candidates = operators.get(pattern); if (candidates == null) - throw new InvalidOperatorException("the pattern " + operator + " is not an operator."); // - HashCons hash = new HashCons.Pattern(operator); + throw new InvalidOperatorException("the pattern " + pattern + " is not an operator."); // + HashCons hash = new HashCons.Pattern(pattern); var args = new ArrayList(candidates.arity()); for (var i = 0; i < candidates.arity(); i++) { if (iotas.isEmpty()) { @@ -62,7 +87,7 @@ public class ArithmeticEngine { return op.apply(args); } - public Operator resolveCandidates(List args, HashCons hash, OpCandidates candidates) { + private Operator resolveCandidates(List args, HashCons hash, OpCandidates candidates) { return cache.computeIfAbsent(hash, $ -> { for (var op : candidates.operators()) { if (op.accepts.test(args)) { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java index 37381842..25567e35 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java @@ -5,18 +5,42 @@ import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; import org.jetbrains.annotations.NotNull; +/** + * Represents an Operator, similar to Action except that it also has a defined set of IotaTypes that it accepts, and + * there can be multiple Operators 'assigned' to the same pattern in different Arithmetics as long as they don't have + * overlapping matched types. (Overlapping matched types is not checked for, but will have undefined behaviour). + */ public abstract class Operator { + /** + * The number of arguments from the stack that this Operator requires; all Operators with the same pattern must have + * the same arity. + */ public final int arity; + /** + * A function that should return true if the passed list of Iotas satisfies this Operator's type constraints, and false otherwise. + */ public final IotaMultiPredicate accepts; + /** + * @param arity The number of arguments from the stack that this Operator requires; all Operators with the same pattern must have arity. + * @param accepts A function that should return true if the passed list of Iotas satisfies this Operator's type constraints, and false otherwise. + */ public Operator(int arity, IotaMultiPredicate accepts) { this.arity = arity; this.accepts = accepts; } + /** + * The method called when this Operator is actually acting on the stack, for real. + * @param iotas An iterable of iotas with {@link Operator#arity} elements that satisfied {@link Operator#accepts}. + * @return the iotas that this operator will return to the stack (with the first element of the returned iterable being placed deepest into the stack, and the last element on top of the stack). + */ public abstract @NotNull Iterable apply(@NotNull Iterable iotas); + /** + * A helper method to take an iota that you know is of iotaType and returning it as an iota of that type. + */ @SuppressWarnings("unchecked") public static T downcast(Iota iota, IotaType iotaType) { if (iota.getType() != iotaType) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java index bb748408..5baa7f06 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorBinary.java @@ -8,6 +8,9 @@ import org.jetbrains.annotations.NotNull; import java.util.List; import java.util.function.BinaryOperator; +/** + * A helper class for defining {@link Operator}s of two iotas. + */ public class OperatorBinary extends Operator { public BinaryOperator inner; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java index e8f02b27..bce49902 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/OperatorUnary.java @@ -8,6 +8,9 @@ import org.jetbrains.annotations.NotNull; import java.util.List; import java.util.function.UnaryOperator; +/** + * A helper class for defining {@link Operator}s of one iota. + */ public class OperatorUnary extends Operator { public UnaryOperator inner; diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java index 3ec5b5ea..4c960080 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaMultiPredicate.java @@ -2,19 +2,35 @@ package at.petrak.hexcasting.api.casting.arithmetic.predicates; import at.petrak.hexcasting.api.casting.iota.Iota; +/** + * Used to determine whether a given set of iotas on the stack are acceptable types for + * the operator that is storing this IotaMultiPredicate. + */ @FunctionalInterface public interface IotaMultiPredicate { boolean test(Iterable iotas); + /** + * The resulting IotaMultiPredicate only returns true if all iotas passed into test match the type dictated by child. + */ static IotaMultiPredicate all(IotaPredicate child) { return new All(child); } + /** + * The resulting IotaMultiPredicate returns true if two iotas are passed, the first matching first, and the second matching second. + */ static IotaMultiPredicate pair(IotaPredicate first, IotaPredicate second) { return new Pair(first, second); } + /** + * The resulting IotaMultiPredicate returns true if three iotas are passed, the first matching first, the second matching second, and the third matching third. + */ static IotaMultiPredicate triple(IotaPredicate first, IotaPredicate second, IotaPredicate third) { return new Triple(first, second, third); } + /** + * The resulting IotaMultiPredicate returns true if at least one iota passed matches needs, and the rest match fallback. + */ static IotaMultiPredicate any(IotaPredicate needs, IotaPredicate fallback) { return new Any(needs, fallback); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java index b91d2265..afc270d5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/predicates/IotaPredicate.java @@ -3,14 +3,24 @@ package at.petrak.hexcasting.api.casting.arithmetic.predicates; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; +/** + * Used to determine whether a given iota is an acceptable type for the operator that is storing this. It must be strictly a function + * of the passed Iota's IotaType, or the caching done by ArithmeticEngine will be invalid. + */ @FunctionalInterface public interface IotaPredicate { boolean test(Iota iota); + /** + * The resulting IotaPredicate returns true if the given iota matches either the left or right predicates. + */ static IotaPredicate or(IotaPredicate left, IotaPredicate right) { return new Or(left, right); } + /** + * The resulting IotaPredicate returns true if the given iota's type is type. + */ static IotaPredicate ofType(IotaType type) { return new OfType(type); } @@ -29,5 +39,8 @@ public interface IotaPredicate { } } + /** + * This IotaPredicate returns true for all iotas. + */ IotaPredicate TRUE = iota -> true; } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt index 19f9ee0f..05e01f28 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt @@ -13,6 +13,10 @@ import at.petrak.hexcasting.common.lib.hex.HexEvalSounds import java.util.* import java.util.function.Consumer +/** + * Represents an Operator with the give pattern as its identifier, a special type of Action that calls a different function depending on the type of its arguments. + * This exists so that addons can easily define their own overloads to patterns like addition, subtraction, etc. + */ data class OperationAction(val pattern: HexPattern) : Action { override fun operate(env: CastingEnvironment, image: CastingImage, continuation: SpellContinuation): OperationResult { val stackList = image.stack diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java index d5ff8030..7493ac2f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java @@ -40,6 +40,9 @@ public enum DoubleArithmetic implements Arithmetic { MOD ); + /** + * An example of an IotaMultiPredicate, which returns true only if all arguments to the Operator are DoubleIotas. + */ public static final IotaMultiPredicate ACCEPTS = IotaMultiPredicate.all(IotaPredicate.ofType(DOUBLE)); @Override @@ -91,6 +94,7 @@ public enum DoubleArithmetic implements Arithmetic { } return null; } + public static OperatorUnary make1(DoubleUnaryOperator op) { return new OperatorUnary(ACCEPTS, i -> new DoubleIota(op.applyAsDouble(downcast(i, DOUBLE).getDouble()))); } From be38658478adcc4c203516708f9e103f7562dbb4 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 17:46:05 +1000 Subject: [PATCH 21/48] todo --- .../petrak/hexcasting/api/casting/castables/OperationAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt index 05e01f28..4edb9820 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/castables/OperationAction.kt @@ -26,7 +26,7 @@ data class OperationAction(val pattern: HexPattern) : Action { return try { val ret: Iterable = HexArithmetics.getEngine().run(pattern, stack, startingLength) ret.forEach(Consumer { e: Iota -> stack.add(e) }) - val image2 = image.copy(stack = stack, opsConsumed = image.opsConsumed + 1) + val image2 = image.copy(stack = stack, opsConsumed = image.opsConsumed + 1) // TODO: maybe let operators figure out how many ops to consume? OperationResult(image2, listOf(), continuation, HexEvalSounds.NORMAL_EXECUTE) } catch (e: NoOperatorCandidatesException) { throw MishapInvalidOperatorArgs(e.args, e.pattern) From 27abbadfd5cac1898d3308484531d5769d4879fd Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 18:42:32 +1000 Subject: [PATCH 22/48] Fixed #464, quenched shards aren't a media source --- .../at/petrak/hexcasting/api/addldata/ADMediaHolder.java | 3 ++- .../petrak/hexcasting/fabric/cc/HexCardinalComponents.java | 3 +++ .../petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADMediaHolder.java b/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADMediaHolder.java index 79060ed6..547f6afc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADMediaHolder.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADMediaHolder.java @@ -102,7 +102,8 @@ public interface ADMediaHolder { return inserting; } - int QUENCHED_ALLAY_PRIORITY = 900; + int QUENCHED_ALLAY_PRIORITY = 800; + int QUENCHED_SHARD_PRIORITY = 900; int CHARGED_AMETHYST_PRIORITY = 1000; int AMETHYST_SHARD_PRIORITY = 2000; int AMETHYST_DUST_PRIORITY = 3000; diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java index 2777d542..9ca6a46c 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java @@ -100,6 +100,9 @@ public class HexCardinalComponents implements EntityComponentInitializer, ItemCo registry.register(HexItems.CHARGED_AMETHYST, MEDIA_HOLDER, s -> new CCMediaHolder.Static( () -> HexConfig.common().chargedCrystalMediaAmount(), ADMediaHolder.CHARGED_AMETHYST_PRIORITY, s )); + registry.register(HexItems.QUENCHED_SHARD.asItem(), MEDIA_HOLDER, s -> new CCMediaHolder.Static( + () -> MediaConstants.QUENCHED_SHARD_UNIT, ADMediaHolder.QUENCHED_SHARD_PRIORITY, s + )); registry.register(HexBlocks.QUENCHED_ALLAY.asItem(), MEDIA_HOLDER, s -> new CCMediaHolder.Static( () -> MediaConstants.QUENCHED_BLOCK_UNIT, ADMediaHolder.QUENCHED_ALLAY_PRIORITY, s )); diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java index f6f2d03b..752dba4c 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/ForgeCapabilityHandler.java @@ -93,6 +93,11 @@ public class ForgeCapabilityHandler { evt.addCapability(MEDIA_STATIC_CAP, provide(stack, HexCapabilities.MEDIA, () -> new CapStaticMediaHolder( HexConfig.common()::chargedCrystalMediaAmount, ADMediaHolder.CHARGED_AMETHYST_PRIORITY, stack))); + } else if (stack.is(HexItems.QUENCHED_SHARD)) { + // no one uses the config + evt.addCapability(MEDIA_STATIC_CAP, + provide(stack, HexCapabilities.MEDIA, () -> new CapStaticMediaHolder( + () -> MediaConstants.QUENCHED_SHARD_UNIT, ADMediaHolder.QUENCHED_SHARD_PRIORITY, stack))); } else if (stack.is(HexBlocks.QUENCHED_ALLAY.asItem())) { // no one uses the config evt.addCapability(MEDIA_STATIC_CAP, From 13bfc6558373e50b3a77b0af694e2df658ed9148 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 19:48:24 +1000 Subject: [PATCH 23/48] Fix #461 (iotas added to ravenmind not serialised properly), and make it so staff cast data only gets reset when both stack and ravenmind are clear. Also made it so writing null to the ravenmind clears it. --- .../hexcasting/api/casting/eval/env/StaffCastEnv.java | 3 ++- .../common/casting/operators/local/OpPushLocal.kt | 7 ++++++- .../hexcasting/common/msgs/MsgNewSpellPatternS2C.java | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java index ea969c14..21aba4e9 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java @@ -97,7 +97,8 @@ public class StaffCastEnv extends PlayerBasedCastEnv { ExecutionClientView clientInfo = vm.queueExecuteAndWrapIota(new PatternIota(msg.pattern()), sender.getLevel()); - if (clientInfo.isStackClear()) { +// if (clientInfo.isStackClear()) { + if (clientInfo.isStackClear() && clientInfo.getRavenmind() == null) { IXplatAbstractions.INSTANCE.setStaffcastImage(sender, null); IXplatAbstractions.INSTANCE.setPatterns(sender, List.of()); } else { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt index 133307f7..d0e7041b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt @@ -6,8 +6,10 @@ import at.petrak.hexcasting.api.casting.eval.CastingEnvironment import at.petrak.hexcasting.api.casting.eval.OperationResult import at.petrak.hexcasting.api.casting.eval.vm.CastingImage import at.petrak.hexcasting.api.casting.eval.vm.SpellContinuation +import at.petrak.hexcasting.api.casting.iota.IotaType import at.petrak.hexcasting.api.casting.mishaps.MishapNotEnoughArgs import at.petrak.hexcasting.common.lib.hex.HexEvalSounds +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes object OpPushLocal : Action { override fun operate(env: CastingEnvironment, image: CastingImage, continuation: SpellContinuation): OperationResult { @@ -17,7 +19,10 @@ object OpPushLocal : Action { throw MishapNotEnoughArgs(1, 0) val newLocal = stack.removeLast() - image.userData.put(HexAPI.RAVENMIND_USERDATA, newLocal.serialize()) + if (newLocal.type == HexIotaTypes.NULL) + image.userData.remove(HexAPI.RAVENMIND_USERDATA) + else + image.userData.put(HexAPI.RAVENMIND_USERDATA, IotaType.serialize(newLocal)) val image2 = image.withUsedOp().copy(stack = stack) return OperationResult(image2, listOf(), continuation, HexEvalSounds.NORMAL_EXECUTE) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java b/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java index c0c23d95..e67869cc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java @@ -52,7 +52,7 @@ public record MsgNewSpellPatternS2C(ExecutionClientView info, int index) impleme public static void handle(MsgNewSpellPatternS2C self) { Minecraft.getInstance().execute(() -> { var mc = Minecraft.getInstance(); - if (self.info().isStackClear()) { + if (self.info().isStackClear() && self.info().getRavenmind() == null) { // don't pay attention to the screen, so it also stops when we die mc.getSoundManager().stop(HexSounds.CASTING_AMBIANCE.getLocation(), null); } From 7c6b6e530dfaa03fcdcfe3c1ae0a4551857819b3 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 20:50:39 +1000 Subject: [PATCH 24/48] Rename .java to .kt --- .../arithmetic/{DoubleArithmetic.java => DoubleArithmetic.kt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/{DoubleArithmetic.java => DoubleArithmetic.kt} (100%) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt similarity index 100% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.java rename to Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt From d51fe053e3617edbe3118715b84931ae78cc7e25 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 20:50:40 +1000 Subject: [PATCH 25/48] Reimplemented divide by 0 mishaps in DoubleArithmetic, fixed mishaps not being able to alter the stack (accepting mutable copy of immutable list, changes to copy not changing original) --- .../casting/arithmetic/operator/Operator.java | 5 +- .../eval/sideeffects/OperatorSideEffect.kt | 2 +- .../hexcasting/api/casting/mishaps/Mishap.kt | 7 +- .../api/casting/mishaps/MishapDivideByZero.kt | 16 ++ .../casting/arithmetic/DoubleArithmetic.kt | 166 ++++++++---------- .../casting/arithmetic/Vec3Arithmetic.java | 21 +-- .../operator/vec/OperatorVec3Delegating.java | 28 +-- 7 files changed, 126 insertions(+), 119 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java index 25567e35..cab8b216 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/arithmetic/operator/Operator.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.api.casting.arithmetic.operator; import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; +import at.petrak.hexcasting.api.casting.mishaps.Mishap; import org.jetbrains.annotations.NotNull; /** @@ -32,11 +33,13 @@ public abstract class Operator { } /** + /** * The method called when this Operator is actually acting on the stack, for real. * @param iotas An iterable of iotas with {@link Operator#arity} elements that satisfied {@link Operator#accepts}. * @return the iotas that this operator will return to the stack (with the first element of the returned iterable being placed deepest into the stack, and the last element on top of the stack). + * @throws Mishap if the Operator mishaps for any reason it will be passed up the chain. */ - public abstract @NotNull Iterable apply(@NotNull Iterable iotas); + public abstract @NotNull Iterable apply(@NotNull Iterable iotas) throws Mishap; /** * A helper method to take an iota that you know is of iotaType and returning it as an iota of that type. diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/sideeffects/OperatorSideEffect.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/sideeffects/OperatorSideEffect.kt index d02a386c..edd61016 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/sideeffects/OperatorSideEffect.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/sideeffects/OperatorSideEffect.kt @@ -76,7 +76,7 @@ sealed class OperatorSideEffect { ) ) - mishap.execute(harness.env, errorCtx, harness.image.stack.toMutableList()) + harness.image = harness.image.copy(stack = mishap.executeReturnStack(harness.env, errorCtx, harness.image.stack.toMutableList())) return true } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/Mishap.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/Mishap.kt index 824eb4c0..58523a4d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/Mishap.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/Mishap.kt @@ -39,12 +39,17 @@ abstract class Mishap : Throwable() { */ abstract fun execute(ctx: CastingEnvironment, errorCtx: Context, stack: MutableList) + fun executeReturnStack(ctx: CastingEnvironment, errorCtx: Context, stack: MutableList): List { + execute(ctx, errorCtx, stack) + return stack + } + protected abstract fun errorMessage(ctx: CastingEnvironment, errorCtx: Context): Component /** * Every error message should be prefixed with the name of the action... */ - public fun errorMessageWithName(ctx: CastingEnvironment, errorCtx: Context): Component { + fun errorMessageWithName(ctx: CastingEnvironment, errorCtx: Context): Component { return if (errorCtx.name != null) { "hexcasting.mishap".asTranslatedComponent(errorCtx.name, this.errorMessage(ctx, errorCtx)) } else { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapDivideByZero.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapDivideByZero.kt index ff43e8ab..9698ed03 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapDivideByZero.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/mishaps/MishapDivideByZero.kt @@ -27,6 +27,13 @@ class MishapDivideByZero(val operand1: Component, val operand2: Component, val s companion object { private const val PREFIX = "hexcasting.mishap.divide_by_zero" + @JvmStatic + fun of(operand1: Double, operand2: Double, suffix: String = "divide"): MishapDivideByZero { + if (suffix == "exponent") + return MishapDivideByZero(translate(DoubleIota(operand1)), powerOf(DoubleIota(operand2)), suffix) + return MishapDivideByZero(translate(DoubleIota(operand1)), translate(DoubleIota(operand2)), suffix) + } + @JvmStatic fun of(operand1: Iota, operand2: Iota, suffix: String = "divide"): MishapDivideByZero { if (suffix == "exponent") @@ -34,6 +41,15 @@ class MishapDivideByZero(val operand1: Component, val operand2: Component, val s return MishapDivideByZero(translate(operand1), translate(operand2), suffix) } + @JvmStatic + fun tan(angle: Double): MishapDivideByZero { + val translatedAngle = translate(DoubleIota(angle)) + return MishapDivideByZero( + "$PREFIX.sin".asTranslatedComponent(translatedAngle), + "$PREFIX.cos".asTranslatedComponent(translatedAngle) + ) + } + @JvmStatic fun tan(angle: DoubleIota): MishapDivideByZero { val translatedAngle = translate(angle) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt index 7493ac2f..3e053e0a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt @@ -1,104 +1,80 @@ -package at.petrak.hexcasting.common.casting.arithmetic; +package at.petrak.hexcasting.common.casting.arithmetic -import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; -import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; -import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; -import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary; -import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary; -import at.petrak.hexcasting.api.casting.iota.DoubleIota; -import at.petrak.hexcasting.api.casting.math.HexPattern; -import at.petrak.hexcasting.common.casting.arithmetic.operator.OperatorLog; +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic +import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic.* +import at.petrak.hexcasting.api.casting.arithmetic.engine.InvalidOperatorException +import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorBinary +import at.petrak.hexcasting.api.casting.arithmetic.operator.OperatorUnary +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaMultiPredicate +import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate +import at.petrak.hexcasting.api.casting.iota.DoubleIota +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.math.HexPattern +import at.petrak.hexcasting.api.casting.mishaps.MishapDivideByZero +import at.petrak.hexcasting.common.casting.arithmetic.operator.OperatorLog +import at.petrak.hexcasting.common.lib.hex.HexIotaTypes +import java.util.function.DoubleBinaryOperator +import java.util.function.DoubleUnaryOperator +import kotlin.math.* -import java.util.List; -import java.util.function.DoubleBinaryOperator; -import java.util.function.DoubleUnaryOperator; +object DoubleArithmetic : Arithmetic { + @JvmField + val OPS = listOf( + ADD, + SUB, + MUL, + DIV, + ABS, + POW, + FLOOR, + CEIL, + SIN, + COS, + TAN, + ARCSIN, + ARCCOS, + ARCTAN, + ARCTAN2, + LOG, + MOD + ) -import static at.petrak.hexcasting.api.casting.arithmetic.operator.Operator.downcast; -import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.DOUBLE; + /** + * An example of an IotaMultiPredicate, which returns true only if all arguments to the Operator are DoubleIotas. + */ + val ACCEPTS: IotaMultiPredicate = IotaMultiPredicate.all(IotaPredicate.ofType(HexIotaTypes.DOUBLE)) -public enum DoubleArithmetic implements Arithmetic { - INSTANCE; + override fun arithName() = "double_math" - public static final List OPS = List.of( - ADD, - SUB, - MUL, - DIV, - ABS, - POW, - FLOOR, - CEIL, - SIN, - COS, - TAN, - ARCSIN, - ARCCOS, - ARCTAN, - ARCTAN2, - LOG, - MOD - ); + override fun opTypes() = OPS - /** - * An example of an IotaMultiPredicate, which returns true only if all arguments to the Operator are DoubleIotas. - */ - public static final IotaMultiPredicate ACCEPTS = IotaMultiPredicate.all(IotaPredicate.ofType(DOUBLE)); + override fun getOperator(pattern: HexPattern): Operator { + return when (pattern) { + ADD -> make2 { a, b -> java.lang.Double.sum(a, b) } + SUB -> make2 { a, b -> a - b } + MUL -> make2 { a, b -> a * b } + DIV -> make2 { a, b -> if (b == 0.0) throw MishapDivideByZero.of(a, b) else a / b } + ABS -> make1 { a -> abs(a) } + POW -> make2 { a, b -> a.pow(b) } + FLOOR -> make1 { a -> floor(a) } + CEIL -> make1 { a -> ceil(a) } + SIN -> make1 { a -> sin(a) } + COS -> make1 { a -> cos(a) } + TAN -> make1 { a -> if (cos(a) == 0.0) throw MishapDivideByZero.tan(a) else tan(a) } + ARCSIN -> make1 { a -> asin(a) } + ARCCOS -> make1 { a -> acos(a) } + ARCTAN -> make1 { a -> atan(a) } + ARCTAN2 -> make2 { a, b -> atan2(a, b) } + LOG -> OperatorLog + MOD -> make2 { a, b -> if (b == 0.0) throw MishapDivideByZero.of(a, b) else a % b } + else -> throw InvalidOperatorException("$pattern is not a valid operator in Arithmetic $this.") + } + } - @Override - public String arithName() { - return "double_math"; - } + fun make1(op: DoubleUnaryOperator) = OperatorUnary(ACCEPTS) + { i: Iota -> DoubleIota(op.applyAsDouble(Operator.downcast(i, HexIotaTypes.DOUBLE).double)) } - @Override - public Iterable opTypes() { - return OPS; - } - - @Override - public Operator getOperator(HexPattern pattern) { - if (pattern.equals(ADD)) { - return make2(Double::sum); - } else if (pattern.equals(SUB)) { - return make2((p, q) -> p - q); - } else if (pattern.equals(MUL)) { - return make2((p, q) -> p * q); - } else if (pattern.equals(DIV)) { - return make2((p, q) -> p / q); - } else if (pattern.equals(ABS)) { - return make1(Math::abs); - } else if (pattern.equals(POW)) { - return make2(Math::pow); - } else if (pattern.equals(FLOOR)) { - return make1(Math::floor); - } else if (pattern.equals(CEIL)) { - return make1(Math::ceil); - } else if (pattern.equals(SIN)) { - return make1(Math::sin); - } else if (pattern.equals(COS)) { - return make1(Math::cos); - } else if (pattern.equals(TAN)) { - return make1(Math::tan); - } else if (pattern.equals(ARCSIN)) { - return make1(Math::asin); - } else if (pattern.equals(ARCCOS)) { - return make1(Math::acos); - } else if (pattern.equals(ARCTAN)) { - return make1(Math::atan); - } else if (pattern.equals(ARCTAN2)) { - return make2(Math::atan2); - } else if (pattern.equals(LOG)) { - return OperatorLog.INSTANCE; - } else if (pattern.equals(MOD)) { - return make2((p, q) -> p % q); - } - return null; - } - - public static OperatorUnary make1(DoubleUnaryOperator op) { - return new OperatorUnary(ACCEPTS, i -> new DoubleIota(op.applyAsDouble(downcast(i, DOUBLE).getDouble()))); - } - public static OperatorBinary make2(DoubleBinaryOperator op) { - return new OperatorBinary(ACCEPTS, (i, j) -> new DoubleIota(op.applyAsDouble(downcast(i, DOUBLE).getDouble(), downcast(j, DOUBLE).getDouble()))); - } + fun make2(op: DoubleBinaryOperator) = OperatorBinary(ACCEPTS) + { i: Iota, j: Iota -> DoubleIota(op.applyAsDouble(Operator.downcast(i, HexIotaTypes.DOUBLE).double, Operator.downcast(j, HexIotaTypes.DOUBLE).double)) } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java index f79abd50..a30cb23f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java @@ -13,7 +13,6 @@ import at.petrak.hexcasting.common.casting.arithmetic.operator.vec.OperatorUnpac import at.petrak.hexcasting.common.casting.arithmetic.operator.vec.OperatorVec3Delegating; import net.minecraft.world.phys.Vec3; -import java.util.ArrayList; import java.util.List; import java.util.function.BiFunction; import java.util.function.Function; @@ -24,15 +23,17 @@ import static at.petrak.hexcasting.common.lib.hex.HexIotaTypes.*; public enum Vec3Arithmetic implements Arithmetic { INSTANCE; - public static final List OPS; - static { - var ops = new ArrayList<>(DoubleArithmetic.OPS); - ops.add(PACK); - ops.add(UNPACK); - ops.remove(FLOOR); - ops.remove(CEIL); - OPS = ops; - } + public static final List OPS = List.of( + PACK, + UNPACK, + ADD, + SUB, + MUL, + DIV, + ABS, + POW, + MOD + ); public static final IotaMultiPredicate ACCEPTS = IotaMultiPredicate.any(IotaPredicate.ofType(VEC3), IotaPredicate.ofType(DOUBLE)); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java index 7448d350..8593fdf7 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/vec/OperatorVec3Delegating.java @@ -5,6 +5,8 @@ import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate; import at.petrak.hexcasting.api.casting.arithmetic.IterPair; import at.petrak.hexcasting.api.casting.arithmetic.TripleIterable; import at.petrak.hexcasting.api.casting.arithmetic.operator.Operator; +import at.petrak.hexcasting.api.casting.mishaps.Mishap; +import at.petrak.hexcasting.api.casting.mishaps.MishapDivideByZero; import at.petrak.hexcasting.common.casting.arithmetic.DoubleArithmetic; import at.petrak.hexcasting.api.casting.iota.DoubleIota; import at.petrak.hexcasting.api.casting.iota.Iota; @@ -30,21 +32,25 @@ public class OperatorVec3Delegating extends Operator { } @Override - public @NotNull Iterable apply(@NotNull Iterable iotas) { + public @NotNull Iterable apply(@NotNull Iterable iotas) throws Mishap { var it = iotas.iterator(); var left = it.next(); var right = it.next(); - if (op != null && left instanceof Vec3Iota lh && right instanceof Vec3Iota rh) { - return List.of(op.apply(lh.getVec3(), rh.getVec3())); + try { + if (op != null && left instanceof Vec3Iota lh && right instanceof Vec3Iota rh) { + return List.of(op.apply(lh.getVec3(), rh.getVec3())); + } + var lh = left instanceof Vec3Iota l ? l.getVec3() : triplicate(downcast(left, DOUBLE).getDouble()); + var rh = right instanceof Vec3Iota r ? r.getVec3() : triplicate(downcast(right, DOUBLE).getDouble()); + return new TripleIterable<>( + fb.apply(new IterPair<>(new DoubleIota(lh.x()), new DoubleIota(rh.x()))), + fb.apply(new IterPair<>(new DoubleIota(lh.y()), new DoubleIota(rh.y()))), + fb.apply(new IterPair<>(new DoubleIota(lh.z()), new DoubleIota(rh.z()))), + (x, y, z) -> new Vec3Iota(new Vec3(downcast(x, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble(), downcast(z, DOUBLE).getDouble())) + ); + } catch (MishapDivideByZero e) { + throw MishapDivideByZero.of(left, right, e.getSuffix()); } - var lh = left instanceof Vec3Iota l ? l.getVec3() : triplicate(downcast(left, DOUBLE).getDouble()); - var rh = right instanceof Vec3Iota r ? r.getVec3() : triplicate(downcast(right, DOUBLE).getDouble()); - return new TripleIterable<>( - fb.apply(new IterPair<>(new DoubleIota(lh.x()), new DoubleIota(rh.x()))), - fb.apply(new IterPair<>(new DoubleIota(lh.y()), new DoubleIota(rh.y()))), - fb.apply(new IterPair<>(new DoubleIota(lh.z()), new DoubleIota(rh.z()))), - (x, y, z) -> new Vec3Iota(new Vec3(downcast(x, DOUBLE).getDouble(), downcast(y, DOUBLE).getDouble(), downcast(z, DOUBLE).getDouble())) - ); } public static Vec3 triplicate(double in) { From c4c2825f3d967aaeac312dd14917a16edad3f1da Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 21:15:21 +1000 Subject: [PATCH 26/48] did #440, SerDer of Vec3Iotas as CompoundTags. --- .../hexcasting/api/casting/iota/Vec3Iota.java | 9 +++++++-- .../at/petrak/hexcasting/api/utils/HexUtils.kt | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Vec3Iota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Vec3Iota.java index d620878f..a60e247a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Vec3Iota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Vec3Iota.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.api.casting.iota; import at.petrak.hexcasting.api.utils.HexUtils; import at.petrak.hexcasting.common.lib.hex.HexIotaTypes; import net.minecraft.ChatFormatting; +import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.LongArrayTag; import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; @@ -62,8 +63,12 @@ public class Vec3Iota extends Iota { }; public static Vec3Iota deserialize(Tag tag) throws IllegalArgumentException { - var lat = HexUtils.downcast(tag, LongArrayTag.TYPE); - var vec = HexUtils.vecFromNBT(lat.getAsLongArray()); + Vec3 vec; + if (tag.getType() == LongArrayTag.TYPE) { + var lat = HexUtils.downcast(tag, LongArrayTag.TYPE); + vec = HexUtils.vecFromNBT(lat.getAsLongArray()); + } else + vec = HexUtils.vecFromNBT(HexUtils.downcast(tag, CompoundTag.TYPE)); return new Vec3Iota(vec); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt index b8abdc0d..60766634 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt @@ -30,8 +30,13 @@ import kotlin.reflect.KProperty const val TAU = Math.PI * 2.0 const val SQRT_3 = 1.7320508f -fun Vec3.serializeToNBT(): LongArrayTag = - LongArrayTag(longArrayOf(this.x.toRawBits(), this.y.toRawBits(), this.z.toRawBits())) +fun Vec3.serializeToNBT(): CompoundTag { + val tag = CompoundTag() + tag.putDouble("x", this.x) + tag.putDouble("y", this.x) + tag.putDouble("z", this.x) + return tag +} fun vecFromNBT(tag: LongArray): Vec3 = if (tag.size != 3) Vec3.ZERO else Vec3( @@ -39,6 +44,12 @@ fun vecFromNBT(tag: LongArray): Vec3 = if (tag.size != 3) Vec3.ZERO else Double.fromBits(tag[1]), Double.fromBits(tag[2]) ) +fun vecFromNBT(tag: CompoundTag): Vec3 { + return if (!tag.contains("x") || !tag.contains("y") || !tag.contains("z")) + Vec3.ZERO + else + Vec3(tag.getDouble("x"), tag.getDouble("y"), tag.getDouble("z")) +} fun Vec2.serializeToNBT(): LongArrayTag = LongArrayTag(longArrayOf(this.x.toDouble().toRawBits(), this.y.toDouble().toRawBits())) From 578c4fdab5c0fe4620b06207c4c61a17a2dcb71b Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 21:41:37 +1000 Subject: [PATCH 27/48] fixed bug from #440 implementation, implemented #439 (casting items now store the caster's pigment when created). --- .../hexcasting/api/addldata/ADHexHolder.java | 5 ++++- .../casting/eval/env/PackagedItemCastEnv.java | 4 +++- .../hexcasting/api/item/HexHolderItem.java | 5 ++++- .../at/petrak/hexcasting/api/utils/HexUtils.kt | 4 ++-- .../operators/spells/OpMakePackagedSpell.kt | 2 +- .../common/items/magic/ItemPackagedHex.java | 17 +++++++++++++++-- .../fabric/cc/adimpl/CCHexHolder.java | 10 ++++++++-- .../forge/cap/adimpl/CapItemHexHolder.java | 10 ++++++++-- 8 files changed, 45 insertions(+), 12 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADHexHolder.java b/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADHexHolder.java index f227a718..15defd67 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADHexHolder.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADHexHolder.java @@ -1,6 +1,7 @@ package at.petrak.hexcasting.api.addldata; import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.pigment.FrozenPigment; import net.minecraft.server.level.ServerLevel; import org.jetbrains.annotations.Nullable; @@ -15,7 +16,9 @@ public interface ADHexHolder { @Nullable List getHex(ServerLevel level); - void writeHex(List patterns, long media); + void writeHex(List patterns, @Nullable FrozenPigment pigment, long media); void clearHex(); + + @Nullable FrozenPigment getPigment(); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java index c62388ee..4411eb34 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java @@ -54,6 +54,8 @@ public class PackagedItemCastEnv extends PlayerBasedCastEnv { @Override public FrozenPigment getColorizer() { - return null; + var casterStack = this.caster.getItemInHand(this.castingHand); + var casterHexHolder = IXplatAbstractions.INSTANCE.findHexHolder(casterStack); + return casterHexHolder.getPigment(); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/item/HexHolderItem.java b/Common/src/main/java/at/petrak/hexcasting/api/item/HexHolderItem.java index 1f086888..a27ef900 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/item/HexHolderItem.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/item/HexHolderItem.java @@ -1,6 +1,7 @@ package at.petrak.hexcasting.api.item; import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.pigment.FrozenPigment; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.ApiStatus; @@ -24,7 +25,9 @@ public interface HexHolderItem extends MediaHolderItem { @Nullable List getHex(ItemStack stack, ServerLevel level); - void writeHex(ItemStack stack, List program, long media); + void writeHex(ItemStack stack, List program, @Nullable FrozenPigment pigment, long media); void clearHex(ItemStack stack); + + @Nullable FrozenPigment getPigment(ItemStack stack); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt index 60766634..19b6fe0a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt @@ -33,8 +33,8 @@ const val SQRT_3 = 1.7320508f fun Vec3.serializeToNBT(): CompoundTag { val tag = CompoundTag() tag.putDouble("x", this.x) - tag.putDouble("y", this.x) - tag.putDouble("z", this.x) + tag.putDouble("y", this.y) + tag.putDouble("z", this.z) return tag } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt index 3374e86c..22ac23c1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt @@ -74,7 +74,7 @@ class OpMakePackagedSpell(val itemType: T, val cost: Int) : val entityStack = itemEntity.item.copy() val mediamount = extractMedia(entityStack, drainForBatteries = true) if (mediamount > 0) { - hexHolder.writeHex(patterns, mediamount) + hexHolder.writeHex(patterns, ctx.colorizer, mediamount) } itemEntity.item = entityStack 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 6df4be6f..d12830b0 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 @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.casting.eval.vm.CastingVM; import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.item.HexHolderItem; +import at.petrak.hexcasting.api.pigment.FrozenPigment; import at.petrak.hexcasting.api.utils.NBTHelper; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; @@ -32,6 +33,7 @@ import static at.petrak.hexcasting.api.HexAPI.modLoc; */ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHolderItem { public static final String TAG_PROGRAM = "patterns"; + public static final String TAG_PIGMENT = "pigment"; public static final ResourceLocation HAS_PATTERNS_PRED = modLoc("has_patterns"); public ItemPackagedHex(Properties pProperties) { @@ -74,24 +76,35 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold } @Override - public void writeHex(ItemStack stack, List program, long media) { + public void writeHex(ItemStack stack, List program, @Nullable FrozenPigment pigment, long media) { ListTag patsTag = new ListTag(); for (Iota pat : program) { patsTag.add(IotaType.serialize(pat)); } NBTHelper.putList(stack, TAG_PROGRAM, patsTag); + if (pigment != null) + NBTHelper.putCompound(stack, TAG_PIGMENT, pigment.serializeToNBT()); withMedia(stack, media, media); } @Override public void clearHex(ItemStack stack) { - NBTHelper.remove(stack, ItemPackagedHex.TAG_PROGRAM); + NBTHelper.remove(stack, TAG_PROGRAM); + NBTHelper.remove(stack, TAG_PIGMENT); NBTHelper.remove(stack, TAG_MEDIA); NBTHelper.remove(stack, TAG_MAX_MEDIA); } + @Override + public @Nullable FrozenPigment getPigment(ItemStack stack) { + var ctag = NBTHelper.getCompound(stack, TAG_PIGMENT); + if (ctag == null) + return null; + return FrozenPigment.fromNBT(ctag); + } + @Override public InteractionResultHolder use(Level world, Player player, InteractionHand usedHand) { var stack = player.getItemInHand(usedHand); diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java index 2f593b45..7e7022b7 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.fabric.cc.adimpl; import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.item.HexHolderItem; import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.pigment.FrozenPigment; import at.petrak.hexcasting.fabric.cc.HexCardinalComponents; import dev.onyxstudios.cca.api.v3.item.ItemComponent; import net.minecraft.server.level.ServerLevel; @@ -45,13 +46,18 @@ public abstract class CCHexHolder extends ItemComponent implements ADHexHolder { } @Override - public void writeHex(List patterns, long media) { - this.hexHolder.writeHex(this.stack, patterns, media); + public void writeHex(List patterns, @Nullable FrozenPigment pigment, long media) { + this.hexHolder.writeHex(this.stack, patterns, pigment, media); } @Override public void clearHex() { this.hexHolder.clearHex(this.stack); } + + @Override + public @Nullable FrozenPigment getPigment() { + return this.hexHolder.getPigment(this.stack); + } } } diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemHexHolder.java b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemHexHolder.java index 7c3d4a15..6fb0f0b1 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemHexHolder.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemHexHolder.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.forge.cap.adimpl; import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.item.HexHolderItem; import at.petrak.hexcasting.api.casting.iota.Iota; +import at.petrak.hexcasting.api.pigment.FrozenPigment; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.Nullable; @@ -28,12 +29,17 @@ public record CapItemHexHolder(HexHolderItem holder, } @Override - public void writeHex(List patterns, long media) { - holder.writeHex(stack, patterns, media); + public void writeHex(List patterns, @Nullable FrozenPigment pigment, long media) { + holder.writeHex(stack, patterns, pigment, media); } @Override public void clearHex() { holder.clearHex(stack); } + + @Override + public @Nullable FrozenPigment getPigment() { + return holder.getPigment(stack); + } } From 0daecb38e4abfb7793e7160f814b1b5f37951595 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 21:44:49 +1000 Subject: [PATCH 28/48] Fix #439 --- .../main/java/at/petrak/hexcasting/api/casting/math/HexCoord.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/math/HexCoord.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/math/HexCoord.kt index a10d3dfe..7102bdcc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/math/HexCoord.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/math/HexCoord.kt @@ -8,7 +8,7 @@ import kotlin.math.min * Uses axial coordinates as per https://www.redblobgames.com/grids/hexagons/ */ data class HexCoord(val q: Int, val r: Int) { - fun s(): Int = this.q - this.r + fun s(): Int = -this.q - this.r fun shiftedBy(x: HexCoord): HexCoord = HexCoord(this.q + x.q, this.r + x.r) From a10b096402d30cfd7e199c19d7c4dfe42056fba6 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 22:23:06 +1000 Subject: [PATCH 29/48] implemented "Undo in parenthised" mentioned in #441. The *way* I did this is kinda hacky, particularly in GuiSpellcasting. --- .../api/casting/eval/ResolvedPatternType.kt | 1 + .../hexcasting/api/casting/eval/SpecialPatterns.java | 2 ++ .../api/casting/eval/env/StaffCastEnv.java | 3 +-- .../hexcasting/api/casting/eval/vm/CastingVM.kt | 8 +++++++- .../petrak/hexcasting/client/gui/GuiSpellcasting.kt | 12 ++++++++---- .../common/msgs/MsgNewSpellPatternS2C.java | 2 +- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/ResolvedPatternType.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/ResolvedPatternType.kt index 244d7a1c..8e332bb8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/ResolvedPatternType.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/ResolvedPatternType.kt @@ -6,6 +6,7 @@ enum class ResolvedPatternType(val color: Int, val fadeColor: Int, val success: UNRESOLVED(0x7f7f7f, 0xcccccc, false), EVALUATED(0x7385de, 0xfecbe6, true), ESCAPED(0xddcc73, 0xfffae5, true), + UNDONE(0xb26b6b, 0xcca88e, true), // TODO: Pick better colours ERRORED(0xde6262, 0xffc7a0, false), INVALID(0xb26b6b, 0xcca88e, false); diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/SpecialPatterns.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/SpecialPatterns.java index 4aee723a..f87fcfdf 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/SpecialPatterns.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/SpecialPatterns.java @@ -7,4 +7,6 @@ public final class SpecialPatterns { public static final HexPattern INTROSPECTION = HexPattern.fromAngles("qqq", HexDir.WEST); public static final HexPattern RETROSPECTION = HexPattern.fromAngles("eee", HexDir.EAST); public static final HexPattern CONSIDERATION = HexPattern.fromAngles("qqqaw", HexDir.WEST); + + public static final HexPattern EVANITION = HexPattern.fromAngles("eeedw", HexDir.EAST); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java index 21aba4e9..ea969c14 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java @@ -97,8 +97,7 @@ public class StaffCastEnv extends PlayerBasedCastEnv { ExecutionClientView clientInfo = vm.queueExecuteAndWrapIota(new PatternIota(msg.pattern()), sender.getLevel()); -// if (clientInfo.isStackClear()) { - if (clientInfo.isStackClear() && clientInfo.getRavenmind() == null) { + if (clientInfo.isStackClear()) { IXplatAbstractions.INSTANCE.setStaffcastImage(sender, null); IXplatAbstractions.INSTANCE.setPatterns(sender, List.of()); } else { 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 aec0f94b..9d12b259 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 @@ -65,7 +65,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { val (stackDescs, ravenmind) = generateDescs() - val isStackClear = image.stack.isEmpty() && image.parenCount == 0 && !image.escapeNext + val isStackClear = image.stack.isEmpty() && image.parenCount == 0 && !image.escapeNext && ravenmind == null return ExecutionClientView(isStackClear, lastResolutionType, stackDescs, ravenmind) } @@ -170,6 +170,12 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { ) to ResolvedPatternType.EVALUATED } + SpecialPatterns.EVANITION.anglesSignature() -> { + val newParens = this.image.parenthesized.toMutableList() + val last = newParens.removeLastOrNull() + this.image.copy(parenthesized = newParens) to if (last == null) ResolvedPatternType.ERRORED else ResolvedPatternType.UNDONE + } + SpecialPatterns.INTROSPECTION.anglesSignature() -> { // we have escaped the parens onto the stack; we just also record our count. val newParens = this.image.parenthesized.toMutableList() diff --git a/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt b/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt index c22be67a..b0220168 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt +++ b/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt @@ -62,14 +62,18 @@ class GuiSpellcasting constructor( } fun recvServerUpdate(info: ExecutionClientView, index: Int) { - if (info.isStackClear && info.ravenmind == null) { + if (info.isStackClear) { this.minecraft?.setScreen(null) return } - this.patterns.getOrNull(index)?.let { - it.type = info.resolutionType - } + // TODO this is the kinda hacky bit + if (info.resolutionType == ResolvedPatternType.UNDONE) { + this.patterns.getOrNull(index - 1)?.let { it.type = ResolvedPatternType.UNDONE } + this.patterns.getOrNull(index)?.let { it.type = ResolvedPatternType.EVALUATED } + } else this.patterns.getOrNull(index)?.let { + it.type = info.resolutionType + } this.cachedStack = info.stackDescs this.cachedRavenmind = info.ravenmind diff --git a/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java b/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java index e67869cc..c0c23d95 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/msgs/MsgNewSpellPatternS2C.java @@ -52,7 +52,7 @@ public record MsgNewSpellPatternS2C(ExecutionClientView info, int index) impleme public static void handle(MsgNewSpellPatternS2C self) { Minecraft.getInstance().execute(() -> { var mc = Minecraft.getInstance(); - if (self.info().isStackClear() && self.info().getRavenmind() == null) { + if (self.info().isStackClear()) { // don't pay attention to the screen, so it also stops when we die mc.getSoundManager().stop(HexSounds.CASTING_AMBIANCE.getLocation(), null); } From a9c859f56d4c9413021ed6dab0827d9f3adc062b Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 22:32:17 +1000 Subject: [PATCH 30/48] Implemented #463 (pressing ESC in the casting GUI while in the middle of drawing a pattern erases the in-progress pattern rather than closing the screen). --- .../at/petrak/hexcasting/client/gui/GuiSpellcasting.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt b/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt index b0220168..8979b55f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt +++ b/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt @@ -122,7 +122,7 @@ class GuiSpellcasting constructor( if (player != null) { val heldItem = player.getItemInHand(handOpenedWith) if (heldItem.isEmpty || !heldItem.`is`(HexTags.Items.STAVES)) - onClose() + closeForReal() } } @@ -287,6 +287,13 @@ class GuiSpellcasting constructor( } override fun onClose() { + if (drawState == PatternDrawState.BetweenPatterns) + closeForReal() + else + drawState = PatternDrawState.BetweenPatterns + } + + fun closeForReal() { Minecraft.getInstance().soundManager.stop(HexSounds.CASTING_AMBIANCE.location, null) super.onClose() From 72d7845178678c21d362b3bb204505b6db9f325e Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 23:22:06 +1000 Subject: [PATCH 31/48] Fixed a number of the issues in #391 (type signature stuff, cost of break block & place block being inconsistent). --- .../casting/arithmetic/Vec3Arithmetic.java | 9 +++++++++ .../assets/hexcasting/lang/en_us.flatten.json5 | 14 +++++++------- .../thehexbook/en_us/entries/interop/pehkui.json | 4 ++-- .../en_us/entries/patterns/basics.json | 6 +++--- .../en_us/entries/patterns/consts.json | 2 +- .../entries/patterns/great_spells/altiora.json | 2 +- .../thehexbook/en_us/entries/patterns/logic.json | 12 ++++++------ .../thehexbook/en_us/entries/patterns/math.json | 16 ++++++++-------- 8 files changed, 37 insertions(+), 28 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java index a30cb23f..3049177a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/Vec3Arithmetic.java @@ -32,6 +32,8 @@ public enum Vec3Arithmetic implements Arithmetic { DIV, ABS, POW, + FLOOR, + CEIL, MOD ); @@ -65,11 +67,18 @@ public enum Vec3Arithmetic implements Arithmetic { return make1Double(Vec3::length); } else if (pattern.equals(POW)) { return make2Vec(pattern, (u, v) -> v.normalize().scale(u.dot(v.normalize()))); + } else if (pattern.equals(FLOOR)) { + return make1(v -> new Vec3(Math.floor(v.x), Math.floor(v.y), Math.floor(v.z))); + } else if (pattern.equals(CEIL)) { + return make1(v -> new Vec3(Math.ceil(v.x), Math.ceil(v.y), Math.ceil(v.z))); } else if (pattern.equals(MOD)) { return make2Fallback(pattern); } throw new InvalidOperatorException(pattern + " is not a valid operator in Arithmetic " + this + "."); } + public static OperatorUnary make1(Function op) { + return new OperatorUnary(ACCEPTS, i -> new Vec3Iota(op.apply(downcast(i, VEC3).getVec3()))); + } public static OperatorUnary make1Double(Function op) { return new OperatorUnary(ACCEPTS, i -> new DoubleIota(op.apply(downcast(i, VEC3).getVec3()))); } 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 42453684..2af56762 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 @@ -448,8 +448,8 @@ "add": "Additive Distillation", "sub": "Subtractive Distillation", - "mul": "Multiplicative Dstl.", - "div": "Division Dstl.", + "mul": "Multiplicative Distillation", + "div": "Division Distillation", "abs": "Length Purification", "pow": "Power Distillation", "floor": "Floor Purification", @@ -879,7 +879,7 @@ "101.4.header": "An Example", "101.4": "It's interesting to note that the $(italic)rotation/$ of a pattern doesn't seem to matter at all. These two patterns both perform an action called $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$, for example.", "101.5": "A _Hex is cast by drawing (valid) actions in sequence. Each action might do one of a few things:$(li)Gather some information about the environment, leaving it on the top of the stack;$(li)manipulate the info gathered (e.g. adding two numbers); or$(li)perform some magical effect, like summoning lightning or an explosion. (These actions are called \"spells.\")$(p)When I start casting a _Hex, it creates an empty stack. Actions manipulate the top of that stack.", - "101.6": "For example, $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. $(l:patterns/basics#hexcasting:get_entity_pos)$(action)Compass Purification/$ will take the iota at the top the stack, if it represents an entity, and transform it into an iota representing that entity's location.$(br2)So, drawing those patterns in that order would result in an iota on the stack representing my position.", + "101.6": "For example, $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. $(l:patterns/basics#hexcasting:entity_pos/eye)$(action)Compass Purification/$ will take the iota at the top the stack, if it represents an entity, and transform it into an iota representing that entity's location.$(br2)So, drawing those patterns in that order would result in an iota on the stack representing my position.", "101.7": "$(thing)Iotas/$ can represent things like myself or my position, but there are several other types I can manipulate with $(thing)Actions/$. Here's a comprehensive list:$(li)Numbers (which some legends called \"doubles\");$(li)Vectors, a collection of three numbers representing a position, movement, or direction in the world;$(li)Booleans or \"bools\" for short, representing an abstract True or False,", "101.8": "$(li)Entities, like myself, chickens, and minecarts;$(li)Influences, peculiar types of iota that seem to represent abstract ideas;$(li)Patterns themselves, used for crafting magic items and truly mind-boggling feats like $(italic)spells that cast other spells/$; and$(li)A list of several of the above, gathered into a single iota.", "101.9": "Of course, there's no such thing as a free lunch. All spells, and certain other actions, require _media as payment.$(br2)The best I can figure, a _Hex is a little bit like a plan of action presented to Nature-- in this analogy, the _media is used to provide the arguments to back it up, so Nature will accept your plan and carry it out.", @@ -1149,11 +1149,11 @@ "math.abs.2": "Replaces a number with its absolute value, or a vector with its length.", "math.pow.1": "Perform exponentiation or vector projection.", "math.pow.2": "With two numbers, combines them by raising the first to the power of the second.$(li)With a number and a vector, removes the number and raises each component of the vector to the number's power.$(li)With two vectors, combines them into the $(l:https://en.wikipedia.org/wiki/Vector_projection)vector projection/$ of the top of the stack onto the second-from-the-top.$(br2)In the first and second cases, the first argument or its components are the base, and the second argument or its components are the exponent.", - "math.floor": "\"Floors\" a number, cutting off the fractional component and leaving an integer value.", - "math.ceil": "\"Ceilings\" a number, raising it to the next integer value if it has a fractional component.", + "math.floor": "\"Floors\" a number, cutting off the fractional component and leaving an integer value. If passed a vector, instead floors each of its components.", + "math.ceil": "\"Ceilings\" a number, raising it to the next integer value if it has a fractional component. If passed a vector, instead ceils each of its components.", "math.construct_vec": "Combine three numbers at the top of the stack into a vector's X, Y, and Z components (top to bottom).", "math.deconstruct_vec": "Split a vector into its X, Y, and Z components (top to bottom).", - "math.modulo": "Takes the modulus of two numbers. This is the amount $(italics)remaining/$ after division - for example, 5 %% 2 is 1, and 5 %% 3 is 2.", + "math.modulo": "Takes the modulus of two numbers. This is the amount $(italics)remaining/$ after division - for example, 5 %% 2 is 1, and 5 %% 3 is 2. When applied on vectors, performs the above operation elementwise.", "math.coerce_axial": "For a vector, coerce it to its nearest axial direction, a unit vector. For a number, return the sign of the number; 1 if positive, -1 if negative. In both cases, zero is unaffected.", "math.random": "Creates a random number between 0 and 1.", @@ -1324,7 +1324,7 @@ "basic_spell.beep.2": "There appear to be 16 different $(thing)instruments/$ and 25 different $(thing)notes/$. Both are indexed by zero.$(br2)These seem to be the same instruments I can produce with a $(item)Note Block/$, though the reason for each instrument's number being what it is eludes me.$(br2)Either way, I can find the numbers I need to use by inspecting a $(item)Note Block/$ through a $(l:items/lens)$(item)Scrying Lens/$.", - "blockworks.place_block": "Remove a location from the stack, then pick a block item and place it at the given location.$(br)Costs a negligible amount of _media.", + "blockworks.place_block": "Remove a location from the stack, then pick a block item and place it at the given location.$(br)Costs about an eighth of one $(l:items/amethyst)$(item)Amethyst Dust/$.", "blockworks.break_block": "Remove a location from the stack, then break the block at the given location. This spell can break nearly anything a Diamond Pickaxe can break.$(br)Costs about an eighth of one $(l:items/amethyst)$(item)Amethyst Dust/$.", "blockworks.create_water": "Summon a block of water (or insert up to a bucket's worth) into a block at the given position. Costs about one $(l:items/amethyst)$(item)Amethyst Dust/$.", "blockworks.destroy_water": "Drains either a liquid container at, or a body of liquid around, the given position. Costs about two $(l:items/amethyst)$(item)Charged Amethyst/$.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/interop/pehkui.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/interop/pehkui.json index a806c928..ae2fff8e 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/interop/pehkui.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/interop/pehkui.json @@ -11,14 +11,14 @@ "op_id": "hexcasting:interop/pehkui/get", "anchor": "hexcasting:interop/pehkui/get", "input": "entity", - "output": "double", + "output": "num", "text": "hexcasting.page.interop.pehkui.get" }, { "type": "hexcasting:pattern", "op_id": "hexcasting:interop/pehkui/set", "anchor": "hexcasting:interop/pehkui/set", - "input": "entity, double", + "input": "entity, num", "output": "", "text": "hexcasting.page.interop.pehkui.set" } diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json index 992d6be2..9ef4f60e 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json @@ -43,7 +43,7 @@ "op_id": "hexcasting:raycast", "anchor": "hexcasting:raycast", "input": "vector, vector", - "output": "vector", + "output": "vector/null", "text": "hexcasting.page.basics_pattern.raycast.1" }, { @@ -55,7 +55,7 @@ "op_id": "hexcasting:raycast/axis", "anchor": "hexcasting:raycast/axis", "input": "vector, vector", - "output": "vector", + "output": "vector/null", "text": "hexcasting.page.basics_pattern.raycast/axis.1" }, { @@ -67,7 +67,7 @@ "op_id": "hexcasting:raycast/entity", "anchor": "hexcasting:raycast/entity", "input": "vector, vector", - "output": "entity", + "output": "entity/null", "text": "hexcasting.page.basics_pattern.raycast/entity" }, { diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json index 61ae6e00..fd85fde5 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json @@ -27,7 +27,7 @@ "op_id": "hexcasting:const/null", "anchor": "hexcasting:const/null", "input": "", - "output": "influence", + "output": "null", "text": "hexcasting.page.consts.const/null" }, { diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/altiora.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/altiora.json index 19412a00..32990148 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/altiora.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/altiora.json @@ -10,7 +10,7 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:flight", "anchor": "hexcasting:flight", - "input": "entity, number, number", + "input": "player", "output": "", "text": "hexcasting.page.altiora.1" }, diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json index 5bc549db..814760b5 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json @@ -67,7 +67,7 @@ "op_id": "hexcasting:equals", "anchor": "hexcasting:equals", "input": "any, any", - "output": "number", + "output": "bool", "text": "hexcasting.page.logic.equals" }, { @@ -75,7 +75,7 @@ "op_id": "hexcasting:not_equals", "anchor": "hexcasting:not_equals", "input": "any, any", - "output": "number", + "output": "bool", "text": "hexcasting.page.logic.not_equals" }, { @@ -83,7 +83,7 @@ "op_id": "hexcasting:greater", "anchor": "hexcasting:greater", "input": "number, number", - "output": "number", + "output": "bool", "text": "hexcasting.page.logic.greater" }, { @@ -91,7 +91,7 @@ "op_id": "hexcasting:less", "anchor": "hexcasting:less", "input": "number, number", - "output": "number", + "output": "bool", "text": "hexcasting.page.logic.less" }, { @@ -99,7 +99,7 @@ "op_id": "hexcasting:greater_eq", "anchor": "hexcasting:greater_eq", "input": "number, number", - "output": "number", + "output": "bool", "text": "hexcasting.page.logic.greater_eq" }, { @@ -107,7 +107,7 @@ "op_id": "hexcasting:less_eq", "anchor": "hexcasting:less_eq", "input": "number, number", - "output": "number", + "output": "bool", "text": "hexcasting.page.logic.less_eq" } ] diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json index 59203d0e..88717061 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json @@ -89,16 +89,16 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:floor", "anchor": "hexcasting:floor", - "input": "num", - "output": "num", + "input": "num/vec", + "output": "num/vec", "text": "hexcasting.page.math.floor" }, { "type": "hexcasting:pattern", "op_id": "hexcasting:ceil", "anchor": "hexcasting:ceil", - "input": "num", - "output": "num", + "input": "num/vec", + "output": "num/vec", "text": "hexcasting.page.math.ceil" }, { @@ -121,16 +121,16 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:modulo", "anchor": "hexcasting:modulo", - "input": "num, num", - "output": "num", + "input": "num/vec, num/vec", + "output": "num/vec", "text": "hexcasting.page.math.modulo" }, { "type": "hexcasting:pattern", "op_id": "hexcasting:coerce_axial", "anchor": "hexcasting:coerce_axial", - "input": "vec or num", - "output": "vec or num", + "input": "vec/num", + "output": "vec/num", "text": "hexcasting.page.math.coerce_axial" }, { From 0446a53959b29d71176304b0762a059d3ee468b5 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Thu, 1 Jun 2023 23:28:41 +1000 Subject: [PATCH 32/48] Fixed some from #385 (renamed GTP to `teleport/great`, renamed `hexcasting:conjured` to `hexcasting:conjured_light`), fixed casting.json using old staff id. --- .../java/at/petrak/hexcasting/common/lib/HexBlocks.java | 2 +- .../at/petrak/hexcasting/common/lib/hex/HexActions.java | 2 +- .../resources/assets/hexcasting/lang/en_us.flatten.json5 | 8 ++++---- .../thehexbook/en_us/categories/casting.json | 2 +- .../en_us/entries/patterns/great_spells/teleport.json | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index 18ea4ba0..eb63bb46 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -96,7 +96,7 @@ public class HexBlocks { } // we give these faux items so Patchi can have an item to view with - public static final Block CONJURED_LIGHT = blockItem("conjured", + public static final Block CONJURED_LIGHT = blockItem("conjured_light", new BlockConjuredLight( BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.NONE) .sound(SoundType.AMETHYST) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index 9abeda8e..93b4fd12 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -338,7 +338,7 @@ public class HexActions { Items.LAVA_BUCKET, Blocks.LAVA_CAULDRON.defaultBlockState(), Fluids.LAVA))); - public static final ActionRegistryEntry TELEPORT = make("teleport", + public static final ActionRegistryEntry TELEPORT = make("teleport/great", new ActionRegistryEntry(HexPattern.fromAngles("wwwqqqwwwqqeqqwwwqqwqqdqqqqqdqq", HexDir.EAST), OpTeleport.INSTANCE)); public static final ActionRegistryEntry SENTINEL$GREAT = make("sentinel/create/great", 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 2af56762..920d7ac6 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 @@ -92,7 +92,7 @@ "entity.hexcasting.wall_scroll": "Hanging Scroll", "block.hexcasting": { - "conjured": "Conjured Light", + "conjured_light": "Conjured Light", "conjured_block": "Conjured Block", "slate.blank": "Blank Slate", "slate.written": "Patterned Slate", @@ -526,7 +526,7 @@ "summon_rain": "Summon Rain", "dispel_rain": "Dispel Rain", "create_lava": "Create Lava", - "teleport": "Greater Teleport", + "teleport/great": "Greater Teleport", "brainsweep": "Flay Mind", "sentinel/create/great": "Summon Greater Sentinel", @@ -1383,8 +1383,8 @@ "altiora.1": "Summon a sheaf of _media about me in the shape of wings, endowed with enough substance to allow gliding.", "altiora.2": "Using them is identical to using $(item)Elytra/$; the target (which must be a player) is lofted into the air, after which pressing $(k:jump) will deploy the wings. The wings are fragile, and break upon touching any surface. Longer flights may benefit from $(l:patterns/spells/basic#hexcasting:add_motion)$(action)Impulse/$ or (for the foolhardy) $(item)Fireworks/$.$(br2)Costs about one $(l:items/amethyst)$(item)Charged Crystal/$.", - "teleport.1": "Far more powerful than $(l:patterns/spells/basic#hexcasting:blink)$(action)Blink/$, this spell lets me teleport nearly anywhere in the entire world! There does seem to be a limit, but it is $(italic)much/$ greater than the normal radius of influence I am used to.", - "teleport.2": "The entity will be teleported by the given vector, which is an offset from its given position. No matter the distance, it always seems to cost about ten $(l:items/amethyst)$(item)Charged Amethyst/$.$(br2)The transference is not perfect, and it seems when teleporting something as complex as a player, their inventory doesn't $(italic)quite/$ stay attached, and tends to splatter everywhere at the destination. In addition, the target will be forcibly removed from anything inanimate they are riding or sitting on ... but I've read scraps that suggest animals can come along for the ride, so to speak.", + "teleport/great.1": "Far more powerful than $(l:patterns/spells/basic#hexcasting:blink)$(action)Blink/$, this spell lets me teleport nearly anywhere in the entire world! There does seem to be a limit, but it is $(italic)much/$ greater than the normal radius of influence I am used to.", + "teleport/great.2": "The entity will be teleported by the given vector, which is an offset from its given position. No matter the distance, it always seems to cost about ten $(l:items/amethyst)$(item)Charged Amethyst/$.$(br2)The transference is not perfect, and it seems when teleporting something as complex as a player, their inventory doesn't $(italic)quite/$ stay attached, and tends to splatter everywhere at the destination. In addition, the target will be forcibly removed from anything inanimate they are riding or sitting on ... but I've read scraps that suggest animals can come along for the ride, so to speak.", "zeniths.1": "This family of spells all impart a positive potion effect upon an entity, similar to the $(l:patterns/spells/nadirs)$(action)Nadirs/$. However, these have their _media costs increase with the $(italic)cube/$ of the potency.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json index 84dd90e6..b1518cb9 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json @@ -1,6 +1,6 @@ { "name": "hexcasting.category.casting", - "icon": "hexcasting:oak_staff", + "icon": "hexcasting:staff/oak", "description": "hexcasting.category.casting.desc", "sortnum": 1 } diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json index b5ea419c..4d812fd6 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json @@ -8,16 +8,16 @@ "pages": [ { "type": "hexcasting:pattern", - "op_id": "hexcasting:teleport", - "anchor": "hexcasting:teleport", + "op_id": "hexcasting:teleport/great", + "anchor": "hexcasting:teleport/great", "input": "entity, vector", "output": "", "hex_size": 8, - "text": "hexcasting.page.teleport.1" + "text": "hexcasting.page.teleport/great.1" }, { "type": "patchouli:text", - "text": "hexcasting.page.teleport.2" + "text": "hexcasting.page.teleport/great.2" } ] } From cf3624692e36eb482326d8247de019c4d7b21ee4 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 00:10:35 +1000 Subject: [PATCH 33/48] Fixed #381 (see the issue for details on why this works). --- .../blocks/akashic/BlockEntityAkashicBookshelf.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicBookshelf.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicBookshelf.java index 7fe9945c..fe10b759 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicBookshelf.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicBookshelf.java @@ -13,6 +13,7 @@ import org.jetbrains.annotations.Nullable; public class BlockEntityAkashicBookshelf extends HexBlockEntity { public static final String TAG_PATTERN = "pattern"; public static final String TAG_IOTA = "iota"; + public static final String TAG_DUMMY = "dummy"; // This is only not null if this stores any data. private HexPattern pattern = null; @@ -55,8 +56,6 @@ public class BlockEntityAkashicBookshelf extends HexBlockEntity { this.pattern = null; this.iotaTag = null; - this.setChanged(); - if (!previouslyEmpty) { var oldBs = this.getBlockState(); var newBs = oldBs.setValue(BlockAkashicBookshelf.HAS_BOOKS, false); @@ -72,6 +71,8 @@ public class BlockEntityAkashicBookshelf extends HexBlockEntity { if (this.pattern != null && this.iotaTag != null) { compoundTag.put(TAG_PATTERN, this.pattern.serializeToNBT()); compoundTag.put(TAG_IOTA, this.iotaTag); + } else { + compoundTag.putBoolean(TAG_DUMMY, false); } } @@ -80,6 +81,9 @@ public class BlockEntityAkashicBookshelf extends HexBlockEntity { if (tag.contains(TAG_PATTERN) && tag.contains(TAG_IOTA)) { this.pattern = HexPattern.fromNBT(tag.getCompound(TAG_PATTERN)); this.iotaTag = tag.getCompound(TAG_IOTA); + } else if (tag.contains(TAG_DUMMY)) { + this.pattern = null; + this.iotaTag = null; } } } From 208ffce914671aae0d6f15c5f49b799377eb97c1 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 00:26:04 +1000 Subject: [PATCH 34/48] make operation counter reset after each pattern is drawn. --- .../petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java index ea969c14..6a656ffc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java @@ -101,7 +101,8 @@ public class StaffCastEnv extends PlayerBasedCastEnv { IXplatAbstractions.INSTANCE.setStaffcastImage(sender, null); IXplatAbstractions.INSTANCE.setPatterns(sender, List.of()); } else { - IXplatAbstractions.INSTANCE.setStaffcastImage(sender, vm.getImage()); + var imageWithOpsReset = vm.getImage().copy(vm.getImage().getStack(), vm.getImage().getParenCount(), vm.getImage().getParenthesized(), vm.getImage().getEscapeNext(), 0, vm.getImage().getUserData()); + IXplatAbstractions.INSTANCE.setStaffcastImage(sender, imageWithOpsReset); if (!resolvedPatterns.isEmpty()) { resolvedPatterns.get(resolvedPatterns.size() - 1).setType(clientInfo.getResolutionType()); } From 343338d66defe9cf6987a3dce3c567e5393e89de Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 00:42:38 +1000 Subject: [PATCH 35/48] change everything to use | for type unions and [X] for list of X --- .../hexcasting/lang/en_us.flatten.json5 | 4 +- .../en_us/entries/patterns/basics.json | 6 +-- .../patterns/great_spells/teleport.json | 2 +- .../en_us/entries/patterns/math.json | 38 +++++++++---------- .../en_us/entries/patterns/sets.json | 12 +++--- .../entries/patterns/spells/hexcasting.json | 6 +-- 6 files changed, 34 insertions(+), 34 deletions(-) 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 920d7ac6..614e0a2f 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 @@ -1136,7 +1136,7 @@ "numbers.3": "In certain cases it might be easier to just use an $(l:items/abacus)$(item)Abacus/$. But, it's worth knowing the \"proper\" way to do things.", - "math.numvec": "Many mathematical operations function on both numbers and vectors. Such arguments are written as \"num/vec\".", + "math.numvec": "Many mathematical operations function on both numbers and vectors. Such arguments are written as \"num|vec\".", "math.add.1": "Perform addition.", "math.add.2": "As such:$(li)With two numbers at the top of the stack, combines them into their sum.$(li)With a number and a vector, removes the number from the stack and adds it to each element of the vector.$(li)With two vectors, combines them by summing corresponding components into a new vector (i.e. [1, 2, 3] + [0, 4, -1] = [1, 6, 2]).", "math.sub.1": "Perform subtraction.", @@ -1168,7 +1168,7 @@ "advanced_math.logarithm": "Removes the number at the top of the stack, then takes the logarithm of the number at the top using the other number as its base. Related to the value of $(l:patterns/consts#hexcasting:const/double/e)$(thing)$(italic)e/$.", - "sets.numlist": "Set operations are odd, in that some of them can accept two numbers or two lists, but not a combination thereof. Such arguments will be written as \"num, num/list, list\".$(br2)When numbers are used in those operations, they are being used as so-called binary \"bitsets\", lists of 1 and 0, true and false, \"on\" and \"off\".", + "sets.numlist": "Set operations are odd, in that some of them can accept two numbers or two lists, but not a combination thereof. Such arguments will be written as \"(num, num)|(list, list)\".$(br2)When numbers are used in those operations, they are being used as so-called binary \"bitsets\", lists of 1 and 0, true and false, \"on\" and \"off\".", "sets.or.1": "Unifies two sets.", "sets.or.2": "As such:$(li)With two numbers at the top of the stack, combines them into a bitset containing every \"on\" bit in either bitset.$(li)With two lists, this creates a list of every element from the first list, plus every element from the second list that is not in the first list. This is similar to $(l:patterns/lists#hexcasting:concat)$(action)Combination Distillation/$.", "sets.and.1": "Takes the intersection of two sets.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json index 9ef4f60e..bca8f6ea 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json @@ -43,7 +43,7 @@ "op_id": "hexcasting:raycast", "anchor": "hexcasting:raycast", "input": "vector, vector", - "output": "vector/null", + "output": "vector | null", "text": "hexcasting.page.basics_pattern.raycast.1" }, { @@ -55,7 +55,7 @@ "op_id": "hexcasting:raycast/axis", "anchor": "hexcasting:raycast/axis", "input": "vector, vector", - "output": "vector/null", + "output": "vector | null", "text": "hexcasting.page.basics_pattern.raycast/axis.1" }, { @@ -67,7 +67,7 @@ "op_id": "hexcasting:raycast/entity", "anchor": "hexcasting:raycast/entity", "input": "vector, vector", - "output": "entity/null", + "output": "entity | null", "text": "hexcasting.page.basics_pattern.raycast/entity" }, { diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json index 4d812fd6..fed5de0f 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/great_spells/teleport.json @@ -1,5 +1,5 @@ { - "name": "hexcasting.action.hexcasting:teleport", + "name": "hexcasting.action.hexcasting:teleport/great", "category": "hexcasting:patterns/great_spells", "icon": "minecraft:ender_pearl", "sortnum": 3, diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json index 88717061..668875a5 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json @@ -17,8 +17,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:add", "anchor": "hexcasting:add", - "input": "num/vec, num/vec", - "output": "num/vec", + "input": "num|vec, num|vec", + "output": "num|vec", "text": "hexcasting.page.math.add.1" }, { @@ -29,8 +29,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:sub", "anchor": "hexcasting:sub", - "input": "num/vec, num/vec", - "output": "num/vec", + "input": "num|vec, num|vec", + "output": "num|vec", "text": "hexcasting.page.math.sub.1" }, { @@ -41,8 +41,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:mul", "anchor": "hexcasting:mul", - "input": "num/vec, num/vec", - "output": "num/vec", + "input": "num|vec, num|vec", + "output": "num|vec", "text": "hexcasting.page.math.mul.1" }, { @@ -53,8 +53,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:div", "anchor": "hexcasting:div", - "input": "num/vec, num/vec", - "output": "num/vec", + "input": "num|vec, num|vec", + "output": "num|vec", "text": "hexcasting.page.math.div.1" }, { @@ -65,7 +65,7 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:abs", "anchor": "hexcasting:abs", - "input": "num/vec", + "input": "num|vec", "output": "number", "text": "hexcasting.page.math.abs.1" }, @@ -77,8 +77,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:pow", "anchor": "hexcasting:pow", - "input": "num/vec, num/vec", - "output": "num/vec", + "input": "num|vec, num|vec", + "output": "num|vec", "text": "hexcasting.page.math.pow.1" }, { @@ -89,16 +89,16 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:floor", "anchor": "hexcasting:floor", - "input": "num/vec", - "output": "num/vec", + "input": "num|vec", + "output": "num|vec", "text": "hexcasting.page.math.floor" }, { "type": "hexcasting:pattern", "op_id": "hexcasting:ceil", "anchor": "hexcasting:ceil", - "input": "num/vec", - "output": "num/vec", + "input": "num|vec", + "output": "num|vec", "text": "hexcasting.page.math.ceil" }, { @@ -121,16 +121,16 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:modulo", "anchor": "hexcasting:modulo", - "input": "num/vec, num/vec", - "output": "num/vec", + "input": "num|vec, num|vec", + "output": "num|vec", "text": "hexcasting.page.math.modulo" }, { "type": "hexcasting:pattern", "op_id": "hexcasting:coerce_axial", "anchor": "hexcasting:coerce_axial", - "input": "vec/num", - "output": "vec/num", + "input": "vec|num", + "output": "vec|num", "text": "hexcasting.page.math.coerce_axial" }, { diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json index 10010d64..936d929f 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/sets.json @@ -17,8 +17,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:or", "anchor": "hexcasting:or", - "input": "num, num/list, list", - "output": "num/list", + "input": "(num, num)|(list, list)", + "output": "num|list", "text": "hexcasting.page.sets.or.1" }, { @@ -29,8 +29,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:and", "anchor": "hexcasting:and", - "input": "num, num/list, list", - "output": "num/list", + "input": "(num, num)|(list, list)", + "output": "num|list", "text": "hexcasting.page.sets.and.1" }, { @@ -41,8 +41,8 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:xor", "anchor": "hexcasting:xor", - "input": "num, num/list, list", - "output": "num/list", + "input": "(num, num)|(list, list)", + "output": "num|list", "text": "hexcasting.page.sets.xor.1" }, { diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json index 92ac5b5e..06cd64b4 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json @@ -14,7 +14,7 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:craft/cypher", "anchor": "hexcasting:craft/cypher", - "input": "entity, list of patterns", + "input": "entity, [pattern]", "output": "", "text": "hexcasting.page.hexcasting_spell.craft/cypher" }, @@ -22,7 +22,7 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:craft/trinket", "anchor": "hexcasting:craft/trinket", - "input": "entity, list of patterns", + "input": "entity, [pattern]", "output": "", "text": "hexcasting.page.hexcasting_spell.craft/trinket", "hex_size": 8 @@ -31,7 +31,7 @@ "type": "hexcasting:pattern", "op_id": "hexcasting:craft/artifact", "anchor": "hexcasting:craft/artifact", - "input": "entity, list of patterns", + "input": "entity, [pattern]", "output": "", "text": "hexcasting.page.hexcasting_spell.craft/artifact", "hex_size": 5 From 2a4d156a784b15dc06c2aa860f7a7fe0940779e5 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 14:26:18 +1000 Subject: [PATCH 36/48] Added in Item variants for foci, spellbooks, cyphers, trinkets, and artifacts. Haven't added a way to get different variants in game yet. Also, some of the variants have weird z-fighting that I haven't fixed yet --- .../8f7cd5c924d3264b7777ef1696459761f9a70902 | 112 ++++++++++-- .../d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 | 4 +- .../{conjured.json => conjured_light.json} | 0 .../hexcasting/models/item/artifact.json | 108 +++++++++++- .../models/item/artifact_0_filled.json | 7 + .../{trinket_filled.json => artifact_1.json} | 2 +- .../models/item/artifact_1_filled.json | 7 + .../{artifact_filled.json => artifact_2.json} | 2 +- .../models/item/artifact_2_filled.json | 7 + .../hexcasting/models/item/artifact_3.json | 6 + .../models/item/artifact_3_filled.json | 7 + .../hexcasting/models/item/artifact_4.json | 6 + .../models/item/artifact_4_filled.json | 7 + .../hexcasting/models/item/artifact_5.json | 6 + .../models/item/artifact_5_filled.json | 7 + .../hexcasting/models/item/artifact_6.json | 6 + .../models/item/artifact_6_filled.json | 7 + .../hexcasting/models/item/artifact_7.json | 6 + .../models/item/artifact_7_filled.json | 7 + .../{conjured.json => conjured_light.json} | 0 .../assets/hexcasting/models/item/cypher.json | 108 +++++++++++- .../models/item/cypher_0_filled.json | 7 + .../{cypher_filled.json => cypher_1.json} | 2 +- .../models/item/cypher_1_filled.json | 7 + .../hexcasting/models/item/cypher_2.json | 6 + .../models/item/cypher_2_filled.json | 7 + .../hexcasting/models/item/cypher_3.json | 6 + .../models/item/cypher_3_filled.json | 7 + .../hexcasting/models/item/cypher_4.json | 6 + .../models/item/cypher_4_filled.json | 7 + .../hexcasting/models/item/cypher_5.json | 6 + .../models/item/cypher_5_filled.json | 7 + .../hexcasting/models/item/cypher_6.json | 6 + .../models/item/cypher_6_filled.json | 7 + .../hexcasting/models/item/cypher_7.json | 6 + .../models/item/cypher_7_filled.json | 7 + .../assets/hexcasting/models/item/focus.json | 162 +++++++++++++++++- .../models/item/focus_0_filled.json | 7 + .../models/item/focus_0_sealed.json | 7 + .../hexcasting/models/item/focus_1.json | 6 + .../models/item/focus_1_filled.json | 7 + .../models/item/focus_1_sealed.json | 7 + .../hexcasting/models/item/focus_2.json | 6 + .../models/item/focus_2_filled.json | 7 + .../models/item/focus_2_sealed.json | 7 + .../hexcasting/models/item/focus_3.json | 6 + .../models/item/focus_3_filled.json | 7 + .../models/item/focus_3_sealed.json | 7 + .../hexcasting/models/item/focus_4.json | 6 + .../models/item/focus_4_filled.json | 7 + .../models/item/focus_4_sealed.json | 7 + .../hexcasting/models/item/focus_5.json | 6 + .../models/item/focus_5_filled.json | 7 + .../models/item/focus_5_sealed.json | 7 + .../hexcasting/models/item/focus_6.json | 6 + .../models/item/focus_6_filled.json | 7 + .../models/item/focus_6_sealed.json | 7 + .../hexcasting/models/item/focus_7.json | 6 + .../models/item/focus_7_filled.json | 7 + .../models/item/focus_7_sealed.json | 7 + .../hexcasting/models/item/focus_filled.json | 7 - .../hexcasting/models/item/focus_sealed.json | 7 - .../hexcasting/models/item/spellbook.json | 162 +++++++++++++++++- .../models/item/spellbook_0_filled.json | 7 + .../models/item/spellbook_0_sealed.json | 7 + .../hexcasting/models/item/spellbook_1.json | 6 + .../models/item/spellbook_1_filled.json | 7 + .../models/item/spellbook_1_sealed.json | 7 + .../hexcasting/models/item/spellbook_2.json | 6 + .../models/item/spellbook_2_filled.json | 7 + .../models/item/spellbook_2_sealed.json | 7 + .../hexcasting/models/item/spellbook_3.json | 6 + .../models/item/spellbook_3_filled.json | 7 + .../models/item/spellbook_3_sealed.json | 7 + .../hexcasting/models/item/spellbook_4.json | 6 + .../models/item/spellbook_4_filled.json | 7 + .../models/item/spellbook_4_sealed.json | 7 + .../hexcasting/models/item/spellbook_5.json | 6 + .../models/item/spellbook_5_filled.json | 7 + .../models/item/spellbook_5_sealed.json | 7 + .../hexcasting/models/item/spellbook_6.json | 6 + .../models/item/spellbook_6_filled.json | 7 + .../models/item/spellbook_6_sealed.json | 7 + .../hexcasting/models/item/spellbook_7.json | 6 + .../models/item/spellbook_7_filled.json | 7 + .../models/item/spellbook_7_sealed.json | 7 + .../models/item/spellbook_filled.json | 7 - .../models/item/spellbook_sealed.json | 7 - .../hexcasting/models/item/trinket.json | 108 +++++++++++- .../models/item/trinket_0_filled.json | 7 + .../hexcasting/models/item/trinket_1.json | 6 + .../models/item/trinket_1_filled.json | 7 + .../hexcasting/models/item/trinket_2.json | 6 + .../models/item/trinket_2_filled.json | 7 + .../hexcasting/models/item/trinket_3.json | 6 + .../models/item/trinket_3_filled.json | 7 + .../hexcasting/models/item/trinket_4.json | 6 + .../models/item/trinket_4_filled.json | 7 + .../hexcasting/models/item/trinket_5.json | 6 + .../models/item/trinket_5_filled.json | 7 + .../hexcasting/models/item/trinket_6.json | 6 + .../models/item/trinket_6_filled.json | 7 + .../hexcasting/models/item/trinket_7.json | 6 + .../models/item/trinket_7_filled.json | 7 + .../hexcasting/api/item/VariantItem.java | 32 ++++ .../client/RegisterClientStuff.java | 16 +- .../common/items/magic/ItemArtifact.java | 10 +- .../common/items/magic/ItemCypher.java | 10 +- .../common/items/magic/ItemTrinket.java | 10 +- .../common/items/storage/ItemFocus.java | 16 +- .../common/items/storage/ItemSpellbook.java | 19 +- .../textures/item/cad/0_artifact.png | Bin 0 -> 473 bytes .../textures/item/cad/0_artifact_overlay.png | Bin 0 -> 189 bytes .../hexcasting/textures/item/cad/0_cypher.png | Bin 0 -> 323 bytes .../textures/item/cad/0_cypher_overlay.png | Bin 0 -> 157 bytes .../textures/item/cad/0_focus_empty.png | Bin 0 -> 415 bytes .../textures/item/cad/0_focus_filled.png | Bin 0 -> 415 bytes .../item/cad/0_focus_filled_overlay.png | Bin 0 -> 152 bytes .../textures/item/cad/0_focus_sealed.png | Bin 0 -> 415 bytes .../item/cad/0_focus_sealed_overlay.png | Bin 0 -> 229 bytes .../textures/item/cad/0_spellbook_empty.png | Bin 0 -> 437 bytes .../item/cad/0_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/0_spellbook_filled.png | Bin 0 -> 526 bytes .../item/cad/0_spellbook_filled_overlay.png | Bin 0 -> 178 bytes .../textures/item/cad/0_spellbook_sealed.png | Bin 0 -> 578 bytes .../item/cad/0_spellbook_sealed_overlay.png | Bin 0 -> 213 bytes .../textures/item/cad/0_trinket.png | Bin 0 -> 330 bytes .../textures/item/cad/0_trinket_overlay.png | Bin 0 -> 137 bytes .../textures/item/cad/1_artifact.png | Bin 0 -> 649 bytes .../textures/item/cad/1_artifact_overlay.png | Bin 0 -> 186 bytes .../hexcasting/textures/item/cad/1_cypher.png | Bin 0 -> 463 bytes .../textures/item/cad/1_cypher_overlay.png | Bin 0 -> 157 bytes .../textures/item/cad/1_focus_empty.png | Bin 0 -> 509 bytes .../textures/item/cad/1_focus_filled.png | Bin 0 -> 509 bytes .../item/cad/1_focus_filled_overlay.png | Bin 0 -> 151 bytes .../textures/item/cad/1_focus_sealed.png | Bin 0 -> 509 bytes .../item/cad/1_focus_sealed_overlay.png | Bin 0 -> 154 bytes .../textures/item/cad/1_spellbook_empty.png | Bin 0 -> 434 bytes .../item/cad/1_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/1_spellbook_filled.png | Bin 0 -> 434 bytes .../item/cad/1_spellbook_filled_overlay.png | Bin 0 -> 183 bytes .../textures/item/cad/1_spellbook_sealed.png | Bin 0 -> 434 bytes .../item/cad/1_spellbook_sealed_overlay.png | Bin 0 -> 189 bytes .../textures/item/cad/1_trinket.png | Bin 0 -> 605 bytes .../textures/item/cad/1_trinket_overlay.png | Bin 0 -> 137 bytes .../textures/item/cad/2_artifact.png | Bin 0 -> 614 bytes .../textures/item/cad/2_artifact_overlay.png | Bin 0 -> 181 bytes .../hexcasting/textures/item/cad/2_cypher.png | Bin 0 -> 306 bytes .../textures/item/cad/2_cypher_overlay.png | Bin 0 -> 156 bytes .../textures/item/cad/2_focus_empty.png | Bin 0 -> 336 bytes .../textures/item/cad/2_focus_filled.png | Bin 0 -> 336 bytes .../item/cad/2_focus_filled_overlay.png | Bin 0 -> 152 bytes .../textures/item/cad/2_focus_sealed.png | Bin 0 -> 336 bytes .../item/cad/2_focus_sealed_overlay.png | Bin 0 -> 184 bytes .../textures/item/cad/2_spellbook_empty.png | Bin 0 -> 553 bytes .../item/cad/2_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/2_spellbook_filled.png | Bin 0 -> 553 bytes .../item/cad/2_spellbook_filled_overlay.png | Bin 0 -> 178 bytes .../textures/item/cad/2_spellbook_sealed.png | Bin 0 -> 553 bytes .../item/cad/2_spellbook_sealed_overlay.png | Bin 0 -> 210 bytes .../textures/item/cad/2_trinket.png | Bin 0 -> 421 bytes .../textures/item/cad/2_trinket_overlay.png | Bin 0 -> 145 bytes .../textures/item/cad/3_artifact.png | Bin 0 -> 502 bytes .../textures/item/cad/3_artifact_overlay.png | Bin 0 -> 193 bytes .../hexcasting/textures/item/cad/3_cypher.png | Bin 0 -> 462 bytes .../textures/item/cad/3_cypher_overlay.png | Bin 0 -> 153 bytes .../textures/item/cad/3_focus_empty.png | Bin 0 -> 440 bytes .../textures/item/cad/3_focus_filled.png | Bin 0 -> 440 bytes .../item/cad/3_focus_filled_overlay.png | Bin 0 -> 153 bytes .../textures/item/cad/3_focus_sealed.png | Bin 0 -> 440 bytes .../item/cad/3_focus_sealed_overlay.png | Bin 0 -> 177 bytes .../textures/item/cad/3_spellbook_empty.png | Bin 0 -> 487 bytes .../item/cad/3_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/3_spellbook_filled.png | Bin 0 -> 487 bytes .../item/cad/3_spellbook_filled_overlay.png | Bin 0 -> 161 bytes .../textures/item/cad/3_spellbook_sealed.png | Bin 0 -> 487 bytes .../item/cad/3_spellbook_sealed_overlay.png | Bin 0 -> 213 bytes .../textures/item/cad/3_trinket.png | Bin 0 -> 441 bytes .../textures/item/cad/3_trinket_overlay.png | Bin 0 -> 146 bytes .../textures/item/cad/4_artifact.png | Bin 0 -> 568 bytes .../textures/item/cad/4_artifact_overlay.png | Bin 0 -> 183 bytes .../hexcasting/textures/item/cad/4_cypher.png | Bin 0 -> 416 bytes .../textures/item/cad/4_cypher_overlay.png | Bin 0 -> 157 bytes .../textures/item/cad/4_focus_empty.png | Bin 0 -> 371 bytes .../textures/item/cad/4_focus_filled.png | Bin 0 -> 371 bytes .../item/cad/4_focus_filled_overlay.png | Bin 0 -> 147 bytes .../textures/item/cad/4_focus_sealed.png | Bin 0 -> 371 bytes .../item/cad/4_focus_sealed_overlay.png | Bin 0 -> 176 bytes .../textures/item/cad/4_spellbook_empty.png | Bin 0 -> 470 bytes .../item/cad/4_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/4_spellbook_filled.png | Bin 0 -> 470 bytes .../item/cad/4_spellbook_filled_overlay.png | Bin 0 -> 151 bytes .../textures/item/cad/4_spellbook_sealed.png | Bin 0 -> 470 bytes .../item/cad/4_spellbook_sealed_overlay.png | Bin 0 -> 161 bytes .../textures/item/cad/4_trinket.png | Bin 0 -> 493 bytes .../textures/item/cad/4_trinket_overlay.png | Bin 0 -> 138 bytes .../textures/item/cad/5_artifact.png | Bin 0 -> 306 bytes .../textures/item/cad/5_artifact_overlay.png | Bin 0 -> 186 bytes .../hexcasting/textures/item/cad/5_cypher.png | Bin 0 -> 186 bytes .../textures/item/cad/5_cypher_overlay.png | Bin 0 -> 157 bytes .../textures/item/cad/5_focus_empty.png | Bin 0 -> 351 bytes .../textures/item/cad/5_focus_filled.png | Bin 0 -> 351 bytes .../item/cad/5_focus_filled_overlay.png | Bin 0 -> 147 bytes .../textures/item/cad/5_focus_sealed.png | Bin 0 -> 351 bytes .../item/cad/5_focus_sealed_overlay.png | Bin 0 -> 177 bytes .../textures/item/cad/5_spellbook_empty.png | Bin 0 -> 507 bytes .../item/cad/5_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/5_spellbook_filled.png | Bin 0 -> 507 bytes .../item/cad/5_spellbook_filled_overlay.png | Bin 0 -> 178 bytes .../textures/item/cad/5_spellbook_sealed.png | Bin 0 -> 507 bytes .../item/cad/5_spellbook_sealed_overlay.png | Bin 0 -> 210 bytes .../textures/item/cad/5_trinket.png | Bin 0 -> 216 bytes .../textures/item/cad/5_trinket_overlay.png | Bin 0 -> 138 bytes .../textures/item/cad/6_artifact.png | Bin 0 -> 437 bytes .../textures/item/cad/6_artifact_overlay.png | Bin 0 -> 151 bytes .../hexcasting/textures/item/cad/6_cypher.png | Bin 0 -> 394 bytes .../textures/item/cad/6_cypher_overlay.png | Bin 0 -> 156 bytes .../textures/item/cad/6_focus_empty.png | Bin 0 -> 416 bytes .../textures/item/cad/6_focus_filled.png | Bin 0 -> 416 bytes .../item/cad/6_focus_filled_overlay.png | Bin 0 -> 151 bytes .../textures/item/cad/6_focus_sealed.png | Bin 0 -> 433 bytes .../item/cad/6_focus_sealed_overlay.png | Bin 0 -> 193 bytes .../textures/item/cad/6_spellbook_empty.png | Bin 0 -> 457 bytes .../item/cad/6_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/6_spellbook_filled.png | Bin 0 -> 457 bytes .../item/cad/6_spellbook_filled_overlay.png | Bin 0 -> 165 bytes .../textures/item/cad/6_spellbook_sealed.png | Bin 0 -> 457 bytes .../item/cad/6_spellbook_sealed_overlay.png | Bin 0 -> 191 bytes .../textures/item/cad/6_trinket.png | Bin 0 -> 376 bytes .../textures/item/cad/6_trinket_overlay.png | Bin 0 -> 135 bytes .../textures/item/cad/7_artifact.png | Bin 0 -> 432 bytes .../textures/item/cad/7_artifact_overlay.png | Bin 0 -> 186 bytes .../hexcasting/textures/item/cad/7_cypher.png | Bin 0 -> 320 bytes .../textures/item/cad/7_cypher_overlay.png | Bin 0 -> 156 bytes .../textures/item/cad/7_focus_empty.png | Bin 0 -> 352 bytes .../textures/item/cad/7_focus_filled.png | Bin 0 -> 352 bytes .../item/cad/7_focus_filled_overlay.png | Bin 0 -> 158 bytes .../textures/item/cad/7_focus_sealed.png | Bin 0 -> 352 bytes .../item/cad/7_focus_sealed_overlay.png | Bin 0 -> 154 bytes .../textures/item/cad/7_spellbook_empty.png | Bin 0 -> 329 bytes .../item/cad/7_spellbook_empty_overlay.png | Bin 0 -> 88 bytes .../textures/item/cad/7_spellbook_filled.png | Bin 0 -> 359 bytes .../item/cad/7_spellbook_filled_overlay.png | Bin 0 -> 111 bytes .../textures/item/cad/7_spellbook_sealed.png | Bin 0 -> 358 bytes .../item/cad/7_spellbook_sealed_overlay.png | Bin 0 -> 134 bytes .../textures/item/cad/7_trinket.png | Bin 0 -> 369 bytes .../textures/item/cad/7_trinket_overlay.png | Bin 0 -> 136 bytes .../tags/blocks/crystal_sound_blocks.json | 2 +- .../forge/datagen/xplat/HexItemModels.java | 74 ++++---- 249 files changed, 1457 insertions(+), 114 deletions(-) rename Common/src/generated/resources/assets/hexcasting/blockstates/{conjured.json => conjured_light.json} (100%) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_0_filled.json rename Common/src/generated/resources/assets/hexcasting/models/item/{trinket_filled.json => artifact_1.json} (57%) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_1_filled.json rename Common/src/generated/resources/assets/hexcasting/models/item/{artifact_filled.json => artifact_2.json} (56%) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_2_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_3_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_4.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_4_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_5.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_5_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_6.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_6_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_7.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/artifact_7_filled.json rename Common/src/generated/resources/assets/hexcasting/models/item/{conjured.json => conjured_light.json} (100%) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_0_filled.json rename Common/src/generated/resources/assets/hexcasting/models/item/{cypher_filled.json => cypher_1.json} (57%) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_1_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_2_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_3_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_4.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_4_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_5.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_5_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_6.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_6_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_7.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/cypher_7_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_0_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_0_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_1_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_1_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_2_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_2_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_3_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_3_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_4.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_4_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_4_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_5.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_5_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_5_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_6.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_6_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_6_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_7.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_7_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_7_sealed.json delete mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json delete mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_sealed.json delete mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json delete mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_0_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_1_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_2_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_3_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_4.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_4_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_5.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_5_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_6.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_6_filled.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_7.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/trinket_7_filled.json create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/item/VariantItem.java create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/0_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/1_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/2_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/3_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/4_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/5_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/6_trinket_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_artifact.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_artifact_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_cypher.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_cypher_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_focus_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_focus_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_focus_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_focus_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_focus_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_empty.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_empty_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_filled.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_filled_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_sealed.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_sealed_overlay.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_trinket.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/cad/7_trinket_overlay.png diff --git a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 index 8c139505..30f2014b 100644 --- a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 +++ b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 @@ -1,4 +1,4 @@ -// 1.19.2 2023-05-23T13:13:41.108322225 Item Models: hexcasting +// 1.19.2 2023-06-02T14:09:23.4990502 Item Models: hexcasting 9af2754cb1e53eeaa85618cf92651b4878cf62b1 assets/hexcasting/models/block/quenched_allay_0.json de4ff723b4332d4e26bd01f74e0485e28c9a2178 assets/hexcasting/models/block/quenched_allay_1.json 4c29163e07f3a903017e38a9cc102f4b37db20b1 assets/hexcasting/models/block/quenched_allay_2.json @@ -6,16 +6,44 @@ de4ff723b4332d4e26bd01f74e0485e28c9a2178 assets/hexcasting/models/block/quenched f2156b3a7041cf99891b528393db64c6b9ca1a4f assets/hexcasting/models/item/abacus.json 19730853397b109cfedd0c3bbda83d5de6cd15b9 assets/hexcasting/models/item/akashic_record.json 8c735feff09d46d00ed681311f46f61a50cfdc9b assets/hexcasting/models/item/amethyst_dust.json -d1b0892de9d751e7bebc763e6407d5285363c851 assets/hexcasting/models/item/artifact.json -7eb3eb776e70eb616c12ada500b9d1d6a3249a6a assets/hexcasting/models/item/artifact_filled.json +87e7ee44cdd0808a3dd72babfd1db716df2bcdfe assets/hexcasting/models/item/artifact.json +1cd1b4d002d1a9a044ceab7cca842e4a2b7bd2f4 assets/hexcasting/models/item/artifact_0_filled.json +4709e65d8e74cf45b3ba014bdf70373728cccc78 assets/hexcasting/models/item/artifact_1.json +13915cc6b9ebbdce7043939c32c308bf129c2099 assets/hexcasting/models/item/artifact_1_filled.json +5434775bd88a654db6b2d09ab5f74a93a1983528 assets/hexcasting/models/item/artifact_2.json +a084bdd9039f5a16183d0cf70d744bf29a3c8760 assets/hexcasting/models/item/artifact_2_filled.json +206548428fd1a142442469c8b65fae24a1b50af6 assets/hexcasting/models/item/artifact_3.json +d6de8ae6a4d546aac12489cae386731490040c5e assets/hexcasting/models/item/artifact_3_filled.json +a0dbd0d40833d91dd33036686cd58494572cbe42 assets/hexcasting/models/item/artifact_4.json +86f1f0c0cbae34010ec9eca723db64303d5f5d5f assets/hexcasting/models/item/artifact_4_filled.json +e822e463834b9bf4433defbace06cc586629da95 assets/hexcasting/models/item/artifact_5.json +a44fec20b346e1e660027d204b42df312a310086 assets/hexcasting/models/item/artifact_5_filled.json +c499e86bb5b5bc2fe29914ce14832212ca23df10 assets/hexcasting/models/item/artifact_6.json +ccb8a41fdd4bc1b493a11cfa2ea4a39b7f7c3888 assets/hexcasting/models/item/artifact_6_filled.json +6461c5261ec1eb92a608bd2db420b1e5b0c3591a assets/hexcasting/models/item/artifact_7.json +373617635cf75ee236da52eb5b9f341d2b77eac3 assets/hexcasting/models/item/artifact_7_filled.json 82e3be7bbdad92d2b4c728be54d9d2f2809a0ac2 assets/hexcasting/models/item/battery.json ec7c3a51882a432185fdbb6a449e66165b6a4c4c assets/hexcasting/models/item/charged_amethyst.json 3ed3e3d86dcbc29d2e6fb59b9c6a7e455e9a3332 assets/hexcasting/models/item/cherry_staff.json -c64ed609ece68994ce23dd2809145040bce13579 assets/hexcasting/models/item/conjured.json c64ed609ece68994ce23dd2809145040bce13579 assets/hexcasting/models/item/conjured_block.json +c64ed609ece68994ce23dd2809145040bce13579 assets/hexcasting/models/item/conjured_light.json c8da4227db3c80e3e2e7f2fb2ae2649656429d68 assets/hexcasting/models/item/creative_unlocker.json -e47acd1d6ef29a3e1941afb1b212bd40b963cb72 assets/hexcasting/models/item/cypher.json -2db55347092ad6bc9e58bc968e88a3b6c5fd77c1 assets/hexcasting/models/item/cypher_filled.json +afe7113b8411c64651b679ea6b4e41bf36ab38c3 assets/hexcasting/models/item/cypher.json +3b9442e76a05b7fa70f9fb30186f94b1ba08a69b assets/hexcasting/models/item/cypher_0_filled.json +2c240a69627de02937aa601faa2578adc7d44906 assets/hexcasting/models/item/cypher_1.json +5dc34d91f0d6db16d537dd93345ccca8fe4f6aaa assets/hexcasting/models/item/cypher_1_filled.json +29e2a1e5c0e518e5edf0c6c25a5259c361ece478 assets/hexcasting/models/item/cypher_2.json +af274f590258b97dadf050d925c1187ee6e35d77 assets/hexcasting/models/item/cypher_2_filled.json +89a21d5aeef41fe788e799b89c7f80a26f09abed assets/hexcasting/models/item/cypher_3.json +e80d8c33a0b4ca69b157888fbc5f5660ba9c411d assets/hexcasting/models/item/cypher_3_filled.json +fcc1b8d2b97207af1f8c06061e170b11949bcf51 assets/hexcasting/models/item/cypher_4.json +7554e24b6f52c6b8db358e0cb5449449752a5808 assets/hexcasting/models/item/cypher_4_filled.json +85cd0adf020150c69ca7fec1f5200b027fd01d09 assets/hexcasting/models/item/cypher_5.json +1010ce5e3def445462ab69c4289f3ba94f50eacc assets/hexcasting/models/item/cypher_5_filled.json +d5b444a363c101779a01f7298d55161a8271c742 assets/hexcasting/models/item/cypher_6.json +6f4d37c92c0d43da6d20705955e9b7cee83ed612 assets/hexcasting/models/item/cypher_6_filled.json +69e61ff1976e99c43a17c7b1e0591829ac44a4d6 assets/hexcasting/models/item/cypher_7.json +41ee99d878ec66f480ebcbacc65f16696c31d161 assets/hexcasting/models/item/cypher_7_filled.json c6523de66cbfae3a1e6361c635cc693a0a089bb3 assets/hexcasting/models/item/default_colorizer.json 113c51af571a92009f5f687a82e10bc5ce97b010 assets/hexcasting/models/item/dye_colorizer_black.json b5a04716775ba2e1b137abc513025b2f1065e5d1 assets/hexcasting/models/item/dye_colorizer_blue.json @@ -41,9 +69,30 @@ c9faada6299f388afc2d2798843d2b45159950d1 assets/hexcasting/models/item/edified_d 2584421c2e9e1cdf22a703018b54cf449613d7d9 assets/hexcasting/models/item/edified_stairs.json ae58c5b7c304d33cbde60caf44a4c4ee4ec1a633 assets/hexcasting/models/item/edified_trapdoor.json 084183e4351973c8165f6f459c0f0dba2463d957 assets/hexcasting/models/item/edified_wood.json -7659d7b7bf93deba4c55405c29b8fa6b8b810ac1 assets/hexcasting/models/item/focus.json -947d1539d88f9d6fd0afcdf831f4327356d19baf assets/hexcasting/models/item/focus_filled.json -cb2d973af25a2ec07e6094ecc106c896a06918dc assets/hexcasting/models/item/focus_sealed.json +1943e85c2ce9a40b0bbe0e4ffca2b6a968287091 assets/hexcasting/models/item/focus.json +7a19f436fc9e8d0e0e01b4404f326eb48404855a assets/hexcasting/models/item/focus_0_filled.json +88615c49de2c14a19da34431724401652e94be79 assets/hexcasting/models/item/focus_0_sealed.json +8099bd2e0afe118fa013b9d635ad47ffaab556bd assets/hexcasting/models/item/focus_1.json +340001b99100480d06cab60229d4af308be3c4ac assets/hexcasting/models/item/focus_1_filled.json +e0f8fef2e2d8d0e9168d10327d55115293ad2ae7 assets/hexcasting/models/item/focus_1_sealed.json +3578e575573fc52c4e819bcc5e207ce7a4e0f808 assets/hexcasting/models/item/focus_2.json +3e31f3b513df519f5e2e2eb4747faa02b89db67d assets/hexcasting/models/item/focus_2_filled.json +6724475ce4ef36295839f95098035889e57896f2 assets/hexcasting/models/item/focus_2_sealed.json +cb22fbb79432527d828475aa457c9c6fdb78bbff assets/hexcasting/models/item/focus_3.json +54f5d42d7104297162cc9b322ff477d568656e26 assets/hexcasting/models/item/focus_3_filled.json +283fcd45c639953802f8345c20ec45d9aa8c463d assets/hexcasting/models/item/focus_3_sealed.json +7818903b0ec7c7926e040e4d634495a7699e6deb assets/hexcasting/models/item/focus_4.json +e2f8f78c5009deb7368e44af09d90c1da075240d assets/hexcasting/models/item/focus_4_filled.json +abdeb1a3563f983bd09db8e7c666ddbdffc3903b assets/hexcasting/models/item/focus_4_sealed.json +9b687b3c191c5802bc39613ae705d7313139b310 assets/hexcasting/models/item/focus_5.json +a00edbeef7c2d828f4f16ed43d5e3a53e9674787 assets/hexcasting/models/item/focus_5_filled.json +c40bd0246003cd2c1824ad61ad718f5959dc6e10 assets/hexcasting/models/item/focus_5_sealed.json +3c77a283be7249e00e1947676276f7484b00ea83 assets/hexcasting/models/item/focus_6.json +732c8201606b3c510c0467fc3840aa1475f7b56f assets/hexcasting/models/item/focus_6_filled.json +9bf849da1973419685e4ed36a823285b154b143f assets/hexcasting/models/item/focus_6_sealed.json +759efbfda9f003e920e37b3b8f0306dd20562e94 assets/hexcasting/models/item/focus_7.json +b2702eb139b47fcdfd3ef268bbc9700eeaae82f3 assets/hexcasting/models/item/focus_7_filled.json +1e89b03a5f3a860dae1864c4dbfe855564f89705 assets/hexcasting/models/item/focus_7_sealed.json 6ec61fea7d8c49cc0c45b64857fd926451b4845f assets/hexcasting/models/item/jeweler_hammer.json abfc028c974a02780aed3d7a5859352503bbd920 assets/hexcasting/models/item/lens.json a34a6d777ae265c7e49c8bb23c15f04359236544 assets/hexcasting/models/item/lore_fragment.json @@ -98,9 +147,30 @@ c809785d09b2545dac68d4a10b1e576454dd51e7 assets/hexcasting/models/item/scroll_sm 9b82beea7667a8f9de3d1e8df136bb2034ed51a8 assets/hexcasting/models/item/slate.json 612d4c65fb907c75975659edf00c7d92bf1b43d8 assets/hexcasting/models/item/slate_blank.json e6452f95b60240e0067769d7f32a0b9fa7718a1b assets/hexcasting/models/item/slate_written.json -986674763b45e0f9381f9f34a708082e5230652a assets/hexcasting/models/item/spellbook.json -f962c13ab9e299885387cee35b16006651821e81 assets/hexcasting/models/item/spellbook_filled.json -c29e6e7b2168eeeb13b1fc3e93ffc3e0c9bd11ce assets/hexcasting/models/item/spellbook_sealed.json +34abd8e443c028eeb24535b685cb3876f7235c23 assets/hexcasting/models/item/spellbook.json +2c23e0ce8a59f0f143ab514f46251e39fae39d6e assets/hexcasting/models/item/spellbook_0_filled.json +e8264e67b895bb61b52b936968b120c064507a26 assets/hexcasting/models/item/spellbook_0_sealed.json +b94a2beab80e87ed3f7e6004f70a3919c64272b4 assets/hexcasting/models/item/spellbook_1.json +158148d51abd63a93123fa7f2e2bce45d83d237f assets/hexcasting/models/item/spellbook_1_filled.json +c2fc066cee9a1e2ddf5a4507cf90b88a65d32028 assets/hexcasting/models/item/spellbook_1_sealed.json +85adbb3604db5a2e41877e2085d445df5622b549 assets/hexcasting/models/item/spellbook_2.json +83336c6e8bac94473e2f420084e544feef016d52 assets/hexcasting/models/item/spellbook_2_filled.json +a585cd9359896cd5ec62e4ccc28649170b2c8875 assets/hexcasting/models/item/spellbook_2_sealed.json +62e70d832eae787e0f086bf2f959eca19bfdfcd4 assets/hexcasting/models/item/spellbook_3.json +b312e3a09356f92d4f47b89f319e5ceeadb565ae assets/hexcasting/models/item/spellbook_3_filled.json +6ec3b9c77f6c7c4953d06c69bd5c06fc90e51d3d assets/hexcasting/models/item/spellbook_3_sealed.json +411ee9b98ec41a11d4026863332f0c65891807fe assets/hexcasting/models/item/spellbook_4.json +99aea30de3172c435b9a85a8ccce599251ed2722 assets/hexcasting/models/item/spellbook_4_filled.json +5881069c0b7e0e2bbaf07d8016fe4bcacce2e5e8 assets/hexcasting/models/item/spellbook_4_sealed.json +c4a41996c971ab44175cb8be5247b595836973cb assets/hexcasting/models/item/spellbook_5.json +4b9a2d0f4942fff48f31e58bde673863303396ad assets/hexcasting/models/item/spellbook_5_filled.json +d47f10973fa2660230f2249b3c009d4c7e4fc33f assets/hexcasting/models/item/spellbook_5_sealed.json +2adb81185491d908b5059c5a8df2a72c0913406b assets/hexcasting/models/item/spellbook_6.json +1d98011ce5c424be3488ac613d04f09572f85120 assets/hexcasting/models/item/spellbook_6_filled.json +53f092cea6f0f27d1b41a4be4403aed908768d2f assets/hexcasting/models/item/spellbook_6_sealed.json +a1dc5817c7c62e0d6e4c1ca1c5bfba6973a9b253 assets/hexcasting/models/item/spellbook_7.json +e43bfc743664dc23cbb2aaa4a66072ce1bbb5c2f assets/hexcasting/models/item/spellbook_7_filled.json +32210f56cb33747d9890de18300ae936cc8b0f77 assets/hexcasting/models/item/spellbook_7_sealed.json f791313aa7bb01b418676ffaeeb09286ca9bddff assets/hexcasting/models/item/staff/acacia.json 19acf04c62128275b8fb468e89a30ab94d6e5a1a assets/hexcasting/models/item/staff/birch.json 244ba74a82a188df6fd258affcdd4b1a7320e617 assets/hexcasting/models/item/staff/crimson.json @@ -122,8 +192,22 @@ ea3f18f75776022127f3a108119e3f7a5c211c0f assets/hexcasting/models/item/stripped_ 0a100b64e77394606018320bbc5752a546fe0af4 assets/hexcasting/models/item/sub_sandwich.json 6a7f5af82cf8ec72c3457ef4c1ae11a76717bf88 assets/hexcasting/models/item/thought_knot.json 93b2191ffab47003f661b75a85cd833ec64f0c15 assets/hexcasting/models/item/thought_knot_written.json -5f4831d11d8f45b037a6f48e12d2e794ada7b961 assets/hexcasting/models/item/trinket.json -946970e74b8d3c76c15191f494bc1f3d7e36aa43 assets/hexcasting/models/item/trinket_filled.json +9e4d326d8339db5d7a627a14630e6c0b2fa32ba6 assets/hexcasting/models/item/trinket.json +dba1f5c24852f756280a5d20c3327ea3825c083a assets/hexcasting/models/item/trinket_0_filled.json +e666a8f88dce284d5026f61814a19c5c8d49eda5 assets/hexcasting/models/item/trinket_1.json +35c7c9f46b05dc05002ac77f94b33f8da97238a1 assets/hexcasting/models/item/trinket_1_filled.json +678a892654958f87400c4d9afb1c5ed47692b77b assets/hexcasting/models/item/trinket_2.json +d8e372e768ca59566633f720ef7816eb34b13966 assets/hexcasting/models/item/trinket_2_filled.json +f8a08620915d5f1756b04c4e92d4e0324d381998 assets/hexcasting/models/item/trinket_3.json +cfc0260102aa161e893b0300ba6941c724cada9f assets/hexcasting/models/item/trinket_3_filled.json +d01e9a46398df5da17f651129b4c4c597cf1726c assets/hexcasting/models/item/trinket_4.json +bb6347ea5701bbccfc713f695f3722d218c52af2 assets/hexcasting/models/item/trinket_4_filled.json +90235641f09e4b1923c217f3c977427391daed6c assets/hexcasting/models/item/trinket_5.json +684800b5a011fe247f42ebc4829033a72030c55c assets/hexcasting/models/item/trinket_5_filled.json +d912708aa8de120d4598a62276f333ac096cdacb assets/hexcasting/models/item/trinket_6.json +24ad9a85ca790205f3e9e62ecb60bc8e50ac47fb assets/hexcasting/models/item/trinket_6_filled.json +b9d891572f572d76c0c0aef0afc3d3cb80f72c30 assets/hexcasting/models/item/trinket_7.json +4a8b82a628a3c4b16c4a45d3689799c8d9cf8bf8 assets/hexcasting/models/item/trinket_7_filled.json c6523de66cbfae3a1e6361c635cc693a0a089bb3 assets/hexcasting/models/item/uuid_colorizer.json c0af5573a4acb5eeacf49ab309d32b6f90ea8a5d assets/hexcasting/models/staff/acacia.json ac7a4b95db8bde9da23dd4fa76d8086a67e166f8 assets/hexcasting/models/staff/birch.json diff --git a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 index b9160e4c..c3cdd973 100644 --- a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 +++ b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 @@ -1,4 +1,4 @@ -// 1.19.2 2023-05-23T13:06:30.179893298 Block States: hexcasting +// 1.19.2 2023-06-02T13:11:35.7728131 Block States: hexcasting 901e38574bdaa40ea4a0f6e773a88a95d9c03e55 assets/hexcasting/blockstates/akashic_bookshelf.json 32a77ef668198002563d68be35a24fa93c8d454a assets/hexcasting/blockstates/akashic_connector.json 85080ce0a0387583a839e4788517d675a1a35e24 assets/hexcasting/blockstates/akashic_record.json @@ -10,8 +10,8 @@ d422119401df3daae032f86ea740b6065a92c44c assets/hexcasting/blockstates/amethyst_ 236496e910696b68480a7b8a977434213fa2197a assets/hexcasting/blockstates/ancient_scroll_paper_lantern.json 2f2eb1130119f6d5f17a98082b727ec7a2ea5334 assets/hexcasting/blockstates/aventurine_edified_leaves.json fa6dfbc40e5b9b22c01356e8a3848d242c414c02 assets/hexcasting/blockstates/citrine_edified_leaves.json -dc268e4c50e5e155fc5414a5f6b58ce1782bd39b assets/hexcasting/blockstates/conjured.json dc268e4c50e5e155fc5414a5f6b58ce1782bd39b assets/hexcasting/blockstates/conjured_block.json +dc268e4c50e5e155fc5414a5f6b58ce1782bd39b assets/hexcasting/blockstates/conjured_light.json b76cc8a2d66700417046c0dc671badd9af3eb519 assets/hexcasting/blockstates/directrix/empty.json 365eba1c32a7a33698120bc7f12670d29087e999 assets/hexcasting/blockstates/directrix/redstone.json e125b73869a438bafa7f47cfa4c8d837e2463c6f assets/hexcasting/blockstates/edified_button.json diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/conjured.json b/Common/src/generated/resources/assets/hexcasting/blockstates/conjured_light.json similarity index 100% rename from Common/src/generated/resources/assets/hexcasting/blockstates/conjured.json rename to Common/src/generated/resources/assets/hexcasting/blockstates/conjured_light.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact.json index d7e2a248..d0db0e43 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/artifact.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact.json @@ -4,17 +4,117 @@ { "model": "hexcasting:item/artifact", "predicate": { - "hexcasting:has_patterns": -0.01 + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/artifact_filled", + "model": "hexcasting:item/artifact_0_filled", "predicate": { - "hexcasting:has_patterns": 0.99 + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:item/artifact_1", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/artifact_1_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/artifact_2", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/artifact_2_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/artifact_3", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/artifact_3_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/artifact_4", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/artifact_4_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/artifact_5", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/artifact_5_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/artifact_6", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/artifact_6_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/artifact_7", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/artifact_7_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 7.0 } } ], "textures": { - "layer0": "hexcasting:item/artifact" + "layer0": "hexcasting:item/cad/0_artifact" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_0_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_0_filled.json new file mode 100644 index 00000000..1e835b5f --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_0_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_artifact", + "layer1": "hexcasting:item/cad/0_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_1.json similarity index 57% rename from Common/src/generated/resources/assets/hexcasting/models/item/trinket_filled.json rename to Common/src/generated/resources/assets/hexcasting/models/item/artifact_1.json index 84b09d42..870900b6 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_filled.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_1.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/trinket_filled" + "layer0": "hexcasting:item/cad/1_artifact" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_1_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_1_filled.json new file mode 100644 index 00000000..a0f005be --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_1_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_artifact", + "layer1": "hexcasting:item/cad/1_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_2.json similarity index 56% rename from Common/src/generated/resources/assets/hexcasting/models/item/artifact_filled.json rename to Common/src/generated/resources/assets/hexcasting/models/item/artifact_2.json index 9fdab84a..f2f7fbea 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_filled.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_2.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/artifact_filled" + "layer0": "hexcasting:item/cad/2_artifact" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_2_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_2_filled.json new file mode 100644 index 00000000..cade3931 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_2_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_artifact", + "layer1": "hexcasting:item/cad/2_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_3.json new file mode 100644 index 00000000..2cb6553e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_artifact" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_3_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_3_filled.json new file mode 100644 index 00000000..23c04562 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_3_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_artifact", + "layer1": "hexcasting:item/cad/3_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_4.json new file mode 100644 index 00000000..216c308d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_artifact" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_4_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_4_filled.json new file mode 100644 index 00000000..d48959f9 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_4_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_artifact", + "layer1": "hexcasting:item/cad/4_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_5.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_5.json new file mode 100644 index 00000000..4a6f9ef1 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_artifact" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_5_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_5_filled.json new file mode 100644 index 00000000..1f64bdfd --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_5_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_artifact", + "layer1": "hexcasting:item/cad/5_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_6.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_6.json new file mode 100644 index 00000000..c66d93ec --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_artifact" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_6_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_6_filled.json new file mode 100644 index 00000000..3d5f969d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_6_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_artifact", + "layer1": "hexcasting:item/cad/6_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_7.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_7.json new file mode 100644 index 00000000..1b89f909 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_7.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_artifact" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/artifact_7_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_7_filled.json new file mode 100644 index 00000000..0e904306 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/artifact_7_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_artifact", + "layer1": "hexcasting:item/cad/7_artifact_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/conjured.json b/Common/src/generated/resources/assets/hexcasting/models/item/conjured_light.json similarity index 100% rename from Common/src/generated/resources/assets/hexcasting/models/item/conjured.json rename to Common/src/generated/resources/assets/hexcasting/models/item/conjured_light.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher.json index 20cd65cd..1a931870 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/cypher.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher.json @@ -4,17 +4,117 @@ { "model": "hexcasting:item/cypher", "predicate": { - "hexcasting:has_patterns": -0.01 + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/cypher_filled", + "model": "hexcasting:item/cypher_0_filled", "predicate": { - "hexcasting:has_patterns": 0.99 + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:item/cypher_1", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/cypher_1_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/cypher_2", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/cypher_2_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/cypher_3", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/cypher_3_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/cypher_4", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/cypher_4_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/cypher_5", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/cypher_5_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/cypher_6", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/cypher_6_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/cypher_7", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/cypher_7_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 7.0 } } ], "textures": { - "layer0": "hexcasting:item/cypher" + "layer0": "hexcasting:item/cad/0_cypher" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_0_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_0_filled.json new file mode 100644 index 00000000..190be7e6 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_0_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_cypher", + "layer1": "hexcasting:item/cad/0_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_1.json similarity index 57% rename from Common/src/generated/resources/assets/hexcasting/models/item/cypher_filled.json rename to Common/src/generated/resources/assets/hexcasting/models/item/cypher_1.json index 9a30752c..71a9ff7c 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_filled.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_1.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:item/cypher_filled" + "layer0": "hexcasting:item/cad/1_cypher" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_1_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_1_filled.json new file mode 100644 index 00000000..abff99cd --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_1_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_cypher", + "layer1": "hexcasting:item/cad/1_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_2.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_2.json new file mode 100644 index 00000000..f7b22a79 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_cypher" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_2_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_2_filled.json new file mode 100644 index 00000000..75143f8a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_2_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_cypher", + "layer1": "hexcasting:item/cad/2_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_3.json new file mode 100644 index 00000000..da551383 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_cypher" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_3_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_3_filled.json new file mode 100644 index 00000000..cbac2eaf --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_3_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_cypher", + "layer1": "hexcasting:item/cad/3_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_4.json new file mode 100644 index 00000000..90430a8f --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_cypher" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_4_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_4_filled.json new file mode 100644 index 00000000..e56ed90c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_4_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_cypher", + "layer1": "hexcasting:item/cad/4_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_5.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_5.json new file mode 100644 index 00000000..138fe59a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_cypher" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_5_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_5_filled.json new file mode 100644 index 00000000..eeb61619 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_5_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_cypher", + "layer1": "hexcasting:item/cad/5_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_6.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_6.json new file mode 100644 index 00000000..bdb310d8 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_cypher" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_6_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_6_filled.json new file mode 100644 index 00000000..f9ed07c9 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_6_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_cypher", + "layer1": "hexcasting:item/cad/6_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_7.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_7.json new file mode 100644 index 00000000..29e4768e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_7.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_cypher" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/cypher_7_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_7_filled.json new file mode 100644 index 00000000..2de0bb87 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/cypher_7_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_cypher", + "layer1": "hexcasting:item/cad/7_cypher_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus.json index 013dc98f..78328a9d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/focus.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus.json @@ -4,23 +4,173 @@ { "model": "hexcasting:item/focus", "predicate": { - "hexcasting:overlay_layer": 0.0 + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/focus_filled", + "model": "hexcasting:item/focus_0_filled", "predicate": { - "hexcasting:overlay_layer": 1.0 + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/focus_sealed", + "model": "hexcasting:item/focus_0_sealed", "predicate": { - "hexcasting:overlay_layer": 2.0 + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:item/focus_1", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/focus_1_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/focus_1_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/focus_2", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/focus_2_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/focus_2_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/focus_3", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/focus_3_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/focus_3_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/focus_4", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/focus_4_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/focus_4_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/focus_5", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/focus_5_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/focus_5_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/focus_6", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/focus_6_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/focus_6_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/focus_7", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/focus_7_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/focus_7_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 7.0 } } ], "textures": { - "layer0": "hexcasting:item/focus_empty" + "layer0": "hexcasting:item/cad/0_focus_empty" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_0_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_0_filled.json new file mode 100644 index 00000000..508a3497 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_0_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_focus_filled", + "layer1": "hexcasting:item/cad/0_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_0_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_0_sealed.json new file mode 100644 index 00000000..0a642922 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_0_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_focus_sealed", + "layer1": "hexcasting:item/cad/0_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_1.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_1.json new file mode 100644 index 00000000..75d8bf40 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_1_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_1_filled.json new file mode 100644 index 00000000..bd049346 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_1_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_focus_filled", + "layer1": "hexcasting:item/cad/1_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_1_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_1_sealed.json new file mode 100644 index 00000000..001bf05b --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_1_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_focus_sealed", + "layer1": "hexcasting:item/cad/1_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_2.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_2.json new file mode 100644 index 00000000..a9ef8599 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_2_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_2_filled.json new file mode 100644 index 00000000..05c2799d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_2_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_focus_filled", + "layer1": "hexcasting:item/cad/2_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_2_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_2_sealed.json new file mode 100644 index 00000000..1c7c230b --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_2_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_focus_sealed", + "layer1": "hexcasting:item/cad/2_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_3.json new file mode 100644 index 00000000..fb366d08 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_3_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_3_filled.json new file mode 100644 index 00000000..3ad27dfc --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_3_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_focus_filled", + "layer1": "hexcasting:item/cad/3_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_3_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_3_sealed.json new file mode 100644 index 00000000..447b7b41 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_3_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_focus_sealed", + "layer1": "hexcasting:item/cad/3_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_4.json new file mode 100644 index 00000000..a3c1bf4e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_4_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_4_filled.json new file mode 100644 index 00000000..8b9eb202 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_4_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_focus_filled", + "layer1": "hexcasting:item/cad/4_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_4_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_4_sealed.json new file mode 100644 index 00000000..2831235f --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_4_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_focus_sealed", + "layer1": "hexcasting:item/cad/4_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_5.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_5.json new file mode 100644 index 00000000..e13b4fa1 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_5_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_5_filled.json new file mode 100644 index 00000000..cbac2be5 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_5_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_focus_filled", + "layer1": "hexcasting:item/cad/5_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_5_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_5_sealed.json new file mode 100644 index 00000000..248801d9 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_5_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_focus_sealed", + "layer1": "hexcasting:item/cad/5_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_6.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_6.json new file mode 100644 index 00000000..3bc3f851 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_6_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_6_filled.json new file mode 100644 index 00000000..e950df12 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_6_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_focus_filled", + "layer1": "hexcasting:item/cad/6_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_6_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_6_sealed.json new file mode 100644 index 00000000..c10282e6 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_6_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_focus_sealed", + "layer1": "hexcasting:item/cad/6_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_7.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_7.json new file mode 100644 index 00000000..8ad80856 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_7.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_focus_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_7_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_7_filled.json new file mode 100644 index 00000000..e6d7b1f2 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_7_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_focus_filled", + "layer1": "hexcasting:item/cad/7_focus_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_7_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_7_sealed.json new file mode 100644 index 00000000..52d149f4 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/focus_7_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_focus_sealed", + "layer1": "hexcasting:item/cad/7_focus_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json deleted file mode 100644 index 3f3fcaa4..00000000 --- a/Common/src/generated/resources/assets/hexcasting/models/item/focus_filled.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "hexcasting:item/focus_base", - "layer1": "hexcasting:item/focus_overlay" - } -} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json deleted file mode 100644 index 786de1ea..00000000 --- a/Common/src/generated/resources/assets/hexcasting/models/item/focus_sealed.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "hexcasting:item/focus_base_sealed", - "layer1": "hexcasting:item/focus_overlay_sealed" - } -} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json index 1a9c4ba6..5acb33c2 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook.json @@ -4,23 +4,173 @@ { "model": "hexcasting:item/spellbook", "predicate": { - "hexcasting:overlay_layer": 0.0 + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/spellbook_filled", + "model": "hexcasting:item/spellbook_0_filled", "predicate": { - "hexcasting:overlay_layer": 1.0 + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/spellbook_sealed", + "model": "hexcasting:item/spellbook_0_sealed", "predicate": { - "hexcasting:overlay_layer": 2.0 + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:item/spellbook_1", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/spellbook_1_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/spellbook_1_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/spellbook_2", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/spellbook_2_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/spellbook_2_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/spellbook_3", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/spellbook_3_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/spellbook_3_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/spellbook_4", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/spellbook_4_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/spellbook_4_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/spellbook_5", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/spellbook_5_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/spellbook_5_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/spellbook_6", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/spellbook_6_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/spellbook_6_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/spellbook_7", + "predicate": { + "hexcasting:overlay_layer": 0.0, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/spellbook_7_filled", + "predicate": { + "hexcasting:overlay_layer": 1.0, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/spellbook_7_sealed", + "predicate": { + "hexcasting:overlay_layer": 2.0, + "hexcasting:variant": 7.0 } } ], "textures": { - "layer0": "hexcasting:item/spellbook_empty" + "layer0": "hexcasting:item/cad/0_spellbook_empty" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_filled.json new file mode 100644 index 00000000..1727f385 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_spellbook_filled", + "layer1": "hexcasting:item/cad/0_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_sealed.json new file mode 100644 index 00000000..e580e3ce --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_0_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_spellbook_sealed", + "layer1": "hexcasting:item/cad/0_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1.json new file mode 100644 index 00000000..6b832d78 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_filled.json new file mode 100644 index 00000000..3ded6679 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_spellbook_filled", + "layer1": "hexcasting:item/cad/1_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_sealed.json new file mode 100644 index 00000000..91c0ed2b --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_1_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_spellbook_sealed", + "layer1": "hexcasting:item/cad/1_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2.json new file mode 100644 index 00000000..2d1355b5 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_filled.json new file mode 100644 index 00000000..9af15dfb --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_spellbook_filled", + "layer1": "hexcasting:item/cad/2_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_sealed.json new file mode 100644 index 00000000..bd336d2d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_2_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_spellbook_sealed", + "layer1": "hexcasting:item/cad/2_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3.json new file mode 100644 index 00000000..e18eaf0d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_filled.json new file mode 100644 index 00000000..6b611c62 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_spellbook_filled", + "layer1": "hexcasting:item/cad/3_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_sealed.json new file mode 100644 index 00000000..25a265b6 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_3_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_spellbook_sealed", + "layer1": "hexcasting:item/cad/3_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4.json new file mode 100644 index 00000000..38cd5d8f --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_filled.json new file mode 100644 index 00000000..ebccd06c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_spellbook_filled", + "layer1": "hexcasting:item/cad/4_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_sealed.json new file mode 100644 index 00000000..d281078d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_4_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_spellbook_sealed", + "layer1": "hexcasting:item/cad/4_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5.json new file mode 100644 index 00000000..2f82f7d8 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_filled.json new file mode 100644 index 00000000..99cc74e7 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_spellbook_filled", + "layer1": "hexcasting:item/cad/5_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_sealed.json new file mode 100644 index 00000000..0a4a822a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_5_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_spellbook_sealed", + "layer1": "hexcasting:item/cad/5_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6.json new file mode 100644 index 00000000..608c5cdd --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_filled.json new file mode 100644 index 00000000..b47cfbac --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_spellbook_filled", + "layer1": "hexcasting:item/cad/6_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_sealed.json new file mode 100644 index 00000000..2fa15268 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_6_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_spellbook_sealed", + "layer1": "hexcasting:item/cad/6_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7.json new file mode 100644 index 00000000..1e7e4369 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_spellbook_empty" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_filled.json new file mode 100644 index 00000000..8438b02a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_spellbook_filled", + "layer1": "hexcasting:item/cad/7_spellbook_filled_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_sealed.json new file mode 100644 index 00000000..d9151228 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_7_sealed.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_spellbook_sealed", + "layer1": "hexcasting:item/cad/7_spellbook_sealed_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json deleted file mode 100644 index 9527a5ec..00000000 --- a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_filled.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "hexcasting:item/spellbook_base", - "layer1": "hexcasting:item/spellbook_overlay" - } -} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json b/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json deleted file mode 100644 index d2df3984..00000000 --- a/Common/src/generated/resources/assets/hexcasting/models/item/spellbook_sealed.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:item/generated", - "textures": { - "layer0": "hexcasting:item/spellbook_base_sealed", - "layer1": "hexcasting:item/spellbook_overlay_sealed" - } -} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket.json index 154e5af3..19102d16 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/trinket.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket.json @@ -4,17 +4,117 @@ { "model": "hexcasting:item/trinket", "predicate": { - "hexcasting:has_patterns": -0.01 + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 0.0 } }, { - "model": "hexcasting:item/trinket_filled", + "model": "hexcasting:item/trinket_0_filled", "predicate": { - "hexcasting:has_patterns": 0.99 + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:item/trinket_1", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/trinket_1_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:item/trinket_2", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/trinket_2_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:item/trinket_3", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/trinket_3_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 3.0 + } + }, + { + "model": "hexcasting:item/trinket_4", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/trinket_4_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 4.0 + } + }, + { + "model": "hexcasting:item/trinket_5", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/trinket_5_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 5.0 + } + }, + { + "model": "hexcasting:item/trinket_6", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/trinket_6_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 6.0 + } + }, + { + "model": "hexcasting:item/trinket_7", + "predicate": { + "hexcasting:has_patterns": -0.01, + "hexcasting:variant": 7.0 + } + }, + { + "model": "hexcasting:item/trinket_7_filled", + "predicate": { + "hexcasting:has_patterns": 0.99, + "hexcasting:variant": 7.0 } } ], "textures": { - "layer0": "hexcasting:item/trinket" + "layer0": "hexcasting:item/cad/0_trinket" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_0_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_0_filled.json new file mode 100644 index 00000000..77da0e72 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_0_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/0_trinket", + "layer1": "hexcasting:item/cad/0_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_1.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_1.json new file mode 100644 index 00000000..4eb168d7 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_1_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_1_filled.json new file mode 100644 index 00000000..80a274ce --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_1_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/1_trinket", + "layer1": "hexcasting:item/cad/1_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_2.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_2.json new file mode 100644 index 00000000..f38c5e5d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_2_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_2_filled.json new file mode 100644 index 00000000..6c60bb94 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_2_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/2_trinket", + "layer1": "hexcasting:item/cad/2_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_3.json new file mode 100644 index 00000000..4410e1a4 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_3_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_3_filled.json new file mode 100644 index 00000000..4aea4da7 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_3_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/3_trinket", + "layer1": "hexcasting:item/cad/3_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_4.json new file mode 100644 index 00000000..87903d7d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_4_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_4_filled.json new file mode 100644 index 00000000..9b61c263 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_4_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/4_trinket", + "layer1": "hexcasting:item/cad/4_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_5.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_5.json new file mode 100644 index 00000000..4cc6440a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_5.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_5_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_5_filled.json new file mode 100644 index 00000000..fbc35672 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_5_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/5_trinket", + "layer1": "hexcasting:item/cad/5_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_6.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_6.json new file mode 100644 index 00000000..6cc75f38 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_6.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_6_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_6_filled.json new file mode 100644 index 00000000..bdd007f3 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_6_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/6_trinket", + "layer1": "hexcasting:item/cad/6_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_7.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_7.json new file mode 100644 index 00000000..a2f57e04 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_7.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_trinket" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/trinket_7_filled.json b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_7_filled.json new file mode 100644 index 00000000..e83c8fa4 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/trinket_7_filled.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/cad/7_trinket", + "layer1": "hexcasting:item/cad/7_trinket_overlay" + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/item/VariantItem.java b/Common/src/main/java/at/petrak/hexcasting/api/item/VariantItem.java new file mode 100644 index 00000000..6bdca2d2 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/item/VariantItem.java @@ -0,0 +1,32 @@ +package at.petrak.hexcasting.api.item; + +import at.petrak.hexcasting.api.utils.NBTHelper; +import net.minecraft.world.item.ItemStack; + +/** + * Items that have multiple different otherwise identical visual variants can implement this interface. + *

+ * On both the Forge and Fabric sides, the registry will be scanned for all items which implement this interface, + * and the appropriate cap/CC will be attached. + */ +public interface VariantItem { + String TAG_VARIANT = "variant"; + + int numVariants(); + + default int getVariant(ItemStack stack) { + return NBTHelper.getInt(stack, TAG_VARIANT, 0); + } + + default void setVariant(ItemStack stack, int variant) { + NBTHelper.putInt(stack, TAG_VARIANT, clampVariant(variant)); + } + + default int clampVariant(int variant) { + if (variant < 0) + return 0; + if (variant >= numVariants()) + return numVariants() - 1; + return variant; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java index 3fb19663..95a96dee 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.client; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.item.IotaHolderItem; import at.petrak.hexcasting.api.item.MediaHolderItem; +import at.petrak.hexcasting.api.item.VariantItem; import at.petrak.hexcasting.api.misc.MediaConstants; import at.petrak.hexcasting.api.utils.NBTHelper; import at.petrak.hexcasting.client.entity.WallScrollRenderer; @@ -42,10 +43,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.function.BiConsumer; -import java.util.function.Consumer; -import java.util.function.Predicate; -import java.util.function.ToIntFunction; +import java.util.function.*; import static at.petrak.hexcasting.api.HexAPI.modLoc; @@ -59,6 +57,11 @@ public class RegisterClientStuff { registerSealableDataHolderOverrides(HexItems.SPELLBOOK, stack -> HexItems.SPELLBOOK.readIotaTag(stack) != null, ItemSpellbook::isSealed); + registerVariantOverrides(HexItems.FOCUS, HexItems.FOCUS::getVariant); + registerVariantOverrides(HexItems.SPELLBOOK, HexItems.SPELLBOOK::getVariant); + registerVariantOverrides(HexItems.CYPHER, HexItems.CYPHER::getVariant); + registerVariantOverrides(HexItems.TRINKET, HexItems.TRINKET::getVariant); + registerVariantOverrides(HexItems.ARTIFACT, HexItems.ARTIFACT::getVariant); IClientXplatAbstractions.INSTANCE.registerItemProperty(HexItems.THOUGHT_KNOT, ItemThoughtKnot.WRITTEN_PRED, (stack, level, holder, holderID) -> { if (NBTHelper.contains(stack, ItemThoughtKnot.TAG_DATA)) { @@ -190,6 +193,11 @@ public class RegisterClientStuff { }); } + private static void registerVariantOverrides(VariantItem item, Function variant) { + IClientXplatAbstractions.INSTANCE.registerItemProperty((Item) item, ItemFocus.VARIANT_PRED, + (stack, level, holder, holderID) -> variant.apply(stack)); + } + private static void registerScrollOverrides(ItemScroll scroll) { IClientXplatAbstractions.INSTANCE.registerItemProperty(scroll, ItemScroll.ANCIENT_PREDICATE, (stack, level, holder, holderID) -> NBTHelper.hasString(stack, ItemScroll.TAG_OP_ID) ? 1f : 0f); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java index 3fed34e1..d7031043 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java @@ -1,9 +1,12 @@ package at.petrak.hexcasting.common.items.magic; +import at.petrak.hexcasting.api.item.VariantItem; import at.petrak.hexcasting.api.mod.HexConfig; import net.minecraft.world.item.ItemStack; -public class ItemArtifact extends ItemPackagedHex { +import static at.petrak.hexcasting.common.items.storage.ItemFocus.NUM_VARIANTS; + +public class ItemArtifact extends ItemPackagedHex implements VariantItem { public ItemArtifact(Properties pProperties) { super(pProperties); } @@ -22,4 +25,9 @@ public class ItemArtifact extends ItemPackagedHex { public int cooldown() { return HexConfig.common().artifactCooldown(); } + + @Override + public int numVariants() { + return NUM_VARIANTS; + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java index 9d9016cc..6c178667 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java @@ -1,9 +1,12 @@ package at.petrak.hexcasting.common.items.magic; +import at.petrak.hexcasting.api.item.VariantItem; import at.petrak.hexcasting.api.mod.HexConfig; import net.minecraft.world.item.ItemStack; -public class ItemCypher extends ItemPackagedHex { +import static at.petrak.hexcasting.common.items.storage.ItemFocus.NUM_VARIANTS; + +public class ItemCypher extends ItemPackagedHex implements VariantItem { public ItemCypher(Properties pProperties) { super(pProperties); } @@ -22,4 +25,9 @@ public class ItemCypher extends ItemPackagedHex { public int cooldown() { return HexConfig.common().cypherCooldown(); } + + @Override + public int numVariants() { + return NUM_VARIANTS; + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java index 38396297..b936f127 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java @@ -1,9 +1,12 @@ package at.petrak.hexcasting.common.items.magic; +import at.petrak.hexcasting.api.item.VariantItem; import at.petrak.hexcasting.api.mod.HexConfig; import net.minecraft.world.item.ItemStack; -public class ItemTrinket extends ItemPackagedHex { +import static at.petrak.hexcasting.common.items.storage.ItemFocus.NUM_VARIANTS; + +public class ItemTrinket extends ItemPackagedHex implements VariantItem { public ItemTrinket(Properties pProperties) { super(pProperties); } @@ -22,4 +25,9 @@ public class ItemTrinket extends ItemPackagedHex { public int cooldown() { return HexConfig.common().trinketCooldown(); } + + @Override + public int numVariants() { + return NUM_VARIANTS; + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemFocus.java b/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemFocus.java index 29b67eec..27c6a8c8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemFocus.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemFocus.java @@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.casting.iota.NullIota; import at.petrak.hexcasting.api.item.IotaHolderItem; +import at.petrak.hexcasting.api.item.VariantItem; import at.petrak.hexcasting.api.utils.NBTHelper; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; @@ -18,11 +19,13 @@ import java.util.List; import static at.petrak.hexcasting.api.HexAPI.modLoc; -public class ItemFocus extends Item implements IotaHolderItem { +public class ItemFocus extends Item implements IotaHolderItem, VariantItem { // 0 = no overlay // 1 = unsealed // 2 = sealed public static final ResourceLocation OVERLAY_PRED = modLoc("overlay_layer"); + public static final ResourceLocation VARIANT_PRED = modLoc("variant"); + public static final int NUM_VARIANTS = 8; public static final String TAG_DATA = "data"; public static final String TAG_SEALED = "sealed"; @@ -74,4 +77,15 @@ public class ItemFocus extends Item implements IotaHolderItem { public static void seal(ItemStack stack) { NBTHelper.putBoolean(stack, TAG_SEALED, true); } + + @Override + public int numVariants() { + return NUM_VARIANTS; + } + + @Override + public void setVariant(ItemStack stack, int variant) { + if (!isSealed(stack)) + NBTHelper.putInt(stack, TAG_VARIANT, clampVariant(variant)); + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemSpellbook.java b/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemSpellbook.java index 9cda2db4..2b2eb98d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemSpellbook.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/storage/ItemSpellbook.java @@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota; import at.petrak.hexcasting.api.casting.iota.IotaType; import at.petrak.hexcasting.api.casting.iota.NullIota; import at.petrak.hexcasting.api.item.IotaHolderItem; +import at.petrak.hexcasting.api.item.VariantItem; import at.petrak.hexcasting.api.utils.NBTHelper; import net.minecraft.ChatFormatting; import net.minecraft.nbt.CompoundTag; @@ -20,7 +21,9 @@ import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.stream.Stream; -public class ItemSpellbook extends Item implements IotaHolderItem { +import static at.petrak.hexcasting.common.items.storage.ItemFocus.NUM_VARIANTS; + +public class ItemSpellbook extends Item implements IotaHolderItem, VariantItem { public static String TAG_SELECTED_PAGE = "page_idx"; // this is a CompoundTag of string numerical keys to SpellData // it is 1-indexed, so that 0/0 can be the special case of "it is empty" @@ -34,6 +37,9 @@ public class ItemSpellbook extends Item implements IotaHolderItem { // it is 1-indexed, and the 0-case for TAG_PAGES will be treated as 1 public static String TAG_SEALED = "sealed_pages"; + // this stores which variant of the spellbook should be rendered + public static final String TAG_VARIANT = "variant"; + public static final int MAX_PAGES = 64; public ItemSpellbook(Properties properties) { @@ -238,4 +244,15 @@ public class ItemSpellbook extends Item implements IotaHolderItem { return idx; } + + @Override + public int numVariants() { + return NUM_VARIANTS; + } + + @Override + public void setVariant(ItemStack stack, int variant) { + if (!isSealed(stack)) + NBTHelper.putInt(stack, TAG_VARIANT, clampVariant(variant)); + } } diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_artifact.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_artifact.png new file mode 100644 index 0000000000000000000000000000000000000000..701fc85d6c8a70ca39142628a3eb3882d95f1731 GIT binary patch literal 473 zcmV;~0Ve*5P)Px$lSxEDR5*>Tl0QhpKorKmMiIACimMKa79E|63J!uLfi{1=QyP}iIaju6(?iWibb%ClSn`Um(QVGFsTIx-*Vp__x;|xdk^@}$R!k7nHc5X z(9D3gGBM^73R{{fY7~x6dD+lRrjvPJyS7T#Rs#?v3_3L|0KnA#w0|b`{Ni|1VjnOz z8in_@f%EqxEX<@ZH!+0W^%1OPmoPUmgoT+D0HCd>3uB|v-~XUmh|{%ImUce5y?jlI zJKh!>y0r62iW;kh`0sxZhDd-{uK(Q(09GbO3GvExdgVHWqqACw2RhW!?Aof|1>xuv zj!r8RV>+3qYpbmx(kxqcTWpl=+A7n@Jmri?U=tvhQ2bI2&Gg?apCj*3)Bwk@J>pT+kbG8}K P00000NkvXXu0mjfatX}x literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_artifact_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_artifact_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..25564a62c1a8a142b884361f8fb9c1af8abc37b6 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|$~|2iLo9le z6C9ZKudDo&#kTA{*|Nz5d5>NIeTE) z*4~L3lj~wX|N8$u`%it*Ax6G`b-l}V1peFA_-=dZ%#y&Jpq9f`$e6>~o55V5YSP4+ j`a#`f5|d!G6EnlhGB?kO$BP~SoxtGf>gTe~DWM4f+*U)c literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_cypher.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_cypher.png new file mode 100644 index 0000000000000000000000000000000000000000..d646ec491e7681a70dfb6d9ceaa65e78cec8ac0e GIT binary patch literal 323 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|{(8DNhFJ6_ zCoE7s@jd?U{0UNOPFzkpyFW-dU0~=su>bP;fAix%{Is_VPbhU<*ZJuG+1mO4jivUg zXK=PL?o{jgzuLyhkxgD3+-J9nT0Z-MPx$SxH1eR5*>zlD$hpQ5eR5TGS-T#VwT4F2 zuy4%|Ya=4m?H1*jq3X{UB`Aw=e-n!<9mj{!J8=wTu{$?4%3nht6vZ5rcS0h^g1GP*8W>m>kY=l2=v zePuXujlnei-Q?}_;qCJQ;O~wJvxE3nz&0?|F95dp900iU4og%ulcsQg2|x`AHa>bV zJ2)%6KeM`?M9rkpbSo>|U(#NeB<$I-46ZT`yZO60>G5h-nX!}ITSm>n&5O+K(Gtpx zoqTSSuC_)}2N#t6g-87ffUswW8WI*(k(8kPqeUvIU#;?=>kY~jjs+SPVoCr2002ov JPDHLkV1jX`v#Px$SxH1eR5*>zlD$hpQ5eR5TGS-T#VwT4F2 zuy4%|Ya=4m?H1*jq3X{UB`Aw=e-n!<9mj{!J8=wTu{$?4%3nht6vZ5rcS0h^g1GP*8W>m>kY=l2=v zePuXujlnei-Q?}_;qCJQ;O~wJvxE3nz&0?|F95dp900iU4og%ulcsQg2|x`AHa>bV zJ2)%6KeM`?M9rkpbSo>|U(#NeB<$I-46ZT`yZO60>G5h-nX!}ITSm>n&5O+K(Gtpx zoqTSSuC_)}2N#t6g-87ffUswW8WI*(k(8kPqeUvIU#;?=>kY~jjs+SPVoCr2002ov JPDHLkV1jX`v#U?6a0&Z7#Mg(5!gFQ+RD%H3ZWz1%HQYb)D>&3tjKOKu6>h!d0f{`G2?+RCc; z3@$9iehfyF4c)49CWUOve%-#7|G}w$KULKGcvNORH@8m!n$FgTe~DWM4fe9Sb9 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_focus_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..0d6bceed1674441753c5e510c93b623c48037354 GIT binary patch literal 415 zcmV;Q0bu@#P)Px$SxH1eR5*>zlD$hpQ5eR5TGS-T#VwT4F2 zuy4%|Ya=4m?H1*jq3X{UB`Aw=e-n!<9mj{!J8=wTu{$?4%3nht6vZ5rcS0h^g1GP*8W>m>kY=l2=v zePuXujlnei-Q?}_;qCJQ;O~wJvxE3nz&0?|F95dp900iU4og%ulcsQg2|x`AHa>bV zJ2)%6KeM`?M9rkpbSo>|U(#NeB<$I-46ZT`yZO60>G5h-nX!}ITSm>n&5O+K(Gtpx zoqTSSuC_)}2N#t6g-87ffUswW8WI*(k(8kPqeUvIU#;?=>kY~jjs+SPVoCr2002ov JPDHLkV1jX`v#!;Pbg07 z5oAzMTCr7cuU>=7Sso=O1`kc$z2~nczn`0C_AYMoY=_XwKQhTjw&m(2csWc`WRdwC zZ>oQEa>&&8e}bDnzbQ9ibYV$jGj`^9sC*;f{oGYn=caytt-GUj_k`)}8cTaZw_UTj bEuX=Dg(Px$Z%IT!R5*>TlfO>FP!xy1HkC+Hh;c1}ZjFPJBS~kK$P2JJNaDa~VtfKkOq7ky zg+WKPzJL-2HO9n0sd0b?d;qAy5W;nU)&fNw{7pBx=lf1i@4XT;k_F+d&p{gBS7w3f zs7^vwNkugDc2yL6tr5wDF$@H#cblXl8fWb)L5UOwrsoY`SnoCgNJX?zi4+EUg@2Jq z1tl)DxkVDP>KFYc0ciAHDxDg-5=RE8bZRvEZfLh)8hw}3&nGIK8nIlCVy`91-sZy5 z?o>(T%N_wUrIIi8k1?4{vgKMFs2LKnO1<0kKNTRB%VC*>No{ zkCOnr>@80P0UXD{%IDFQ_}~}~5U;l%Sl2O>r5hZ_8JT??1h9i6*n|5Z-rjB2R#Sd) zSVs>WGC%*|@i_*-#mYJx_gA5y-D~;aNFGkw;&A&;c;oCxb&&;8P~yS>VFVu3cqVN_ fiMI~z_@DU(6coXUwe{5X00000NkvXXu0mjfo^-k| literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..98477e424108555174f04fe8e12a3006c7217dc4 GIT binary patch literal 526 zcmV+p0`dKcP)Px$$Vo&&R5*>LlQD=BK@^6+3FBfgyNH#rVRySlK^u|d2&S-*)5BC^VLF>di)bN& zScqt&D8zIJ7B&`&)oDDiG=?B5BAll=EOJ9mEM*f3hULa0*}Ys?W8tf2nD_nf{f{^B zpCSI0Py!vFms9d(8gyWY`k7e*P>9&6!^XRP={;F09*nJUwr^J zhMSx<=V3}DGudhhboJCI^6P*fT`{x?6pkgASgwMi!cb4&AMO z0>(nm=Bf<$7Xi3=SuRtHLXpg1Z}r+tkyywqmswm|N`@{f($bwM zajP*{ERIAR$3ZDY5ClT_pwDMLuJ-G^c;EoAcKy&_K>(!`^&r5L z)@ZYQ&|lttr`|A;2i~BR+OZqcAV7QkCdU^6==E=HPA<4fa$3b095dUS`029=!1E)g zIQ`*eD%g&~1l$oHANBP8i|=)8=T6qsCD0XVX&R1Su_2S~TzW=Y0w* zw_eM>axH2DgZJbmeTEDSd&{Q;ZJV(6Ve5?dl?v^w9foaFgcuZ__k?cf7YG-aw9c)r bHca@Pvr)**W4mO4_A+?7`njxgN@xNAukJue literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..c6a96a61db63382ff76fd5842323f7aa98e3a5e9 GIT binary patch literal 578 zcmV-I0=@l-P)Px${7FPXR5*>LlRsz^aTLct7q7u!a#klH@p6N3Skyt05`q~Vq*~0R4rUYKz#%HA zP#i?mK~PDv6^ghxRGg|O=x7Z=@Gr*Vl@95VfP+ZAq+Aa1VFP~BONhFgrX$Fag0V;6x*IM5U^I67T)|U0Ox`9 z7ZZS`R-IF^6!bts-K}Op6b{}*8_5Fj@Wx?Yj4rU$s*?=IB_ywEaxA4YV>)7x-u(Nw z6R$52{`wMtYj@@_=e9^lG92eoqfD{wDN0_|M0{vFiBJ@PWH>$$0#I9TQu3=9suqk; z@~hO=n^M>TJsvI4+K~a^`lUnI`<9tmsZjE(#Bw=`ZBLOq7%of5l6B|z78t~BjGAf;7@nUxAB_neiB?bK#6L1*gow#S)>!PpU~j{buT5q z3P3EElf?kLwhrOCF1BTnS2dwJpxpPX;_|y~0de;$h6@vncX>nCb)YWawq@Y}PTLEN zBNtpV*orkaE#+`pGl!@Ss1DYAMVKx zoZg#w|DYl6o_iwzOc1vthRA}*tC}!Dm>||F)1q@D-O=|N&8`dl>$jfx1yDlOy+DsV QhX4Qo07*qoM6N<$f~_9}NdN!< literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/0_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..bf03d051111ccae9a417474298e104f0a461e1fc GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|`aNA7Lo9mF zPTt7LqA1|{U+#9x%!r96S+1ohvZ<9NiYJ++o^j`ru!m{Wfy)EdPvLR9sZ1 zZGZlp)!19}sg>8-uNN3@Pnwz9!^n`aR`Gca_fFk40-@)bDl-|L-w||TU^pVNQ98^t z!gpO__4|nSP~Nb~Q!Z^YX1rGMem;yjJ+5eA+S2Ax8a7vNf@lqV95+Jj( z)G`=+J}-VOWN|g2;^37lU-qXyiD&a`Ue5FJV=m7xn@XOIFJJKh!T;+r`iBcx+ZdPo z&rf^v_U+&E2M!zv5Z~FKc>bU)kN>@ukBc?RCcNMO%U;K`J)-QPua5=eCbdmG3c!$Y XFNxKETw-Yr3>*eeS3j3^P66gqlV<86JgP*V6i%Yb2Xi&NNGs5Io k;+IC1(5r<%pKjOL*k=5A_RPOGfW|R+y85}Sb4q9e021UfeEPx%LrFwIR5*==lV3=aVHAg-iAY^|@gaDTSK@F|6sQmkOG5??7YSpsn_vXuDzafP z2^K_QBpc1@LQ9BIL7;{g)4_ryWP#9ffiiLS#c1Geb|EoFA?!O{=sx!~s2?175AS(? zob&#H|Hx$xipv_5O78Ed6MsjY)D%XC6@9}uxFD6#l6ldRdGQS{h`*yw_O}M4T=IxI z-6Q~}3ha1#8Mo~eEzPai`s@HW&KEIt?I9_JsYssOZkC3O8}BWJHt#y$UvyKiPB%%L zcb%bg^UOcH0zfQr)S09dVu?oD%@zQ1%mLQ`*h*>CR|;F2TZttaahxyea4gYi=md@< zsUF5Ao)h-mGtOTwd1NVEl%;S{q?|UarJNQmnU}{mzDT*`k#fl+(P71SkkuwyGH(Ev z!bKg94l8;9MLhZVnQH(OZyI(e9nV=w^d9r;Nw@L@I1*u+5x;kV0_ ze-wBhpX1fS44$FugkOeq#$Zs<)ZHFTU3+N1gT#DM0A8nOuy*#>)S9Xjmo+HX&VJg> z76!aGiTR?e6lSsY+1XJuEUzAzeM~>lIYS5U*2Yb6@bfMmyU(|VQ8v^l8|r2a_)od4 jL8&~f{jGu8S68J!kYy~Px$iAh93R5*>LkxwXtVI0RluUx39T{x`N%AXvTT52t=9Z>W-NaLiWTs2Zol9tno z#o0xQ!i7vq(t49x+JQ`))oQhrCGjc;hsS~Ev3cL^;(L1EZ@=&7_ve9sO0zRJ2fBp( zo<6&`t&ys?3r{YsqNT5YoLx~1QUQ?Rt;oFcbf1S!s0mTwPvbfVZA=hQkFk?+YU3WOg)7+;DJ{yR{y%Tq5OE5Rq~+ zw{i(UtIKVvRe<7Co@_2dM_VTVYcn4dig{Hi4_g&*aJ8U8^ym3HE#Yh~!*SvWfQ!3` z^@vu;_sGYIBenB#_bI`hr2R9NE98%g=eKtilKLA4_yW?$p*@v_DWU)X002ovPDHLk FV1l-o(A59{ literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_cypher_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_cypher_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..ace6c348ec68c245ff413858dce67c126a252c51 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|!aZFaLo9le z6C{crRQleiPq7nT$<}e|)q)S6Mht1zo3tf5uX1euxqlib^W&|?JRq=MK3?%0LrHU- z{k}sAH#c>u>@E0^o+g~y_~X|{(M>vXtj$sk3~K9T|8Mp>zZ_@Px$w@E}nR5*>*lCf)3VHCxGN^9v5fY{ zQ>#9ZQ1h_j*0EjcA~q2OQS8&jN`|O`mVgjQD5#~cbumJ(Q$O;Wmp{NeoqM_GeCJ#~ z`0wkO*RY(sDBb;5Ylqp@n&<9-7de@X&CTODqW3=ytys~Lzn4T*oA+r zPD#PgiouI?L2af=_cIzx7{=uF{k9Rk9Cxe+cDVh$6xPh5B z`8)gyfHS9F;0zV}+rJVk%E3lk4mR3SFm(Czb;*U-O8fHo#%IZ1dhUv$9E3ETitPhn zbfU(I?R6@)PvKOy$?Vf%tUKrF7I8%YsMtQvh11L}*Z>Mk^(411*QwY(YK<@6M@&U; zQm#ECYgJkK@ET~69;*`2EOHM&5(()&(FXtuhA#6nYs@X!j84Gv;wMToZJMp`1T+hP zMBMPaopSJVXP3H@!Qa><6Px$w@E}nR5*>*lCf)3VHCxGN^9v5fY{ zQ>#9ZQ1h_j*0EjcA~q2OQS8&jN`|O`mVgjQD5#~cbumJ(Q$O;Wmp{NeoqM_GeCJ#~ z`0wkO*RY(sDBb;5Ylqp@n&<9-7de@X&CTODqW3=ytys~Lzn4T*oA+r zPD#PgiouI?L2af=_cIzx7{=uF{k9Rk9Cxe+cDVh$6xPh5B z`8)gyfHS9F;0zV}+rJVk%E3lk4mR3SFm(Czb;*U-O8fHo#%IZ1dhUv$9E3ETitPhn zbfU(I?R6@)PvKOy$?Vf%tUKrF7I8%YsMtQvh11L}*Z>Mk^(411*QwY(YK<@6M@&U; zQm#ECYgJkK@ET~69;*`2EOHM&5(()&(FXtuhA#6nYs@X!j84Gv;wMToZJMp`1T+hP zMBMPaopSJVXP3H@!Qa><6Px$w@E}nR5*>*lCf)3VHCxGN^9v5fY{ zQ>#9ZQ1h_j*0EjcA~q2OQS8&jN`|O`mVgjQD5#~cbumJ(Q$O;Wmp{NeoqM_GeCJ#~ z`0wkO*RY(sDBb;5Ylqp@n&<9-7de@X&CTODqW3=ytys~Lzn4T*oA+r zPD#PgiouI?L2af=_cIzx7{=uF{k9Rk9Cxe+cDVh$6xPh5B z`8)gyfHS9F;0zV}+rJVk%E3lk4mR3SFm(Czb;*U-O8fHo#%IZ1dhUv$9E3ETitPhn zbfU(I?R6@)PvKOy$?Vf%tUKrF7I8%YsMtQvh11L}*Z>Mk^(411*QwY(YK<@6M@&U; zQm#ECYgJkK@ET~69;*`2EOHM&5(()&(FXtuhA#6nYs@X!j84Gv;wMToZJMp`1T+hP zMBMPaopSJVXP3H@!Qa><6v Ai2wiq literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_empty.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..34dd93b60f0cb9141fd5fde971fea3a8b1abe6ce GIT binary patch literal 434 zcmV;j0ZsmiP)Px$Y)M2xR5*=&lRZzuP#8wfg_}kRG;R(MaAR|FF(#}H0}c)n!w(=X{0M)6adC5! zfklmk5C=yFR|5l11z|A`@)ZICb)c;UE`6pu^qlv(Z(D&P1*u!+tPj952-P!AqzXQd z9MhV1=`4mYHZ4Dq*aj!GD6MH1fX-q_ZEPwVNk2HDMFB_vu|QbaNcv4)&&f`5Llkru zCg$iuqctjeAacT>ic4a@27e316C>D!CB*8MIPP$y;{p^xE`)=!^cs%aH*VQW3Oct=; z<+>ym2y->6uZRG*wsUp`Dv7h@CjT*{?t)F5UHL4%5^rtq#O4~a@q;)LZ*3L0Rp3aR c^ES}QAE6@Mu_&xld;kCd07*qoM6N<$g1Q^CNB{r; literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..34dd93b60f0cb9141fd5fde971fea3a8b1abe6ce GIT binary patch literal 434 zcmV;j0ZsmiP)Px$Y)M2xR5*=&lRZzuP#8wfg_}kRG;R(MaAR|FF(#}H0}c)n!w(=X{0M)6adC5! zfklmk5C=yFR|5l11z|A`@)ZICb)c;UE`6pu^qlv(Z(D&P1*u!+tPj952-P!AqzXQd z9MhV1=`4mYHZ4Dq*aj!GD6MH1fX-q_ZEPwVNk2HDMFB_vu|QbaNcv4)&&f`5Llkru zCg$iuqctjeAacT>ic4a@27e316C>D!CB*8MIPP$y;{p^xE`)=!^cs%aH*VQW3Oct=; z<+>ym2y->6uZRG*wsUp`Dv7h@CjT*{?t)F5UHL4%5^rtq#O4~a@q;)LZ*3L0Rp3aR c^ES}QAE6@Mu_&xld;kCd07*qoM6N<$g1Q^CNB{r; literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe087b9b454a5fe99fa06ed2060827a7d8e8174 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|3O!vMLo9ml zPCCfjV8Fx7e?;hST6fOHe)pGBv73{pFiI`p;8gkJQxrBu;@*TMdMn-cma>(V-Gz^2bWHnSIl literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..34dd93b60f0cb9141fd5fde971fea3a8b1abe6ce GIT binary patch literal 434 zcmV;j0ZsmiP)Px$Y)M2xR5*=&lRZzuP#8wfg_}kRG;R(MaAR|FF(#}H0}c)n!w(=X{0M)6adC5! zfklmk5C=yFR|5l11z|A`@)ZICb)c;UE`6pu^qlv(Z(D&P1*u!+tPj952-P!AqzXQd z9MhV1=`4mYHZ4Dq*aj!GD6MH1fX-q_ZEPwVNk2HDMFB_vu|QbaNcv4)&&f`5Llkru zCg$iuqctjeAacT>ic4a@27e316C>D!CB*8MIPP$y;{p^xE`)=!^cs%aH*VQW3Oct=; z<+>ym2y->6uZRG*wsUp`Dv7h@CjT*{?t)F5UHL4%5^rtq#O4~a@q;)LZ*3L0Rp3aR c^ES}QAE6@Mu_&xld;kCd07*qoM6N<$g1Q^CNB{r; literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..c39d02bfee19d062f926f54a3b5937b9ea0b004d GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|$~|2iLo9mF zPCCeWKtX`TT+#Q(*6z25&fDo6nWcN!rb*z#6z-M@Kj#@gC_EtUku_1|sh&j~JT zOFMG3cTTw!?DJwE5iE`*T>`)mw`8Djxtkfx*+&&t;ucLK6V@q()i* literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_trinket.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_trinket.png new file mode 100644 index 0000000000000000000000000000000000000000..28daaaf26ae0093722dbe666afb99fadfa257b2c GIT binary patch literal 605 zcmV-j0;2tiP)Px%7fD1xR5*=|l21sJVHm)FU)yQ8!(f*fh{paP9%|Be_z;prNK7$eUV^^ef(X)W zkT66lWCx?qF5#)m4k2hz*~SiH3=s*LIcPCW8BAudi$>Q=E*GsQVoXcKm=+tJo12qzxh$q>ifNkv7mW_j%hCG29Ifxm=N)Z^S zvGv2jV625iB0*!afe~6`gj@Z;H9)?JzQYwG7`g;1=-q~X9>vB^=CxB&H8X&LUzXV|H&H~k1 zMU7OgRTLZ@d5HDqMY8~)v1?%O!WLPN3aX?1va_KCwR#1^caNYyL^K)&Ael^39d8Gq zuc!YnxJj_E_C$l@zdv&AHB0#%o12?}L(Tsw{}F)CrRSQ>X=jZQV_J-GFTNW)WV2cJ r3T-NP8vLigmbe1n*ekT13!RQX94hrk7hfGX00000NkvXXu0mjfJs%rl literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_trinket_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/1_trinket_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..52ee90ddfbe823f02585de43986b195eed6065b4 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|oIPC}Lo9mV zPT0tMz(9a0@SA)~;l4e&1<$q4{+{jfDKv!L>6gqlV<86JgP*V6i%Yb2Xi&NNGs5Io k;+IC1(5r<%pKjOL*k=5A_RPOGfW|R+y85}Sb4q9e021UfeEPx%AW1|)R5*>DlQC#hQ51&1_sAp!c@1twj4pv7N{U;>4jDpQ5-g}7wJjLvqGU?3 zI2Q|n(ki5+bV%aVMp}4nAVUj61qW$skry*0BuI3yXogTIfxP4J`kqZ17teI>Isf_Z ze}2w|u88|o(W9Dl=k=&2ai4l2f1$Zm9F|sbxPwHGYEHhJ#C85s)#iEp)H<*2TtP<{ zfRUvzkAi-ypbY^todj{8DphTs_1EJ7VAmZPrd;l2iln@kjX7G;eQ1{c(tJbsC32mpH%=pzrBhaXaF6u zyTfI_KC%=BARC1AW`W?n5cNGb{e5uD-vrBjY@CiR;njxXERP=5q@47Kv}+QJR@|qGvq)KEmi6gzDyf?+ZtU}5aGgwU*^!$2@Q_MsfUl=D zvc@tY-diIiN~XeCLC}UcGThWpYmmCe+RiBXnC{57n{7W{jul9hOvMF|D4ELHdJ4dV z-^4rFX;$&TBx_iT-hG@==oSC-nR=4+0{tuh2fOqkF_9-lnE(I)07*qoM6N<$f*zM1 AFaQ7m literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_artifact_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_artifact_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..1aa51c3c72b3057523592c149f7c7f59c4363850 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|@;zM~Lo9le z6D0OMxNf@s|B)5Rhg1*h=zC3Zjo@v#>DQwzanbZpPTHf4lpo(0&uavNhwl$x=gEn> zEn&FzF~k0Km4E;LHvMORhP8hGF=0_T4Tfc$cMbN$Ih3>d?r|17AkJoSnX!wJKYnuV bPoPu8AG)1dK7U~j&}s%xS3j3^P6AyqS literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_cypher.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_cypher.png new file mode 100644 index 0000000000000000000000000000000000000000..61676c54993de3d9662778d823f5b50feabe3966 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|-gvq=hFJ6_ zCrGgN++Zp875Q)MS#D?m1U9v$^BaL6@$5&VHCcvWx$w#vMjgNX6LwTgoeq{e_)C_@ zKmP9VEDqsa4LbVlM^YAl=V9B}|KQQ3q%I!CX|ew~r49grg4Sy0^w-(-X$2d0-et7ygDFpCBM~^24u>qHI9WwoP`qq}u$Q=RGbk%uwV3f;5@W mk`h25SO2eZVWo%z1H~3H zz);ehAk}%bo$241oJBeU@%HPx$3Q0skR5*=eU>Nd%5uap~rObaAd)e_PSkz5>pwQN7%s^7U;V$o#+rfA=sklL=Qf6|b00B$ zWba~-7DIRm**i?gnqdkqUgc%@b^SQQ?zu}CyrPydxY&C@Q{J89uUiG5kNw%OE4fz@V@F8Sb5?9rsaU z18dZTSa$uF7E@$kV1U@{=C+by_uM56KK%#qMmq|KvXuG1rO@I3|2=X4w-h>HjRBl4 ifEfS_Fmz`RGXMb8c3xOf=<9U=0000Px$3Q0skR5*=eU>Nd%5uap~rObaAd)e_PSkz5>pwQN7%s^7U;V$o#+rfA=sklL=Qf6|b00B$ zWba~-7DIRm**i?gnqdkqUgc%@b^SQQ?zu}CyrPydxY&C@Q{J89uUiG5kNw%OE4fz@V@F8Sb5?9rsaU z18dZTSa$uF7E@$kV1U@{=C+by_uM56KK%#qMmq|KvXuG1rO@I3|2=X4w-h>HjRBl4 ifEfS_Fmz`RGXMb8c3xOf=<9U=0000Px$3Q0skR5*=eU>Nd%5uap~rObaAd)e_PSkz5>pwQN7%s^7U;V$o#+rfA=sklL=Qf6|b00B$ zWba~-7DIRm**i?gnqdkqUgc%@b^SQQ?zu}CyrPydxY&C@Q{J89uUiG5kNw%OE4fz@V@F8Sb5?9rsaU z18dZTSa$uF7E@$kV1U@{=C+by_uM56KK%#qMmq|KvXuG1rO@I3|2=X4w-h>HjRBl4 ifEfS_Fmz`RGXMb8c3xOf=<9U=0000d?Rn-#x&5R6(CX^oY zxpY=%&EC8R@19?YdcD2j@SNhh*~U(nJby8s{LuMQZ^bI+9c#E9yfmHHdlWcj>&~3{ i<(~iBlYcgEW}LOmsOYljjAcOE89ZJ6T-G@yGywq5)<=H; literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_empty.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..d1249783603172df145926e3aa384696a239d5a5 GIT binary patch literal 553 zcmV+^0@nSBP)Px$<4Ht8R5*>Tk}+sgQ51&1cL^cYrV{`qi%UQy2CPf5HG(+Fs}`(51eIj#dnCch+O(k|B=@tO#)I8?OCIH2!XZb1L5)$KXn;g$!^_n!~Ht%-U0r02OOeGRb z0p)TT55Qt4gYeBlw!+O*r@39dhV15*;!meZBoc(fVQkwbd-Xjh*8)m& zHgKoZpkn#~P~XCC+Y38$L&8cf$6_bLe5^FQM!D8f_a3!K-Z+A3ny$fKVbn9h>wcS* zE-2Kb2JA)v`22OZ`f_ZJ3)NRxmW6HGJWM8udM2m?^?sW=XoZ>_8ZMt6Z>hW2KPo5A r{_~yweVu;|Ll8%79Zex00000NkvXXu0mjf8`%H4 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..d1249783603172df145926e3aa384696a239d5a5 GIT binary patch literal 553 zcmV+^0@nSBP)Px$<4Ht8R5*>Tk}+sgQ51&1cL^cYrV{`qi%UQy2CPf5HG(+Fs}`(51eIj#dnCch+O(k|B=@tO#)I8?OCIH2!XZb1L5)$KXn;g$!^_n!~Ht%-U0r02OOeGRb z0p)TT55Qt4gYeBlw!+O*r@39dhV15*;!meZBoc(fVQkwbd-Xjh*8)m& zHgKoZpkn#~P~XCC+Y38$L&8cf$6_bLe5^FQM!D8f_a3!K-Z+A3ny$fKVbn9h>wcS* zE-2Kb2JA)v`22OZ`f_ZJ3)NRxmW6HGJWM8udM2m?^?sW=XoZ>_8ZMt6Z>hW2KPo5A r{_~yweVu;|Ll8%79Zex00000NkvXXu0mjf8`%H4 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..63dcb0938c4078ebe2dbf396a30d352e6a4c629b GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ay(reLo9mV zPTa_QK!Jy4zJ~V&Bf;L~NdjC_YK#6F`b<@0Je{ia)cW_@$zS>R1Su_2S~TzW=Y0w* zw_eM>axH2DgZJbmeTEDSd&{Q;ZJV(6Ve5?dl?v^w9foaFgcuZ__k?cf7YG-aw9c)r bHca@Pvr)**W4mO4_A+?7`njxgN@xNAukJue literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..d1249783603172df145926e3aa384696a239d5a5 GIT binary patch literal 553 zcmV+^0@nSBP)Px$<4Ht8R5*>Tk}+sgQ51&1cL^cYrV{`qi%UQy2CPf5HG(+Fs}`(51eIj#dnCch+O(k|B=@tO#)I8?OCIH2!XZb1L5)$KXn;g$!^_n!~Ht%-U0r02OOeGRb z0p)TT55Qt4gYeBlw!+O*r@39dhV15*;!meZBoc(fVQkwbd-Xjh*8)m& zHgKoZpkn#~P~XCC+Y38$L&8cf$6_bLe5^FQM!D8f_a3!K-Z+A3ny$fKVbn9h>wcS* zE-2Kb2JA)v`22OZ`f_ZJ3)NRxmW6HGJWM8udM2m?^?sW=XoZ>_8ZMt6Z>hW2KPo5A r{_~yweVu;|Ll8%79Zex00000NkvXXu0mjf8`%H4 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..d4f1665ef98c61ec1490db3817bf20e86575fe2a GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|dOTemLo9mF zPTI)HqA1|{U+#9x%!r96S+1ohvZ<9NiYJ++o^jPx$Ur9tkR5*>rlD$hpVHC!H*BZNo5q*#dL5mbA(jCNqA#iaC>Ti$~njCT!Olk?7 zjFw9`a411&bZB^?x`81GMPw2|X$dWcZ-ZR%3kxE8rgL5n&-B60({S4qwU0xzB+UwFYExUZjO;krT8c#|rZ%5XR=FVl4y3K#=VJTNSprb(B}1<;m# zw6~7pt#Z2St{-^i?hR2jo+ZLGW P00000NkvXXu0mjfV(7QU literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_trinket_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/2_trinket_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..3dae6ec1401766e6f82098b93ce42fc728517de3 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|yggkULo9mV zPEZtTaNuDUw+p_V{@rrw%WS^J#)C2;33;_Px$ut`KgR5*>LlRZcyQ51#0jB$xYiXdYXPzDr(wW+pnK?@ns!ctZ&6c@r4A_Uwj zWC^%nrw}kK2$pt%nG6{LkkwPH%)+?5)YhfcI@F61x`&eh>|A{#tEZS4n`B~alB}L;y11VgwSp?N zWUuAcYgelmBg`&*Vt3;+2RXl0?++?uD=DUYVWeSD24ZOJi^0g9#~}a^>{B?%`BA@o zZCdojfgZ%!N0w)Pv%aavck{&oXgtI)%Q~Ce-?`8(0k}EJyWij? z8V@mU_rsWFy-BKETV#LmndTCx++OofD_ZxPqr79Ho$L}YN+&4BDu2#@xg1?+myDVT z0z+Zvs?ZEhe(%vLD#ofyVAM=F2E7V<8qNE8QBBK2OZGaV91Te#8j?Eyjaoq!)wC?C sY57fpE8BKAx#Rx;tp9Da?Rz(#00*_Rb377A=l}o!07*qoM6N<$f}ncWPyhe` literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_artifact_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_artifact_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..aa107d0a8d322f4852f21857c5dd867bcc96eafa GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|sy$sCLo9le z6C9ZKudDo&#kTA{*|Nz5d5>NIeTE) z*4~L3lj~wX|N8$u`%it*Ax6G`b-l}V1peFA_-=dZ%&~yoNLa6R2SZho@=1oA&fXO* oP5K)rvSduU;lbxplFrPqZn|sI>cxM!fzDv?boFyt=akR{0ATt@-v9sr literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_cypher.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_cypher.png new file mode 100644 index 0000000000000000000000000000000000000000..bf46f74a00ecb21f9046f6be3c943e3a68b24242 GIT binary patch literal 462 zcmV;<0WtoGP)Px$h)G02R5*>TlQBrcKoo|*6bp*2Aecc!u|f)kii_gVp@ZPMs6#-9wjgAPL(P$-4KDt0+;Q*y-+On*!5^yTQcg9O za>C-$UuH#)17KQhRL$tim%Pc|fT|f%X))n!C1tU9^U-GS$`6US=Hk{iiX0cCw3u)r zQ-@r1%OZIq1p!CjuuU*o_dcqKhH(Cal(@%8OR#FSVx9H7La!sO0gLr|d| z1cCR@52Q!Vd|&}kHAA|*c^GJR<(fl}plXI>T5S=qT20K3joGnLVo?^xhk@ShpFdd~ zH(n$NJfo@^QZ<)y7#a3e^BRI0xat0jyRY7pg_-|FKW;Od9W}r#2mk;807*qoM6N<$ Ef&xd*3gF-=aJ75DFv<7&7pHNm=m@o7qcoW_8QFopFPvSAkO;m0U-GB>!T>! y$!VcIEW8fp9FfW=ADlmosM;VXH$-Bq5Y@Yx$p25@A&t;ucLK6V9-ZgIk literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_empty.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..c24bea2f652841df452cdc37e19f3cf39034b425 GIT binary patch literal 440 zcmV;p0Z0CcP)Px$a!Eu%R5*>bld($zQ5e8~PaX*W z;Rkig=TDm*_f^6VlEDIl?_0i-06;o1=7H-niwqW+n605F4P>z3+g-q2#G+yHr%h3p zSxycY(UXR{6dKihB}!nLA)K=%XLLxzy6R_c%~rt1Q6Kv|lS&echE><6C@jnF0F4Ek^SiuA$0L;XQk^r% z8JZJ|hFjJ5FT{MJ;5@&)0kAoHi8~(v%d#ooG`?rhO#*nJb`YR^{U|&g{FJzGJJb%k i@#|k`$j`3OpT-vzLX@-86gWWu0000Px$a!Eu%R5*>bld($zQ5e8~PaX*W z;Rkig=TDm*_f^6VlEDIl?_0i-06;o1=7H-niwqW+n605F4P>z3+g-q2#G+yHr%h3p zSxycY(UXR{6dKihB}!nLA)K=%XLLxzy6R_c%~rt1Q6Kv|lS&echE><6C@jnF0F4Ek^SiuA$0L;XQk^r% z8JZJ|hFjJ5FT{MJ;5@&)0kAoHi8~(v%d#ooG`?rhO#*nJb`YR^{U|&g{FJzGJJb%k i@#|k`$j`3OpT-vzLX@-86gWWu0000~Tmg)@e`etr@s^Tdr82M}A7e<@S{g1`XRc@=y3cGYJ6lgqyr>mdKI;Vst008+m AasU7T literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_focus_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..c24bea2f652841df452cdc37e19f3cf39034b425 GIT binary patch literal 440 zcmV;p0Z0CcP)Px$a!Eu%R5*>bld($zQ5e8~PaX*W z;Rkig=TDm*_f^6VlEDIl?_0i-06;o1=7H-niwqW+n605F4P>z3+g-q2#G+yHr%h3p zSxycY(UXR{6dKihB}!nLA)K=%XLLxzy6R_c%~rt1Q6Kv|lS&echE><6C@jnF0F4Ek^SiuA$0L;XQk^r% z8JZJ|hFjJ5FT{MJ;5@&)0kAoHi8~(v%d#ooG`?rhO#*nJb`YR^{U|&g{FJzGJJb%k i@#|k`$j`3OpT-vzLX@-86gWWu0000CFyLXie`adzCf9E#_1@V!rWKe~aJ7hP2yji=d2Qe3#-sbML|Lj%3wq|laQpe| zWQWjr_jBtXH_zG3a3HuvPx$p-DtRR5*==ld(?QP!vGVi>#=Th(+fhKW}aaKA?(}A3$R0&?O&W!H}^M>KAmN zN?9tlE(|bKDk=kOREq^s6%m9h2Ky;l8Jtu>smo&^e%Qglot|{>Irl#4UcnQw3Oal5 zgD9)9o&uXSm!--Avf98M9qFw!c_0zbfdKJzh^#i)8yzt(5%Xa4g=doSbO?Z~HXfB! z09?y9T{9>H^Ap6=A@AyM=vcNc2mpdf#NcLJ=sYh02(Ck-G%*q*09fp9lu7^wH)D4H zo)JtU>g~4qMnT{>4)4bY1xaun7QmJ5?SfbUbSzs(X~OsaeSUm)0671!OfZQ6sJGj+ zS}h#sE~k{j_k97mJ!sZk^vO#Atk*wT>~64R)>~;J%ol|B$`r+MjFhqzoHZm&llut(F2W1J zY$H$KuEDo20DSU&Jnok5cvc&h9oDa}BfYtPtN}dGA8W2&1>Lc1?Sb}kmzj^!6U`*q dyR_phZUJ_bz((nm>*N3c002ovPDHLkV1j&4&pQAB literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..f76f877a3f253f32e650bb0fa4f26d27923bc146 GIT binary patch literal 487 zcmVPx$p-DtRR5*==ld(?QP!vGVi>#=Th(+fhKW}aaKA?(}A3$R0&?O&W!H}^M>KAmN zN?9tlE(|bKDk=kOREq^s6%m9h2Ky;l8Jtu>smo&^e%Qglot|{>Irl#4UcnQw3Oal5 zgD9)9o&uXSm!--Avf98M9qFw!c_0zbfdKJzh^#i)8yzt(5%Xa4g=doSbO?Z~HXfB! z09?y9T{9>H^Ap6=A@AyM=vcNc2mpdf#NcLJ=sYh02(Ck-G%*q*09fp9lu7^wH)D4H zo)JtU>g~4qMnT{>4)4bY1xaun7QmJ5?SfbUbSzs(X~OsaeSUm)0671!OfZQ6sJGj+ zS}h#sE~k{j_k97mJ!sZk^vO#Atk*wT>~64R)>~;J%ol|B$`r+MjFhqzoHZm&llut(F2W1J zY$H$KuEDo20DSU&Jnok5cvc&h9oDa}BfYtPtN}dGA8W2&1>Lc1?Sb}kmzj^!6U`*q dyR_phZUJ_bz((nm>*N3c002ovPDHLkV1j&4&pQAB literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..0acc80bcd1794ebdaad5bd262282ce166174a285 GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|qCH(4Lo9mV z_HE=nV8Fp*AG9rrZ&{K6m${G2X^ACX$wygSy`I0GS3j5GU&GAFGdFLxeeUeCWYs;x z;}Y(w6*|gFcV!t8(gY?hO^GZ~eOfK+sX0T{<;$-7Id+ANo|_HVZ*ee>2U^46>FVdQ I&MBb@0OAQXuK)l5 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..f76f877a3f253f32e650bb0fa4f26d27923bc146 GIT binary patch literal 487 zcmVPx$p-DtRR5*==ld(?QP!vGVi>#=Th(+fhKW}aaKA?(}A3$R0&?O&W!H}^M>KAmN zN?9tlE(|bKDk=kOREq^s6%m9h2Ky;l8Jtu>smo&^e%Qglot|{>Irl#4UcnQw3Oal5 zgD9)9o&uXSm!--Avf98M9qFw!c_0zbfdKJzh^#i)8yzt(5%Xa4g=doSbO?Z~HXfB! z09?y9T{9>H^Ap6=A@AyM=vcNc2mpdf#NcLJ=sYh02(Ck-G%*q*09fp9lu7^wH)D4H zo)JtU>g~4qMnT{>4)4bY1xaun7QmJ5?SfbUbSzs(X~OsaeSUm)0671!OfZQ6sJGj+ zS}h#sE~k{j_k97mJ!sZk^vO#Atk*wT>~64R)>~;J%ol|B$`r+MjFhqzoHZm&llut(F2W1J zY$H$KuEDo20DSU&Jnok5cvc&h9oDa}BfYtPtN}dGA8W2&1>Lc1?Sb}kmzj^!6U`*q dyR_phZUJ_bz((nm>*N3c002ovPDHLkV1j&4&pQAB literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..89e73cfeacb9e896036fd0d3afdab6a40438d222 GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|`aNA7Lo9l? zPTt7LqA1|{U+#9x%!r96S+1ohvZ<9NiYJ++o^jko*TLkDd22WQ% Jmvv4FO#pqZOK$)G literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_trinket.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/3_trinket.png new file mode 100644 index 0000000000000000000000000000000000000000..898be5e90b205434040f910ed1a14717fc3a5211 GIT binary patch literal 441 zcmV;q0Y?6bP)Px$b4f%&R5*>Tl0QqsKp2OgXeU89CvmBNust$Ji`Y#41lc8v1RVVYE)I1S+JcL7 z&nX=(euAQfW+^Cygn)z8L8w&R>JX<3wn=gEHywBPJommY2YWZ8LP8Kl>? zZR=&ClrokI7NKgjn&-|)3L5ToI(VL!0dLNqcznA8z%STj}M{P)Px$@<~KNR5*=|l0Rq@aU8`zcZk%XLo72=8lEh&GRZdLohbO+*Ii3Cd6K2kf+5(CU3xpTHZ62XVmN^Sp;KSJbrTq0BvLg zfTWfN;9YqY)y(nyr{yb=<>_rR^7OUT?n2tg2KHzGMq8&=uL3YT-gLZhLxz80vEk-nMdi+;_ZV%R z!e>niE2`s#XM(-PAW1DvCQ%k{eqiW)e0|rEdfW>MdKu4^o;ZQ2)vFk7-NVC*%G^{4 z>8i=>c$4er9uQwMCAqaSB-G>>&`a8dvpD;9bGx(c#b_Z;B^3}-B^402io00dJh^Kn z^uXfD>jLgYo-ta8BM&Sv9~nlfqypmW=5K(LGky&2KYsxgQ~E3pVC>ug0000~mP literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_artifact_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_artifact_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..2f0b83de806a32126f1a96ecce2d1978d8959d82 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|3O!vMLo9le z6BGph?0WW9e&%_XRcUFJfg;Wlo)=FX0D>bIPkeaqZp#b=hwrzq_uMF-bm9K`kN+?3 zbrkyX+jQO^gMPx$T1iAfR5*>rlD|trQ5c4w8xA$JG-`;B))0gUf{Q~CE|PdbCv#K?e+-WP0fK=z zxCG{WTO&JqP|9Wwy9D@(6(O z1PV6~%IX#w+hUO@mQf6yp;;F$p9a9=XaGQ^salH81;!Il44q0Zgv%Eqm$ZMK*y;7R z89kQ-z}0O*5|WBDuUoi$8u{uL0BWE$olH#u(9mj20utr4EpvN7Ik)Hh zhFw3ooNLb~ihPw|GXMe+-)AX6E$0QYHcxE?0!2HM$sqi2`VlWSwzk7JwkYKMFaLG( z|Nr{+|M)k)`E~xlfdc}mnxE^v7asoqzxvU?e9e-E?!yeiX3b8y+lanvfm}w6XCJp#<2%$%Ucs) z-*M+@6r3)Ra88e7SKHN~DJ>#ETjZa;$(A<`6j5S-Wx&kv_({c`6pvN7Ik)Hh zhFw3ooNLb~ihPw|GXMe+-)AX6E$0QYHcxE?0!2HM$sqi2`VlWSwzk7JwkYKMFaLG( z|Nr{+|M)k)`E~xlfdc}mnxE^v7asoqzxvU?e9e-E?!yeiX3b8y+lanvfm}w6XCJp#<2%$%Ucs) z-*M+@6r3)Ra88e7SKHN~DJ>#ETjZa;$(A<`6j5S-Wx&kv_({c`67q89x&tYQP!*{$|-g$zs?03%;4$j=d#Wzp$PzFPcpm! literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_focus_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..fb321cbd645822fd670695da2cd8572b3e570e8f GIT binary patch literal 371 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D%zbv<1iLo9le z6C^%02u^p&zc%wf4-oXvyO*8-1QmZ*3FvKq^Fw%tomh+%xA4*hNpvN7Ik)Hh zhFw3ooNLb~ihPw|GXMe+-)AX6E$0QYHcxE?0!2HM$sqi2`VlWSwzk7JwkYKMFaLG( z|Nr{+|M)k)`E~xlfdc}mnxE^v7asoqzxvU?e9e-E?!yeiX3b8y+lanvfm}w6XCJp#<2%$%Ucs) z-*M+@6r3)Ra88e7SKHN~DJ>#ETjZa;$(A<`6j5S-Wx&kv_({c`6ZROG!N*Pr+&i>8L%#RHyr4^y9E!AB?LHioKgq^yFW-_fC1}yJ->WQ^ zmaO)b+)?e(759FI;PW|*4CmhldvuAFzmL1rnlhm$Ym?5jlA|7bdUPx$kV!;AR5*>TlfN$mVHn3hZB8lIi&)!SZ@WQE1`)~a)i5;--7FHpAR)wGKtiM) z#AY!t7)bpC(lmmI#E+a9dX3r`v{D-J8m>Lp_QJq-dWYxpeBW=L=Yc=U_gldzi2D1$ zqh9(A913bg{4&u%7_F2OsgIY2CM_MkKme;+BpL{_SIXgTB6)#B9lFzSuas*r7z+)8 z>nA=h(5eoX1r(7U*gRV_LoKq#3cwX@^%*RyqREb;JJ20)%mJK%F- zp6r{+?&}rVN}f(h(?>GL zApmZc`+fugO!pW~dmqHzy-94klgF+l;Px$kV!;AR5*>TlfN$mVHn3hZB8lIi&)!SZ@WQE1`)~a)i5;--7FHpAR)wGKtiM) z#AY!t7)bpC(lmmI#E+a9dX3r`v{D-J8m>Lp_QJq-dWYxpeBW=L=Yc=U_gldzi2D1$ zqh9(A913bg{4&u%7_F2OsgIY2CM_MkKme;+BpL{_SIXgTB6)#B9lFzSuas*r7z+)8 z>nA=h(5eoX1r(7U*gRV_LoKq#3cwX@^%*RyqREb;JJ20)%mJK%F- zp6r{+?&}rVN}f(h(?>GL zApmZc`+fugO!pW~dmqHzy-94klgF+l;d#ugQu&X%Q~loCIGkpFxvnC literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..958c2f194fa0acaa467517d9ff729ede4e5a9474 GIT binary patch literal 470 zcmV;{0V)28P)Px$kV!;AR5*>TlfN$mVHn3hZB8lIi&)!SZ@WQE1`)~a)i5;--7FHpAR)wGKtiM) z#AY!t7)bpC(lmmI#E+a9dX3r`v{D-J8m>Lp_QJq-dWYxpeBW=L=Yc=U_gldzi2D1$ zqh9(A913bg{4&u%7_F2OsgIY2CM_MkKme;+BpL{_SIXgTB6)#B9lFzSuas*r7z+)8 z>nA=h(5eoX1r(7U*gRV_LoKq#3cwX@^%*RyqREb;JJ20)%mJK%F- zp6r{+?&}rVN}f(h(?>GL zApmZc`+fugO!pW~dmqHzy-94klgF+l;bP0 Hl+XkKCL}M} literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_trinket.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/4_trinket.png new file mode 100644 index 0000000000000000000000000000000000000000..aa5af6b9452f5399a93b7af78f5d15bc8863519f GIT binary patch literal 493 zcmVPx$r%6OXR5*>Tk}*glK@^6+$)&Ln!Qzlalwh%i#eu~ZhhlSum7=g#E-}p>If%Mj z*l4+FJQUPIQb~f9u~7+F*jVIJjE#l1;pAc!OkrUo>=k!2&R%k0;or^h{x|RY=Lz1Z zAP6FWcDqfbQW5Gt*{gW_+jRtR-)aKz<6#TW^RO%n+qPr1$zDc3m->5?;^wxWR;kHm z?u_tow(BwRZ-ZdJ4*+Mf20+%y15mCW@bjgLlv0>D!ZiE26k?)-Gg;%Lu`YVybOz2T zm&*Xyw%wh9GXD>!SZd;Y{;qKn%BWs273}vRCORyx9I?1^#IMI!B-eG3Qi_CWxVh~o z>*QITt48YOox(H6drKVeEpd5u0l>!BJfle`KEa2v2F20=0AHqO@WVPgg=bVQepqMs z)DfzQQUd-giRXDb?cqUKo}bbDYYTVUFp|#jY5Yl_lj=Jx%OX6S#dTeZrFa(RkGzIz zGywF5Nh!rtFcsZ5hIC-*kC|vBozXaJ3wOF{Y>`Zy&D@y|4A5iyVI6?oQ%A%mP-InX=?Pgg&ebxsLQ0De0y>i_@% literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_artifact.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_artifact.png new file mode 100644 index 0000000000000000000000000000000000000000..4f38df40af393ef22707812f4d148b1dd9fea746 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|-gvq=hFJ6_ zCnzx9nW^@tKDg__{~+FF|ChXI&i?n?^xyyW*>V5h`v|v5AM#m~cCgA`g{Mv-^c9Tn%GWwY8zGDu1iZuXpmrHzH9!^(8vG?9$mgO zyYyN8#S}j_^}SOy9{pZ#_VDWQ0|yv5_tY<+|CfK`8ztLwpZ|vczklcZ&;5(bWGgw_ zl+M=gKQ?)ONPX<*U;8y(CzPB$(KcaiLi$MaQ~HypL+dEm?b@ ikLB4q_*`ZkwP)CT*EQ)uj?81A{S2P2elF{r5}E)9U`)>d literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_cypher.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_cypher.png new file mode 100644 index 0000000000000000000000000000000000000000..c3ea43f45535b8daa6b8b39f70f90ac5b2c48bb5 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|N<3X0Lo9le z6C{cf`c^-yPq7nTIcx9PQbQiasL%6f`u^W7bMnHS*`?3^@4tNh-}6}-la~Mde}DCV z*{!cnT$f3@>ALG#&Ht~ BG2H+F literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_empty.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..678465d8789371009aed51d9fbebac8f3d45d5d0 GIT binary patch literal 351 zcmV-l0igbgP)Px$8A(JzR5*=eU>I^>OQFMmWIhWng;AC=aD~f`KVgJv_V$)z*uvoO->3foBVGek z_*oguH05F3|4|ky46eyB4D}_g3{5-kGZJ)aormK8|9j&8GcYhP^k$v;|L^p(|H!Vw z>IGy4O*`&0nrX`a|9NH3e>P1{1}D8443d197NHn`?(CaCdl(qzmN2*`GcfGG+QbMA z!2hr?VPIfjU_v+1+gpyor~d$>s8~NkVWJd6?=Cxr-E)^Pz`TRk1<20cwabISIiZ_D zl5ZY^PyZ9fy6cKq4Zr|f3LXA$DRlV%^U9q6Fg~`x!|H`Cg%1B+lVcc`ow$S7**IpT?kx&XrvqHP>B002e)c&Fbu%=`cV002ovPDHLkV1g;pp1J@4 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..678465d8789371009aed51d9fbebac8f3d45d5d0 GIT binary patch literal 351 zcmV-l0igbgP)Px$8A(JzR5*=eU>I^>OQFMmWIhWng;AC=aD~f`KVgJv_V$)z*uvoO->3foBVGek z_*oguH05F3|4|ky46eyB4D}_g3{5-kGZJ)aormK8|9j&8GcYhP^k$v;|L^p(|H!Vw z>IGy4O*`&0nrX`a|9NH3e>P1{1}D8443d197NHn`?(CaCdl(qzmN2*`GcfGG+QbMA z!2hr?VPIfjU_v+1+gpyor~d$>s8~NkVWJd6?=Cxr-E)^Pz`TRk1<20cwabISIiZ_D zl5ZY^PyZ9fy6cKq4Zr|f3LXA$DRlV%^U9q6Fg~`x!|H`Cg%1B+lVcc`ow$S7**IpT?kx&XrvqHP>B002e)c&Fbu%=`cV002ovPDHLkV1g;pp1J@4 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..f9cb4cd774c7cacc85ce313c1df22def09429efa GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|d_7$pLo9mV zPS_~eV8FvH|LlXzy{pVH7v{8K*xtVdIbH4hh}HC9@O$U#g4Uc$V$1 uEQ9glRSYN2nEzewaVg{PgPx$8A(JzR5*=eU>I^>OQFMmWIhWng;AC=aD~f`KVgJv_V$)z*uvoO->3foBVGek z_*oguH05F3|4|ky46eyB4D}_g3{5-kGZJ)aormK8|9j&8GcYhP^k$v;|L^p(|H!Vw z>IGy4O*`&0nrX`a|9NH3e>P1{1}D8443d197NHn`?(CaCdl(qzmN2*`GcfGG+QbMA z!2hr?VPIfjU_v+1+gpyor~d$>s8~NkVWJd6?=Cxr-E)^Pz`TRk1<20cwabISIiZ_D zl5ZY^PyZ9fy6cKq4Zr|f3LXA$DRlV%^U9q6Fg~`x!|H`Cg%1B+lVcc`ow$S7**IpT?kx&XrvqHP>B002e)c&Fbu%=`cV002ovPDHLkV1g;pp1J@4 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_focus_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..fa8acadce7e16e529d778d8802ecef6ecc042f7d GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|vOQfKLo9mV z_8;UupupjpseVDyV$*!*9rEt!Ka?*xFZOJXV*4;x;h}xQ3xlOok}lq?789HJ!AM;| zFe!~mVAmne8I@PkzG)XW`FUyT6f$h!W4OJy_^rw+t6$foR%%_1vY+{s+w!^L4lemP Zx#fbEx9c3DCjqTx@O1TaS?83{1OOZNJPx$wMj%lR5*>TlfO$FVHn3hcU;BTD1qB!Y8IhOhC-J>DbdA3 za3~!_EC{WO2pPH@nYx^u|3C@iuY?Ybq;$vyl}-&Lfk+6x9pat&g%0gAy~FeQexK)g zp9lUir27(*Al$b#CSSP^jQKRevY+Tg2(5V_w!4i1kr9D@aA~W_?=>9&r*px}z;hT9 zQO1F>NuA*O2~S?Vpj@m8PGT=x zoSBa(w5tFFQYlQ+l)M={{*>i>WrMKn$LU-U{W|ZpV`Gua)qy&JR0_i|05DAxNeA)T zr}3_31MtzG@G5ajbsY`EAQFjCtJSd6>0S!}I*7C5OYCm}0Lp7KcY*+w{%@@GHcb5d zRU!U%ipz&t5;qAhxD$_~DXItFFt>Z~{YTGzZ*GCb(|sJr838NZh6fHr=}S{=y*UwX xJDWaDBtc{pRp=n}zIzysvB%U8jCK5<@fYK6w~eQ3?cD$X002ovPDHLkV1nU}+v5NL literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..a58467065b6590087230cc51ae35031e965fe302 GIT binary patch literal 507 zcmVPx$wMj%lR5*>TlfO$FVHn3hcU;BTD1qB!Y8IhOhC-J>DbdA3 za3~!_EC{WO2pPH@nYx^u|3C@iuY?Ybq;$vyl}-&Lfk+6x9pat&g%0gAy~FeQexK)g zp9lUir27(*Al$b#CSSP^jQKRevY+Tg2(5V_w!4i1kr9D@aA~W_?=>9&r*px}z;hT9 zQO1F>NuA*O2~S?Vpj@m8PGT=x zoSBa(w5tFFQYlQ+l)M={{*>i>WrMKn$LU-U{W|ZpV`Gua)qy&JR0_i|05DAxNeA)T zr}3_31MtzG@G5ajbsY`EAQFjCtJSd6>0S!}I*7C5OYCm}0Lp7KcY*+w{%@@GHcb5d zRU!U%ipz&t5;qAhxD$_~DXItFFt>Z~{YTGzZ*GCb(|sJr838NZh6fHr=}S{=y*UwX xJDWaDBtc{pRp=n}zIzysvB%U8jCK5<@fYK6w~eQ3?cD$X002ovPDHLkV1nU}+v5NL literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..63dcb0938c4078ebe2dbf396a30d352e6a4c629b GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ay(reLo9mV zPTa_QK!Jy4zJ~V&Bf;L~NdjC_YK#6F`b<@0Je{ia)cW_@$zS>R1Su_2S~TzW=Y0w* zw_eM>axH2DgZJbmeTEDSd&{Q;ZJV(6Ve5?dl?v^w9foaFgcuZ__k?cf7YG-aw9c)r bHca@Pvr)**W4mO4_A+?7`njxgN@xNAukJue literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..a58467065b6590087230cc51ae35031e965fe302 GIT binary patch literal 507 zcmVPx$wMj%lR5*>TlfO$FVHn3hcU;BTD1qB!Y8IhOhC-J>DbdA3 za3~!_EC{WO2pPH@nYx^u|3C@iuY?Ybq;$vyl}-&Lfk+6x9pat&g%0gAy~FeQexK)g zp9lUir27(*Al$b#CSSP^jQKRevY+Tg2(5V_w!4i1kr9D@aA~W_?=>9&r*px}z;hT9 zQO1F>NuA*O2~S?Vpj@m8PGT=x zoSBa(w5tFFQYlQ+l)M={{*>i>WrMKn$LU-U{W|ZpV`Gua)qy&JR0_i|05DAxNeA)T zr}3_31MtzG@G5ajbsY`EAQFjCtJSd6>0S!}I*7C5OYCm}0Lp7KcY*+w{%@@GHcb5d zRU!U%ipz&t5;qAhxD$_~DXItFFt>Z~{YTGzZ*GCb(|sJr838NZh6fHr=}S{=y*UwX xJDWaDBtc{pRp=n}zIzysvB%U8jCK5<@fYK6w~eQ3?cD$X002ovPDHLkV1nU}+v5NL literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..d4f1665ef98c61ec1490db3817bf20e86575fe2a GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|dOTemLo9mF zPTI)HqA1|{U+#9x%!r96S+1ohvZ<9NiYJ++o^jl2*aVSVA6i;u&M)_$uV&YGG1g()F-BGfWxbP0l+XkKy-Z$% literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_trinket_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/5_trinket_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..9fbf994775df9e76616f8b43e675a492c35dc941 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Ts&PILo9mV zPT0uHV93K1_)Wg0Fy@}wlHW?dj`_`AEx@X-InX=?Pgg&ebxsLQ0De0y>i_@% literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_artifact.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_artifact.png new file mode 100644 index 0000000000000000000000000000000000000000..be4c472c4a0faff40f4e891634a096e53c05a31e GIT binary patch literal 437 zcmV;m0ZRUfP)Px$Z%IT!R5*>rlD|vCP!xr~2G=4X(4lqdAlSMU7e#R@2!bwB!9gfSM1_i=*8f0I z6mf`yZWi&!WQs_^tx|`IlY&E}Ak;w$QQU;~I;b(R5l7E<&wcmY@9`e|w*tR4EJG83 zlbZqn?QcnjcI~F~9%FsxN&p_J6{=4a4ofvQXH(3l!=y4f#yeMhLp%YE@}o4$kCNYb zm67gMX~?yVbg#0J&gR3_((ZW)?HrzZf& zFPyP<=TC>Jt5TOGu?$TXI}|Z>RldBsEHynL`20juS0$eK01HNx&pUr?{_`igLjZ~w fFOK&s_P^^L-AR>U5zoc=00000NkvXXu0mjf3p&4Y literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_artifact_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_artifact_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..e276e10783ee2539b9609a5f609a8ede5d5401ad GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|0zF+ELo9le z6C_wwn&YqU`KSDOriW=mWSmH=|0G6(+Y@6CdaQAqan?tsm*;=o6=MS+_*461mdI~K vw!eR+{>$6ScrexPKNc+3p<-PvBEZHF^-0O@uuZH5&~OG%S3j3^P6Px$L`g(JR5*>zlD|s=VHn3hhQSFr=n!NzI5gZ4LIe#>B0|vI7}y#(xb#N|4RM1* zLPU$;)F8AqNP}=oXao+Pc$lD|!7T>~*KoYAp6}IK-{pPZ=Y7AQ=LawRwIV-VRP(wg z_S3n)UOm4n@0GyyrRfcZ7Q?ZHkuw44_WA&{MvelBteQ&~DF7PHIQR7mwSo)4#O~1T z^%Y2T888@HK#Iu0jGebQ0HxbId7nvWB%@Hy>Yji|KsB#>Ph*Ql^F*4rH`ClaS~6Sl zFzsa$TA<}X1xC)KSg$OZ&jKy(#x;m(*dL!Vw#JHT1(&U_ieeVp+gJ~rC15&VOgl`~ zyzZSJ?<;Yof{EP;HJ={&=GMr;Fc)(Plv&RDSsJZ2uQS*084#HtUfRF^0|7~j(Z)2{ obJ!;e1qcX$?YJ_wT=xIcH@^UT1BG5utpET307*qoM6N<$f?(9Dj{pDw literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_cypher_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_cypher_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..f254063e899aa526f1bbd34f49f422e26a2643c8 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|!aQ9ZLo9le z6Bd|P#0h_spLyP872~2!RvI;vcp7f@z2S08GCh>@Z++^a0~K$1n1SH%>*L`a#te5C zT<>3R;IVCulBd4RpP4sZA{F-4)wJq#yC3|(#&Bes?El9Fg-3xlFnGH9xvXPx$T1iAfR5*>zlD|s=VI0OkMY(Ar;&2*u5l!k4(cf@eOXpGzx*2HPAK(o+r({E$ zLq&@%4MI}{hJm>CLx|AKTndbv8{P)F>(0};zT5k}-{*aw=lOo&uWM@3MIjLv03uih zz-X)NUv*sl)1$z_Zd2@SR7AbE&Ccc`09sPw$w;FsvKZ~386|5;36QAP6w*bgVk4`L(3a0*bK%wlMq4G3JtG{F$CAyFHdPx$T1iAfR5*>zlD|s=VI0OkMY(Ar;&2*u5l!k4(cf@eOXpGzx*2HPAK(o+r({E$ zLq&@%4MI}{hJm>CLx|AKTndbv8{P)F>(0};zT5k}-{*aw=lOo&uWM@3MIjLv03uih zz-X)NUv*sl)1$z_Zd2@SR7AbE&Ccc`09sPw$w;FsvKZ~386|5;36QAP6w*bgVk4`L(3a0*bK%wlMq4G3JtG{F$CAyFHdkAs)+2C6Ixso#5kTH@xP+~x7gj%nMPK4({Ne^kM} xN{d0sDU?w_a7N_pYLV1uQhyD8F}%AeD=y%uGAlw(FBNDwgQu&X%Q~loCIAb!F=GG# literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..e23f31985fce1426bfadf53aceece600b53ea60c GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4(FKV2ty0aSXBOJsY&&`>=z^Kb=`? zO^*b4H7B^dzSPFIt4!Fc`(%*Jt%VAgobCu8j5G=HF&Q5S#vNc38 zgY#rmd$ES4(BxgOZr{7R_jlbM{vWTSW|Svt2r)7oGG}CX=Wr~uTB1t+v$_6sZ3B@` zi7uBbS#s>Zvl$q+&N()@nq#lVqj zKjnbN2;W|Kcy_ckW2f|KZ{ziM^sC$?1@?8Wwti5tzH!pEnTp%n6*DCpo%3_tjRQ_+ zo`^ELBSrmlo!8wd-MIb{?dPof3XEmYv@Uz;rbC6;C!hOo@u_m Z3|c@o2M~k6rQpdR%G1@)Wt~$(69DVIv7`V1 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_focus_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..8e3425ceda6dae1d3a61e899709b6851c765d77d GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`d7dtgAr`%FC+y~JFyL|FKfPx$gGod|R5*>bl0Qg7Q5431PfUnPs-;1B>Y_u@8WKuV36I<)NN{MYK?+)0f~MAR z3Bk4+DhPr^3b%TMyF*5Ui4AULhFRim=|2CY5<%Z|;GXYyzI)Gw|I~KCCAI@D@h9`e z#+;~S6QY()h#-g{bOo6^CjvaYe4=S8$%8`x&eIX}PzmSjt%%jj%C9Cad+p+AXiD6S zEeMg07+MN&q~5JdyLgF`ses`0<3pV&mlX7MVl|f*AJN z0a&}61Yq`b!T?AJfWu<@0a2o6tFR4>V>b;OO;+VSZqHa0L4ZHy_&~qwqgR% zt9goziqSZqaU0WGRcur^e#@d)^NfVU#Oh_mBo9aTw%Q=Ak@fdnn^B9$n~&%L;Q>}t zDGG%G&+EI!b!1e4k#HEl-w%MQs-zZ|np^OISQ&IOeYS5v`Wf@}GP%|@c7wF4n=$w8 zZTnT7kbXwv4d{@B$TeNo%Uz8<0TLqXUPh@e5USiHy3czk00000NkvXXu0mjfk-N*` literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..29d64aea7907aa5094a03716860f7b9d367c00f6 GIT binary patch literal 457 zcmV;)0XF`LP)Px$gGod|R5*>bl0Qg7Q5431PfUnPs-;1B>Y_u@8WKuV36I<)NN{MYK?+)0f~MAR z3Bk4+DhPr^3b%TMyF*5Ui4AULhFRim=|2CY5<%Z|;GXYyzI)Gw|I~KCCAI@D@h9`e z#+;~S6QY()h#-g{bOo6^CjvaYe4=S8$%8`x&eIX}PzmSjt%%jj%C9Cad+p+AXiD6S zEeMg07+MN&q~5JdyLgF`ses`0<3pV&mlX7MVl|f*AJN z0a&}61Yq`b!T?AJfWu<@0a2o6tFR4>V>b;OO;+VSZqHa0L4ZHy_&~qwqgR% zt9goziqSZqaU0WGRcur^e#@d)^NfVU#Oh_mBo9aTw%Q=Ak@fdnn^B9$n~&%L;Q>}t zDGG%G&+EI!b!1e4k#HEl-w%MQs-zZ|np^OISQ&IOeYS5v`Wf@}GP%|@c7wF4n=$w8 zZTnT7kbXwv4d{@B$TeNo%Uz8<0TLqXUPh@e5USiHy3czk00000NkvXXu0mjfk-N*` literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..91056626e56021ac37522685b41376530cc75711 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|;yqm)Lo9mV zPCU(dz=6X>T{Cs}27&B5hp#Dan(8C@OzIo+y-5!D0_T`7IB>q*V6(yIfU7&spI@_J zO4B`S7na2;cRh-@Px$gGod|R5*>bl0Qg7Q5431PfUnPs-;1B>Y_u@8WKuV36I<)NN{MYK?+)0f~MAR z3Bk4+DhPr^3b%TMyF*5Ui4AULhFRim=|2CY5<%Z|;GXYyzI)Gw|I~KCCAI@D@h9`e z#+;~S6QY()h#-g{bOo6^CjvaYe4=S8$%8`x&eIX}PzmSjt%%jj%C9Cad+p+AXiD6S zEeMg07+MN&q~5JdyLgF`ses`0<3pV&mlX7MVl|f*AJN z0a&}61Yq`b!T?AJfWu<@0a2o6tFR4>V>b;OO;+VSZqHa0L4ZHy_&~qwqgR% zt9goziqSZqaU0WGRcur^e#@d)^NfVU#Oh_mBo9aTw%Q=Ak@fdnn^B9$n~&%L;Q>}t zDGG%G&+EI!b!1e4k#HEl-w%MQs-zZ|np^OISQ&IOeYS5v`Wf@}GP%|@c7wF4n=$w8 zZTnT7kbXwv4d{@B$TeNo%Uz8<0TLqXUPh@e5USiHy3czk00000NkvXXu0mjfk-N*` literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/6_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..fd28e491f95af7b9b25f087e9e6ac3cecd6602f8 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Dm`5sLo9mV zPCCeWK!L|~|5EQKYIzS83$ o?q^MsveM?f&MnuL9hWR-RMFIzlS@iJ2y_I4r>mdKI;Vst09Px$GD$>1R5*>zk|A%xP!xr~k=dDv35HqHw81qK?>AtItZS3nxi!HM6d`rfNRnD+ zCg>j^0l`Gg(tv5w1lMFg;Y~o_9&ORvQSaV&&wcltcj2#bbL}DwLs^~6vIHQG<3|0h z9=yGLN`T^+Q*3i)iy;7MnpP#U-sGYIz-!P2x~$d%Cc&KLW`t!~?DzZDCLNtz9P^W| z=WlxVr<@Q1Aq1Z1aX1_>32Ug=B(BOdS7<{JU%?}{;|_XmX70G_h7ad zG7092Tt~m(2O!I`>mDpOBZLt3mlaIYyoi+tWm)QOH!z(}<#;@9Px$YDq*vR5*>bQol z;r46t4{)gnR6GQKAP60S4lNwCWEecuQ8PpjmctmK>A)UzE- zRC6kyo+sEpuH)i%7i_6`AKBa)oFbVBYMk~`tmK=d=#rw#S!2vuW6Vsv z%xN#hp{Xq~Qi32`2ZsOvwp5vGclVZR8)qJx8Yx^lmM4FAERPf}ho;6t+WvVbKJ8g! z%xX@hU{L}H7Fo@yGF|~$oY@C4bVWW`^n)Ps3c;Drt|n-A=kcQN+vwx%dx@9kQRw{o zMLw?82Z&}%vN@V9p;jNr_~!l&kFUkmb7taYX5wX1xRSPGc{Fr|6fXVx+AA2kva&G8 z^5|HeT&$rh>vfP!gdzGJL}DxQKqRI>^gBo3y<+D^20gt( z^_hvThxpq-qD$WFJJ+#>{j5!g;`@I(|IY)B40yyZ7+v$lh?)6tYTKs2D`pwSFfjZ7 zoF(D4>)WB9XJ&Ov`u+7dvP{JM#P|5W|L?y{|9@WpM~^YDKq|-0Sufcbl)vTn#N=w; Q0fqvDr>mdKI;Vst034`~*#H0l literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_cypher_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_cypher_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..3f6311b97472c06eb15ca82a28f4a84ddfd727da GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|!aQ9ZLo9le z6Bejf#0h_skL~FcVRlI^H8|2?#*k*cOIxDzBFE;R`=@a-Ki+E00|M*i;}a+3L>~3H zz);ehAk}%bo$241oJBeU@%H)0ml-kdRQYeQNrO&km+6M;VNL zE7|h%EqT)4S(i?31cHONqx%l}1k26#7fA44c=-SP@MnMi?^k~Zws?O0hoArd+ZO(> zkDK|q-g_Z)n|Q*IMn|p sw&35^{+SV`!Yn`ktu9ncT*b)1mNkc2)0ml-kdRQYeQNrO&km+6M;VNL zE7|h%EqT)4S(i?31cHONqx%l}1k26#7fA44c=-SP@MnMi?^k~Zws?O0hoArd+ZO(> zkDK|q-g_Z)n|Q*IMn|p sw&35^{+SV`!Yn`ktu9ncT*b)1mNkc2sHP-5}Zk1f0PJ+oK0ujPAC`P-tdl$k+CW!AQbb~}J}FnGH9xvX)0ml-kdRQYeQNrO&km+6M;VNL zE7|h%EqT)4S(i?31cHONqx%l}1k26#7fA44c=-SP@MnMi?^k~Zws?O0hoArd+ZO(> zkDK|q-g_Z)n|Q*IMn|p sw&35^{+SV`!Yn`ktu9ncT*b)1mNkc2zXU;OXk;vd$@?2>_H) BIB@^~ literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_empty.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..fbf5030e9d0bd019312f6435f130c9e583dfdb0b GIT binary patch literal 329 zcmV-P0k-~$P)Px$14%?dR5*>zku7e+FdRo;CX6@L*n5w2j;`xaO0k@YIE@3lO+{IjNGa+2{st_H;zqu#Bm>w&*ljAF z-`|i@(liZ4QBc?QT~*$D0GxAJYqP1JErb`5a~TI-4~OI|q?7=(ZHqA`o3?OxWD;cqEB^AB~|BIj3>>sW>H=OFq6Xt6)r05GC=v b1ph4G)boCco}Hql00000NkvXXu0mjfy)KWO literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_empty_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_empty_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..5e4988e6b2bfa35a4512b02b86013e071bb13b02 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|ggjjwLo9le j6C_v{Cy4YgaWF8j2rw|#`&RS;Wf?qO{an^LB{Ts5=Rgvz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_filled.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_filled.png new file mode 100644 index 0000000000000000000000000000000000000000..f6c83858d25db056a06c515b680681b50fe12f72 GIT binary patch literal 359 zcmV-t0hs=YP)Px$AxT6*R5*>zku7e+FdRpptB{hgQah|F*##zrR?&_SR$|s$gqKa>F&(R_(p0-b ztFgvM$iPS>kJN6KHXRw*4_TJq^Zx_>b@DuSd7isRZ=x{}AWc($<%}`nS3w_?Qil7B z=&mGs1okr~nXIGOeHs(sEX#g8u+~!7HK)^wG))=KWU}vCo~H>?N|aLUb~~44nXuMU zRaF2tn~jiC-be(%9NcP}@bvbIQi`G|n9XJ^7K>1o7nfz}0P4EN7$ZWtb8yQj=G?Ws zl;zDVyhJGlz~OK}Yc0YSK0wg5Zq;k2X__E79*+*7X&S7xY_(<`#qMS;!*+c7;N`>X z3?51RCbn9WL^1oWy;eLX=u6(e&UZndQGu8E^AP;Ad;@`pk9(KsrR)Fz002ovPDHLk FV1johpa1{> literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_filled_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_filled_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..cdeb9f77a7f309861ec9787917bf6e1f33251d83 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|G(BA$Lo9le z6C_xh1?Je-|Fb{Zc4m&H@L_?RBp2oxt2K&bUG*ebP1qO?oE2IueMO}lsENVT)z4*} HQ$iB}r_deI literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_sealed.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_sealed.png new file mode 100644 index 0000000000000000000000000000000000000000..b1bd1250726e7387b0035e3943cb13956e8b80ef GIT binary patch literal 358 zcmV-s0h#`ZP)Px$AW1|)R5*>zks)rwFc?OktB{hgQm3p6*##zro9qH+C1trqdD)Z$gpN&CX{27k z(b$qBbYLXXKT@Y@nsj7fAF?dJXMexpU&mT2)>?UVCYl2QvMdW*QkJFqRWJm#))-@y zb51UzNr{>Q0gN&I;i4!6psFgyl0_cH@>P~Mw*ollB*0ZwQP(wDmNA~m;@F*eUarwv zlOzewIWfklwr#Q2N&pXsgVI{xNff{aWV>AR^!7@UB<%NlR;v|hn%>O97^7zEY(VlT zmKTtsC?r%E)^W~>_g=jB5=8wke1M`m%XUy_81KCRG)+U>w!H6lx<_EL&@p;a}o@h6$D9GkHJ674=8k`XRJ+67ytkO07*qoM6N<$ Ef(z}IqyPW_ literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_sealed_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_spellbook_sealed_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..0f871bb828899a5a0b3b2a352d6f3fe3699e0727 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|96VhdLo9le z6C_wG4*vZ7{J(I};TG?tXJ=;qpP0ERNA(zMMXtJv+oshXWf#xPH2#0sWa87N&(F{Q hUw-1{;sy%_hL@JwwLK#DmjlgW@O1TaS?83{1OW0#GB5xD literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_trinket.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_trinket.png new file mode 100644 index 0000000000000000000000000000000000000000..c0ac4bf1a5e482e428f866d223f3730dd242cf01 GIT binary patch literal 369 zcmV-%0gnEOP)Px$D@jB_R5*>zlCes}Komu9#C8iI*eon;l|n%Tr`XmHFpc$mK$;Z(f@~qAwKXth z{voZf6O4-lCRm7q`GJ6yn`<>g5_b!&_Ez)mn|EgBy#e-GNmMY23jVv8n~I%o7>C*4 zAhy^7I^FPkakmw6FgAn`1OPrAId5G}2DzO8DJ7Ls`1pK-h1g;MP)b2cIe;AY1K;-% z1Ob2-=bfFj0D$T796=Dk_x-KU9^Aqh!!m8z>4s(6GKmTrV>mwjm*OyEryB|(*y+ZB z%Cw~rg4|TQClZI*pz~$gQc6jZ4q_+LhqxxrrgH~dR}2em*k3G9cqJsSd0K9)^&{})rPqa9{#LfMMhrQ4b?l8xSD`6j6 P00000NkvXXu0mjfI53`@ literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_trinket_overlay.png b/Common/src/main/resources/assets/hexcasting/textures/item/cad/7_trinket_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..38148c0fdc05557607f42b711ba702abc965d4fe GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|oIG6|Lo9mV zPS_}Tz<`Ho=No&D$1DEi7ChJLT~qQgJcPgfi|ICFAqL%ppRe7EOSE=qP`UXt!sJ)t jmqwM)tA#(G?$^1u+W7Id_rD#1rZITB`njxgN@xNA246C> literal 0 HcmV?d00001 diff --git a/Forge/src/generated/resources/data/minecraft/tags/blocks/crystal_sound_blocks.json b/Forge/src/generated/resources/data/minecraft/tags/blocks/crystal_sound_blocks.json index 675296c5..7a23dc1e 100644 --- a/Forge/src/generated/resources/data/minecraft/tags/blocks/crystal_sound_blocks.json +++ b/Forge/src/generated/resources/data/minecraft/tags/blocks/crystal_sound_blocks.json @@ -1,6 +1,6 @@ { "values": [ - "hexcasting:conjured", + "hexcasting:conjured_light", "hexcasting:conjured_block", "hexcasting:amethyst_tiles", "hexcasting:amethyst_sconce" diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java index e87b56b4..accd53e6 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java @@ -106,12 +106,12 @@ public class HexItemModels extends PaucalItemModelProvider { simpleItem(modLoc("patchouli_book")); buildThoughtKnot(); - buildSealableIotaHolder(HexItems.FOCUS, "focus"); - buildSealableIotaHolder(HexItems.SPELLBOOK, "spellbook"); + buildSealableIotaHolder(HexItems.FOCUS, "focus", HexItems.FOCUS.numVariants()); + buildSealableIotaHolder(HexItems.SPELLBOOK, "spellbook", HexItems.SPELLBOOK.numVariants()); - buildPackagedSpell(HexItems.CYPHER, "cypher"); - buildPackagedSpell(HexItems.TRINKET, "trinket"); - buildPackagedSpell(HexItems.ARTIFACT, "artifact"); + buildPackagedSpell(HexItems.CYPHER, "cypher", HexItems.CYPHER.numVariants()); + buildPackagedSpell(HexItems.TRINKET, "trinket", HexItems.TRINKET.numVariants()); + buildPackagedSpell(HexItems.ARTIFACT, "artifact", HexItems.ARTIFACT.numVariants()); int maxFill = 4; for (int size = 0; size < PHIAL_SIZES.length; size++) { @@ -194,23 +194,27 @@ public class HexItemModels extends PaucalItemModelProvider { .model(written).end(); } - private void buildSealableIotaHolder(Item item, String stub) { + private void buildSealableIotaHolder(Item item, String stub, int numVariants) { var name = getPath(item); - var plain = singleTexture(name, new ResourceLocation("item/generated"), - "layer0", modLoc("item/" + stub + "_empty")); - var unsealed = withExistingParent(name + "_filled", new ResourceLocation("item/generated")) - .texture("layer0", modLoc("item/" + stub + "_base")) - .texture("layer1", modLoc("item/" + stub) + "_overlay"); - var sealed = withExistingParent(name + "_sealed", new ResourceLocation("item/generated")) - .texture("layer0", modLoc("item/" + stub + "_base_sealed")) - .texture("layer1", modLoc("item/" + stub) + "_overlay_sealed"); - getBuilder(name) - .override().predicate(ItemFocus.OVERLAY_PRED, 0f) - .model(plain).end() - .override().predicate(ItemFocus.OVERLAY_PRED, 1f) - .model(unsealed).end() - .override().predicate(ItemFocus.OVERLAY_PRED, 2f) - .model(sealed).end(); + var builder = getBuilder(name); + for (int i = 0; i < numVariants; i++) { + var plain = i == 0 ? singleTexture(name, new ResourceLocation("item/generated"), + "layer0", modLoc("item/cad/" + i + "_" + stub + "_empty")) + : withExistingParent(name + "_" + i, new ResourceLocation("item/generated")) + .texture("layer0", modLoc("item/cad/" + i + "_" + stub + "_empty")); + var unsealed = withExistingParent(name + "_" + i + "_filled", new ResourceLocation("item/generated")) + .texture("layer0", modLoc("item/cad/" + i + "_" + stub + "_filled")) + .texture("layer1", modLoc("item/cad/" + i + "_" + stub + "_filled_overlay")); + var sealed = withExistingParent(name + "_" + i + "_sealed", new ResourceLocation("item/generated")) + .texture("layer0", modLoc("item/cad/" + i + "_" + stub + "_sealed")) + .texture("layer1", modLoc("item/cad/" + i + "_" + stub + "_sealed_overlay")); + builder.override().predicate(ItemFocus.VARIANT_PRED, i).predicate(ItemFocus.OVERLAY_PRED, 0f) + .model(plain).end() + .override().predicate(ItemFocus.VARIANT_PRED, i).predicate(ItemFocus.OVERLAY_PRED, 1f) + .model(unsealed).end() + .override().predicate(ItemFocus.VARIANT_PRED, i).predicate(ItemFocus.OVERLAY_PRED, 2f) + .model(sealed).end(); + } } private void buildScroll(Item item, String size) { @@ -238,18 +242,22 @@ public class HexItemModels extends PaucalItemModelProvider { .end(); } - private void buildPackagedSpell(Item item, String name) { - simpleItem(modLoc(name)); - simpleItem(modLoc(name + "_filled")); - getBuilder(getPath(item)) - .override() - .predicate(ItemPackagedHex.HAS_PATTERNS_PRED, -0.01f) - .model(new ModelFile.UncheckedModelFile(modLoc("item/" + name))) - .end() - .override() - .predicate(ItemPackagedHex.HAS_PATTERNS_PRED, 1f - 0.01f) - .model(new ModelFile.UncheckedModelFile(modLoc("item/" + name + "_filled"))) - .end(); + private void buildPackagedSpell(Item item, String stub, int numVariants) { + var name = getPath(item); + var builder = getBuilder(name); + for (int i = 0; i < numVariants; i++) { + var plain = i == 0 ? singleTexture(name, new ResourceLocation("item/generated"), + "layer0", modLoc("item/cad/" + i + "_" + stub)) + : withExistingParent(name + "_" + i, new ResourceLocation("item/generated")) + .texture("layer0", modLoc("item/cad/" + i + "_" + stub)); + var filled = withExistingParent(name + "_" + i + "_filled", new ResourceLocation("item/generated")) + .texture("layer0", modLoc("item/cad/" + i + "_" + stub)) + .texture("layer1", modLoc("item/cad/" + i + "_" + stub + "_overlay")); + builder.override().predicate(ItemFocus.VARIANT_PRED, i).predicate(ItemPackagedHex.HAS_PATTERNS_PRED, -0.01f) + .model(plain).end() + .override().predicate(ItemFocus.VARIANT_PRED, i).predicate(ItemPackagedHex.HAS_PATTERNS_PRED, 1f - 0.01f) + .model(filled).end(); + } } private void buildFourVariantGaslight(String name, String path, From 0f78ac17a173d16ab556d3e7b44fb528ec981af8 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 14:31:00 +1000 Subject: [PATCH 37/48] rename operators package to actions to avoid confusion now that there's a *separate* thing called operators. --- .../{operators => actions}/OpEntityHeight.kt | 2 +- .../{operators => actions}/OpEntityLook.kt | 2 +- .../{operators => actions}/OpEntityPos.kt | 2 +- .../OpEntityVelocity.kt | 2 +- .../akashic/OpAkashicRead.kt | 2 +- .../akashic/OpAkashicWrite.kt | 2 +- .../circles/OpCircleBounds.kt | 2 +- .../circles/OpImpetusDir.kt | 2 +- .../circles/OpImpetusPos.kt | 2 +- .../{operators => actions}/eval/OpEval.kt | 2 +- .../{operators => actions}/eval/OpForEach.kt | 2 +- .../{operators => actions}/eval/OpHalt.kt | 2 +- .../{operators => actions}/eval/OpThanos.kt | 2 +- .../{operators => actions}/lists/OpAppend.kt | 2 +- .../{operators => actions}/lists/OpConcat.kt | 2 +- .../{operators => actions}/lists/OpCons.kt | 2 +- .../lists/OpEmptyList.kt | 2 +- .../{operators => actions}/lists/OpIndex.kt | 2 +- .../{operators => actions}/lists/OpIndexOf.kt | 2 +- .../lists/OpLastNToList.kt | 2 +- .../lists/OpListSize.kt | 2 +- .../lists/OpModifyInPlace.kt | 2 +- .../{operators => actions}/lists/OpRemove.kt | 2 +- .../lists/OpReverski.kt | 2 +- .../lists/OpSingleton.kt | 2 +- .../{operators => actions}/lists/OpSlice.kt | 2 +- .../{operators => actions}/lists/OpSplat.kt | 2 +- .../{operators => actions}/lists/OpUnCons.kt | 2 +- .../local/OpPeekLocal.kt | 2 +- .../local/OpPushLocal.kt | 2 +- .../{operators => actions}/math/OpAbsLen.kt | 2 +- .../{operators => actions}/math/OpAdd.kt | 2 +- .../{operators => actions}/math/OpCeil.kt | 2 +- .../math/OpCoerceToAxial.kt | 2 +- .../math/OpConstructVec.kt | 2 +- .../math/OpDeconstructVec.kt | 2 +- .../{operators => actions}/math/OpDivCross.kt | 2 +- .../{operators => actions}/math/OpFloor.kt | 2 +- .../{operators => actions}/math/OpLog.kt | 2 +- .../{operators => actions}/math/OpModulo.kt | 2 +- .../{operators => actions}/math/OpMulDot.kt | 2 +- .../{operators => actions}/math/OpPowProj.kt | 2 +- .../{operators => actions}/math/OpRandom.kt | 2 +- .../{operators => actions}/math/OpSub.kt | 2 +- .../math/SpecialHandlerNumberLiteral.kt | 2 +- .../{operators => actions}/math/bit/OpAnd.kt | 2 +- .../{operators => actions}/math/bit/OpNot.kt | 2 +- .../{operators => actions}/math/bit/OpOr.kt | 2 +- .../math/bit/OpToSet.kt | 2 +- .../{operators => actions}/math/bit/OpXor.kt | 2 +- .../math/logic/OpBoolAnd.kt | 2 +- .../math/logic/OpBoolIf.kt | 2 +- .../math/logic/OpBoolNot.kt | 2 +- .../math/logic/OpBoolOr.kt | 2 +- .../math/logic/OpBoolToNumber.kt | 2 +- .../math/logic/OpBoolXor.kt | 2 +- .../math/logic/OpCoerceToBool.kt | 2 +- .../math/logic/OpCompare.kt | 2 +- .../math/logic/OpEquality.kt | 2 +- .../math/trig/OpArcCos.kt | 2 +- .../math/trig/OpArcSin.kt | 2 +- .../math/trig/OpArcTan.kt | 2 +- .../math/trig/OpArcTan2.kt | 2 +- .../{operators => actions}/math/trig/OpCos.kt | 2 +- .../{operators => actions}/math/trig/OpSin.kt | 2 +- .../{operators => actions}/math/trig/OpTan.kt | 2 +- .../raycast/OpBlockAxisRaycast.kt | 2 +- .../raycast/OpBlockRaycast.kt | 2 +- .../raycast/OpEntityRaycast.kt | 2 +- .../{operators => actions}/rw/OpRead.kt | 2 +- .../{operators => actions}/rw/OpReadable.kt | 2 +- .../rw/OpTheCoolerRead.kt | 2 +- .../rw/OpTheCoolerReadable.kt | 2 +- .../rw/OpTheCoolerWritable.kt | 2 +- .../rw/OpTheCoolerWrite.kt | 2 +- .../{operators => actions}/rw/OpWritable.kt | 2 +- .../{operators => actions}/rw/OpWrite.kt | 2 +- .../selectors/OpGetCaster.kt | 2 +- .../selectors/OpGetEntitiesBy.kt | 2 +- .../selectors/OpGetEntityAt.kt | 2 +- .../spells/OpAddMotion.kt | 2 +- .../{operators => actions}/spells/OpBeep.kt | 2 +- .../{operators => actions}/spells/OpBlink.kt | 4 +-- .../spells/OpBreakBlock.kt | 2 +- .../spells/OpColorize.kt | 2 +- .../spells/OpConjureBlock.kt | 2 +- .../spells/OpCreateFluid.kt | 2 +- .../spells/OpDestroyFluid.kt | 2 +- .../spells/OpEdifySapling.kt | 2 +- .../{operators => actions}/spells/OpErase.kt | 2 +- .../spells/OpExplode.kt | 2 +- .../spells/OpExtinguish.kt | 2 +- .../{operators => actions}/spells/OpFlight.kt | 2 +- .../{operators => actions}/spells/OpIgnite.kt | 2 +- .../spells/OpMakeBattery.kt | 2 +- .../spells/OpMakePackagedSpell.kt | 2 +- .../spells/OpPlaceBlock.kt | 2 +- .../spells/OpPotionEffect.kt | 2 +- .../{operators => actions}/spells/OpPrint.kt | 2 +- .../spells/OpRecharge.kt | 2 +- .../OpTheOnlyReasonAnyoneDownloadedPsi.kt | 2 +- .../spells/great/OpAltiora.kt | 2 +- .../spells/great/OpBrainsweep.kt | 2 +- .../spells/great/OpLightning.kt | 2 +- .../spells/great/OpTeleport.kt | 2 +- .../spells/great/OpWeather.kt | 2 +- .../spells/sentinel/OpCreateSentinel.kt | 2 +- .../spells/sentinel/OpDestroySentinel.kt | 2 +- .../spells/sentinel/OpGetSentinelPos.kt | 2 +- .../spells/sentinel/OpGetSentinelWayfind.kt | 2 +- .../OpAlwinfyHasAscendedToABeingOfPureMath.kt | 2 +- .../stack/OpDuplicateN.kt | 2 +- .../stack/OpFisherman.kt | 2 +- .../stack/OpFishermanButItCopies.kt | 2 +- .../{operators => actions}/stack/OpMask.kt | 2 +- .../stack/OpStackSize.kt | 2 +- .../stack/OpTwiddling.kt | 2 +- .../stack/SpecialHandlerMask.kt | 2 +- .../operator/list/OperatorUnique.kt | 2 +- .../hexcasting/common/lib/hex/HexActions.java | 30 +++++++++---------- .../common/lib/hex/HexSpecialHandlers.java | 4 +-- .../hexcasting/fabric/FabricHexInitializer.kt | 4 +-- .../hexcasting/forge/ForgeHexInitializer.java | 4 +-- .../interop/jei/EdifyRecipeCategory.java | 2 +- .../forge/interop/jei/HexJEIPlugin.java | 4 +-- .../interop/jei/PhialRecipeCategory.java | 2 +- 126 files changed, 145 insertions(+), 145 deletions(-) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/OpEntityHeight.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/OpEntityLook.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/OpEntityPos.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/OpEntityVelocity.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/akashic/OpAkashicRead.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/akashic/OpAkashicWrite.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/circles/OpCircleBounds.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/circles/OpImpetusDir.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/circles/OpImpetusPos.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/eval/OpEval.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/eval/OpForEach.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/eval/OpHalt.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/eval/OpThanos.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpAppend.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpConcat.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpCons.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpEmptyList.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpIndex.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpIndexOf.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpLastNToList.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpListSize.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpModifyInPlace.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpRemove.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpReverski.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpSingleton.kt (88%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpSlice.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpSplat.kt (87%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/lists/OpUnCons.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/local/OpPeekLocal.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/local/OpPushLocal.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpAbsLen.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpAdd.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpCeil.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpCoerceToAxial.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpConstructVec.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpDeconstructVec.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpDivCross.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpFloor.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpLog.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpModulo.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpMulDot.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpPowProj.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpRandom.kt (88%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/OpSub.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/SpecialHandlerNumberLiteral.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/bit/OpAnd.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/bit/OpNot.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/bit/OpOr.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/bit/OpToSet.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/bit/OpXor.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpBoolAnd.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpBoolIf.kt (88%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpBoolNot.kt (88%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpBoolOr.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpBoolToNumber.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpBoolXor.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpCoerceToBool.kt (87%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpCompare.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/logic/OpEquality.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpArcCos.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpArcSin.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpArcTan.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpArcTan2.kt (90%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpCos.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpSin.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/math/trig/OpTan.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/raycast/OpBlockAxisRaycast.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/raycast/OpBlockRaycast.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/raycast/OpEntityRaycast.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpRead.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpReadable.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpTheCoolerRead.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpTheCoolerReadable.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpTheCoolerWritable.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpTheCoolerWrite.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpWritable.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/rw/OpWrite.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/selectors/OpGetCaster.kt (89%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/selectors/OpGetEntitiesBy.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/selectors/OpGetEntityAt.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpAddMotion.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpBeep.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpBlink.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpBreakBlock.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpColorize.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpConjureBlock.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpCreateFluid.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpDestroyFluid.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpEdifySapling.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpErase.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpExplode.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpExtinguish.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpFlight.kt (99%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpIgnite.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpMakeBattery.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpMakePackagedSpell.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpPlaceBlock.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpPotionEffect.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpPrint.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpRecharge.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/great/OpAltiora.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/great/OpBrainsweep.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/great/OpLightning.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/great/OpTeleport.kt (98%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/great/OpWeather.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/sentinel/OpCreateSentinel.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/sentinel/OpDestroySentinel.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/sentinel/OpGetSentinelPos.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/spells/sentinel/OpGetSentinelWayfind.kt (94%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt (97%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpDuplicateN.kt (91%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpFisherman.kt (96%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpFishermanButItCopies.kt (95%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpMask.kt (92%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpStackSize.kt (93%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/OpTwiddling.kt (88%) rename Common/src/main/java/at/petrak/hexcasting/common/casting/{operators => actions}/stack/SpecialHandlerMask.kt (98%) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityHeight.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityHeight.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityHeight.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityHeight.kt index 2f747b40..eea382d0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityHeight.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityHeight.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators +package at.petrak.hexcasting.common.casting.actions import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityLook.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityLook.kt index ba8b642a..14faec64 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityLook.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators +package at.petrak.hexcasting.common.casting.actions import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityPos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityPos.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityPos.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityPos.kt index cc7d3a46..80ab0e23 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityPos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityPos.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators +package at.petrak.hexcasting.common.casting.actions import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityVelocity.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityVelocity.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityVelocity.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityVelocity.kt index db5c2714..b1b73309 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityVelocity.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/OpEntityVelocity.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators +package at.petrak.hexcasting.common.casting.actions import at.petrak.hexcasting.api.HexAPI import at.petrak.hexcasting.api.casting.asActionResult diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/akashic/OpAkashicRead.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/akashic/OpAkashicRead.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/akashic/OpAkashicRead.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/akashic/OpAkashicRead.kt index 4baf1394..62a29b92 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/akashic/OpAkashicRead.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/akashic/OpAkashicRead.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.akashic +package at.petrak.hexcasting.common.casting.actions.akashic import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/akashic/OpAkashicWrite.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/akashic/OpAkashicWrite.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/akashic/OpAkashicWrite.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/akashic/OpAkashicWrite.kt index 916a7044..b81f8e5c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/akashic/OpAkashicWrite.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/akashic/OpAkashicWrite.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.akashic +package at.petrak.hexcasting.common.casting.actions.akashic import at.petrak.hexcasting.api.casting.RenderedSpell import at.petrak.hexcasting.api.casting.castables.SpellAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpCircleBounds.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpCircleBounds.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt index 74bfc7c6..8081552a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpCircleBounds.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.circles +package at.petrak.hexcasting.common.casting.actions.circles import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpImpetusDir.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpImpetusDir.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpImpetusDir.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpImpetusDir.kt index 4debe5a4..cb231bb4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpImpetusDir.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpImpetusDir.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.circles +package at.petrak.hexcasting.common.casting.actions.circles import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpImpetusPos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpImpetusPos.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpImpetusPos.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpImpetusPos.kt index 90087a4f..d1ca4430 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/circles/OpImpetusPos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpImpetusPos.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.circles +package at.petrak.hexcasting.common.casting.actions.circles import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpEval.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpEval.kt index bedd4277..0b3c274b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpEval.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpEval.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.eval +package at.petrak.hexcasting.common.casting.actions.eval import at.petrak.hexcasting.api.casting.SpellList import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpForEach.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpForEach.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpForEach.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpForEach.kt index 7d787e89..bb5ccafa 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpForEach.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpForEach.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.eval +package at.petrak.hexcasting.common.casting.actions.eval import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpHalt.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpHalt.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpHalt.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpHalt.kt index cf28dc63..7436c26a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpHalt.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpHalt.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.eval +package at.petrak.hexcasting.common.casting.actions.eval import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpThanos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpThanos.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpThanos.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpThanos.kt index b50468e8..680808c8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/eval/OpThanos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/eval/OpThanos.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.eval +package at.petrak.hexcasting.common.casting.actions.eval import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpAppend.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpAppend.kt index c7926dbc..1834166e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpAppend.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpConcat.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpConcat.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpConcat.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpConcat.kt index 7ee92e06..2e77b356 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpConcat.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpConcat.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpCons.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpCons.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpCons.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpCons.kt index f0dfb518..b0ec3173 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpCons.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpCons.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.SpellList import at.petrak.hexcasting.api.casting.asActionResult diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpEmptyList.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpEmptyList.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpEmptyList.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpEmptyList.kt index 42725660..b3c63981 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpEmptyList.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpEmptyList.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndex.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpIndex.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndex.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpIndex.kt index 88941551..dacaa022 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndex.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpIndex.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndexOf.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpIndexOf.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndexOf.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpIndexOf.kt index 2f9b62ab..98209c9b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndexOf.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpIndexOf.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpLastNToList.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpLastNToList.kt index be78e0bb..ffd4e3c1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpLastNToList.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpLastNToList.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpListSize.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpListSize.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpListSize.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpListSize.kt index bdd5f050..0df98e16 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpListSize.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpListSize.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpModifyInPlace.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpModifyInPlace.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpModifyInPlace.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpModifyInPlace.kt index cf596b17..f54ec91e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpModifyInPlace.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpModifyInPlace.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.SpellList import at.petrak.hexcasting.api.casting.asActionResult diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpRemove.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpRemove.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpRemove.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpRemove.kt index 54eec6cb..586b679e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpRemove.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpRemove.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpReverski.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpReverski.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpReverski.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpReverski.kt index ff596b49..ffee5403 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpReverski.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpReverski.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSingleton.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSingleton.kt similarity index 88% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSingleton.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSingleton.kt index 3e9398d8..41fab11f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSingleton.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSingleton.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSlice.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSlice.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSlice.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSlice.kt index ef0a2324..f83daf76 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSlice.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSlice.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSplat.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSplat.kt similarity index 87% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSplat.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSplat.kt index 8df6f2c5..f35f0d8a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSplat.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpSplat.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpUnCons.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpUnCons.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpUnCons.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpUnCons.kt index 72f4fce9..211e9128 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpUnCons.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/lists/OpUnCons.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.actions.lists import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPeekLocal.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/local/OpPeekLocal.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPeekLocal.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/local/OpPeekLocal.kt index a9140dfb..375b5bbc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPeekLocal.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/local/OpPeekLocal.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.local +package at.petrak.hexcasting.common.casting.actions.local import at.petrak.hexcasting.api.HexAPI import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/local/OpPushLocal.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/local/OpPushLocal.kt index d0e7041b..59c8a7e0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/local/OpPushLocal.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/local/OpPushLocal.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.local +package at.petrak.hexcasting.common.casting.actions.local import at.petrak.hexcasting.api.HexAPI import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAbsLen.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpAbsLen.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAbsLen.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpAbsLen.kt index f2e29733..b78bb09a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAbsLen.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpAbsLen.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAdd.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpAdd.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAdd.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpAdd.kt index 49bc1e44..cdb1cea4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAdd.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpAdd.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpCeil.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpCeil.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpCeil.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpCeil.kt index 89f8d2e2..d9b7cbd6 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpCeil.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpCeil.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.aplKinnie import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpCoerceToAxial.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpCoerceToAxial.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpCoerceToAxial.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpCoerceToAxial.kt index 5ca0188a..2338066f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpCoerceToAxial.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpCoerceToAxial.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpConstructVec.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpConstructVec.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpConstructVec.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpConstructVec.kt index 0e7512fa..3a94ea1e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpConstructVec.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpConstructVec.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpDeconstructVec.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpDeconstructVec.kt index e1ec5486..68a979d2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpDeconstructVec.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpDivCross.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpDivCross.kt index 2e412024..f83c97b4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpDivCross.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpFloor.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpFloor.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpFloor.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpFloor.kt index 551b18c1..761888de 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpFloor.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpFloor.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.aplKinnie import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpLog.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpLog.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpLog.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpLog.kt index 42085a02..054debb4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpLog.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpLog.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpModulo.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpModulo.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpModulo.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpModulo.kt index 258a048e..57753f8f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpModulo.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpModulo.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpMulDot.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpMulDot.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpMulDot.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpMulDot.kt index fd5002c2..fe5324dd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpMulDot.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpMulDot.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpPowProj.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpPowProj.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpPowProj.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpPowProj.kt index 668a1514..814fca39 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpPowProj.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpPowProj.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpRandom.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpRandom.kt similarity index 88% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpRandom.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpRandom.kt index 2d7f3116..87853a1e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpRandom.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpRandom.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpSub.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpSub.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpSub.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpSub.kt index d289f0ca..e5aec943 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpSub.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/OpSub.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/SpecialHandlerNumberLiteral.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/SpecialHandlerNumberLiteral.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/SpecialHandlerNumberLiteral.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/SpecialHandlerNumberLiteral.kt index 62cb6ea5..03f689ce 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/SpecialHandlerNumberLiteral.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/SpecialHandlerNumberLiteral.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math +package at.petrak.hexcasting.common.casting.actions.math import at.petrak.hexcasting.api.HexAPI import at.petrak.hexcasting.api.casting.asActionResult diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpAnd.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpAnd.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpAnd.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpAnd.kt index e6f9593d..60ec2eec 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpAnd.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpAnd.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.bit +package at.petrak.hexcasting.common.casting.actions.math.bit import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpNot.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpNot.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpNot.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpNot.kt index 66b44b01..435b1706 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpNot.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpNot.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.bit +package at.petrak.hexcasting.common.casting.actions.math.bit import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpOr.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpOr.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpOr.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpOr.kt index 063dab65..220ff724 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpOr.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpOr.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.bit +package at.petrak.hexcasting.common.casting.actions.math.bit import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpToSet.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpToSet.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpToSet.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpToSet.kt index bbb8780e..94ddcba5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpToSet.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpToSet.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.bit +package at.petrak.hexcasting.common.casting.actions.math.bit import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpXor.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpXor.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpXor.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpXor.kt index 0283384f..d45323de 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/bit/OpXor.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/bit/OpXor.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.bit +package at.petrak.hexcasting.common.casting.actions.math.bit import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolAnd.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolAnd.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolAnd.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolAnd.kt index 21683f1d..db3e8b0e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolAnd.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolAnd.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolIf.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolIf.kt similarity index 88% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolIf.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolIf.kt index 18c52660..140de0ea 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolIf.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolIf.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolNot.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolNot.kt similarity index 88% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolNot.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolNot.kt index cec1c641..834f498f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolNot.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolNot.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolOr.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolOr.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolOr.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolOr.kt index eb156426..7c2123b1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolOr.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolOr.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolToNumber.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolToNumber.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolToNumber.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolToNumber.kt index e8063b5e..cc390289 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolToNumber.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolToNumber.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolXor.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolXor.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolXor.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolXor.kt index 691d80a0..5c1af936 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpBoolXor.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpBoolXor.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpCoerceToBool.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpCoerceToBool.kt similarity index 87% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpCoerceToBool.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpCoerceToBool.kt index 69f4c85a..d9996457 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpCoerceToBool.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpCoerceToBool.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpCompare.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpCompare.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpCompare.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpCompare.kt index bd9ca304..98c479aa 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpCompare.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpCompare.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpEquality.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpEquality.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpEquality.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpEquality.kt index 03e8b485..2dcc9f19 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/logic/OpEquality.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpEquality.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.logic +package at.petrak.hexcasting.common.casting.actions.math.logic import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcCos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcCos.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcCos.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcCos.kt index 1a550e63..49dce7e6 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcCos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcCos.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcSin.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcSin.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcSin.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcSin.kt index b0881d72..49e82a21 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcSin.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcSin.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcTan.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcTan.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcTan.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcTan.kt index acd228bb..45b07c6e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcTan.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcTan.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcTan2.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcTan2.kt similarity index 90% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcTan2.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcTan2.kt index d5fc69c4..6418ccfa 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpArcTan2.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpArcTan2.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpCos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpCos.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpCos.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpCos.kt index 63db3487..7411c3b8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpCos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpCos.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpSin.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpSin.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpSin.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpSin.kt index e6c0ad03..de67f35c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpSin.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpSin.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpTan.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpTan.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpTan.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpTan.kt index dfba49ba..b6b76872 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/math/trig/OpTan.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/trig/OpTan.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.math.trig +package at.petrak.hexcasting.common.casting.actions.math.trig import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpBlockAxisRaycast.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpBlockAxisRaycast.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpBlockAxisRaycast.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpBlockAxisRaycast.kt index 329aaced..e7b97bd0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpBlockAxisRaycast.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpBlockAxisRaycast.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.raycast +package at.petrak.hexcasting.common.casting.actions.raycast import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpBlockRaycast.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpBlockRaycast.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpBlockRaycast.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpBlockRaycast.kt index 2c77959e..382e0299 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpBlockRaycast.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpBlockRaycast.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.raycast +package at.petrak.hexcasting.common.casting.actions.raycast import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpEntityRaycast.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpEntityRaycast.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpEntityRaycast.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpEntityRaycast.kt index a0911890..3e9f4f65 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/raycast/OpEntityRaycast.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/raycast/OpEntityRaycast.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.raycast +package at.petrak.hexcasting.common.casting.actions.raycast import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpRead.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpRead.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpRead.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpRead.kt index 9832b99c..fceb1a1a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpRead.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpRead.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpReadable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpReadable.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpReadable.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpReadable.kt index 55b85b6b..8b4cee85 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpReadable.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpReadable.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerRead.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerRead.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerRead.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerRead.kt index 1db0ac5c..4fd4a69f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerRead.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerRead.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerReadable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerReadable.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerReadable.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerReadable.kt index 546f9229..aa118182 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerReadable.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerReadable.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerWritable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerWritable.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerWritable.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerWritable.kt index 54fe2ff6..598ae8b1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerWritable.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerWritable.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerWrite.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerWrite.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerWrite.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerWrite.kt index 3b8681d0..d63e972c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpTheCoolerWrite.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpTheCoolerWrite.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.addldata.ADIotaHolder import at.petrak.hexcasting.api.casting.ParticleSpray diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpWritable.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpWritable.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpWritable.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpWritable.kt index 61dfa9ac..6912f7f6 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpWritable.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpWritable.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpWrite.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpWrite.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpWrite.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpWrite.kt index 5b744e45..73b07967 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/rw/OpWrite.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/rw/OpWrite.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.rw +package at.petrak.hexcasting.common.casting.actions.rw import at.petrak.hexcasting.api.addldata.ADIotaHolder import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetCaster.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetCaster.kt similarity index 89% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetCaster.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetCaster.kt index 842ea02c..9a091db8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetCaster.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetCaster.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.selectors +package at.petrak.hexcasting.common.casting.actions.selectors import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntitiesBy.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetEntitiesBy.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntitiesBy.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetEntitiesBy.kt index 6578f21a..17eabc18 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntitiesBy.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetEntitiesBy.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.selectors +package at.petrak.hexcasting.common.casting.actions.selectors import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntityAt.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetEntityAt.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntityAt.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetEntityAt.kt index 828f7d90..55de4537 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntityAt.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/selectors/OpGetEntityAt.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.selectors +package at.petrak.hexcasting.common.casting.actions.selectors import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpAddMotion.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpAddMotion.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpAddMotion.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpAddMotion.kt index 9e644cec..670d8417 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpAddMotion.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpAddMotion.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBeep.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBeep.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBeep.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBeep.kt index 7586d8a3..5b4df4f3 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBeep.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBeep.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.* import at.petrak.hexcasting.api.casting.castables.SpellAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBlink.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBlink.kt index 9170217e..6647b4ef 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBlink.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell @@ -12,7 +12,7 @@ import at.petrak.hexcasting.api.casting.mishaps.MishapImmuneEntity import at.petrak.hexcasting.api.misc.MediaConstants import at.petrak.hexcasting.api.mod.HexConfig import at.petrak.hexcasting.api.mod.HexTags -import at.petrak.hexcasting.common.casting.operators.spells.great.OpTeleport +import at.petrak.hexcasting.common.casting.actions.spells.great.OpTeleport import net.minecraft.world.entity.Entity import kotlin.math.absoluteValue import kotlin.math.roundToInt diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBreakBlock.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBreakBlock.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBreakBlock.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBreakBlock.kt index 6093baa0..369bbc7d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBreakBlock.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpBreakBlock.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpColorize.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpColorize.kt index b985a135..787f6865 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpColorize.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpColorize.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.RenderedSpell import at.petrak.hexcasting.api.casting.castables.SpellAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpConjureBlock.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpConjureBlock.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpConjureBlock.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpConjureBlock.kt index 516fd8d4..e2e6bf06 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpConjureBlock.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpConjureBlock.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpCreateFluid.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCreateFluid.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpCreateFluid.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCreateFluid.kt index 7ba80b56..388609b9 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpCreateFluid.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCreateFluid.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpDestroyFluid.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpDestroyFluid.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpDestroyFluid.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpDestroyFluid.kt index 3fa29ae2..a47667e2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpDestroyFluid.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpDestroyFluid.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpEdifySapling.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpEdifySapling.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpEdifySapling.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpEdifySapling.kt index 4bb45914..3da14049 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpEdifySapling.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpEdifySapling.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpErase.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpErase.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt index 7f11e555..601c58b4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpErase.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpErase.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.RenderedSpell import at.petrak.hexcasting.api.casting.castables.SpellAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExplode.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpExplode.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExplode.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpExplode.kt index 43f1966b..96932c87 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExplode.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpExplode.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExtinguish.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpExtinguish.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExtinguish.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpExtinguish.kt index e43c79ed..a34efb48 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExtinguish.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpExtinguish.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpFlight.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt similarity index 99% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpFlight.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt index 86481c2a..9dfb5365 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpFlight.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpFlight.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpIgnite.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpIgnite.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpIgnite.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpIgnite.kt index 192a46df..6e1530dd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpIgnite.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpIgnite.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakeBattery.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpMakeBattery.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakeBattery.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpMakeBattery.kt index d5c700ea..619f84ee 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakeBattery.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpMakeBattery.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpMakePackagedSpell.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpMakePackagedSpell.kt index 22ac23c1..cdc9939e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpMakePackagedSpell.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPlaceBlock.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPlaceBlock.kt index 65448e9d..237ad7ca 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPlaceBlock.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPotionEffect.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPotionEffect.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPotionEffect.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPotionEffect.kt index fa3c33c5..be7a30a4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPotionEffect.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPotionEffect.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.* import at.petrak.hexcasting.api.casting.castables.SpellAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPrint.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPrint.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt index 76c8216e..719d47cd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPrint.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.RenderedSpell import at.petrak.hexcasting.api.casting.castables.Action diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpRecharge.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpRecharge.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpRecharge.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpRecharge.kt index ba22431e..324a202c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpRecharge.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpRecharge.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt index ee614162..7dd0093e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpTheOnlyReasonAnyoneDownloadedPsi.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.actions.spells import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpAltiora.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpAltiora.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpAltiora.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpAltiora.kt index 9465ea7f..3d70ed29 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpAltiora.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpAltiora.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.actions.spells.great import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpBrainsweep.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpBrainsweep.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpBrainsweep.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpBrainsweep.kt index a54c08b8..f7073303 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpBrainsweep.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpBrainsweep.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.actions.spells.great import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpLightning.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpLightning.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpLightning.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpLightning.kt index dd72271c..02da1f78 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpLightning.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpLightning.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.actions.spells.great import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpTeleport.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpTeleport.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpTeleport.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpTeleport.kt index 702dc1f3..c45eb297 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpTeleport.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpTeleport.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.actions.spells.great import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpWeather.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpWeather.kt index 00c41ca9..b6e314c0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/great/OpWeather.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.actions.spells.great import at.petrak.hexcasting.api.casting.RenderedSpell import at.petrak.hexcasting.api.casting.castables.SpellAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpCreateSentinel.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpCreateSentinel.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt index 59b3831e..c6b0f33b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpCreateSentinel.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpCreateSentinel.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.sentinel +package at.petrak.hexcasting.common.casting.actions.spells.sentinel import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpDestroySentinel.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpDestroySentinel.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt index 0483c4dd..7703bd58 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpDestroySentinel.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpDestroySentinel.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.sentinel +package at.petrak.hexcasting.common.casting.actions.spells.sentinel import at.petrak.hexcasting.api.casting.ParticleSpray import at.petrak.hexcasting.api.casting.RenderedSpell diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpGetSentinelPos.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpGetSentinelPos.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt index f016db3d..3903f77b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpGetSentinelPos.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelPos.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.sentinel +package at.petrak.hexcasting.common.casting.actions.spells.sentinel import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpGetSentinelWayfind.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt similarity index 94% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpGetSentinelWayfind.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt index 2ecb7d19..f439a8dd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/sentinel/OpGetSentinelWayfind.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/sentinel/OpGetSentinelWayfind.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.spells.sentinel +package at.petrak.hexcasting.common.casting.actions.spells.sentinel import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.castables.ConstMediaAction diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt similarity index 97% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt index d4f87ee1..115ff4b6 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpAlwinfyHasAscendedToABeingOfPureMath.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpDuplicateN.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpDuplicateN.kt similarity index 91% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpDuplicateN.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpDuplicateN.kt index 92491447..fd3aa008 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpDuplicateN.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpDuplicateN.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpFisherman.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpFisherman.kt similarity index 96% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpFisherman.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpFisherman.kt index f255880c..c2c8874f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpFisherman.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpFisherman.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpFishermanButItCopies.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpFishermanButItCopies.kt similarity index 95% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpFishermanButItCopies.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpFishermanButItCopies.kt index 3d99f4e0..91ed5b94 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpFishermanButItCopies.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpFishermanButItCopies.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpMask.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpMask.kt similarity index 92% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpMask.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpMask.kt index 5f1a36be..3e15480b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpMask.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpMask.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpStackSize.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpStackSize.kt similarity index 93% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpStackSize.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpStackSize.kt index 6a1d0b88..eeec0f57 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpStackSize.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpStackSize.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.Action import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpTwiddling.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpTwiddling.kt similarity index 88% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpTwiddling.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpTwiddling.kt index e1680ccd..b2f73c1b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/OpTwiddling.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/OpTwiddling.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.casting.castables.ConstMediaAction import at.petrak.hexcasting.api.casting.eval.CastingEnvironment diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/SpecialHandlerMask.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/SpecialHandlerMask.kt similarity index 98% rename from Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/SpecialHandlerMask.kt rename to Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/SpecialHandlerMask.kt index 60a4447a..4639f143 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/operators/stack/SpecialHandlerMask.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/stack/SpecialHandlerMask.kt @@ -1,4 +1,4 @@ -package at.petrak.hexcasting.common.casting.operators.stack +package at.petrak.hexcasting.common.casting.actions.stack import at.petrak.hexcasting.api.HexAPI import at.petrak.hexcasting.api.HexAPI.modLoc diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt index 5695e61a..18a1bfdd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorUnique.kt @@ -6,7 +6,7 @@ import at.petrak.hexcasting.api.casting.arithmetic.predicates.IotaPredicate import at.petrak.hexcasting.api.casting.asActionResult import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.common.casting.arithmetic.operator.nextList -import at.petrak.hexcasting.common.casting.operators.math.bit.OpToSet +import at.petrak.hexcasting.common.casting.actions.math.bit.OpToSet import at.petrak.hexcasting.common.lib.hex.HexIotaTypes.LIST object OperatorUnique : Operator(1, IotaMultiPredicate.all(IotaPredicate.ofType(LIST))) { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index 93b4fd12..a6177b86 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -11,21 +11,21 @@ import at.petrak.hexcasting.api.casting.math.HexDir; import at.petrak.hexcasting.api.casting.math.HexPattern; import at.petrak.hexcasting.api.misc.MediaConstants; import at.petrak.hexcasting.api.utils.HexUtils; -import at.petrak.hexcasting.common.casting.operators.*; -import at.petrak.hexcasting.common.casting.operators.akashic.*; -import at.petrak.hexcasting.common.casting.operators.circles.*; -import at.petrak.hexcasting.common.casting.operators.eval.*; -import at.petrak.hexcasting.common.casting.operators.lists.*; -import at.petrak.hexcasting.common.casting.operators.local.*; -import at.petrak.hexcasting.common.casting.operators.math.*; -import at.petrak.hexcasting.common.casting.operators.math.logic.*; -import at.petrak.hexcasting.common.casting.operators.raycast.*; -import at.petrak.hexcasting.common.casting.operators.rw.*; -import at.petrak.hexcasting.common.casting.operators.selectors.*; -import at.petrak.hexcasting.common.casting.operators.spells.*; -import at.petrak.hexcasting.common.casting.operators.spells.great.*; -import at.petrak.hexcasting.common.casting.operators.spells.sentinel.*; -import at.petrak.hexcasting.common.casting.operators.stack.*; +import at.petrak.hexcasting.common.casting.actions.*; +import at.petrak.hexcasting.common.casting.actions.akashic.*; +import at.petrak.hexcasting.common.casting.actions.circles.*; +import at.petrak.hexcasting.common.casting.actions.eval.*; +import at.petrak.hexcasting.common.casting.actions.lists.*; +import at.petrak.hexcasting.common.casting.actions.local.*; +import at.petrak.hexcasting.common.casting.actions.math.*; +import at.petrak.hexcasting.common.casting.actions.math.logic.*; +import at.petrak.hexcasting.common.casting.actions.raycast.*; +import at.petrak.hexcasting.common.casting.actions.rw.*; +import at.petrak.hexcasting.common.casting.actions.selectors.*; +import at.petrak.hexcasting.common.casting.actions.spells.*; +import at.petrak.hexcasting.common.casting.actions.spells.great.*; +import at.petrak.hexcasting.common.casting.actions.spells.sentinel.*; +import at.petrak.hexcasting.common.casting.actions.stack.*; import at.petrak.hexcasting.common.lib.HexItems; import at.petrak.hexcasting.interop.pehkui.*; import at.petrak.hexcasting.xplat.IXplatAbstractions; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexSpecialHandlers.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexSpecialHandlers.java index ff8da1d0..c69fb936 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexSpecialHandlers.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexSpecialHandlers.java @@ -1,8 +1,8 @@ package at.petrak.hexcasting.common.lib.hex; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; -import at.petrak.hexcasting.common.casting.operators.math.SpecialHandlerNumberLiteral; -import at.petrak.hexcasting.common.casting.operators.stack.SpecialHandlerMask; +import at.petrak.hexcasting.common.casting.actions.math.SpecialHandlerNumberLiteral; +import at.petrak.hexcasting.common.casting.actions.stack.SpecialHandlerMask; import net.minecraft.resources.ResourceLocation; import java.util.LinkedHashMap; diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt index bee371d9..842fdfc3 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt @@ -9,8 +9,8 @@ import at.petrak.hexcasting.api.mod.HexStatistics import at.petrak.hexcasting.common.blocks.behavior.HexComposting import at.petrak.hexcasting.common.blocks.behavior.HexStrippables import at.petrak.hexcasting.common.casting.PatternRegistryManifest -import at.petrak.hexcasting.common.casting.operators.spells.OpFlight -import at.petrak.hexcasting.common.casting.operators.spells.great.OpAltiora +import at.petrak.hexcasting.common.casting.actions.spells.OpFlight +import at.petrak.hexcasting.common.casting.actions.spells.great.OpAltiora import at.petrak.hexcasting.common.command.PatternResLocArgument import at.petrak.hexcasting.common.entities.HexEntities import at.petrak.hexcasting.common.items.ItemJewelerHammer diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java index a28a51af..76477f5e 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java @@ -7,8 +7,8 @@ import at.petrak.hexcasting.api.mod.HexStatistics; import at.petrak.hexcasting.common.blocks.behavior.HexComposting; import at.petrak.hexcasting.common.blocks.behavior.HexStrippables; import at.petrak.hexcasting.common.casting.PatternRegistryManifest; -import at.petrak.hexcasting.common.casting.operators.spells.OpFlight; -import at.petrak.hexcasting.common.casting.operators.spells.great.OpAltiora; +import at.petrak.hexcasting.common.casting.actions.spells.OpFlight; +import at.petrak.hexcasting.common.casting.actions.spells.great.OpAltiora; import at.petrak.hexcasting.common.entities.HexEntities; import at.petrak.hexcasting.common.items.ItemJewelerHammer; import at.petrak.hexcasting.common.lib.*; diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java index 1c1b4410..593ae2bd 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java @@ -1,6 +1,6 @@ package at.petrak.hexcasting.forge.interop.jei; -import at.petrak.hexcasting.common.casting.operators.spells.OpEdifySapling; +import at.petrak.hexcasting.common.casting.actions.spells.OpEdifySapling; import at.petrak.hexcasting.common.lib.HexBlocks; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/HexJEIPlugin.java b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/HexJEIPlugin.java index f841bd11..aa2f11cc 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/HexJEIPlugin.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/HexJEIPlugin.java @@ -1,8 +1,8 @@ package at.petrak.hexcasting.forge.interop.jei; import at.petrak.hexcasting.api.HexAPI; -import at.petrak.hexcasting.common.casting.operators.spells.OpEdifySapling; -import at.petrak.hexcasting.common.casting.operators.spells.OpMakeBattery; +import at.petrak.hexcasting.common.casting.actions.spells.OpEdifySapling; +import at.petrak.hexcasting.common.casting.actions.spells.OpMakeBattery; import at.petrak.hexcasting.common.items.ItemStaff; import at.petrak.hexcasting.common.lib.HexItems; import at.petrak.hexcasting.common.recipe.BrainsweepRecipe; diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/PhialRecipeCategory.java b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/PhialRecipeCategory.java index e8e20b2e..23a4272a 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/PhialRecipeCategory.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/PhialRecipeCategory.java @@ -1,7 +1,7 @@ package at.petrak.hexcasting.forge.interop.jei; import at.petrak.hexcasting.api.mod.HexTags; -import at.petrak.hexcasting.common.casting.operators.spells.OpMakeBattery; +import at.petrak.hexcasting.common.casting.actions.spells.OpMakeBattery; import at.petrak.hexcasting.interop.utils.PhialRecipeStackBuilder; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; From 31b75776056b3cb12905f4c77fbced98ad5b881a Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 15:00:38 +1000 Subject: [PATCH 38/48] added a pattern to cycle the offhand item's variant, haven't documented it since I'm not sure if it should be a temp-dev thing or the actual way of making variants. --- .../api/addldata/ADVariantItem.java | 9 ++++ .../casting/actions/spells/OpCycleVariant.kt | 35 ++++++++++++++++ .../hexcasting/common/lib/hex/HexActions.java | 2 + .../hexcasting/xplat/IXplatAbstractions.java | 3 ++ .../hexcasting/lang/en_us.flatten.json5 | 1 + .../fabric/cc/HexCardinalComponents.java | 10 +++-- .../fabric/cc/adimpl/CCVariantItem.java | 41 +++++++++++++++++++ .../fabric/xplat/FabricXplatImpl.java | 7 ++++ .../forge/cap/ForgeCapabilityHandler.java | 13 ++++-- .../hexcasting/forge/cap/HexCapabilities.java | 7 ++-- .../forge/cap/adimpl/CapItemVariantItem.java | 22 ++++++++++ .../forge/xplat/ForgeXplatImpl.java | 7 ++++ 12 files changed, 145 insertions(+), 12 deletions(-) create mode 100644 Common/src/main/java/at/petrak/hexcasting/api/addldata/ADVariantItem.java create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCycleVariant.kt create mode 100644 Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCVariantItem.java create mode 100644 Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemVariantItem.java diff --git a/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADVariantItem.java b/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADVariantItem.java new file mode 100644 index 00000000..6b1a59f7 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/api/addldata/ADVariantItem.java @@ -0,0 +1,9 @@ +package at.petrak.hexcasting.api.addldata; + +public interface ADVariantItem { + int numVariants(); + int getVariant(); + + + void setVariant(int variant); +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCycleVariant.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCycleVariant.kt new file mode 100644 index 00000000..77105795 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpCycleVariant.kt @@ -0,0 +1,35 @@ +package at.petrak.hexcasting.common.casting.actions.spells + +import at.petrak.hexcasting.api.addldata.ADVariantItem +import at.petrak.hexcasting.api.casting.RenderedSpell +import at.petrak.hexcasting.api.casting.castables.SpellAction +import at.petrak.hexcasting.api.casting.eval.CastingEnvironment +import at.petrak.hexcasting.api.casting.iota.Iota +import at.petrak.hexcasting.api.casting.mishaps.MishapBadOffhandItem +import at.petrak.hexcasting.xplat.IXplatAbstractions +import net.minecraft.world.item.ItemStack + +object OpCycleVariant : SpellAction { + override val argc = 0 + + override fun execute(args: List, ctx: CastingEnvironment): SpellAction.Result { + val (handStack, hand) = ctx.getHeldItemToOperateOn { + IXplatAbstractions.INSTANCE.findVariantHolder(it) != null + } ?: throw MishapBadOffhandItem.of(ItemStack.EMPTY.copy(), null, "variant") // TODO: hack + + val variantHolder = IXplatAbstractions.INSTANCE.findVariantHolder(handStack) + ?: throw MishapBadOffhandItem.of(handStack, hand, "variant") + + return SpellAction.Result( + Spell(variantHolder), + 0, + listOf() + ) + } + + private data class Spell(val variantHolder: ADVariantItem) : RenderedSpell { + override fun cast(ctx: CastingEnvironment) { + variantHolder.variant = (variantHolder.variant + 1) % variantHolder.numVariants() + } + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index a6177b86..3ba88c1d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -222,6 +222,8 @@ public class HexActions { new ActionRegistryEntry(HexPattern.fromAngles("eeeeede", HexDir.SOUTH_WEST), OpPlaceBlock.INSTANCE)); public static final ActionRegistryEntry COLORIZE = make("colorize", new ActionRegistryEntry(HexPattern.fromAngles("awddwqawqwawq", HexDir.EAST), OpColorize.INSTANCE)); + public static final ActionRegistryEntry CYCLE_VARIANT = make("cycle_variant", + new ActionRegistryEntry(HexPattern.fromAngles("dwaawedwewdwe", HexDir.WEST), OpCycleVariant.INSTANCE)); public static final ActionRegistryEntry CREATE_WATER = make("create_water", new ActionRegistryEntry(HexPattern.fromAngles("aqawqadaq", HexDir.SOUTH_EAST), new OpCreateFluid( MediaConstants.DUST_UNIT, diff --git a/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java b/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java index c8a0bcc9..89fb92ec 100644 --- a/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java +++ b/Common/src/main/java/at/petrak/hexcasting/xplat/IXplatAbstractions.java @@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.HexAPI; import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.addldata.ADIotaHolder; import at.petrak.hexcasting.api.addldata.ADMediaHolder; +import at.petrak.hexcasting.api.addldata.ADVariantItem; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; @@ -121,6 +122,8 @@ public interface IXplatAbstractions { @Nullable ADHexHolder findHexHolder(ItemStack stack); + @Nullable ADVariantItem findVariantHolder(ItemStack stack); + // coooollooorrrs boolean isColorizer(ItemStack stack); 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 614e0a2f..6aab57ca 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 @@ -686,6 +686,7 @@ "bottle": "a glass bottle", "rechargable": "a rechargable item", "colorizer": "a pigment", + "variant": "an item with variants" }, bad_block: { "": "Expected %s at %s, but got %s", diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java index 9ca6a46c..fa10b385 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/HexCardinalComponents.java @@ -3,10 +3,7 @@ package at.petrak.hexcasting.fabric.cc; import at.petrak.hexcasting.api.addldata.ADMediaHolder; import at.petrak.hexcasting.api.addldata.ItemDelegatingEntityIotaHolder; import at.petrak.hexcasting.api.casting.iota.DoubleIota; -import at.petrak.hexcasting.api.item.ColorizerItem; -import at.petrak.hexcasting.api.item.HexHolderItem; -import at.petrak.hexcasting.api.item.IotaHolderItem; -import at.petrak.hexcasting.api.item.MediaHolderItem; +import at.petrak.hexcasting.api.item.*; import at.petrak.hexcasting.api.misc.MediaConstants; import at.petrak.hexcasting.api.mod.HexConfig; import at.petrak.hexcasting.common.entities.EntityWallScroll; @@ -60,6 +57,9 @@ public class HexCardinalComponents implements EntityComponentInitializer, ItemCo public static final ComponentKey HEX_HOLDER = ComponentRegistry.getOrCreate(modLoc("hex_holder"), CCHexHolder.class); + public static final ComponentKey VARIANT_ITEM = ComponentRegistry.getOrCreate(modLoc("variant_item"), + CCVariantItem.class); + @Override public void registerEntityComponentFactories(EntityComponentFactoryRegistry registry) { registry.registerFor(Mob.class, BRAINSWEPT, CCBrainswept::new); @@ -108,6 +108,8 @@ public class HexCardinalComponents implements EntityComponentInitializer, ItemCo )); registry.register(i -> i instanceof HexHolderItem, HEX_HOLDER, CCHexHolder.ItemBased::new); + + registry.register(i -> i instanceof VariantItem, VARIANT_ITEM, CCVariantItem.ItemBased::new); } private ComponentFactory wrapItemEntityDelegate(Function new CapItemHexHolder(holder, stack))); } + if (stack.getItem() instanceof VariantItem variantItem) { + evt.addCapability(VARIANT_ITEM_CAP, + provide(stack, HexCapabilities.VARIANT_ITEM, () -> new CapItemVariantItem(variantItem, stack))); + } if (stack.getItem() instanceof ColorizerItem colorizer) { evt.addCapability(PIGMENT_CAP, diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/HexCapabilities.java b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/HexCapabilities.java index 53c3d6b7..fa81e044 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/HexCapabilities.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/HexCapabilities.java @@ -1,9 +1,6 @@ package at.petrak.hexcasting.forge.cap; -import at.petrak.hexcasting.api.addldata.ADColorizer; -import at.petrak.hexcasting.api.addldata.ADHexHolder; -import at.petrak.hexcasting.api.addldata.ADIotaHolder; -import at.petrak.hexcasting.api.addldata.ADMediaHolder; +import at.petrak.hexcasting.api.addldata.*; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; @@ -16,6 +13,8 @@ public final class HexCapabilities { }); public static final Capability STORED_HEX = CapabilityManager.get(new CapabilityToken<>() { }); + public static final Capability VARIANT_ITEM = CapabilityManager.get(new CapabilityToken<>() { + }); public static final Capability COLOR = CapabilityManager.get(new CapabilityToken<>() { }); } diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemVariantItem.java b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemVariantItem.java new file mode 100644 index 00000000..19c54fea --- /dev/null +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/cap/adimpl/CapItemVariantItem.java @@ -0,0 +1,22 @@ +package at.petrak.hexcasting.forge.cap.adimpl; + +import at.petrak.hexcasting.api.addldata.ADVariantItem; +import at.petrak.hexcasting.api.item.VariantItem; +import net.minecraft.world.item.ItemStack; + +public record CapItemVariantItem(VariantItem variantItem, ItemStack stack) implements ADVariantItem { + @Override + public int numVariants() { + return variantItem.numVariants(); + } + + @Override + public int getVariant() { + return variantItem.getVariant(stack); + } + + @Override + public void setVariant(int variant) { + variantItem.setVariant(stack, variant); + } +} 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 f3822e50..20c1a328 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 @@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.HexAPI; import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.addldata.ADIotaHolder; import at.petrak.hexcasting.api.addldata.ADMediaHolder; +import at.petrak.hexcasting.api.addldata.ADVariantItem; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; import at.petrak.hexcasting.api.casting.arithmetic.Arithmetic; import at.petrak.hexcasting.api.casting.castables.SpecialHandler; @@ -332,6 +333,12 @@ public class ForgeXplatImpl implements IXplatAbstractions { return maybeCap.orElse(null); } + @Override + public @Nullable ADVariantItem findVariantHolder(ItemStack stack) { + var maybeCap = stack.getCapability(HexCapabilities.VARIANT_ITEM).resolve(); + return maybeCap.orElse(null); + } + @Override public boolean isColorizer(ItemStack stack) { return stack.getCapability(HexCapabilities.COLOR).isPresent(); From 9157ef5dcb87f8194375ba6c698393257d18d45d Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 20:50:13 +1000 Subject: [PATCH 39/48] reset ops used after each slate when circles are casting. --- .../api/casting/circles/CircleExecutionState.java | 2 +- .../hexcasting/api/casting/eval/env/StaffCastEnv.java | 3 +-- .../petrak/hexcasting/api/casting/eval/vm/CastingImage.kt | 7 ++++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index ace46ac4..0d392058 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -273,7 +273,7 @@ public class CircleExecutionState { Objects.requireNonNull(env.getImpetus()), true); currentPos = found.getFirst(); enteredFrom = found.getSecond(); - currentImage = cont.update; + currentImage = cont.update.withOverriddenUsedOps(0); // reset ops used after each slate finishes executing } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java index 6a656ffc..05310d46 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/StaffCastEnv.java @@ -101,8 +101,7 @@ public class StaffCastEnv extends PlayerBasedCastEnv { IXplatAbstractions.INSTANCE.setStaffcastImage(sender, null); IXplatAbstractions.INSTANCE.setPatterns(sender, List.of()); } else { - var imageWithOpsReset = vm.getImage().copy(vm.getImage().getStack(), vm.getImage().getParenCount(), vm.getImage().getParenthesized(), vm.getImage().getEscapeNext(), 0, vm.getImage().getUserData()); - IXplatAbstractions.INSTANCE.setStaffcastImage(sender, imageWithOpsReset); + IXplatAbstractions.INSTANCE.setStaffcastImage(sender, vm.getImage().withOverriddenUsedOps(0)); if (!resolvedPatterns.isEmpty()) { resolvedPatterns.get(resolvedPatterns.size() - 1).setType(clientInfo.getResolutionType()); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt index 1bd2dfcc..bf58503c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt @@ -34,6 +34,11 @@ data class CastingImage private constructor( */ fun withUsedOp() = this.withUsedOps(1) + /** + * Returns a copy of this with the [opsConsumed] replaced with [count]. + */ + fun withOverriddenUsedOps(count: Long) = this.copy(opsConsumed = count) + fun serializeToNbt() = NBTBuilder { TAG_STACK %= stack.serializeToNBT() @@ -54,7 +59,7 @@ data class CastingImage private constructor( const val TAG_USERDATA = "userdata" @JvmStatic - public fun loadFromNbt(tag: CompoundTag, world: ServerLevel): CastingImage { + fun loadFromNbt(tag: CompoundTag, world: ServerLevel): CastingImage { return try { val stack = mutableListOf() val stackTag = tag.getList(TAG_STACK, Tag.TAG_COMPOUND) From 9b13e218ba3a3a83ab303c99c74c435ebb00dc0a Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Fri, 2 Jun 2023 22:47:30 +1000 Subject: [PATCH 40/48] Made ContinuationIotas not serialise if they're too big. --- .../api/casting/eval/vm/ContinuationFrame.kt | 5 +++++ .../api/casting/eval/vm/FrameEvaluate.kt | 2 ++ .../api/casting/eval/vm/FrameFinishEval.kt | 2 ++ .../api/casting/eval/vm/FrameForEach.kt | 2 ++ .../api/casting/iota/ContinuationIota.java | 14 +++++++++++++- .../petrak/hexcasting/api/casting/iota/Iota.java | 15 +++++++++++++-- .../hexcasting/api/casting/iota/IotaType.java | 2 +- 7 files changed, 38 insertions(+), 4 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt index dae27911..8cb2fcc5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/ContinuationFrame.kt @@ -44,6 +44,11 @@ sealed interface ContinuationFrame { */ fun serializeToNBT(): CompoundTag + /** + * Return the number of iotas contained inside this frame, used for determining whether it is valid to serialise. + */ + fun size(): Int + companion object { @JvmStatic fun fromNBT(tag: CompoundTag, world: ServerLevel): ContinuationFrame { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt index 082b2c68..98914f30 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameEvaluate.kt @@ -48,4 +48,6 @@ data class FrameEvaluate(val list: SpellList, val isMetacasting: Boolean) : Cont "patterns" %= list.serializeToNBT() "isMetacasting" %= isMetacasting } + + override fun size() = list.size() } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt index dd00ad35..c7909d84 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameFinishEval.kt @@ -33,4 +33,6 @@ object FrameFinishEval : ContinuationFrame { override fun serializeToNBT() = NBTBuilder { "type" %= "end" } + + override fun size() = 0 } 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 404000fc..ad162770 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 @@ -84,4 +84,6 @@ data class FrameForEach( "base" %= baseStack.serializeToNBT() "accumulator" %= acc.serializeToNBT() } + + override fun size() = data.size() + code.size() + acc.size + (baseStack?.size ?: 0) } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/ContinuationIota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/ContinuationIota.java index 7fbe6ef4..23ff4bd8 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/ContinuationIota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/ContinuationIota.java @@ -13,7 +13,6 @@ import net.minecraft.nbt.Tag; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.util.List; @@ -57,6 +56,19 @@ public class ContinuationIota extends Iota { return true; } + @Override + public int size() { + var continuation = this.getContinuation(); + var size = 0; + while (continuation instanceof SpellContinuation.NotDone notDone) { + size += 1; + size += notDone.component1().size(); + continuation = notDone.component2(); + } + + return Math.min(size, 1); + } + public static IotaType TYPE = new IotaType<>() { @Override public @NotNull ContinuationIota deserialize(Tag tag, ServerLevel world) throws IllegalArgumentException { diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java index 6533b261..151cc518 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/Iota.java @@ -78,13 +78,24 @@ public abstract class Iota { * This method is called to determine whether the iota is above the max serialisation depth/serialisation count * limits. It should return every "iota" that is a subelement of this iota. * For example, if you implemented a Map<Iota, Iota>, then it should be an iterable over the keys *and* - * values of the map. If you implemented a typed List<Double> iota for some reason, it would - * probably be a good idea to supply an iterable over those doubles mapped to double iotas. + * values of the map. If you implemented a typed List<Double> iota for some reason, you should instad override + * {@link Iota#size}. */ public @Nullable Iterable subIotas() { return null; } + /** + * This method is called to determine whether the iota is above the max serialisation depth/serialisation count limits. + * This is an alternative to deriving subIotas for if your Iota is a datastructure of variable size over something that + * doesn't make sense to convert to an Iota iterable, such as {@link ContinuationIota}, or a typed List<Double>. + * It should return "1" per "iota sized" unit of memory that it would occupy. Easy option, return the element count of + * your data structure. + */ + public int size() { + return 1; + } + public Component display() { return this.type.display(this.serialize()); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/IotaType.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/IotaType.java index fbadc71c..12b376fc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/IotaType.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/iota/IotaType.java @@ -87,7 +87,7 @@ public abstract class IotaType { var sublist = iotaPair.getFirst(); int depth = iotaPair.getSecond(); for (var iota : sublist) { - totalEltsFound++; + totalEltsFound += iota.size(); if (totalEltsFound >= HexIotaTypes.MAX_SERIALIZATION_TOTAL) { return true; // too bad } From 70aaf42d8f9ac5a30c46cc3b70afebc5d20ae489 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Sun, 4 Jun 2023 16:16:11 +1000 Subject: [PATCH 41/48] add bounds checks to arccos and arcsin --- .../common/casting/arithmetic/DoubleArithmetic.kt | 7 ++++--- .../common/casting/arithmetic/operator/OperatorUtils.kt | 9 ++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt index 3e053e0a..57917c22 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/DoubleArithmetic.kt @@ -13,6 +13,7 @@ import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.math.HexPattern import at.petrak.hexcasting.api.casting.mishaps.MishapDivideByZero import at.petrak.hexcasting.common.casting.arithmetic.operator.OperatorLog +import at.petrak.hexcasting.common.casting.arithmetic.operator.asDoubleBetween import at.petrak.hexcasting.common.lib.hex.HexIotaTypes import java.util.function.DoubleBinaryOperator import java.util.function.DoubleUnaryOperator @@ -51,7 +52,7 @@ object DoubleArithmetic : Arithmetic { override fun getOperator(pattern: HexPattern): Operator { return when (pattern) { - ADD -> make2 { a, b -> java.lang.Double.sum(a, b) } + ADD -> make2 { a, b -> a + b } SUB -> make2 { a, b -> a - b } MUL -> make2 { a, b -> a * b } DIV -> make2 { a, b -> if (b == 0.0) throw MishapDivideByZero.of(a, b) else a / b } @@ -62,8 +63,8 @@ object DoubleArithmetic : Arithmetic { SIN -> make1 { a -> sin(a) } COS -> make1 { a -> cos(a) } TAN -> make1 { a -> if (cos(a) == 0.0) throw MishapDivideByZero.tan(a) else tan(a) } - ARCSIN -> make1 { a -> asin(a) } - ARCCOS -> make1 { a -> acos(a) } + ARCSIN -> make1 { a -> asin(a.asDoubleBetween(-1.0, 1.0, 0)) } + ARCCOS -> make1 { a -> acos(a.asDoubleBetween(-1.0, 1.0, 0)) } ARCTAN -> make1 { a -> atan(a) } ARCTAN2 -> make2 { a, b -> atan2(a, b) } LOG -> OperatorLog diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt index ffbcc042..24247286 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/OperatorUtils.kt @@ -57,4 +57,11 @@ fun Iterator>.nextPositiveIntUnderInclusive(max: Int, argc: I } } throw MishapInvalidIota.of(x, if (argc == 0) idx else argc - (idx + 1), "int.positive.less.equal", max) -} \ No newline at end of file +} + +/** + * Returns the double if it is between [min] and [max] (inclusive), and throws a mishap otherwise. [idx] should be + * the double's index from the top of the stack (i.e. top iota has [idx]=0, second from the top has [idx]=1, etc.). + */ +fun Double.asDoubleBetween(min: Double, max: Double, idx: Int) = if (this in min .. max) this + else throw MishapInvalidIota.of(DoubleIota(this), idx, "double.between", min, max) \ No newline at end of file From 798bb79acbb9daff808e549d657e92b54ab4d035 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Sun, 4 Jun 2023 16:23:39 +1000 Subject: [PATCH 42/48] added documentation for Evanition. --- .../assets/hexcasting/lang/en_us.flatten.json5 | 4 +++- .../en_us/entries/patterns/patterns_as_iotas.json | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) 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 9f38c164..2d8560ab 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 @@ -587,6 +587,7 @@ "open_paren": "Introspection", "close_paren": "Retrospection", "escape": "Consideration", + "undo": "Evanition" }, "iota.hexcasting:": { "null": "Null", @@ -947,7 +948,7 @@ "influences.1": "Influences are ... strange, to say the least. Whereas most iotas seem to represent something about the world, influences represent something more... abstract, or formless.$(br2)For example, one influence I've named $(l:casting/influences)$(thing)Null/$ seems to represent nothing at all. It's created when there isn't a suitable answer to a question asked, such as an $(l:patterns/basics#hexcasting:raycast)$(action)Archer's Distillation/$ facing the sky.", - "influences.2": "In addition, I've discovered a curious triplet of influences I've named $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Consideration/$, $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Introspection/$, and $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$. They seem to have properties of both patterns and other influences, yet act very differently. I can use these to add patterns to my stack as iotas, instead of matching them to actions. $(l:patterns/patterns_as_iotas)My notes on the subject are here/$.", + "influences.2": "In addition, I've discovered a curious triplet of influences I've named $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Consideration/$, $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Introspection/$, $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$, and $(l:patterns/patterns_as_iotas#hexcasting:undo)$(action)Evanition/$. They seem to have properties of both patterns and other influences, yet act very differently. I can use these to add patterns to my stack as iotas, instead of matching them to actions. $(l:patterns/patterns_as_iotas)My notes on the subject are here/$.", "influences.3": "Finally, there seems to be an infinite family of influences that just seem to be a tangled mess of _media. I've named them $(l:casting/influences)$(action)Garbage/$, as they are completely useless. They seem to appear in my stack at various places in response to $(l:casting/mishaps)$(thing)mishaps/$, and appear to my senses as a nonsense jumble.", @@ -1273,6 +1274,7 @@ "patterns_as_iotas.parens.1": "Drawing $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Introspection/$ makes my drawing of patterns act differently, for a time. Until I draw $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Retrospection/$, the patterns I draw are saved. Then, when I draw $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$, they are added to the stack as a list iota.", "patterns_as_iotas.parens.2": "If I draw another $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Introspection/$, it'll still be saved to the list, but I'll then have to draw $(italic)two/$ $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospections/$ to get back to normal casting.", "patterns_as_iotas.parens.3": "Also, I can escape the special behavior of $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Intro-/$ and $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$ by drawing a $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Consideration/$ before them, which will simply add them to the list without affecting which the number of $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospections/$ I need to return to casting.$(br2)If I draw two $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Considerations/$ in a row while $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)introspecting/$, it will add a single $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Consideration/$ to the list.", + "patterns_as_iotas.undo": "Finally, if I make a mistake while drawning patterns inside $(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)Intro-/$ and $(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)Retrospection/$ I can draw $(l:patterns/patterns_as_iotas#hexcasting:undo)$(action)Evanition/$ to remove the last pattern that I drew from the pattern list that is being constructed.", "readwrite.1": "This section deals with the storage of $(thing)Iotas/$ in a more permanent medium. Nearly any iota can be stored to a suitable item, such as a $(l:items/focus)$(item)Focus/$ or $(l:items/spellbook)$(item)Spellbook/$), and read back later. Certain items, such as an $(l:items/abacus)$(item)Abacus/$, can only be read from.$(br2)Iotas are usually read and written from the other hand, but it is also possible to read and write with an item when it is sitting on the ground as an item entity, or when in an item frame.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/patterns_as_iotas.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/patterns_as_iotas.json index 139c4235..0bcd8569 100644 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/patterns_as_iotas.json +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/patterns_as_iotas.json @@ -51,6 +51,16 @@ { "type": "patchouli:text", "text": "hexcasting.page.patterns_as_iotas.parens.3" + }, + { + "type": "hexcasting:manual_pattern", + "header": "hexcasting.rawhook.hexcasting:undo", + "anchor": "hexcasting:undo", + "text": "hexcasting.page.patterns_as_iotas.undo", + "patterns": { + "startdir": "EAST", + "signature": "eeedw" + } } ] } From e50f2331762456799a160663202270248b3b175b Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Sun, 4 Jun 2023 17:17:33 +1000 Subject: [PATCH 43/48] made Evanition interact properly with unescaped and escaped introspection/retrospections. --- .../api/casting/eval/vm/CastingImage.kt | 41 ++++++++++++++++--- .../api/casting/eval/vm/CastingVM.kt | 18 +++++--- .../petrak/hexcasting/api/utils/HexUtils.kt | 16 ++++++++ .../hexcasting/client/gui/GuiSpellcasting.kt | 2 +- 4 files changed, 65 insertions(+), 12 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt index bf58503c..d04b1c29 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/CastingImage.kt @@ -1,10 +1,14 @@ package at.petrak.hexcasting.api.casting.eval.vm import at.petrak.hexcasting.api.HexAPI +import at.petrak.hexcasting.api.casting.eval.vm.CastingImage.ParenthesizedIota.Companion.TAG_ESCAPED +import at.petrak.hexcasting.api.casting.eval.vm.CastingImage.ParenthesizedIota.Companion.TAG_IOTAS import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.iota.IotaType +import at.petrak.hexcasting.api.casting.iota.ListIota import at.petrak.hexcasting.api.utils.* import net.minecraft.nbt.CompoundTag +import net.minecraft.nbt.ListTag import net.minecraft.nbt.Tag import net.minecraft.server.level.ServerLevel import net.minecraft.world.entity.Entity @@ -16,7 +20,7 @@ data class CastingImage private constructor( val stack: List, val parenCount: Int, - val parenthesized: List, + val parenthesized: List, val escapeNext: Boolean, val opsConsumed: Long, @@ -24,6 +28,30 @@ data class CastingImage private constructor( ) { constructor() : this(listOf(), 0, listOf(), false, 0, CompoundTag()) + data class ParenthesizedIota(val iota: Iota, val escaped: Boolean) { + companion object { + const val TAG_IOTAS = "iotas" + const val TAG_ESCAPED = "escaped" + } + } + + /** + * Returns an empty list if it's too complicated. + */ + private fun Iterable.serializeToNBT(): CompoundTag { + val tag = CompoundTag() + + if (IotaType.isTooLargeToSerialize(this.map { it.iota })) { + tag.put(TAG_IOTAS, ListTag()) + tag.put(TAG_ESCAPED, ListTag()) + } else { + tag.put(TAG_IOTAS, ListIota(this.map { it.iota }).serialize()) + tag.put(TAG_ESCAPED, this.map { it.escaped }.serializeToNBT()) + } + + return tag + } + /** * Return a copy of this with the given number of ops additionally exhausted */ @@ -74,10 +102,13 @@ data class CastingImage private constructor( CompoundTag() } - val parenthesized = mutableListOf() - val parenTag = tag.getList(TAG_PARENTHESIZED, Tag.TAG_COMPOUND) - for (subtag in parenTag) { - parenthesized.add(IotaType.deserialize(subtag.downcast(CompoundTag.TYPE), world)) + val parenthesized = mutableListOf() + val parenTag = tag.getCompound(TAG_PARENTHESIZED) + val parenIotasTag = parenTag.getList(TAG_IOTAS, Tag.TAG_COMPOUND) + val parenEscapedTag = parenTag.getByteArray(TAG_ESCAPED) + + for ((subtag, isEscapedByte) in parenIotasTag.zipWithDefault(parenEscapedTag) { _ -> 0 }) { + parenthesized.add(ParenthesizedIota(IotaType.deserialize(subtag.downcast(CompoundTag.TYPE), world), isEscapedByte != 0.toByte())) } val parenCount = tag.getInt(TAG_PAREN_COUNT) 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 9d12b259..f2bcce36 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 @@ -5,6 +5,7 @@ import at.petrak.hexcasting.api.casting.PatternShapeMatch.* import at.petrak.hexcasting.api.casting.SpellList import at.petrak.hexcasting.api.casting.eval.* import at.petrak.hexcasting.api.casting.eval.sideeffects.OperatorSideEffect +import at.petrak.hexcasting.api.casting.eval.vm.CastingImage.ParenthesizedIota import at.petrak.hexcasting.api.casting.iota.Iota import at.petrak.hexcasting.api.casting.iota.IotaType import at.petrak.hexcasting.api.casting.iota.ListIota @@ -156,7 +157,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { val out = if (displayDepth > 0) { if (this.image.escapeNext) { val newParens = this.image.parenthesized.toMutableList() - newParens.add(iota) + newParens.add(ParenthesizedIota(iota, true)) this.image.copy( escapeNext = false, parenthesized = newParens @@ -173,13 +174,18 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { SpecialPatterns.EVANITION.anglesSignature() -> { val newParens = this.image.parenthesized.toMutableList() val last = newParens.removeLastOrNull() - this.image.copy(parenthesized = newParens) to if (last == null) ResolvedPatternType.ERRORED else ResolvedPatternType.UNDONE + val newParenCount = this.image.parenCount + if (last == null || last.escaped || last.iota !is PatternIota) 0 else when (last.iota.pattern) { + SpecialPatterns.INTROSPECTION -> -1 + SpecialPatterns.RETROSPECTION -> 1 + else -> -1 + } + this.image.copy(parenthesized = newParens, parenCount = newParenCount) to if (last == null) ResolvedPatternType.ERRORED else ResolvedPatternType.UNDONE } SpecialPatterns.INTROSPECTION.anglesSignature() -> { // we have escaped the parens onto the stack; we just also record our count. val newParens = this.image.parenthesized.toMutableList() - newParens.add(iota) + newParens.add(ParenthesizedIota(iota, false)) this.image.copy( parenthesized = newParens, parenCount = this.image.parenCount + 1 @@ -191,7 +197,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { displayDepth-- if (newParenCount == 0) { val newStack = this.image.stack.toMutableList() - newStack.add(ListIota(this.image.parenthesized.toList())) + newStack.add(ListIota(this.image.parenthesized.toList().map { it.iota })) this.image.copy( stack = newStack, parenCount = newParenCount, @@ -203,7 +209,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { // we have this situation: "(()" // we need to add the close paren val newParens = this.image.parenthesized.toMutableList() - newParens.add(iota) + newParens.add(ParenthesizedIota(iota, false)) this.image.copy( parenCount = newParenCount, parenthesized = newParens @@ -213,7 +219,7 @@ class CastingVM(var image: CastingImage, val env: CastingEnvironment) { else -> { val newParens = this.image.parenthesized.toMutableList() - newParens.add(iota) + newParens.add(ParenthesizedIota(iota, false)) this.image.copy( parenthesized = newParens ) to ResolvedPatternType.ESCAPED diff --git a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt index 19b6fe0a..20929776 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/utils/HexUtils.kt @@ -267,6 +267,22 @@ fun Iterable.serializeToNBT() = else ListIota(this.toList()).serialize() +fun Iterable.serializeToNBT(): ByteArrayTag { + val out = ByteArray(if (this is Collection<*>) this.size else 10) + for ((i, b) in this.withIndex()) { + out[i] = if (b) 1 else 0 + } + return ByteArrayTag(out) +} + +fun List.zipWithDefault(array: ByteArray, default: (idx: Int) -> Byte): List> { + val list = ArrayList>(this.size) + var i = 0 + for (element in this) list.add(element to array.getOrElse(i++, default)) + + return list +} + // Copy the impl from forge fun ItemStack.serializeToNBT(): CompoundTag { val out = CompoundTag() diff --git a/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt b/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt index 8979b55f..321915fc 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt +++ b/Common/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt @@ -69,7 +69,7 @@ class GuiSpellcasting constructor( // TODO this is the kinda hacky bit if (info.resolutionType == ResolvedPatternType.UNDONE) { - this.patterns.getOrNull(index - 1)?.let { it.type = ResolvedPatternType.UNDONE } + this.patterns.reversed().drop(1).firstOrNull { it.type == ResolvedPatternType.ESCAPED }?.let { it.type = ResolvedPatternType.UNDONE } this.patterns.getOrNull(index)?.let { it.type = ResolvedPatternType.EVALUATED } } else this.patterns.getOrNull(index)?.let { it.type = info.resolutionType From 3be1da94d419372f0836cbe1e12bd9fcd75a8e1f Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Sun, 4 Jun 2023 22:34:19 +1000 Subject: [PATCH 44/48] added a bunchh more decoration blocks; the way that I've extended the BlockEntityQuenchedAllayRenderer is kinda hacky --- .../8f7cd5c924d3264b7777ef1696459761f9a70902 | 24 ++++++- .../d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 | 62 ++++++++++++++++-- .../blockstates/amethyst_bricks.json | 7 ++ .../blockstates/amethyst_bricks_small.json | 7 ++ .../blockstates/amethyst_pillar.json | 30 +++++++++ .../blockstates/amethyst_tiles.json | 2 +- .../blockstates/edified_log_amethyst.json | 16 +++++ .../blockstates/edified_log_aventurine.json | 16 +++++ .../blockstates/edified_log_citrine.json | 16 +++++ .../blockstates/edified_log_purple.json | 16 +++++ .../blockstates/quenched_allay_bricks.json | 7 ++ .../quenched_allay_bricks_small.json | 7 ++ .../blockstates/quenched_allay_tiles.json | 7 ++ .../blockstates/slate_amethyst_bricks.json | 15 +++++ .../slate_amethyst_bricks_small.json | 15 +++++ .../blockstates/slate_amethyst_pillar.json | 16 +++++ .../blockstates/slate_amethyst_tiles.json | 7 ++ .../hexcasting/blockstates/slate_bricks.json | 7 ++ .../blockstates/slate_bricks_small.json | 7 ++ .../hexcasting/blockstates/slate_pillar.json | 16 +++++ .../hexcasting/blockstates/slate_tiles.json | 7 ++ .../models/block/deco/amethyst_bricks.json | 6 ++ .../block/deco/amethyst_bricks_small.json | 6 ++ .../models/block/deco/amethyst_pillar.json | 8 +++ .../models/block/deco/amethyst_tiles.json | 6 ++ .../block/deco/quenched_allay_bricks_0.json | 6 ++ .../block/deco/quenched_allay_bricks_1.json | 6 ++ .../block/deco/quenched_allay_bricks_2.json | 6 ++ .../block/deco/quenched_allay_bricks_3.json | 6 ++ .../deco/quenched_allay_bricks_small_0.json | 6 ++ .../deco/quenched_allay_bricks_small_1.json | 6 ++ .../deco/quenched_allay_bricks_small_2.json | 6 ++ .../deco/quenched_allay_bricks_small_3.json | 6 ++ .../block/deco/quenched_allay_tiles_0.json | 6 ++ .../block/deco/quenched_allay_tiles_1.json | 6 ++ .../block/deco/quenched_allay_tiles_2.json | 6 ++ .../block/deco/quenched_allay_tiles_3.json | 6 ++ .../block/deco/slate_amethyst_bricks_0.json | 6 ++ .../block/deco/slate_amethyst_bricks_1.json | 6 ++ .../block/deco/slate_amethyst_bricks_2.json | 6 ++ .../deco/slate_amethyst_bricks_small_0.json | 6 ++ .../deco/slate_amethyst_bricks_small_1.json | 6 ++ .../deco/slate_amethyst_bricks_small_2.json | 6 ++ .../block/deco/slate_amethyst_tiles.json | 6 ++ .../models/block/deco/slate_bricks.json | 6 ++ .../models/block/deco/slate_bricks_small.json | 6 ++ .../slate_tiles.json} | 2 +- .../models/block/edified_log_amethyst.json | 7 ++ .../edified_log_amethyst_horizontal.json | 7 ++ .../models/block/edified_log_aventurine.json | 7 ++ .../edified_log_aventurine_horizontal.json | 7 ++ .../models/block/edified_log_citrine.json | 7 ++ .../block/edified_log_citrine_horizontal.json | 7 ++ .../models/block/edified_log_purple.json | 7 ++ .../block/edified_log_purple_horizontal.json | 7 ++ .../models/block/quenched_allay_bricks.json | 6 ++ .../block/quenched_allay_bricks_small.json | 6 ++ .../models/block/quenched_allay_tiles.json | 6 ++ .../models/block/slate_amethyst_pillar.json | 7 ++ .../slate_amethyst_pillar_horizontal.json | 7 ++ .../hexcasting/models/block/slate_pillar.json | 7 ++ .../models/block/slate_pillar_horizontal.json | 7 ++ .../models/item/amethyst_bricks.json | 3 + .../models/item/amethyst_bricks_small.json | 3 + .../models/item/amethyst_pillar.json | 3 + .../models/item/amethyst_tiles.json | 2 +- .../models/item/edified_log_amethyst.json | 3 + .../models/item/edified_log_aventurine.json | 3 + .../models/item/edified_log_citrine.json | 3 + .../models/item/edified_log_purple.json | 3 + .../models/item/quenched_allay_bricks.json | 28 ++++++++ .../item/quenched_allay_bricks_small.json | 28 ++++++++ .../models/item/quenched_allay_tiles.json | 28 ++++++++ .../models/item/slate_amethyst_bricks.json | 3 + .../item/slate_amethyst_bricks_small.json | 3 + .../models/item/slate_amethyst_pillar.json | 3 + .../models/item/slate_amethyst_tiles.json | 3 + .../hexcasting/models/item/slate_bricks.json | 3 + .../models/item/slate_bricks_small.json | 3 + .../hexcasting/models/item/slate_pillar.json | 3 + .../hexcasting/models/item/slate_tiles.json | 3 + .../client/RegisterClientStuff.java | 50 ++++++++++---- .../be/BlockEntityQuenchedAllayRenderer.java | 7 +- .../common/blocks/BlockQuenchedAllay.java | 2 +- .../blocks/behavior/HexStrippables.java | 4 ++ .../decoration/BlockAmethystDirectional.java | 36 ++++++++++ .../entity/BlockEntityQuenchedAllay.java | 11 +++- .../common/lib/HexBlockEntities.java | 24 ++++++- .../hexcasting/common/lib/HexBlocks.java | 41 ++++++++++-- .../common/misc/AkashicTreeGrower.java | 18 +++-- .../hexcasting/datagen/HexLootTables.java | 15 +++-- .../datagen/recipe/HexplatRecipes.java | 37 +++++++---- .../datagen/tag/HexBlockTagProvider.java | 26 ++++++-- .../textures/block/deco/amethyst_bricks.png | Bin 0 -> 298 bytes .../block/deco/amethyst_bricks_small.png | Bin 0 -> 315 bytes .../block/deco/amethyst_pillar_bottom.png | Bin 0 -> 411 bytes .../block/deco/amethyst_pillar_side.png | Bin 0 -> 380 bytes .../block/deco/amethyst_pillar_top.png | Bin 0 -> 465 bytes .../textures/block/deco/amethyst_tiles.png | Bin 0 -> 371 bytes .../block/deco/edified_log_amethyst.png | Bin 0 -> 656 bytes .../block/deco/edified_log_aventurine.png | Bin 0 -> 625 bytes .../block/deco/edified_log_citrine.png | Bin 0 -> 610 bytes .../block/deco/edified_log_purple.png | Bin 0 -> 650 bytes .../block/deco/quenched_allay_bricks_0.png | Bin 0 -> 372 bytes .../block/deco/quenched_allay_bricks_1.png | Bin 0 -> 345 bytes .../block/deco/quenched_allay_bricks_2.png | Bin 0 -> 433 bytes .../block/deco/quenched_allay_bricks_3.png | Bin 0 -> 456 bytes .../deco/quenched_allay_bricks_small_0.png | Bin 0 -> 419 bytes .../deco/quenched_allay_bricks_small_1.png | Bin 0 -> 413 bytes .../deco/quenched_allay_bricks_small_2.png | Bin 0 -> 423 bytes .../deco/quenched_allay_bricks_small_3.png | Bin 0 -> 400 bytes .../block/deco/quenched_allay_tiles_0.png | Bin 0 -> 444 bytes .../block/deco/quenched_allay_tiles_1.png | Bin 0 -> 478 bytes .../block/deco/quenched_allay_tiles_2.png | Bin 0 -> 453 bytes .../block/deco/quenched_allay_tiles_3.png | Bin 0 -> 467 bytes .../block/deco/slate_amethyst_bricks_0.png | Bin 0 -> 326 bytes .../block/deco/slate_amethyst_bricks_1.png | Bin 0 -> 311 bytes .../block/deco/slate_amethyst_bricks_2.png | Bin 0 -> 347 bytes .../deco/slate_amethyst_bricks_small_0.png | Bin 0 -> 347 bytes .../deco/slate_amethyst_bricks_small_1.png | Bin 0 -> 332 bytes .../deco/slate_amethyst_bricks_small_2.png | Bin 0 -> 320 bytes .../block/deco/slate_amethyst_pillar_end.png | Bin 0 -> 437 bytes .../block/deco/slate_amethyst_pillar_side.png | Bin 0 -> 389 bytes .../block/deco/slate_amethyst_tiles.png | Bin 0 -> 425 bytes .../textures/block/deco/slate_bricks.png | Bin 0 -> 259 bytes .../block/deco/slate_bricks_small.png | Bin 0 -> 267 bytes .../textures/block/deco/slate_pillar_end.png | Bin 0 -> 381 bytes .../textures/block/deco/slate_pillar_side.png | Bin 0 -> 329 bytes .../textures/block/deco/slate_tiles.png | Bin 0 -> 218 bytes .../hexcasting/fabric/FabricHexInitializer.kt | 4 ++ .../fabric/interop/emi/EmiEdifyRecipe.java | 8 ++- .../xplat/HexBlockStatesAndModels.java | 37 ++++++++++- .../forge/datagen/xplat/HexItemModels.java | 21 ++++++ .../interop/jei/EdifyRecipeCategory.java | 6 +- 134 files changed, 975 insertions(+), 66 deletions(-) create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_amethyst.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_aventurine.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_citrine.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_purple.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/blockstates/slate_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks_small.json rename Common/src/generated/resources/assets/hexcasting/models/block/{amethyst_tiles.json => deco/slate_tiles.json} (57%) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst_horizontal.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine_horizontal.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine_horizontal.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple_horizontal.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar_horizontal.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar_horizontal.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/amethyst_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/edified_log_amethyst.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/edified_log_aventurine.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/edified_log_citrine.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/edified_log_purple.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_tiles.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks_small.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_pillar.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/slate_tiles.json create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/blocks/decoration/BlockAmethystDirectional.java create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_bricks.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_bricks_small.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_pillar_bottom.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_pillar_side.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_pillar_top.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_tiles.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_amethyst.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_aventurine.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_citrine.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_purple.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_3.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_3.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_3.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_small_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_small_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_small_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_pillar_end.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_pillar_side.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_tiles.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_bricks.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_bricks_small.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_pillar_end.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_pillar_side.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_tiles.png diff --git a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 index 30f2014b..60558fda 100644 --- a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 +++ b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 @@ -1,4 +1,16 @@ -// 1.19.2 2023-06-02T14:09:23.4990502 Item Models: hexcasting +// 1.19.2 2023-06-04T21:59:01.7641342 Item Models: hexcasting +2fc68dcd6d73da3deaa6a33240dd9160a2b79592 assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json +d59af7a48b20b210240b26115fb172d6202f9254 assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json +a62eeebbca2d145c22f25725bd848ed4d673cefa assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json +90e14c7ae44f667810fa5d31af5fd02cb575c13a assets/hexcasting/models/block/deco/quenched_allay_bricks_3.json +669d9348f4581dae45c35268a760675509a89a29 assets/hexcasting/models/block/deco/quenched_allay_bricks_small_0.json +bb65f6b36336fb4746e749a2b248e521ff24f901 assets/hexcasting/models/block/deco/quenched_allay_bricks_small_1.json +39b54b608cdf5e959a5c115379e45aaf590a254a assets/hexcasting/models/block/deco/quenched_allay_bricks_small_2.json +da0aee7c9516804372262165dc5aab16bd1c6ce6 assets/hexcasting/models/block/deco/quenched_allay_bricks_small_3.json +bacd99e8c24b9ce004e8aeff509cca4b971f3ed9 assets/hexcasting/models/block/deco/quenched_allay_tiles_0.json +1b272b737dea8a856c63e253359863dff7ec7e54 assets/hexcasting/models/block/deco/quenched_allay_tiles_1.json +9840fe9648aedd03ecda485e7c6466bbe2a418ba assets/hexcasting/models/block/deco/quenched_allay_tiles_2.json +71abe574694be3f0be75433068bae0489bae5055 assets/hexcasting/models/block/deco/quenched_allay_tiles_3.json 9af2754cb1e53eeaa85618cf92651b4878cf62b1 assets/hexcasting/models/block/quenched_allay_0.json de4ff723b4332d4e26bd01f74e0485e28c9a2178 assets/hexcasting/models/block/quenched_allay_1.json 4c29163e07f3a903017e38a9cc102f4b37db20b1 assets/hexcasting/models/block/quenched_allay_2.json @@ -6,6 +18,7 @@ de4ff723b4332d4e26bd01f74e0485e28c9a2178 assets/hexcasting/models/block/quenched f2156b3a7041cf99891b528393db64c6b9ca1a4f assets/hexcasting/models/item/abacus.json 19730853397b109cfedd0c3bbda83d5de6cd15b9 assets/hexcasting/models/item/akashic_record.json 8c735feff09d46d00ed681311f46f61a50cfdc9b assets/hexcasting/models/item/amethyst_dust.json +fbb8706993fbc3246c56b9f3eb274ff8968b70f8 assets/hexcasting/models/item/amethyst_pillar.json 87e7ee44cdd0808a3dd72babfd1db716df2bcdfe assets/hexcasting/models/item/artifact.json 1cd1b4d002d1a9a044ceab7cca842e4a2b7bd2f4 assets/hexcasting/models/item/artifact_0_filled.json 4709e65d8e74cf45b3ba014bdf70373728cccc78 assets/hexcasting/models/item/artifact_1.json @@ -64,6 +77,10 @@ de7f7dec75da3170672de5c46a87ff47297db12b assets/hexcasting/models/item/dye_color f867a3b2bbc117a782d49f0819b60f4727d1f483 assets/hexcasting/models/item/edified_button.json c9faada6299f388afc2d2798843d2b45159950d1 assets/hexcasting/models/item/edified_door.json 7f22e012a844cc2c5e30b0fcbdc2e7e4afac1c40 assets/hexcasting/models/item/edified_log.json +8197108bfba4b5963e3c0b1e76a04b8a0d6aae03 assets/hexcasting/models/item/edified_log_amethyst.json +7d6bd7d94d4417f85444c387fc34d9b6947858f1 assets/hexcasting/models/item/edified_log_aventurine.json +c13f4b5b9e57224107c7f7c00928a6873b437245 assets/hexcasting/models/item/edified_log_citrine.json +2415591623223d1cb1a4ac2aeb2d1337694fa9a9 assets/hexcasting/models/item/edified_log_purple.json 6b2c9d4aca0c869d7e18707c22b00c14e1d30f0c assets/hexcasting/models/item/edified_pressure_plate.json 31b4d60ff15a6d6de7aecb6feeba25a366bba2fd assets/hexcasting/models/item/edified_slab.json 2584421c2e9e1cdf22a703018b54cf449613d7d9 assets/hexcasting/models/item/edified_stairs.json @@ -130,7 +147,10 @@ d60b723c44183b59cbadfd02a911dab5e89e0e61 assets/hexcasting/models/item/pride_col c67e74e2a323872c3b34b113df99da8b77a501c6 assets/hexcasting/models/item/pride_colorizer_plural.json 7c4191ec2479b0a67e578da49d459deea8294ec4 assets/hexcasting/models/item/pride_colorizer_transgender.json 5038e069909e2dcf8664bcde81b229c8e27191ae assets/hexcasting/models/item/quenched_allay.json +6bef352b86abdaf9ce4f4942f01e746aa7cc62a2 assets/hexcasting/models/item/quenched_allay_bricks.json +c9aab9c7c0483766c670cfda7916323473e3c097 assets/hexcasting/models/item/quenched_allay_bricks_small.json a8859c93236b88f9ed46a4957f5723965ce04e03 assets/hexcasting/models/item/quenched_allay_shard.json +812d5b11011c52dc5ce97040f9df5125c0542d10 assets/hexcasting/models/item/quenched_allay_tiles.json 8105007d186fe2c6bea6958dd85d1b2ed3cecb58 assets/hexcasting/models/item/quenched_shard_0.json aef7d4b759bcc8a1d5b886b8a0170657e447a8d8 assets/hexcasting/models/item/quenched_shard_1.json 4a08374ef00de51381df9659488cb305e7c8674f assets/hexcasting/models/item/quenched_shard_2.json @@ -145,7 +165,9 @@ e5e1c3116c97deeee0ab5e87178043f4f1b53bea assets/hexcasting/models/item/scroll_an e4dd5a16b9914044c1721df150e02b657835d97b assets/hexcasting/models/item/scroll_pristine_small.json c809785d09b2545dac68d4a10b1e576454dd51e7 assets/hexcasting/models/item/scroll_small.json 9b82beea7667a8f9de3d1e8df136bb2034ed51a8 assets/hexcasting/models/item/slate.json +973361a2dd2ba5f3cd9fe2104f7ead43b085acc8 assets/hexcasting/models/item/slate_amethyst_pillar.json 612d4c65fb907c75975659edf00c7d92bf1b43d8 assets/hexcasting/models/item/slate_blank.json +96c85c64446072761910774b36924436c637faab assets/hexcasting/models/item/slate_pillar.json e6452f95b60240e0067769d7f32a0b9fa7718a1b assets/hexcasting/models/item/slate_written.json 34abd8e443c028eeb24535b685cb3876f7235c23 assets/hexcasting/models/item/spellbook.json 2c23e0ce8a59f0f143ab514f46251e39fae39d6e assets/hexcasting/models/item/spellbook_0_filled.json diff --git a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 index c3cdd973..0f4cbf37 100644 --- a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 +++ b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 @@ -1,11 +1,14 @@ -// 1.19.2 2023-06-02T13:11:35.7728131 Block States: hexcasting +// 1.19.2 2023-06-04T22:11:58.5791186 Block States: hexcasting 901e38574bdaa40ea4a0f6e773a88a95d9c03e55 assets/hexcasting/blockstates/akashic_bookshelf.json 32a77ef668198002563d68be35a24fa93c8d454a assets/hexcasting/blockstates/akashic_connector.json 85080ce0a0387583a839e4788517d675a1a35e24 assets/hexcasting/blockstates/akashic_record.json +04221253f80c85d1e19e9688cae5039f257c8d63 assets/hexcasting/blockstates/amethyst_bricks.json +3b4d0e25a44b9ac1582a969bdd435c3d436b8ba8 assets/hexcasting/blockstates/amethyst_bricks_small.json 1919f303e32e4ea395caa26c1e08c65cd2641e95 assets/hexcasting/blockstates/amethyst_dust_block.json d422119401df3daae032f86ea740b6065a92c44c assets/hexcasting/blockstates/amethyst_edified_leaves.json +25990c171a75164aa282a23acae949b17173426d assets/hexcasting/blockstates/amethyst_pillar.json 276a70fa0e2b94ec3e2218015842b6e315157283 assets/hexcasting/blockstates/amethyst_sconce.json -8b35482fc7d38211847ee2e18b8df56cc06dece2 assets/hexcasting/blockstates/amethyst_tiles.json +09b6b22fecc577c4fcf4f7ad49f5d6907ef3d10a assets/hexcasting/blockstates/amethyst_tiles.json 65f7a4db6fa7616374ff814624231aec859d0a71 assets/hexcasting/blockstates/ancient_scroll_paper.json 236496e910696b68480a7b8a977434213fa2197a assets/hexcasting/blockstates/ancient_scroll_paper_lantern.json 2f2eb1130119f6d5f17a98082b727ec7a2ea5334 assets/hexcasting/blockstates/aventurine_edified_leaves.json @@ -17,6 +20,10 @@ b76cc8a2d66700417046c0dc671badd9af3eb519 assets/hexcasting/blockstates/directrix e125b73869a438bafa7f47cfa4c8d837e2463c6f assets/hexcasting/blockstates/edified_button.json 749d29dc5e11aeba703022dd66aad939d211a3b9 assets/hexcasting/blockstates/edified_door.json 9080ec8bb4142aa3f80775fb017d821585cdfeba assets/hexcasting/blockstates/edified_log.json +b9bbfe3288a699ef51ee0d21ec8e335f811353ca assets/hexcasting/blockstates/edified_log_amethyst.json +fc0f4407ef06ac962b5985db31800e05c8f1d1be assets/hexcasting/blockstates/edified_log_aventurine.json +56a1a09d9e755d5db882fad46c2c603037148f24 assets/hexcasting/blockstates/edified_log_citrine.json +1c6a336f3e975ef6c74a62f49f98af601f979a76 assets/hexcasting/blockstates/edified_log_purple.json 2a894cc506928113c967e65281950d91ca73ec50 assets/hexcasting/blockstates/edified_panel.json 61abf0ff91d33d51f2c1e0b5aace5580ad3ec5af assets/hexcasting/blockstates/edified_planks.json b2c7e0d8dd5ef0e942a28363649a88e268f36ce2 assets/hexcasting/blockstates/edified_pressure_plate.json @@ -30,10 +37,21 @@ b4c85725c8cddadffe0b80586dcd35a8d08b7f47 assets/hexcasting/blockstates/impetus/e d2c41f2997d018f2e8e095508378e6d9aa8d7b6c assets/hexcasting/blockstates/impetus/redstone.json d7c50e1ce1a4219f22e1c1ac6b5a1e38ee16d0d7 assets/hexcasting/blockstates/impetus/rightclick.json c41c3f2f39c9fa8a319a705e2183112df18cb4f8 assets/hexcasting/blockstates/quenched_allay.json +0cdb41c9716ca939f348876aebbb46921e490f0d assets/hexcasting/blockstates/quenched_allay_bricks.json +d595dc580e8c154c771131ab2ad0c982c1c6b280 assets/hexcasting/blockstates/quenched_allay_bricks_small.json +fb69a8b5507838f3e418a4f9724da20b73cfc2d0 assets/hexcasting/blockstates/quenched_allay_tiles.json 0aca7e2e67793a21ffc794c02fb2b22d02d2058a assets/hexcasting/blockstates/scroll_paper.json e5c88e23be0552d4c06062510e8feeab510472ef assets/hexcasting/blockstates/scroll_paper_lantern.json ef6b44bd2360926cb9dcde5bb3f1380385acea90 assets/hexcasting/blockstates/slate.json +9d2f430f379569c512ca80540bb0242f33066ed3 assets/hexcasting/blockstates/slate_amethyst_bricks.json +8de3b35109abb92bcd8f8ce0e05068abf37b0c27 assets/hexcasting/blockstates/slate_amethyst_bricks_small.json +b341fc5a5f113863b37bc3e0f4cb16d677a4baeb assets/hexcasting/blockstates/slate_amethyst_pillar.json +b52cc5b8ab2d301df1d220b2596b393a19a149fe assets/hexcasting/blockstates/slate_amethyst_tiles.json 571fe1d5dfdfd9dacd88bc6d04b1a10e01920bd9 assets/hexcasting/blockstates/slate_block.json +c8c732a2c32e0fbdd2d3c1f7de9d1633479f7ce1 assets/hexcasting/blockstates/slate_bricks.json +a67dc65f3b1e4035662154f0de32e33e2300ad3c assets/hexcasting/blockstates/slate_bricks_small.json +b4f572a104921eba369abe5c84af3682087067c9 assets/hexcasting/blockstates/slate_pillar.json +113b805c092cf5e62f0972056d0d53a591b5aae9 assets/hexcasting/blockstates/slate_tiles.json 13fc293e23c575b19f81f9c4bcd7131d2c34f678 assets/hexcasting/blockstates/stripped_edified_log.json d66dd72dfbc57537c39d98cf221cc0bfd108dc47 assets/hexcasting/blockstates/stripped_edified_wood.json b2f3c31e92c7ce6d5b42d95d7ece82b898a9f4f7 assets/hexcasting/models/block/akashic_bookshelf.json @@ -46,7 +64,6 @@ d3b9ed0fd896d96d9bf571ccf3e37d1101e5c162 assets/hexcasting/models/block/akashic_ e2a738dede302484f7c8d19dde58c08f841f0432 assets/hexcasting/models/block/akashic_record.json 218a4e73a221eae6b0da7ecdd7f64c0532be46ee assets/hexcasting/models/block/amethyst_dust_block.json 031fefc08eaad4f0d5b7b4b23a0f311f5b5b84b4 assets/hexcasting/models/block/amethyst_edified_leaves.json -a01a3f7c666a611dbf675b66eea2087d435e99d9 assets/hexcasting/models/block/amethyst_tiles.json c0a2818ae1162e8b93d32a913602ba8523476695 assets/hexcasting/models/block/ancient_scroll_paper.json 77d0a5c4496678f96da5103b49777e612e3cba1e assets/hexcasting/models/block/ancient_scroll_paper_lantern.json 8b6de8cb9ccea9a8e4ce207f0b72048881c11da9 assets/hexcasting/models/block/aventurine_edified_leaves.json @@ -136,6 +153,20 @@ b45b1e1ff5360c9bd5985bf6ea375df437da2b22 assets/hexcasting/models/block/circle/i b45b1e1ff5360c9bd5985bf6ea375df437da2b22 assets/hexcasting/models/block/circle/impetus/rightclick/lit_west.json 7b47963b4fb1598595cc972f8ac6a38d542c6cf8 assets/hexcasting/models/block/citrine_edified_leaves.json 8b556039d842c21d8cb4cb902aaa5ab6f657a566 assets/hexcasting/models/block/conjured.json +663e744436e300ccead6a7865c72beb86a12532b assets/hexcasting/models/block/deco/amethyst_bricks.json +8db7e7dff6590f9031718c0513e3d75f92ff2525 assets/hexcasting/models/block/deco/amethyst_bricks_small.json +4ba75056f28a3a9ea0c69eb4bd7167a43bd31d74 assets/hexcasting/models/block/deco/amethyst_pillar.json +498da886ef9ba804d18e9a9ebad2acce0efb4ac2 assets/hexcasting/models/block/deco/amethyst_tiles.json +11ed17c8196b894e7f46f72f58fae1286dec4636 assets/hexcasting/models/block/deco/slate_amethyst_bricks_0.json +a04e6772e19e0803217bad644b0f2b2d342cc0fb assets/hexcasting/models/block/deco/slate_amethyst_bricks_1.json +ea05d80cfd1b19be57a04502948bd72f6b39810f assets/hexcasting/models/block/deco/slate_amethyst_bricks_2.json +c7ace7614fedaa48a07e573948d3265eb9baf399 assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_0.json +6060174b4ee67529c5159a95b1d9a4dc29939558 assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_1.json +e7737a9b49cf47235ce4bc5661ae511fb5502f02 assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_2.json +7232b88842fa67b4d3c49d4080623c758f85d8cd assets/hexcasting/models/block/deco/slate_amethyst_tiles.json +d8cda16f0554a97039096a7c2fba50044bd5d0fa assets/hexcasting/models/block/deco/slate_bricks.json +099367e64dea6cef0399ccb30293e56030a5dc20 assets/hexcasting/models/block/deco/slate_bricks_small.json +606a997b09ab7b1b0b6ddf754b583bd7fceb2e46 assets/hexcasting/models/block/deco/slate_tiles.json d04e6e7976a44e4286f0693a0ea173bc08525c6d assets/hexcasting/models/block/edified_button.json 79b149288702e1239dee1f94f8562f8c37410d14 assets/hexcasting/models/block/edified_button_pressed.json b13efe9e1aade0163a8d378184a19a639b98c460 assets/hexcasting/models/block/edified_door_bottom_left.json @@ -147,7 +178,15 @@ b13efe9e1aade0163a8d378184a19a639b98c460 assets/hexcasting/models/block/edified_ 729cf57ba13bf915999b4297aadb2ef6848d0337 assets/hexcasting/models/block/edified_door_top_right.json db3008a51e611ee3ffb86b5829df6b7da6bfcc61 assets/hexcasting/models/block/edified_door_top_right_open.json c5433d0b5c9f039ae3c314c8a82c7e1d3238447d assets/hexcasting/models/block/edified_log.json +4e779dbe1d8dfcb2d500bf43d71ecf0bd0104eac assets/hexcasting/models/block/edified_log_amethyst.json +5c9d3a002deae195ba8bff03ac106c302d36792d assets/hexcasting/models/block/edified_log_amethyst_horizontal.json +a470e058329c844661a8011393b57d00efa1fe09 assets/hexcasting/models/block/edified_log_aventurine.json +20695e3c99b52b7738e96c57659bb358dbe9f9ec assets/hexcasting/models/block/edified_log_aventurine_horizontal.json +c38df07b2dada3843ce9399b244d2b9ecdb8faf2 assets/hexcasting/models/block/edified_log_citrine.json +df0e644143c2e50e1f165e89223796a758feb685 assets/hexcasting/models/block/edified_log_citrine_horizontal.json 71f1505d8255e1d57b8a9100b008dbaf73beacdc assets/hexcasting/models/block/edified_log_horizontal.json +231d3d0651bc8525e45f1c9a6bdcd0292b7209b4 assets/hexcasting/models/block/edified_log_purple.json +3cbf60f5ff164e84ae1224520f991a53c1177c14 assets/hexcasting/models/block/edified_log_purple_horizontal.json e691e8592c9ba75a2c67979ebef11e1c9280075b assets/hexcasting/models/block/edified_panel.json 7dbd6ab538ab6452c981275976d698a8cd7f5636 assets/hexcasting/models/block/edified_planks.json e291a8a550c6a31e1e11cdd590129d2b61aa3f36 assets/hexcasting/models/block/edified_planks_2.json @@ -166,9 +205,16 @@ ba95ea7a856895ca2a3438293b79fe4798b212ad assets/hexcasting/models/block/edified_ d4f286180e320c0ca819067b9e9a9b1db7f72e0a assets/hexcasting/models/block/edified_wood.json b2e1617c6549ffdf0a38bfbb6e9270a54c7a2718 assets/hexcasting/models/block/edified_wood_horizontal.json 9af2754cb1e53eeaa85618cf92651b4878cf62b1 assets/hexcasting/models/block/quenched_allay.json +2fc68dcd6d73da3deaa6a33240dd9160a2b79592 assets/hexcasting/models/block/quenched_allay_bricks.json +669d9348f4581dae45c35268a760675509a89a29 assets/hexcasting/models/block/quenched_allay_bricks_small.json +bacd99e8c24b9ce004e8aeff509cca4b971f3ed9 assets/hexcasting/models/block/quenched_allay_tiles.json 12ef9da44a265e8aa92d4c37d26fa0777493629e assets/hexcasting/models/block/scroll_paper.json 4f0924c356f9d7bccc490344944d44010ea7e918 assets/hexcasting/models/block/scroll_paper_lantern.json +e450fafba8beee7b800376ed54ff7c3ff7db5faf assets/hexcasting/models/block/slate_amethyst_pillar.json +c68d869d5320b9304ed301a3ce6dfa7dbea74747 assets/hexcasting/models/block/slate_amethyst_pillar_horizontal.json 603ffa587a335cf23e2bb17604583c6ad6f436b8 assets/hexcasting/models/block/slate_block.json +e7481aed52721e3893c4fa70341d696992223c25 assets/hexcasting/models/block/slate_pillar.json +5cfe93a217031aff9db6c9067c56d2366b13ac7e assets/hexcasting/models/block/slate_pillar_horizontal.json a5081ed63f45e689df2c2d6a6c1283bfcd89f20f assets/hexcasting/models/block/stripped_edified_log.json e5484f6caf6bea67cc8a447c202a4f1dc11957db assets/hexcasting/models/block/stripped_edified_log_horizontal.json 4495b24baf73ef0aaf930a136bf0052398aad1b3 assets/hexcasting/models/block/stripped_edified_wood.json @@ -176,10 +222,12 @@ ca5cd940b68d928845dc2d104da3dda8d15e45dd assets/hexcasting/models/block/stripped 19a6005af10d0812e8c861053f5863e6e04af3ba assets/hexcasting/models/item/akashic_bookshelf.json faf66c95b0725ee747c4e510414522121d9f80eb assets/hexcasting/models/item/akashic_connector.json 19730853397b109cfedd0c3bbda83d5de6cd15b9 assets/hexcasting/models/item/akashic_record.json +b5ddad23811e2f51a036c497dbe2e9f569801e79 assets/hexcasting/models/item/amethyst_bricks.json +f41f6f46a5a37e757eb4e4df3b10f68fc86efe66 assets/hexcasting/models/item/amethyst_bricks_small.json 951a9945880de02cae20c1afaf38b16b21194dd1 assets/hexcasting/models/item/amethyst_dust_block.json 144aa423e08987551a34aff969884a11c4efbff7 assets/hexcasting/models/item/amethyst_edified_leaves.json f81fdf1ffe88fab521b34901e983cd4836ce4529 assets/hexcasting/models/item/amethyst_sconce.json -d0eb15cbb5d10fdf43d421d89b4018ed60d352e2 assets/hexcasting/models/item/amethyst_tiles.json +fa23967e352823f0fc9e2bdd11a9cbac7c47b135 assets/hexcasting/models/item/amethyst_tiles.json 1d0a961ead6b43d20c621b351532656bf3a0d6d2 assets/hexcasting/models/item/ancient_scroll_paper.json d4a109488c27fc5d60e9054cd1485f1982040ff3 assets/hexcasting/models/item/ancient_scroll_paper_lantern.json 7c2b9b5296ba5e3c261bb237555e7d4082ad9303 assets/hexcasting/models/item/aventurine_edified_leaves.json @@ -195,4 +243,10 @@ cbe5bc7148b9e1c1cf5c4517801da664aa39efb8 assets/hexcasting/models/item/impetus/l e7f590cfc681aa7d19c56df325c95c5fbed01bc5 assets/hexcasting/models/item/impetus/rightclick.json 769dcfb4a504e4dcd28a43cf603a18c66f57e594 assets/hexcasting/models/item/scroll_paper.json 222e40e5754f5cb5a04321c4ed4cee27748c9224 assets/hexcasting/models/item/scroll_paper_lantern.json +e5b07f23ead1bba9ee5a3b86a9e520da883ba331 assets/hexcasting/models/item/slate_amethyst_bricks.json +826f953fdee668104ec1772941c56332e12dbc46 assets/hexcasting/models/item/slate_amethyst_bricks_small.json +a179178b90c8650b7906ce3aa302623bf3c427b7 assets/hexcasting/models/item/slate_amethyst_tiles.json 145db42b0d90bdb4fd82f5a7eea229be4c0f9675 assets/hexcasting/models/item/slate_block.json +eef72354b37ba0940ecf1e0cc5219cc15a6886a6 assets/hexcasting/models/item/slate_bricks.json +cb5ccddcc3654021fc134867303483bd135db65c assets/hexcasting/models/item/slate_bricks_small.json +71c735cca7c0b8c4e55b31fd87e46982552db135 assets/hexcasting/models/item/slate_tiles.json diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks.json b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks.json new file mode 100644 index 00000000..267e1b4d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/deco/amethyst_bricks" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks_small.json new file mode 100644 index 00000000..66b78f9a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_bricks_small.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/deco/amethyst_bricks_small" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_pillar.json b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_pillar.json new file mode 100644 index 00000000..257e10ca --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_pillar.json @@ -0,0 +1,30 @@ +{ + "variants": { + "facing=down": { + "model": "hexcasting:block/deco/amethyst_pillar", + "x": 180 + }, + "facing=east": { + "model": "hexcasting:block/deco/amethyst_pillar", + "x": 90, + "y": 90 + }, + "facing=north": { + "model": "hexcasting:block/deco/amethyst_pillar", + "x": 90 + }, + "facing=south": { + "model": "hexcasting:block/deco/amethyst_pillar", + "x": 90, + "y": 180 + }, + "facing=up": { + "model": "hexcasting:block/deco/amethyst_pillar" + }, + "facing=west": { + "model": "hexcasting:block/deco/amethyst_pillar", + "x": 90, + "y": 270 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_tiles.json index 79459a90..b716f2a5 100644 --- a/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_tiles.json +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/amethyst_tiles.json @@ -1,7 +1,7 @@ { "variants": { "": { - "model": "hexcasting:block/amethyst_tiles" + "model": "hexcasting:block/deco/amethyst_tiles" } } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_amethyst.json b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_amethyst.json new file mode 100644 index 00000000..7526dda3 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_amethyst.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "hexcasting:block/edified_log_amethyst_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "hexcasting:block/edified_log_amethyst" + }, + "axis=z": { + "model": "hexcasting:block/edified_log_amethyst_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_aventurine.json b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_aventurine.json new file mode 100644 index 00000000..ed8e454e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_aventurine.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "hexcasting:block/edified_log_aventurine_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "hexcasting:block/edified_log_aventurine" + }, + "axis=z": { + "model": "hexcasting:block/edified_log_aventurine_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_citrine.json b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_citrine.json new file mode 100644 index 00000000..258b377a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_citrine.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "hexcasting:block/edified_log_citrine_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "hexcasting:block/edified_log_citrine" + }, + "axis=z": { + "model": "hexcasting:block/edified_log_citrine_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_purple.json b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_purple.json new file mode 100644 index 00000000..078f72a9 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/edified_log_purple.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "hexcasting:block/edified_log_purple_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "hexcasting:block/edified_log_purple" + }, + "axis=z": { + "model": "hexcasting:block/edified_log_purple_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks.json b/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks.json new file mode 100644 index 00000000..e3d66f7e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/quenched_allay_bricks" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks_small.json new file mode 100644 index 00000000..72aad9ca --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_bricks_small.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/quenched_allay_bricks_small" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_tiles.json b/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_tiles.json new file mode 100644 index 00000000..ddb791a0 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/quenched_allay_tiles.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/quenched_allay_tiles" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks.json new file mode 100644 index 00000000..e99315f3 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks.json @@ -0,0 +1,15 @@ +{ + "variants": { + "": [ + { + "model": "hexcasting:block/deco/slate_amethyst_bricks_0" + }, + { + "model": "hexcasting:block/deco/slate_amethyst_bricks_1" + }, + { + "model": "hexcasting:block/deco/slate_amethyst_bricks_2" + } + ] + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks_small.json new file mode 100644 index 00000000..e6b5557c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_bricks_small.json @@ -0,0 +1,15 @@ +{ + "variants": { + "": [ + { + "model": "hexcasting:block/deco/slate_amethyst_bricks_small_0" + }, + { + "model": "hexcasting:block/deco/slate_amethyst_bricks_small_1" + }, + { + "model": "hexcasting:block/deco/slate_amethyst_bricks_small_2" + } + ] + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_pillar.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_pillar.json new file mode 100644 index 00000000..056bc449 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_pillar.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "hexcasting:block/slate_amethyst_pillar_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "hexcasting:block/slate_amethyst_pillar" + }, + "axis=z": { + "model": "hexcasting:block/slate_amethyst_pillar_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_tiles.json new file mode 100644 index 00000000..4c5f5d61 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_amethyst_tiles.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/deco/slate_amethyst_tiles" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks.json new file mode 100644 index 00000000..003a0daa --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/deco/slate_bricks" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks_small.json new file mode 100644 index 00000000..cdd21fd4 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_bricks_small.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/deco/slate_bricks_small" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_pillar.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_pillar.json new file mode 100644 index 00000000..6d0e098f --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_pillar.json @@ -0,0 +1,16 @@ +{ + "variants": { + "axis=x": { + "model": "hexcasting:block/slate_pillar_horizontal", + "x": 90, + "y": 90 + }, + "axis=y": { + "model": "hexcasting:block/slate_pillar" + }, + "axis=z": { + "model": "hexcasting:block/slate_pillar_horizontal", + "x": 90 + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/blockstates/slate_tiles.json b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_tiles.json new file mode 100644 index 00000000..1482ae08 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/blockstates/slate_tiles.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "hexcasting:block/deco/slate_tiles" + } + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks.json new file mode 100644 index 00000000..89c8ec51 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/amethyst_bricks" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks_small.json new file mode 100644 index 00000000..fc1202b6 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_bricks_small.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/amethyst_bricks_small" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_pillar.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_pillar.json new file mode 100644 index 00000000..5ee8934b --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_pillar.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/cube_bottom_top", + "textures": { + "bottom": "hexcasting:block/deco/amethyst_pillar_bottom", + "side": "hexcasting:block/deco/amethyst_pillar_side", + "top": "hexcasting:block/deco/amethyst_pillar_top" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_tiles.json new file mode 100644 index 00000000..ab9ffcda --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/amethyst_tiles.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/amethyst_tiles" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json new file mode 100644 index 00000000..e0c97c18 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json new file mode 100644 index 00000000..61215cda --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json new file mode 100644 index 00000000..536da900 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_3.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_3.json new file mode 100644 index 00000000..e45bf99d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_3" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_0.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_0.json new file mode 100644 index 00000000..2b93f327 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_small_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_1.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_1.json new file mode 100644 index 00000000..91ade205 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_small_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_2.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_2.json new file mode 100644 index 00000000..e6b6bd7b --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_small_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_3.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_3.json new file mode 100644 index 00000000..7da0cdfc --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_bricks_small_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_small_3" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_0.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_0.json new file mode 100644 index 00000000..3d953c56 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_tiles_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_1.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_1.json new file mode 100644 index 00000000..6d6150b8 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_tiles_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_2.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_2.json new file mode 100644 index 00000000..758194fe --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_tiles_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_3.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_3.json new file mode 100644 index 00000000..5c83c33e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/quenched_allay_tiles_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_tiles_3" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_0.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_0.json new file mode 100644 index 00000000..910ec099 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_bricks_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_1.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_1.json new file mode 100644 index 00000000..4d565a54 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_bricks_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_2.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_2.json new file mode 100644 index 00000000..a9072bac --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_bricks_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_0.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_0.json new file mode 100644 index 00000000..ad3c92af --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_bricks_small_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_1.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_1.json new file mode 100644 index 00000000..1f24ff9a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_bricks_small_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_2.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_2.json new file mode 100644 index 00000000..e106adbe --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_bricks_small_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_bricks_small_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_tiles.json new file mode 100644 index 00000000..2c80ba14 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_amethyst_tiles.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_amethyst_tiles" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks.json new file mode 100644 index 00000000..7fb51bcd --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_bricks" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks_small.json new file mode 100644 index 00000000..3b262eaf --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_bricks_small.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/slate_bricks_small" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_tiles.json similarity index 57% rename from Common/src/generated/resources/assets/hexcasting/models/block/amethyst_tiles.json rename to Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_tiles.json index 9870b725..d18efee9 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/amethyst_tiles.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/deco/slate_tiles.json @@ -1,6 +1,6 @@ { "parent": "minecraft:block/cube_all", "textures": { - "all": "hexcasting:block/amethyst_tiles" + "all": "hexcasting:block/deco/slate_tiles" } } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst.json new file mode 100644 index 00000000..e9833c81 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_amethyst" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst_horizontal.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst_horizontal.json new file mode 100644 index 00000000..fdfc8bd1 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_amethyst_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_amethyst" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine.json new file mode 100644 index 00000000..f9f832f6 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_aventurine" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine_horizontal.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine_horizontal.json new file mode 100644 index 00000000..e7ddcd8e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_aventurine_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_aventurine" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine.json new file mode 100644 index 00000000..ea1b1d60 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_citrine" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine_horizontal.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine_horizontal.json new file mode 100644 index 00000000..2ae70b9a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_citrine_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_citrine" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple.json new file mode 100644 index 00000000..70736370 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_purple" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple_horizontal.json b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple_horizontal.json new file mode 100644 index 00000000..235890db --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/edified_log_purple_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "hexcasting:block/edified_log_top", + "side": "hexcasting:block/deco/edified_log_purple" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks.json new file mode 100644 index 00000000..e0c97c18 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks_small.json new file mode 100644 index 00000000..2b93f327 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_bricks_small.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_bricks_small_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_tiles.json new file mode 100644 index 00000000..3d953c56 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/quenched_allay_tiles.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "hexcasting:block/deco/quenched_allay_tiles_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar.json b/Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar.json new file mode 100644 index 00000000..1ec3ef6c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "hexcasting:block/deco/slate_amethyst_pillar_end", + "side": "hexcasting:block/deco/slate_amethyst_pillar_side" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar_horizontal.json b/Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar_horizontal.json new file mode 100644 index 00000000..bbd24d1c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/slate_amethyst_pillar_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "hexcasting:block/deco/slate_amethyst_pillar_end", + "side": "hexcasting:block/deco/slate_amethyst_pillar_side" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar.json b/Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar.json new file mode 100644 index 00000000..697f4daa --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column", + "textures": { + "end": "hexcasting:block/deco/slate_pillar_end", + "side": "hexcasting:block/deco/slate_pillar_side" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar_horizontal.json b/Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar_horizontal.json new file mode 100644 index 00000000..cca16a0c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/block/slate_pillar_horizontal.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:block/cube_column_horizontal", + "textures": { + "end": "hexcasting:block/deco/slate_pillar_end", + "side": "hexcasting:block/deco/slate_pillar_side" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks.json new file mode 100644 index 00000000..5ec08429 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/amethyst_bricks" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks_small.json new file mode 100644 index 00000000..1b8fe48d --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_bricks_small.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/amethyst_bricks_small" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_pillar.json b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_pillar.json new file mode 100644 index 00000000..98d9d0c8 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_pillar.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/amethyst_pillar" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_tiles.json index 580c37a9..b8ecd40c 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_tiles.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/amethyst_tiles.json @@ -1,3 +1,3 @@ { - "parent": "hexcasting:block/amethyst_tiles" + "parent": "hexcasting:block/deco/amethyst_tiles" } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_amethyst.json b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_amethyst.json new file mode 100644 index 00000000..8e80eb67 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_amethyst.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/edified_log_amethyst" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_aventurine.json b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_aventurine.json new file mode 100644 index 00000000..45007ec4 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_aventurine.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/edified_log_aventurine" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_citrine.json b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_citrine.json new file mode 100644 index 00000000..9cae3948 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_citrine.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/edified_log_citrine" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_purple.json b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_purple.json new file mode 100644 index 00000000..62c67453 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/edified_log_purple.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/edified_log_purple" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks.json new file mode 100644 index 00000000..c3a1b638 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks.json @@ -0,0 +1,28 @@ +{ + "overrides": [ + { + "model": "hexcasting:block/deco/quenched_allay_bricks_0", + "predicate": { + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_bricks_1", + "predicate": { + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_bricks_2", + "predicate": { + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_bricks_3", + "predicate": { + "hexcasting:variant": 3.0 + } + } + ] +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks_small.json new file mode 100644 index 00000000..c0e376a5 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_bricks_small.json @@ -0,0 +1,28 @@ +{ + "overrides": [ + { + "model": "hexcasting:block/deco/quenched_allay_bricks_small_0", + "predicate": { + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_bricks_small_1", + "predicate": { + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_bricks_small_2", + "predicate": { + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_bricks_small_3", + "predicate": { + "hexcasting:variant": 3.0 + } + } + ] +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_tiles.json new file mode 100644 index 00000000..5ea5cf33 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/quenched_allay_tiles.json @@ -0,0 +1,28 @@ +{ + "overrides": [ + { + "model": "hexcasting:block/deco/quenched_allay_tiles_0", + "predicate": { + "hexcasting:variant": 0.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_tiles_1", + "predicate": { + "hexcasting:variant": 1.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_tiles_2", + "predicate": { + "hexcasting:variant": 2.0 + } + }, + { + "model": "hexcasting:block/deco/quenched_allay_tiles_3", + "predicate": { + "hexcasting:variant": 3.0 + } + } + ] +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks.json new file mode 100644 index 00000000..727a50c8 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/slate_amethyst_bricks_0" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks_small.json new file mode 100644 index 00000000..accf94f2 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_bricks_small.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/slate_amethyst_bricks_small_0" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_pillar.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_pillar.json new file mode 100644 index 00000000..74988731 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_pillar.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/slate_amethyst_pillar" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_tiles.json new file mode 100644 index 00000000..e20b742c --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_amethyst_tiles.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/slate_amethyst_tiles" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks.json new file mode 100644 index 00000000..adc88039 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/slate_bricks" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks_small.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks_small.json new file mode 100644 index 00000000..4d0555b2 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_bricks_small.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/slate_bricks_small" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_pillar.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_pillar.json new file mode 100644 index 00000000..8d6a18fa --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_pillar.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/slate_pillar" +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/slate_tiles.json b/Common/src/generated/resources/assets/hexcasting/models/item/slate_tiles.json new file mode 100644 index 00000000..c2bf7616 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/slate_tiles.json @@ -0,0 +1,3 @@ +{ + "parent": "hexcasting:block/deco/slate_tiles" +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java index 95a96dee..74d79a42 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java @@ -30,6 +30,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.client.resources.model.ModelBakery; +import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.world.item.Item; @@ -39,16 +40,18 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Map; +import java.util.*; import java.util.function.*; import static at.petrak.hexcasting.api.HexAPI.modLoc; public class RegisterClientStuff { - public static List QUENCHED_ALLAY_VARIANTS = new ArrayList<>(); + public static Map> QUENCHED_ALLAY_VARIANTS = new HashMap<>(); + private static final Map QUENCHED_ALLAY_TYPES = Map.of( + HexBlocks.QUENCHED_ALLAY, false, + HexBlocks.QUENCHED_ALLAY_TILES, true, + HexBlocks.QUENCHED_ALLAY_BRICKS, true, + HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL, true); public static void init() { registerSealableDataHolderOverrides(HexItems.FOCUS, @@ -107,6 +110,9 @@ public class RegisterClientStuff { registerGaslight4(HexItems.STAFF_QUENCHED); registerGaslight4(HexBlocks.QUENCHED_ALLAY.asItem()); + registerGaslight4(HexBlocks.QUENCHED_ALLAY_TILES.asItem()); + registerGaslight4(HexBlocks.QUENCHED_ALLAY_BRICKS.asItem()); + registerGaslight4(HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL.asItem()); registerGaslight4(HexItems.QUENCHED_SHARD); x.setRenderLayer(HexBlocks.CONJURED_LIGHT, RenderType.cutout()); @@ -233,6 +239,12 @@ public class RegisterClientStuff { BlockEntityAkashicBookshelfRenderer::new); registerer.registerBlockEntityRenderer(HexBlockEntities.QUENCHED_ALLAY_TILE, BlockEntityQuenchedAllayRenderer::new); + registerer.registerBlockEntityRenderer(HexBlockEntities.QUENCHED_ALLAY_TILES_TILE, + BlockEntityQuenchedAllayRenderer::new); + registerer.registerBlockEntityRenderer(HexBlockEntities.QUENCHED_ALLAY_BRICKS_TILE, + BlockEntityQuenchedAllayRenderer::new); + registerer.registerBlockEntityRenderer(HexBlockEntities.QUENCHED_ALLAY_BRICKS_SMALL_TILE, + BlockEntityQuenchedAllayRenderer::new); } @FunctionalInterface @@ -242,16 +254,32 @@ public class RegisterClientStuff { } public static void onModelRegister(ResourceManager recMan, Consumer extraModels) { - for (int i = 0; i < BlockQuenchedAllay.VARIANTS; i++) { - extraModels.accept(modLoc("block/quenched_allay_" + i)); + for (var type : QUENCHED_ALLAY_TYPES.entrySet()) { + var blockLoc = Registry.BLOCK.getKey(type.getKey()); + var locStart = "block/"; + if (type.getValue()) + locStart += "deco/"; + + for (int i = 0; i < BlockQuenchedAllay.VARIANTS; i++) { + extraModels.accept(modLoc( locStart + blockLoc.getPath() + "_" + i)); + } } } public static void onModelBake(ModelBakery loader, Map map) { - for (int i = 0; i < BlockQuenchedAllay.VARIANTS; i++) { - var variantLoc = modLoc("block/quenched_allay_" + i); - var model = map.get(variantLoc); - QUENCHED_ALLAY_VARIANTS.add(model); + for (var type : QUENCHED_ALLAY_TYPES.entrySet()) { + var blockLoc = Registry.BLOCK.getKey(type.getKey()); + var locStart = "block/"; + if (type.getValue()) + locStart += "deco/"; + + var list = new ArrayList(); + for (int i = 0; i < BlockQuenchedAllay.VARIANTS; i++) { + var variantLoc = modLoc(locStart + blockLoc.getPath() + "_" + i); + var model = map.get(variantLoc); + list.add(model); + } + QUENCHED_ALLAY_VARIANTS.put(blockLoc, list); } } } diff --git a/Common/src/main/java/at/petrak/hexcasting/client/render/be/BlockEntityQuenchedAllayRenderer.java b/Common/src/main/java/at/petrak/hexcasting/client/render/be/BlockEntityQuenchedAllayRenderer.java index 46446015..82e37713 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/render/be/BlockEntityQuenchedAllayRenderer.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/render/be/BlockEntityQuenchedAllayRenderer.java @@ -11,6 +11,7 @@ import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.block.BlockRenderDispatcher; import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.core.Registry; import net.minecraft.world.phys.AABB; // TODO: this doesn't cover the block being *behind* something. Is it possible to cleanly do that? @@ -22,13 +23,13 @@ public class BlockEntityQuenchedAllayRenderer implements BlockEntityRenderer $$0) { + $$0.add(FACING); + } + + public BlockState getStateForPlacement(BlockPlaceContext ctx) { + return this.defaultBlockState().setValue(FACING, ctx.getClickedFace()); + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityQuenchedAllay.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityQuenchedAllay.java index e43f691f..dac5512a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityQuenchedAllay.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityQuenchedAllay.java @@ -1,17 +1,24 @@ package at.petrak.hexcasting.common.blocks.entity; import at.petrak.hexcasting.api.block.HexBlockEntity; +import at.petrak.hexcasting.common.blocks.BlockQuenchedAllay; import at.petrak.hexcasting.common.lib.HexBlockEntities; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.level.block.state.BlockState; +import java.util.function.BiFunction; + /** * No-op BE just to have a BER */ public class BlockEntityQuenchedAllay extends HexBlockEntity { - public BlockEntityQuenchedAllay(BlockPos pos, BlockState blockState) { - super(HexBlockEntities.QUENCHED_ALLAY_TILE, pos, blockState); + public BlockEntityQuenchedAllay(BlockQuenchedAllay block, BlockPos pos, BlockState blockState) { + super(HexBlockEntities.typeForQuenchedAllay(block), pos, blockState); + } + + public static BiFunction fromKnownBlock(BlockQuenchedAllay block) { + return (pos, state) -> new BlockEntityQuenchedAllay(block, pos, state); } @Override diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlockEntities.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlockEntities.java index 2983a5e1..6e229206 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlockEntities.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlockEntities.java @@ -1,6 +1,7 @@ package at.petrak.hexcasting.common.lib; import at.petrak.hexcasting.api.HexAPI; +import at.petrak.hexcasting.common.blocks.BlockQuenchedAllay; import at.petrak.hexcasting.common.blocks.akashic.BlockEntityAkashicBookshelf; import at.petrak.hexcasting.common.blocks.circles.BlockEntitySlate; import at.petrak.hexcasting.common.blocks.circles.impetuses.BlockEntityLookingImpetus; @@ -53,7 +54,28 @@ public class HexBlockEntities { BlockEntitySlate::new, HexBlocks.SLATE); public static final BlockEntityType QUENCHED_ALLAY_TILE = register( - "quenched_allay", BlockEntityQuenchedAllay::new, HexBlocks.QUENCHED_ALLAY); + "quenched_allay", BlockEntityQuenchedAllay.fromKnownBlock(HexBlocks.QUENCHED_ALLAY), HexBlocks.QUENCHED_ALLAY); + + public static final BlockEntityType QUENCHED_ALLAY_TILES_TILE = register( + "quenched_allay_tiles", BlockEntityQuenchedAllay.fromKnownBlock(HexBlocks.QUENCHED_ALLAY_TILES), HexBlocks.QUENCHED_ALLAY_TILES); + + public static final BlockEntityType QUENCHED_ALLAY_BRICKS_TILE = register( + "quenched_allay_bricks", BlockEntityQuenchedAllay.fromKnownBlock(HexBlocks.QUENCHED_ALLAY_BRICKS), HexBlocks.QUENCHED_ALLAY_BRICKS); + + public static final BlockEntityType QUENCHED_ALLAY_BRICKS_SMALL_TILE = register( + "quenched_allay_bricks_small", BlockEntityQuenchedAllay.fromKnownBlock(HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL), HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL); + + public static BlockEntityType typeForQuenchedAllay(BlockQuenchedAllay block) { + if (block == HexBlocks.QUENCHED_ALLAY) + return QUENCHED_ALLAY_TILE; + if (block == HexBlocks.QUENCHED_ALLAY_TILES) + return QUENCHED_ALLAY_TILES_TILE; + if (block == HexBlocks.QUENCHED_ALLAY_BRICKS) + return QUENCHED_ALLAY_BRICKS_TILE; + if (block == HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL) + return QUENCHED_ALLAY_BRICKS_SMALL_TILE; + return null; + } private static BlockEntityType register(String id, BiFunction func, Block... blocks) { diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index eb63bb46..99d53750 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -95,6 +95,14 @@ public class HexBlocks { .isViewBlocking(HexBlocks::never); } + // we have to make it emit light because otherwise it occludes itself and is always dark + private static BlockBehaviour.Properties quenched() { + return BlockBehaviour.Properties + .copy(Blocks.AMETHYST_BLOCK) + .lightLevel($ -> 4) + .noOcclusion(); + } + // we give these faux items so Patchi can have an item to view with public static final Block CONJURED_LIGHT = blockItem("conjured_light", new BlockConjuredLight( @@ -151,20 +159,33 @@ public class HexBlocks { public static final BlockAkashicLigature AKASHIC_LIGATURE = blockItem("akashic_connector", new BlockAkashicLigature(akashicWoodyHard().lightLevel(bs -> 4))); - // we have to make it emit light because otherwise it occludes itself and is always dark - public static final BlockQuenchedAllay QUENCHED_ALLAY = blockItem("quenched_allay", new BlockQuenchedAllay( - BlockBehaviour.Properties - .copy(Blocks.AMETHYST_BLOCK) - .lightLevel($ -> 4) - .noOcclusion())); + public static final BlockQuenchedAllay QUENCHED_ALLAY = blockItem("quenched_allay", new BlockQuenchedAllay(quenched())); // Decoration?! public static final Block SLATE_BLOCK = blockItem("slate_block", new Block(slateish().strength(2f, 4f))); + public static final Block SLATE_TILES = blockItem("slate_tiles", new Block(slateish().strength(2f, 4f))); + public static final Block SLATE_BRICKS = blockItem("slate_bricks", new Block(slateish().strength(2f, 4f))); + public static final Block SLATE_BRICKS_SMALL = blockItem("slate_bricks_small", new Block(slateish().strength(2f, 4f))); + public static final RotatedPillarBlock SLATE_PILLAR = blockItem("slate_pillar", new RotatedPillarBlock(slateish().strength(2f, 4f))); public static final SandBlock AMETHYST_DUST_BLOCK = blockItem("amethyst_dust_block", new SandBlock(0xff_b38ef3, BlockBehaviour.Properties.of(Material.SAND, MaterialColor.COLOR_PURPLE) .strength(0.5f).sound(SoundType.SAND))); public static final AmethystBlock AMETHYST_TILES = blockItem("amethyst_tiles", new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK))); + public static final AmethystBlock AMETHYST_BRICKS = blockItem("amethyst_bricks", + new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK))); + public static final AmethystBlock AMETHYST_BRICKS_SMALL = blockItem("amethyst_bricks_small", + new AmethystBlock(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK))); + public static final BlockAmethystDirectional AMETHYST_PILLAR = blockItem("amethyst_pillar", + new BlockAmethystDirectional(BlockBehaviour.Properties.copy(Blocks.AMETHYST_BLOCK))); + public static final Block SLATE_AMETHYST_TILES = blockItem("slate_amethyst_tiles", new Block(slateish().strength(2f, 4f))); + public static final Block SLATE_AMETHYST_BRICKS = blockItem("slate_amethyst_bricks", new Block(slateish().strength(2f, 4f))); + public static final Block SLATE_AMETHYST_BRICKS_SMALL = blockItem("slate_amethyst_bricks_small", new Block(slateish().strength(2f, 4f))); + public static final RotatedPillarBlock SLATE_AMETHYST_PILLAR = blockItem("slate_amethyst_pillar", + new RotatedPillarBlock(slateish().strength(2f, 4f))); + public static final BlockQuenchedAllay QUENCHED_ALLAY_TILES = blockItem("quenched_allay_tiles", new BlockQuenchedAllay(quenched())); + public static final BlockQuenchedAllay QUENCHED_ALLAY_BRICKS = blockItem("quenched_allay_bricks", new BlockQuenchedAllay(quenched())); + public static final BlockQuenchedAllay QUENCHED_ALLAY_BRICKS_SMALL = blockItem("quenched_allay_bricks_small", new BlockQuenchedAllay(quenched())); public static final Block SCROLL_PAPER = blockItem("scroll_paper", new BlockFlammable(papery(MaterialColor.TERRACOTTA_WHITE), 100, 60)); public static final Block ANCIENT_SCROLL_PAPER = blockItem("ancient_scroll_paper", @@ -183,6 +204,14 @@ public class HexBlocks { public static final BlockAkashicLog EDIFIED_LOG = blockItem("edified_log", new BlockAkashicLog(edifiedWoody())); + public static final BlockAkashicLog EDIFIED_LOG_AMETHYST = blockItem("edified_log_amethyst", + new BlockAkashicLog(edifiedWoody())); + public static final BlockAkashicLog EDIFIED_LOG_AVENTURINE = blockItem("edified_log_aventurine", + new BlockAkashicLog(edifiedWoody())); + public static final BlockAkashicLog EDIFIED_LOG_CITRINE = blockItem("edified_log_citrine", + new BlockAkashicLog(edifiedWoody())); + public static final BlockAkashicLog EDIFIED_LOG_PURPLE = blockItem("edified_log_purple", + new BlockAkashicLog(edifiedWoody())); public static final BlockAkashicLog STRIPPED_EDIFIED_LOG = blockItem("stripped_edified_log", new BlockAkashicLog(edifiedWoody())); public static final BlockAkashicLog EDIFIED_WOOD = blockItem("edified_wood", diff --git a/Common/src/main/java/at/petrak/hexcasting/common/misc/AkashicTreeGrower.java b/Common/src/main/java/at/petrak/hexcasting/common/misc/AkashicTreeGrower.java index d781730f..99ceb0a1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/misc/AkashicTreeGrower.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/misc/AkashicTreeGrower.java @@ -6,21 +6,23 @@ import com.google.common.collect.Lists; import net.minecraft.core.Holder; import net.minecraft.data.worldgen.features.FeatureUtils; import net.minecraft.util.RandomSource; +import net.minecraft.util.random.SimpleWeightedRandomList; import net.minecraft.util.valueproviders.ConstantInt; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.grower.AbstractTreeGrower; +import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.TreeConfiguration; import net.minecraft.world.level.levelgen.feature.featuresize.TwoLayersFeatureSize; import net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; +import net.minecraft.world.level.levelgen.feature.stateproviders.WeightedStateProvider; import net.minecraft.world.level.levelgen.feature.trunkplacers.FancyTrunkPlacer; import org.jetbrains.annotations.Nullable; import java.util.List; import java.util.OptionalInt; -import java.util.Random; public class AkashicTreeGrower extends AbstractTreeGrower { public static final AkashicTreeGrower INSTANCE = new AkashicTreeGrower(); @@ -28,15 +30,19 @@ public class AkashicTreeGrower extends AbstractTreeGrower { public static final List>> GROWERS = Lists.newArrayList(); public static void init() { - GROWERS.add(buildTreeFeature(HexBlocks.AMETHYST_EDIFIED_LEAVES, "1")); - GROWERS.add(buildTreeFeature(HexBlocks.AVENTURINE_EDIFIED_LEAVES, "2")); - GROWERS.add(buildTreeFeature(HexBlocks.CITRINE_EDIFIED_LEAVES, "3")); + GROWERS.add(buildTreeFeature(HexBlocks.AMETHYST_EDIFIED_LEAVES, HexBlocks.EDIFIED_LOG_AMETHYST, "1")); + GROWERS.add(buildTreeFeature(HexBlocks.AVENTURINE_EDIFIED_LEAVES, HexBlocks.EDIFIED_LOG_AVENTURINE, "2")); + GROWERS.add(buildTreeFeature(HexBlocks.CITRINE_EDIFIED_LEAVES, HexBlocks.EDIFIED_LOG_CITRINE, "3")); } - private static Holder> buildTreeFeature(Block leaves, String name) { + private static Holder> buildTreeFeature(Block leaves, Block altLog, String name) { return FeatureUtils.register(HexAPI.MOD_ID + ":akashic_tree" + name, Feature.TREE, new TreeConfiguration.TreeConfigurationBuilder( - BlockStateProvider.simple(HexBlocks.EDIFIED_LOG), + new WeightedStateProvider( + SimpleWeightedRandomList.builder() + .add(HexBlocks.EDIFIED_LOG.defaultBlockState(), 8) + .add(altLog.defaultBlockState(), 1) + .build()), // baseHeight, heightRandA, heightRandB new FancyTrunkPlacer(5, 5, 3), BlockStateProvider.simple(leaves), diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java b/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java index 524ec0b8..55784c10 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java @@ -46,11 +46,16 @@ public class HexLootTables extends PaucalLootTableProvider { HexBlocks.IMPETUS_RIGHTCLICK, HexBlocks.IMPETUS_LOOK, HexBlocks.IMPETUS_REDSTONE, HexBlocks.DIRECTRIX_REDSTONE, HexBlocks.EMPTY_DIRECTRIX, HexBlocks.AKASHIC_RECORD, HexBlocks.AKASHIC_BOOKSHELF, HexBlocks.AKASHIC_LIGATURE, - HexBlocks.SLATE_BLOCK, HexBlocks.AMETHYST_DUST_BLOCK, HexBlocks.AMETHYST_TILES, HexBlocks.SCROLL_PAPER, - HexBlocks.ANCIENT_SCROLL_PAPER, HexBlocks.SCROLL_PAPER_LANTERN, HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN, - HexBlocks.SCONCE, - HexBlocks.EDIFIED_LOG, HexBlocks.STRIPPED_EDIFIED_LOG, HexBlocks.EDIFIED_WOOD, - HexBlocks.STRIPPED_EDIFIED_WOOD, + HexBlocks.SLATE_BLOCK, HexBlocks.SLATE_TILES, HexBlocks.SLATE_BRICKS, HexBlocks.SLATE_BRICKS_SMALL, + HexBlocks.SLATE_PILLAR, HexBlocks.AMETHYST_DUST_BLOCK, HexBlocks.AMETHYST_TILES, HexBlocks.AMETHYST_BRICKS, + HexBlocks.AMETHYST_BRICKS_SMALL, HexBlocks.AMETHYST_PILLAR, HexBlocks.SLATE_AMETHYST_TILES, + HexBlocks.SLATE_AMETHYST_BRICKS, HexBlocks.SLATE_AMETHYST_BRICKS_SMALL, HexBlocks.SLATE_AMETHYST_PILLAR, + HexBlocks.QUENCHED_ALLAY_TILES, HexBlocks.QUENCHED_ALLAY_BRICKS, HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL, + HexBlocks.SCROLL_PAPER, HexBlocks.ANCIENT_SCROLL_PAPER, HexBlocks.SCROLL_PAPER_LANTERN, + HexBlocks.ANCIENT_SCROLL_PAPER_LANTERN, HexBlocks.SCONCE, + HexBlocks.EDIFIED_LOG, HexBlocks.EDIFIED_LOG_AMETHYST, HexBlocks.EDIFIED_LOG_AVENTURINE, + HexBlocks.EDIFIED_LOG_CITRINE, HexBlocks.EDIFIED_LOG_PURPLE, HexBlocks.STRIPPED_EDIFIED_LOG, + HexBlocks.EDIFIED_WOOD, HexBlocks.STRIPPED_EDIFIED_WOOD, HexBlocks.EDIFIED_PLANKS, HexBlocks.EDIFIED_TILE, HexBlocks.EDIFIED_PANEL, HexBlocks.EDIFIED_TRAPDOOR, HexBlocks.EDIFIED_STAIRS, HexBlocks.EDIFIED_PRESSURE_PLATE, HexBlocks.EDIFIED_BUTTON); diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java index fe3d283f..b7caa459 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java @@ -3,6 +3,7 @@ package at.petrak.hexcasting.datagen.recipe; import at.petrak.hexcasting.api.HexAPI; import at.petrak.hexcasting.api.misc.MediaConstants; import at.petrak.hexcasting.api.mod.HexTags; +import at.petrak.hexcasting.common.blocks.decoration.BlockAkashicLog; import at.petrak.hexcasting.common.items.ItemStaff; import at.petrak.hexcasting.common.items.colorizer.ItemPrideColorizer; import at.petrak.hexcasting.common.lib.HexBlocks; @@ -35,6 +36,7 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.SimpleRecipeSerializer; import net.minecraft.world.level.block.Blocks; +import java.util.List; import java.util.function.Consumer; import java.util.function.Function; @@ -44,6 +46,11 @@ public class HexplatRecipes extends PaucalRecipeProvider { private final IXplatIngredients ingredients; private final Function conditions; + private final List EDIFIED_LOGS = List.of( + HexBlocks.EDIFIED_LOG, HexBlocks.EDIFIED_LOG_AMETHYST, + HexBlocks.EDIFIED_LOG_AVENTURINE, HexBlocks.EDIFIED_LOG_CITRINE, + HexBlocks.EDIFIED_LOG_PURPLE); + public HexplatRecipes(DataGenerator generator, IXplatIngredients ingredients, Function conditions) { super(generator, HexAPI.MOD_ID); @@ -298,11 +305,13 @@ public class HexplatRecipes extends PaucalRecipeProvider { .requires(HexTags.Items.EDIFIED_LOGS) .unlockedBy("has_item", hasItem(HexTags.Items.EDIFIED_LOGS)).save(recipes); - ShapedRecipeBuilder.shaped(HexBlocks.EDIFIED_WOOD, 3) - .define('W', HexBlocks.EDIFIED_LOG) - .pattern("WW") - .pattern("WW") - .unlockedBy("has_item", hasItem(HexBlocks.EDIFIED_LOG)).save(recipes); + for (var log : EDIFIED_LOGS) { + ShapedRecipeBuilder.shaped(HexBlocks.EDIFIED_WOOD, 3) + .define('W', log) + .pattern("WW") + .pattern("WW") + .unlockedBy("has_item", hasItem(log)).save(recipes); + } ShapedRecipeBuilder.shaped(HexBlocks.STRIPPED_EDIFIED_WOOD, 3) .define('W', HexBlocks.STRIPPED_EDIFIED_LOG) @@ -466,14 +475,16 @@ public class HexplatRecipes extends PaucalRecipeProvider { .save(recipes, modLoc("compat/create/crushing/amethyst_shard")); // FD compat - this.conditions.apply(new FarmersDelightCuttingRecipeBuilder() - .withInput(HexBlocks.EDIFIED_LOG) - .withTool(ingredients.axeStrip()) - .withOutput(HexBlocks.STRIPPED_EDIFIED_LOG) - .withOutput("farmersdelight:tree_bark") - .withSound(SoundEvents.AXE_STRIP)) - .whenModLoaded("farmersdelight") - .save(recipes, modLoc("compat/farmersdelight/cutting/akashic_log")); + for (var log : EDIFIED_LOGS) { + this.conditions.apply(new FarmersDelightCuttingRecipeBuilder() + .withInput(log) + .withTool(ingredients.axeStrip()) + .withOutput(HexBlocks.STRIPPED_EDIFIED_LOG) + .withOutput("farmersdelight:tree_bark") + .withSound(SoundEvents.AXE_STRIP)) + .whenModLoaded("farmersdelight") + .save(recipes, modLoc("compat/farmersdelight/cutting/" + Registry.BLOCK.getKey(log).getNamespace())); + } this.conditions.apply(new FarmersDelightCuttingRecipeBuilder() .withInput(HexBlocks.EDIFIED_WOOD) diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexBlockTagProvider.java b/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexBlockTagProvider.java index c15110e5..093ee010 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexBlockTagProvider.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexBlockTagProvider.java @@ -26,19 +26,25 @@ public class HexBlockTagProvider extends PaucalBlockTagProvider { .addTag(HexTags.Blocks.DIRECTRICES); tag(BlockTags.MINEABLE_WITH_PICKAXE) - .add(HexBlocks.SLATE_BLOCK, HexBlocks.SLATE, + .add(HexBlocks.SLATE_BLOCK, HexBlocks.SLATE_TILES, HexBlocks.SLATE_BRICKS, + HexBlocks.SLATE_BRICKS_SMALL, HexBlocks.SLATE_PILLAR, HexBlocks.SLATE, HexBlocks.EMPTY_DIRECTRIX, HexBlocks.DIRECTRIX_REDSTONE, HexBlocks.IMPETUS_EMPTY, HexBlocks.IMPETUS_RIGHTCLICK, HexBlocks.IMPETUS_LOOK, HexBlocks.IMPETUS_REDSTONE, - HexBlocks.AMETHYST_TILES, HexBlocks.SCONCE, - HexBlocks.QUENCHED_ALLAY); + HexBlocks.AMETHYST_TILES, HexBlocks.AMETHYST_BRICKS, HexBlocks.AMETHYST_BRICKS_SMALL, + HexBlocks.AMETHYST_PILLAR, HexBlocks.SLATE_AMETHYST_TILES, HexBlocks.SLATE_AMETHYST_BRICKS, + HexBlocks.SLATE_AMETHYST_BRICKS_SMALL, HexBlocks.SLATE_AMETHYST_PILLAR, HexBlocks.SCONCE, + HexBlocks.QUENCHED_ALLAY, HexBlocks.QUENCHED_ALLAY_TILES, HexBlocks.QUENCHED_ALLAY_BRICKS, + HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL); tag(BlockTags.MINEABLE_WITH_SHOVEL) .add(HexBlocks.AMETHYST_DUST_BLOCK); tag(BlockTags.MINEABLE_WITH_AXE) .add(HexBlocks.AKASHIC_RECORD, HexBlocks.AKASHIC_BOOKSHELF, HexBlocks.AKASHIC_LIGATURE, - HexBlocks.EDIFIED_LOG, HexBlocks.STRIPPED_EDIFIED_LOG, + HexBlocks.EDIFIED_LOG, HexBlocks.EDIFIED_LOG_AMETHYST, + HexBlocks.EDIFIED_LOG_AVENTURINE, HexBlocks.EDIFIED_LOG_CITRINE, + HexBlocks.EDIFIED_LOG_PURPLE, HexBlocks.STRIPPED_EDIFIED_LOG, HexBlocks.EDIFIED_WOOD, HexBlocks.STRIPPED_EDIFIED_WOOD, HexBlocks.EDIFIED_PLANKS, HexBlocks.EDIFIED_PANEL, HexBlocks.EDIFIED_TILE, HexBlocks.EDIFIED_DOOR, HexBlocks.EDIFIED_TRAPDOOR, HexBlocks.EDIFIED_SLAB, @@ -53,13 +59,19 @@ public class HexBlockTagProvider extends PaucalBlockTagProvider { HexBlocks.SCONCE); tag(HexTags.Blocks.EDIFIED_LOGS) - .add(HexBlocks.EDIFIED_LOG, HexBlocks.STRIPPED_EDIFIED_LOG, + .add(HexBlocks.EDIFIED_LOG, HexBlocks.EDIFIED_LOG_AMETHYST, + HexBlocks.EDIFIED_LOG_AVENTURINE, HexBlocks.EDIFIED_LOG_CITRINE, + HexBlocks.EDIFIED_LOG_PURPLE, HexBlocks.STRIPPED_EDIFIED_LOG, HexBlocks.EDIFIED_WOOD, HexBlocks.STRIPPED_EDIFIED_WOOD); tag(BlockTags.LOGS) - .add(HexBlocks.EDIFIED_LOG, HexBlocks.STRIPPED_EDIFIED_LOG, + .add(HexBlocks.EDIFIED_LOG, HexBlocks.EDIFIED_LOG_AMETHYST, + HexBlocks.EDIFIED_LOG_AVENTURINE, HexBlocks.EDIFIED_LOG_CITRINE, + HexBlocks.EDIFIED_LOG_PURPLE, HexBlocks.STRIPPED_EDIFIED_LOG, HexBlocks.EDIFIED_WOOD, HexBlocks.STRIPPED_EDIFIED_WOOD); tag(BlockTags.LOGS_THAT_BURN) - .add(HexBlocks.EDIFIED_LOG, HexBlocks.STRIPPED_EDIFIED_LOG, + .add(HexBlocks.EDIFIED_LOG, HexBlocks.EDIFIED_LOG_AMETHYST, + HexBlocks.EDIFIED_LOG_AVENTURINE, HexBlocks.EDIFIED_LOG_CITRINE, + HexBlocks.EDIFIED_LOG_PURPLE, HexBlocks.STRIPPED_EDIFIED_LOG, HexBlocks.EDIFIED_WOOD, HexBlocks.STRIPPED_EDIFIED_WOOD); tag(BlockTags.LEAVES) .add(HexBlocks.AMETHYST_EDIFIED_LEAVES, HexBlocks.AVENTURINE_EDIFIED_LEAVES, diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_bricks.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_bricks.png new file mode 100644 index 0000000000000000000000000000000000000000..7a5f8e386111e341d2f5688c6fd46c8da0f2ed5c GIT binary patch literal 298 zcmV+_0oDGAP)Px#LQacWUKop$aYy}svwza3>3ML-Q%0vq*V_^j$;R0Gvkq91u#t>s+ zDE%aqVqqRG>+%t&+xMCG-p;V+;ZmRn;?Tf!wT1uy*Eca7{Kk`J3;^B)1k27#cKIz& zRlxxuO19bwu5VUimYpNb7}AWDJzQ;wL!&a8Vg&V6PDx@UBDqi{mp5kn`L%F@-PZ|S za5|pBCZky|8OsfHK8QmDOV7h*F>WOgI%!B_pxq-v)xHjO9^rCFFwYP)>8ac^Z)<=07*qoM6N<$f;1X>Z2$lO literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_bricks_small.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_bricks_small.png new file mode 100644 index 0000000000000000000000000000000000000000..28d4e8992b6faa48e4d22f8b26137bf0c42c8947 GIT binary patch literal 315 zcmV-B0mS}^P)Px#^+`lQR5*>5QmYQaKoFd3svy@|G!|b$6Fh<-ND2l8D87I%K#^cDH1$oBeg+BQ zBdU=+LTwRc$#PteGVXSEZ+B)_9JiMOFYJ;8%OHT~=Kz4yp#csZZvjAd7Rb&5I(UBm z!Sg)N&tdcA+x1>1u+Dsn+x7mA(G+6Z-4~n$0LPWaH;3KtjWHQLw3^ppgwB%~b zU{P^h%@m`!MP!^dwOy)W1TpMvihneJeZcRaj^^=T{^6O$H9M~S>Y#d}dSPx$RY^oaR5*=wlQC-oK@f$%wM3g<4spjlUpOK#Qwl3Y(By zNM+#qgMj2mY`vwY#P(8z-R$jc1`dwdd2eUlycO41PgOFR(eG8bp|l_`G5{8FjMAc3 zqqHE~Z4j>yW#u0j;C4N>`LE9l{7_oZ3b96`qybi1kV=Wt!sh$E3b9`uDi<6Y$G^a> zu>`4`Y!DFH0tSe~qKsgyiEzXUbeuE*p>M$13wblZ*jO;@34MWckf`;Qt(X@Sy$<$TH_ zjvM606IKI&xA)5iySsD$-*`jpSBJ{oFZ`+<8p~a?>8xg?yvQ0W^gHrvtcd+yMKnst zi_Eq=7@qCt+T6XM@t91wJ}@GO3?@R)*>zPx$Hc3Q5R5*=|ld(#}P!xv03wJ80YbTN7BJOo4I0}NnL1^5KlP{o8&`HptQ`5mk zNY)I3qfpSkfJ+IbQ%0-U^*V%`p4=qGf6U2u?|=Stt~x)wH@+9pX&a={O!4v-0dUjr zlV+;&&tNo0y+3@JCh+O;toS~iv`Y2wAo2GK3 z1-rc!uqx_0O2QJ@lz|1MhH;Gcy`U0a)zMnhNsD0|18{omH)r5FlAxUmkRPxKtPc-5 zZ9|%=JcGUcU5*Y;8e6%$zN&<0>)M4~uug-~xTve=+ob{c_*Zl{2F8;B0000SRE literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_pillar_top.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_pillar_top.png new file mode 100644 index 0000000000000000000000000000000000000000..e51801aa6767850b237bed09525a7d8556915428 GIT binary patch literal 465 zcmV;?0WSWDP)Px$i%CR5R5*=wlfO#CP!z_0w`9^6$RrY6e1SLw3Jw-JbSfA-r+EkS1YKR662VDK zK^!_1Iu-=m7wA$#amuKJS+7HSZf}CU)4lhc?>pc5r(W)VwC8H%6s2Om%mL_kLu{Ma z^H~N!I2hyPvy5;sHjd4={ug+DamLkU4*&;XwOIf?=F6NUj_`wD0M;KTM}czG%l(g* zr~r4v19*}?8L4(EkJG71&k@6FvtV?6(*U8FEOy}#{DOZ<0cH26r`h57-c41bV z1-tE+0k)S(S}T5z7~1VRwoC_GtwMc1eCuN~FTi8#U6hJHiNE>f*hR>s00000NkvXX Hu0mjfsi4V( literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_tiles.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/amethyst_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..1c3ac5b870c965717854587a0e635133c20fc2bc GIT binary patch literal 371 zcmV-(0gV2MP)Px$ElET{R5*>LlCev}KorJ*DV-Fa602| z;-!w0#*4Dx(t07B&bYa1;(I!Vh#0tQ4}wuCm7DhRr-N2aaB#SvK!A_Ml02S_APs5N z#4p!i$y%Vzuq|qQeW0S+66jR Rx10a~002ovPDHLkV1jMSuulL0 literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_amethyst.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_amethyst.png new file mode 100644 index 0000000000000000000000000000000000000000..51372152971a9d5c57fe0b2eeae74cce7ee2b6d1 GIT binary patch literal 656 zcmV;B0&o3^P)Px%N=ZaPR5*=&ld(?|VHn1Lt(+IW^AZkeftYYsjD!R+k+5kb4lcstz-UYy?>}Hr zRyd{(jbSojY9~!`v5hH-iy~^zZbug$8-O?Vke7Z4B59mI7{<`bO_9dOF zPK~DPcp7wy(%RP8EvO8ug8^k<2S0BZ393J8e@Ez~WEcqm#`J0SD*M>3Lndj`+Sb@v z8~I1bD_ZZ!;_d4+5lj_l*0xLmh_T^Q4+0m$Xo1D75>eeAg)^$aY2E^Z(s z1-VB;m9KH)G-#ZiA|!=_LV^6@R}Sr8^!N7h`@Bi$RN`Yc#fj7K7DRi_3-0MBDZ q7L@B2cLrkYRrb3aNN=Tr=llm>X&i#R^W>ud00003KC literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_aventurine.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_aventurine.png new file mode 100644 index 0000000000000000000000000000000000000000..cff619dec0225e782da18c1845bb171098cb1efb GIT binary patch literal 625 zcmV-%0*?KOP)Px%D@jB_R5*=olfP>dVHn3hjcG5w#|?qrwLxM?a~3RBgpNgU5RHF9GwDCjN!JVo zy9ycHI>kXLv~EJ3M0BaO1RRnO)1GIBm?m(M^NwCq8;9iHp4Ml3-}m|PdA`s4Ox&2g zH)L#v(3zjk(&$-Ojt#)g+3OrQHeTR!|JoheZU;B;u^by!5ySwzzz1M{I?Mme3w*N4 z3;-!@22Bz2Ef#eGFw-WQB4mI&z6Y2quVSW6Qre7+iG_jLWQMu&>R**rMR4SI<+)nv zvb0rTWw&^dz;bNq5MqYORYhPqHm#b=UcFEG)mKRv3#$VpN}KG}`>gC1S$_Rg-sh4T zR7KF)Sfg4wCz1(5Q5rpqSaFBFdS5zvflo@CA(zbH1wM(=CX3tqvbA`q?3W)k0Gh2P zW^so^t0_kr`W!emAHRRPNDvjQ(X(i_nlySA>X^(-o0w^nhwols2%Wau!4Ud+g0|Zs zH|{s8x*>E_MR2yBXKAZIwbI3MY}~+?ZO5aCFq(T5(-6AUV{v<*_p(TYAhg>H%jDlY zlX!;EIr6)Fe*A>PN6%%eUf@g8OUcVu*E+v?*@51x`Oy&=kRBYzlAS zb38a<;&jOI;DrA1Pp0CN41N!YtBSx7I%n&7IlflSl~kG{upA%6NGnYdQe3%A0B>I& zQmu4Jls0)#ZAh^~ZT=NEw77iSSYs&kk-Dw(?;CEY7g?(CtSW*(oX!M7o>#sS00000 LNkvXXu0mjfO!Fai literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_citrine.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_citrine.png new file mode 100644 index 0000000000000000000000000000000000000000..8df470c823a1e8532f6742c6abf5e6e3e3920c84 GIT binary patch literal 610 zcmV-o0-gPdP)Px%97#k$R5*=old)?PQ5?rVhQP@?ZV2=)%@9J!Sx~6ZIEs)+ssBO8(xFfgp{08X z&Mt+PPENro;3f(p#6c)nr#ckdl;e3rn_l3C;~qI}qC@Xq6YJZ4?|#4c`+h&a``wwJ zUHU_M9APszQ{`mf;e`@_hqL!N3ng))cy_PBdDJIL6kaGX4M7edP80xhGgba~;zUs` zQ~)ShMJz+;Z@I}N0JrR78A2CC={>++*T*fpl&qqz$z_GrLWRAqKh@bZ1eYq%@kj=2 zbsFp+tld`Ng;FPEGPB1`L*Rvy@br-Ju*L5m&$Yr_)*WDDwa$3hV*g-`x8Hv0`&yxb zX$ThA7Z}MKMf!mZ%E`cEXQjz_*wTq{q9|EKYK01MqS#oiv%9^lt>rVaM;FHc^!y$> zD@}TS4=?=XQAZF&#zMo^0$Bu&}z(-gIjj>6qe?%IFI@`!p2MFwT1JjPc8L3 zN!<}PrXkpDciHMR7|8%HlthWrwzYz6wo#&{WIDpW=22;}yS)s&PMg@%V+45e;4vS+ z=W&Fsi!W8cqo-HAXqL6rI8j<@4&dnG7`N=Q)oGBs`;rguLL6aZ8A3mHGVtj6JsoR^ zW}39w?lK;B8Oea~^blAg8?hHE5ZA0MLtv)<^)dkrKD}oo12$IcylKDEurfCP!krr9 wr3zSFU%(LsETa$p&F`CSXgsl0S!^1DzigxYf5@CUng9R*07*qoM6N<$g3eMNApigX literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_purple.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/edified_log_purple.png new file mode 100644 index 0000000000000000000000000000000000000000..dec75a4bde08c96c8e8451261d6c18d73596462f GIT binary patch literal 650 zcmV;50(Jd~P)Px%L`g(JR5*=olg~>OQ5?WOuB(G@m}0^i6^7=2!T`r}Q58W7zz+iehI@1TFZ?hd zr)L2e(E896A=gsLBmgU8p(#QZG}`k36O+?e8H)j}Pu8U3!knIEVsiS_$*LmQ3-;x> zP%JSulV@&j@?QeSb7ew|8E>vC0>^XN+ICpo(0K87M-q1GJ%h73JxjfLz`3x=`3s{w zdU%t|!w>jUT*i+AhV(3lQGm1km9u9?0QhcyqTW1c5yVo;HHX5|0;?Mug|Ot$KWfh6tJdj@B#hc)hx z++}JePrrG@&%Px$E=fc|R5*>DQz1{oKp1`3RzPP63V}jk2$eIqY7%}5zk~z?a)M+D%hFlIM5ij+ z8ZtzaW+~=UYSt7;Hq01e`Hs753)!CPy?ft#_byj<&0p5o0seG_SuchK0G>C;;pxFv z24z|Sz{Y^!I;L=!*K(>30|37GvN6H)<_hOJCd#xznO0)P&M3)sW1@e{0RW3vuHJ!MC2y#e^CkMe%2~5sToY~s_8sT7cMt_O?uSD> z++F@_U`2slBeQ~u@4={plcV;xW_2$XBK0rmI$9gDAS)QMf+0-C_;~*W0EEf7@q~j> zXJa5Iw;h!RqQDl(RL{^iN}8V|Iq) zjfUFk|B^WN?f%MmE^hNP-R23i81k6se3|iZ+au-|uM%q1Qdr;T)h1Mwzh*w%uYUib z)Wn-7^kRT2k1(XnF0>R~mIySiV0PlYWT)va+XT}re0Y|L-Bc2r@np05eaUHW4$HEg mV6%5lGA?2}zf41xfuX#5R^N4X*XO{nV(@hJb6Mw<&;$UcFpu5< literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_2.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_2.png new file mode 100644 index 0000000000000000000000000000000000000000..a02af528cd98aaa45860249b52c04decbf63891e GIT binary patch literal 433 zcmV;i0Z#sjP)Px$Ye_^wR5*>5ld(#}P#A^3G?^L^sVME>B3J~WV?ny*1$>G=K!-kqlQ=m^w}PcK zFOZ>58IlggE`=zeL#YKxhzhAo)gj(AZ5qY1dJj z$pBhK#&-gIC*WhcSP_VZj;>;xd8)OLW^o8Wujj2zE|mAy6$rUPg&;~U^qn9k(kgO1 zJ>`KQX`k#sKea1n(*^B~@5<$EE446GcGKM%khbN(HuKzcyA-Px$f=NU{R5*>5lRryBQ5eR5SMN|7Ax5E4i-WWzw73Wj4lRvMLEj-9f<8dt(9j1E zw+4sf+Td_EhjgfHC{A({5xoRnE>YT$*l;-)um7lLI`4bV`@GLN?{l=X&eNEG;JUW~ zK&=`gUnrsj2+=2+jQok9CPM(2mImMwC}dMX0F1`S7b~2Iof*Oaz;|ajvtdgIA^N^t zIy1nuG)zn5?z!SuU`q!fA)1VkO$8Cs&8zD@Zf*gPh>bn@0NUQ|!?U&jy^s6MM!4`fa^dNXX8QF2jH5l*(ZM0+XE=*;y6Tsv%FwdF&n``UI5YjK+v;D(LI3Px$T}ebiR5*=&lCeudQ5eO4@A;M#pWxKcQaA{aTMkJ<4M9URXxh?bP5lM^1x`Ur zOX4nyYlDLg5=1T06cV~f&q?%2Z;RJp_i^9t>e=o+-@WHM=lhK3+lkK~?ivlQibb+H z4}h1aC^B@s3D6%I^hX9dWOH7Km+P`Q4@)j~r?Yv1q%3#gPG`ZL=)ySPx%Xufz)r+* zr!(4V8-Rl22j}SeTBt+oXs^Us{#)z0-EER8ZMV`mKNx&Us zBEj9bH^CbW=OF^rTQO}H03AhHhHjdEp*Zsx?Z- z7op5d*|VL9|5H*kQ8TmDIWOA-8TD3-ja46GC13S*K844_4_EsEKs#+?Y(2dBVmxZv zpS4#WcTX2)vfpiDE}L_~@ll~>VhLsOSjDnT3XUcN;aydi_XG$g_6yF-#pZE(NR$8o N002ovPDHLkV1nC_y1M`X literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_1.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e1d56483421e706b66cff976ed906e18cfa96514 GIT binary patch literal 413 zcmV;O0b>4%P)Px$S4l)cR5*==lQB!fP!xr~mv(8OspuqT2~;SE#ibprE)`rITDmy}CuawDp@RsW z4fzM16$%y?LE1$eL`tcPLl;Y|&`siCUwBQE^eoA{H#hg5bI%jcEzf6;rsFcYKB8Jo z0nmN@MaAA#kMl-@a%BcU?@31k7>xy^u^0lN-%6A#Gt%LL$-tw_T5wjU zn125Ro#hnbbpO^@lbwQrZkfzJK7&HtGC8<^i=0qwwI2O?eIt_d(Cw4AOR<^^-9DNu zj^iw!GACm)uE}J({T10IE*4P8)Er-OK7OA9VC1raCSi06#=<$Bw@dTaO}KdA^2}b? zvx=tUvVORYs+p#8HgegeJ;S0;!kTGudtL>pnaI?fz{*mCB&ZtbmWkNCd-0R@ywV3r zd)6&;X@am%((=!;IE6Waq|L3na&Ichx8G?-hVQAQ!lUa}pV}00000NkvXX Hu0mjf=cc+X literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_2.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_2.png new file mode 100644 index 0000000000000000000000000000000000000000..01d2d85db91390fe23ba7b9f1ea393ecfc402f29 GIT binary patch literal 423 zcmV;Y0a*TtP)Px$VM#jH zw=T)Uvdt-jc|I>}<@ui%2{Mz%NeSxXZ@X Rb2b0~002ovPDHLkV1gc7!&(3U literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_3.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_bricks_small_3.png new file mode 100644 index 0000000000000000000000000000000000000000..78171a100606083283634b52dfd149a2f0ade28b GIT binary patch literal 400 zcmV;B0dM|^P)Px$N=ZaPR5*>5lRrp8Q5eO4_dS;kpOI7GVnalc1c8g2L*Ue)NP9T778EoFPK{0C z8X>k81Uc0r4dN6IwlugT{vkJc4bSg!yFJa$a=G6<-#zy`oU3;3n=VuAUN$%`6iB7V z05o30=(w&{XfIrb9Rp_b#|O8@PwLufUm0hk0000Px$c1c7*R5*==l0QfSQ5?rVo(?7ShjS@Q$f%Z}O(~8V+=8&7L*1j6hUTEXDY%A~ z#32YGX{n{np%TP~z?up&xU-rfi>{WqhIprEdiR~)^_8?Y3m~qT2$hRL zdwrCG99UJ3j(IR%h5-FCov4JNWCxJpfW%F`1uBlUe#Cv-HWW ze#z*7#ab$57t6EbsA>pR4e@P!Ay4!(wjBFApmj98TI2Mp_-|Apvuf~Ec((Te@!n1C z8ogR$e`kSmF-Tl7+08>@%Fpo~9B2k+)nIjJnnLA=#FU?#N4+sYGNurT4%y8B@AVJ+ zrf_1AV074S7Lu9`OU4w(Z-^%d!@`L{M>Bx0q`g^N*&MxnJq{plKk2Fi&^;1y@UKU` zaR9W>!B#fM#>z5o+%pGWTmn3E;Krp^(^_-j#RFo|E(c^Ajh(n83~85xX2Uvh*Bpqi mb>qIp$!)8-xK$z#o%k>E@zb)0NfYM)0000Px$m`OxIR5*=&k~>JlU=)SFJ_aplr7pe-D(cv+MF~1&6GR7tx;P0g4uZ4JuIbRl z;vfoQDS|F;MbtvkL1>*+tdLZl#0N$fi9`8+lbU#@KiqqB&pqb^O8ScpkWwrJ&WjQG z-qj4eP$+)`5C+KPa@;-5x*Cp7_5g@!BWx^}h>Z@q>d&V)00dKt#rW7PbJHKpO@DA@ zoYCK5votd!n`5JcXj(g(*3OstNo=T%frVuK2aVK>YK_B-;vcF4R@LO8@F>5-;@(yL z5~EsUD?Pz^F+xhQ$mBpxgvejRj&5RAO%~I`6w2SIi4c{0)FkE4xB#cuj@^MHvFHHAo%+%X#ba!KRIahxlz={ zoP@=_UOwMC2EB4Z*1^EfXCatZPUH!GJ`1b-a?%=YA<(TK+qLb2ug_CoQQ7Q;A6sqN UiZ4`mTmS$707*qoM6N<$f`i)FrT_o{ literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_2.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_2.png new file mode 100644 index 0000000000000000000000000000000000000000..7ee57d8fc821b8e2416c6de479f5f1143ca30096 GIT binary patch literal 453 zcmV;$0XqJPP)Px$e@R3^R5*==lfO#>VHn3hYD+>tuq8FYqFe%(FaoLJh9HOMpl!OB}_bOG#d6bVd^Ne$kwADa!bQxZR|$lMDMm>xq_2T;`kzRU)JSU;ny z3DL}rcSj?5?Qv|?b(0tE)oCk7-lfESoL1mCV^Y^m*0NJ#*K*ZBD>Wx^;!pMp03jua ze|Sj1PPuWfR{9o(gp{CTu^Vqx4LnS2TL9hBh*Z?58UTb>6lzDBEB6#L9~Qu5vM%6l z!4JSr?ttj!thjg0!CpSk^V^d2!o}5zIRBf2xtS%FQ=crSK6x;17#Xx!Pp3tLKXcGN zI)I_qIKM0WGSb$s9N34=%sqx)<1jnVZNcC4B-i>UTytO>wvb2?84kCKJLH;!cEc7D vNvXKEuSYV>F$as|yH@+hozl{=KXdQ{UWnA*)4aWB00000NkvXXu0mjfde6w@ literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_3.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/quenched_allay_tiles_3.png new file mode 100644 index 0000000000000000000000000000000000000000..e027312815e9b3c40773657debf60797f18f23da GIT binary patch literal 467 zcmV;^0WAKBP)Px$jY&j7R5*==lD|s=aTvxwo-PSx=u(z&MYaSkVFY4>Ll8s`inRwV4gLew+7#H( zk~Bmui8QoC%MFzvH3ZsZk-?qS6fJ6tT*G&nXAK?Kw%$D)T!?p&WH&4bPE^|;Q@ba;0`@g(C13&`s$HS!40n+IJ z-&!00^e|KFQBl0Ku*zDh$y%z(qk7Bah|XpvV>B>FHPNbTyeaSEZXF#!tv9&1FNwP+ z5ph$j!D&vTRoB?qpGT>5NJQLJUsX}Km3u&~H#pv3=C0&58t1z!00a}GcqhgM*(umc zG)8D*?3dhyq*OXWuwY`;Ms^Ce5{=o&L%u;=%Px$07*naR5*>LlD$d;K@^3*S(X&DK{k*=Ed{GoHUWw6;A2?{_F`?Cynq%~fh1N| zHnJFnWvwy7yO z%loIt+7bSv_qPwsW#@XQXB5Sa#53nAjqh@Gfzz)k7iZ^u<~aaOTYo};xRs^= z2&ieThlsRU<~=|X^srmZeeD+W3N(aA1PTW>_52QWp_AA3)8wEI*kt+(q-BoUr+fW_ YUxyrbpdpUf7ytkO07*qoM6N<$f+(7ZD*ylh literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_1.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_1.png new file mode 100644 index 0000000000000000000000000000000000000000..12055dc188c3d7c3888b401995f5638eb9248c09 GIT binary patch literal 311 zcmV-70m%M|P)Px#@kvBMR5*>DlQ9kfK^TR!pDq@J~~#(GwjFax@b%eMJBO002ov JPDHLkV1j=-f>i(j literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_2.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_2.png new file mode 100644 index 0000000000000000000000000000000000000000..11f8c9b392eb21de735394131f66a0b1e171aa14 GIT binary patch literal 347 zcmV-h0i^zkP)Px$6-h)vR5*==k}*!hKoCWrqpijkG7=J@jl=;`U@1yUproUv<|KqWAZnn<1wuhZ zVLA%r&L~2POobH@w@$V8#`dm%HJY9OXLkO0*B3V>4!qpmcjiCdh55rH3gBnG1|Sdt z;J+vUSpBZ5VjGkW0uc_wuzJuU8qu`a6H7C%7Ra|70ulc5-1VCZn!Gnbvtz#9RPoc> zD`|GgXjl?W3(|#8oGbwtbP>#0j~pjU(#+#|;WHZ6d#@&F61$+g#z~#?PL58UHb%#{ zPEj=*Pn-qt=@#hQym=F|@uYP#%JklZ77j#O4rwxg(uy_&A}xnZ(SeQF{DLi~TCWCd tw(5N7AE5fY?`zPx$6-h)vR5*>Tld(?2Fc5}6BTqy^L1HLlDltTvD$z(NjLb+p3o9d!!2@K8Ix;hK zp>vci87NVt4vkRpNEnJu;-msp{^`y>`|iH8#ntq>;Y(?eF}qt3MhbxE`5|rH+)oKS z-}uL_i`=MfaQ*(qkitk2Cyw!#s|wdS0$`&Q(mt410$Q2vD(qz9^yIARMf^eXa&pmG zSl6|&(<0;b@u^dZ%|X7D<>1XjO!7(qT@F14wsht&QXMw>-2My#&nGRi-h8!eCV}U7 z_N6xL`Pyo?+U6#gt7tFqi1MQ4Q--YaY8?YT` tUJ3IiWSlsRM~%s%d(=FB`Wt&Q_yl?ejlRHXj}!m^002ovPDHLkV1o7qo_zoS literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_small_1.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_bricks_small_1.png new file mode 100644 index 0000000000000000000000000000000000000000..92fb3e308ddc4b5b11d236221ff5123d2c9ca6a6 GIT binary patch literal 332 zcmV-S0ki&zP)Px$21!IgR5*>Tld)>UFc5}6gC@Ha1v;c-0v$r8LSqQd*tyVW>DsZ6(FgEiGIs9J zrJaqpdT0_18Dc`})g77>a!~9c`6ucAL%RD;^6n=OHG8Fb#&|H2Ej_K-lqGGx+Eo<* z&on=bSh3^AR z4o(KP7VE-!sH{(CFdmFZ^NjiP7h&{2w$BgWnf&-NX)pm$T{nbLMVthUn9WT|kKcs{ z`5wsF_1T(<{8VkcL3rf;OX_Q^KU5WNoFh>_G?pe+utw@BoHS7!+vch eVtX!~%-|0ZS(T#`){#B{0000Px#`bk7VR5*>TlOb=yP!Pv|U7lK#2*-ui=5qB`^L;}d}8;t_!HBrI_--}`-Qo1#tX z0c8%g479{KiXG%UZ=}yyJr6Wb#qa!RmuE;wZ9LvIYhBzI`d08&CMi-6vzRo zd8LbLH*#O}KMZ8&W!H7w#AZARd8p1*7i&eaW0QKtP81CEXVI}{Q`g1a41NGS&69L< STgKr40000Px$Z%IT!R5*=wQ?Y8oP!v6pOfMpFCyX~(OP;;c^SyJZ3gI9F%8c~J;a6Z1WZWm28j+fD5)FEX^~N7r@HbzSusM+|Yq5Do;M4XJ`%&J^?c7|IHRTq2JSXTDnE*suvNOynE#fcP0 z?4)oLYdzfNa+%Bk0R3PH-;+is>P|QvYyFqR$=yrM_T=@(7!UYc<9fSMA>rl0n3*~g zuFV(yVmXNNo+HwQ;q_>Jiv82wUCeqIUutBe=!_1?dzo{maullIr1Vi fz^6p?h*SLnLu10-?;!&W00000NkvXXu0mjfwY0%Y literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_pillar_side.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_pillar_side.png new file mode 100644 index 0000000000000000000000000000000000000000..22d94182a7402c99a0094f9d209b0c6b83ba7865 GIT binary patch literal 389 zcmV;00eb$4P)Px$KS@MER5*=wlf6#EFcgKqR+*eCa)(M$RTeg0pbVYi1rQPw6R*RgFtK&d(1;D8 zA|Vx3peTr;AxgZK0bSQWpn(@=^4h=?1v1=L| zV$>)gdlm$pG1h{6>uSC9$WaDDb|F)68_g!UB})djLDRR^M%YL~bZvMFn!aT=$-P5m zaggb%5VGWuxC{5drXH|)NF%ajAeIyG=PTn8qC15!KraJ`gB1BP1^0i69@4S-hY!dl j3X+iQN(>*73$gkO;dPoLY>_O`00000NkvXXu0mjfgrlTs literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_tiles.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_amethyst_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..4cce94e49163feff9cac95b5bec7d80fe3b31a00 GIT binary patch literal 425 zcmV;a0apHrP)Px$V@X6oR5*=&lDlidP#DF32I-K#;?&a8q5U6p3Ai~3;vzmKT?-vtJ2suo0XLr+n-1Z|Jd6h};eI#Y`5xy)@~N`L7PM~eHpcs18GtB& zZW!#zvge1TX)>CO0H{>kq?1L@`{!2+010rCV~RpdQE1ysd?h(YoL}fQ3`Bd5JXuUuO0*Rwb01giKJ@NT$VH5lf z495qeJ+Zjk$7gm@@Tj$@mU0|&?QK4h@WHRMyW%FFM8&+d zx`sX+(`;m%UEIHV+YKE7!gYr2K9PV>orP2)VUtfHFV{1x_3;#{bAR#>sP4u;81l?; T>MuBT00000NkvXXu0mjfw-><& literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_bricks.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_bricks.png new file mode 100644 index 0000000000000000000000000000000000000000..310e2d53d151d386dd0c1aba630bdd7be2909183 GIT binary patch literal 259 zcmV+e0sQ`nP)Px#y-7qtR5*>Dl0OTBFcidpN~Tnb{U{C{1jlym*0tZdbSzR3I+=>P+M&Fn(ZoNu z1j60Dm)r%{^Q~heN@Gv}uc81T(t44wZd(BIcm6Z5#fLa{P86<~C;-z`gG)JGh_uEu z6#${V)|w~$H;^p=;@#dW7T(CfMVNyE_|)Yp(a0c6((MKkji8@#mZY;CQIh#o#sXhQ zluYQ8`yV;ikq`@0eeiW;5Th$XUq{rM+^4v~>3Hex&&OgD8(#r}XCOtmnJ54N002ov JPDHLkV1fvrYPx##Ysd#R5*>TlQ9dzFc3yxAyXAe!NswIL+Rw;AUHbv@5Rx%#p3fjpGj+aBAtnGu zma5HPD_?RmV?B;Z=EJ`jxIZs@)Ml>jhJkNSZpMB*wHrMHxhyjF&%S0e_yGM(n?GSf RC0hUh002ovPDHLkV1n!Tas&VX literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_pillar_end.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_pillar_end.png new file mode 100644 index 0000000000000000000000000000000000000000..63c3e16b4f1c3f6009327e5d68db8c9364697656 GIT binary patch literal 381 zcmV-@0fPRCP)Px$H%UZ6R5*=wQbB6NFc6#spJe082ZIsz3;KaRpnXEGeQhAe97;%`haeJ6Ob$|l zqHB66yI!g3oV3!;Xm+H<``gDI8CIJ$o~njxUDgmuI>F(zWVta<(U{gs?u zg2R%EMr$-$|4V*U1DFMJ^lb+KsFXsb6ac{AuISs2&v=9oBU>Mgft@Tuj664uNW|m$ zGz+XY>*QuTSr#IM7}02r?SA*i>Eh-2^-dP4S&|Rqh`|_kaXg=rERqazvhzNvi7Yc& zO0vXZ9Qjq8_XshfZ@YvHh!81ZYL)?p7$L_@LZrq4v(@c>he|1SRVkJH5xFja-ycT7 zkTvOwKz$@`C!2;S3I29vQF0;!BrGLamo?8PZz5MjmVpPx$14%?dR5*==l0l2YKn#VSr6((OJP0z_pW{#1>;CCw*#!?Gl|kvDv9!Iq2ls`v zGiXkeke7UU?c(F``KUtx0IZfv0KoU@2kX@a3|Ew>yvNt^cTzjw&d6DyxF1K@a7Fnt z&nezG7Y%qP27oN8{KtN~Q!>(}@{C*QL*>1aRNgC@Jre+A=w1_W(EKa_xHMNiXJTS2 z5;fN$Oomx;L_lmtE0PpP9;7hq5cK|51i;f+iX#tX==2QhLF%kabJcfFF+ZEdr_dr( z?1~cizI_r{Q`pdtqf*U1u*F=x22MP%jkcL2c9E^+DY31wF_kNU6{mjJ bRPek%8G4$jj`+6f00000NkvXXu0mjf2C$Hm literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_tiles.png b/Common/src/main/resources/assets/hexcasting/textures/block/deco/slate_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..34c7f21a12d2108a5b388ff230bbcacda1c3a496 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|rg*wIhFJ8z zowSkbkb{8B{NteqAAQo)WX}A{61_jnV`e@_W5d<8MRBXACYq)+AGx%0TIJ^8v+pV_ zY<~m=rtGpkV9@ub`;qRHqGkKPn1tpQvHNV`X*6Qlvi;cJJRi&R^RDfvKIor${t=(U zyX}z<)nebnGFAqhW{wGtsj(?v8~KKD)+#gSu%F9h8UD+D=$3Vv=xbfUR57u`!+zopr0OXuj$^ZZW literal 0 HcmV?d00001 diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt index 842fdfc3..b6c3aa04 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt @@ -171,6 +171,10 @@ object FabricHexInitializer : ModInitializer { val flameOn = FlammableBlockRegistry.getDefaultInstance() for (log in listOf( HexBlocks.EDIFIED_LOG, + HexBlocks.EDIFIED_LOG_AMETHYST, + HexBlocks.EDIFIED_LOG_AVENTURINE, + HexBlocks.EDIFIED_LOG_CITRINE, + HexBlocks.EDIFIED_LOG_PURPLE, HexBlocks.STRIPPED_EDIFIED_LOG, HexBlocks.EDIFIED_WOOD, HexBlocks.STRIPPED_EDIFIED_LOG, diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/interop/emi/EmiEdifyRecipe.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/interop/emi/EmiEdifyRecipe.java index 33fe1f84..b5ec3aab 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/interop/emi/EmiEdifyRecipe.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/interop/emi/EmiEdifyRecipe.java @@ -30,7 +30,13 @@ public class EmiEdifyRecipe implements EmiRecipe { EmiStack.of(HexBlocks.AVENTURINE_EDIFIED_LEAVES), EmiStack.of(HexBlocks.CITRINE_EDIFIED_LEAVES) )); - this.log = EmiStack.of(HexBlocks.EDIFIED_LOG); + this.log = EmiIngredient.of(List.of( + EmiStack.of(HexBlocks.EDIFIED_LOG), + EmiStack.of(HexBlocks.EDIFIED_LOG_AMETHYST), + EmiStack.of(HexBlocks.EDIFIED_LOG_AVENTURINE), + EmiStack.of(HexBlocks.EDIFIED_LOG_CITRINE) +// EmiStack.of(HexBlocks.EDIFIED_LOG_PURPLE) + )); } @Override diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java index 83109f6e..8a5b7494 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java @@ -124,10 +124,38 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { blockAndItem(HexBlocks.SLATE_BLOCK, models().cubeAll("slate_block", modLoc("block/slate"))); + blockAndItem(HexBlocks.SLATE_TILES, models().cubeAll("block/deco/slate_tiles", modLoc("block/deco/slate_tiles"))); + blockAndItem(HexBlocks.SLATE_BRICKS, models().cubeAll("block/deco/slate_bricks", modLoc("block/deco/slate_bricks"))); + blockAndItem(HexBlocks.SLATE_BRICKS_SMALL, models().cubeAll("block/deco/slate_bricks_small", modLoc("block/deco/slate_bricks_small"))); + axisBlock(HexBlocks.SLATE_PILLAR, modLoc("block/deco/slate_pillar")); blockAndItem(HexBlocks.AMETHYST_DUST_BLOCK, models().singleTexture("amethyst_dust_block", modLoc(BLOCK_FOLDER + "/cube_half_mirrored"), "all", modLoc("block/amethyst_dust_block"))); - cubeBlockAndItem(HexBlocks.AMETHYST_TILES, "amethyst_tiles"); + blockAndItem(HexBlocks.AMETHYST_TILES, models().cubeAll("block/deco/amethyst_tiles", modLoc("block/deco/amethyst_tiles"))); + blockAndItem(HexBlocks.AMETHYST_BRICKS, models().cubeAll("block/deco/amethyst_bricks", modLoc("block/deco/amethyst_bricks"))); + blockAndItem(HexBlocks.AMETHYST_BRICKS_SMALL, models().cubeAll("block/deco/amethyst_bricks_small", modLoc("block/deco/amethyst_bricks_small"))); + directionalBlock(HexBlocks.AMETHYST_PILLAR, + models().cubeBottomTop("block/deco/amethyst_pillar", + modLoc("block/deco/amethyst_pillar_side"), + modLoc("block/deco/amethyst_pillar_bottom"), + modLoc("block/deco/amethyst_pillar_top"))); + blockAndItem(HexBlocks.SLATE_AMETHYST_TILES, models().cubeAll("block/deco/slate_amethyst_tiles", modLoc("block/deco/slate_amethyst_tiles"))); + + simpleBlock(HexBlocks.SLATE_AMETHYST_BRICKS, + new ConfiguredModel(models().cubeAll("block/deco/slate_amethyst_bricks_0", modLoc("block/deco/slate_amethyst_bricks_0"))), + new ConfiguredModel(models().cubeAll("block/deco/slate_amethyst_bricks_1", modLoc("block/deco/slate_amethyst_bricks_1"))), + new ConfiguredModel(models().cubeAll("block/deco/slate_amethyst_bricks_2", modLoc("block/deco/slate_amethyst_bricks_2"))) + ); + simpleBlockItem(HexBlocks.SLATE_AMETHYST_BRICKS, models().cubeAll("block/deco/slate_amethyst_bricks_0", modLoc("block/deco/slate_amethyst_bricks_0"))); + + simpleBlock(HexBlocks.SLATE_AMETHYST_BRICKS_SMALL, + new ConfiguredModel(models().cubeAll("block/deco/slate_amethyst_bricks_small_0", modLoc("block/deco/slate_amethyst_bricks_small_0"))), + new ConfiguredModel(models().cubeAll("block/deco/slate_amethyst_bricks_small_1", modLoc("block/deco/slate_amethyst_bricks_small_1"))), + new ConfiguredModel(models().cubeAll("block/deco/slate_amethyst_bricks_small_2", modLoc("block/deco/slate_amethyst_bricks_small_2"))) + ); + simpleBlockItem(HexBlocks.SLATE_AMETHYST_BRICKS_SMALL, models().cubeAll("block/deco/slate_amethyst_bricks_small_0", modLoc("block/deco/slate_amethyst_bricks_small_0"))); + + axisBlock(HexBlocks.SLATE_AMETHYST_PILLAR, modLoc("block/deco/slate_amethyst_pillar")); cubeBlockAndItem(HexBlocks.SCROLL_PAPER, "scroll_paper"); cubeBlockAndItem(HexBlocks.ANCIENT_SCROLL_PAPER, "ancient_scroll_paper"); @@ -143,6 +171,10 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { modLoc("block/ancient_scroll_paper_lantern_top"))); axisBlock(HexBlocks.EDIFIED_LOG, modLoc("block/edified_log"), modLoc("block/edified_log_top")); + axisBlock(HexBlocks.EDIFIED_LOG_AMETHYST, modLoc("block/deco/edified_log_amethyst"), modLoc("block/edified_log_top")); + axisBlock(HexBlocks.EDIFIED_LOG_AVENTURINE, modLoc("block/deco/edified_log_aventurine"), modLoc("block/edified_log_top")); + axisBlock(HexBlocks.EDIFIED_LOG_CITRINE, modLoc("block/deco/edified_log_citrine"), modLoc("block/edified_log_top")); + axisBlock(HexBlocks.EDIFIED_LOG_PURPLE, modLoc("block/deco/edified_log_purple"), modLoc("block/edified_log_top")); axisBlock(HexBlocks.STRIPPED_EDIFIED_LOG, modLoc("block/stripped_edified_log"), modLoc("block/stripped_edified_log_top")); axisBlock(HexBlocks.EDIFIED_WOOD, modLoc("block/edified_log"), modLoc("block/edified_log")); @@ -200,6 +232,9 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { // for the break particles simpleBlock(HexBlocks.QUENCHED_ALLAY, models().cubeAll("quenched_allay", modLoc("block/quenched_allay_0"))); + simpleBlock(HexBlocks.QUENCHED_ALLAY_TILES, models().cubeAll("quenched_allay_tiles", modLoc("block/deco/quenched_allay_tiles_0"))); + simpleBlock(HexBlocks.QUENCHED_ALLAY_BRICKS, models().cubeAll("quenched_allay_bricks", modLoc("block/deco/quenched_allay_bricks_0"))); + simpleBlock(HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL, models().cubeAll("quenched_allay_bricks_small", modLoc("block/deco/quenched_allay_bricks_small_0"))); } // Assumes that the bottom are always the same diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java index accd53e6..6a93bf74 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java @@ -102,6 +102,12 @@ public class HexItemModels extends PaucalItemModelProvider { "layer0", modLoc(path.getPath()))); buildFourVariantGaslight(getPath(HexBlocks.QUENCHED_ALLAY), "block/quenched_allay", (name, path) -> cubeAll(path.getPath(), path)); + buildFourVariantGaslight(getPath(HexBlocks.QUENCHED_ALLAY_TILES), "block/deco/quenched_allay_tiles", (name, path) -> + cubeAll(path.getPath(), path)); + buildFourVariantGaslight(getPath(HexBlocks.QUENCHED_ALLAY_BRICKS), "block/deco/quenched_allay_bricks", (name, path) -> + cubeAll(path.getPath(), path)); + buildFourVariantGaslight(getPath(HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL), "block/deco/quenched_allay_bricks_small", (name, path) -> + cubeAll(path.getPath(), path)); simpleItem(modLoc("patchouli_book")); @@ -157,6 +163,13 @@ public class HexItemModels extends PaucalItemModelProvider { .model(new ModelFile.UncheckedModelFile(modLoc("item/slate_written"))) .end(); + getBuilder(getPath(HexBlocks.SLATE_PILLAR)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/slate_pillar"))); + getBuilder(getPath(HexBlocks.AMETHYST_PILLAR)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/deco/amethyst_pillar"))); + getBuilder(getPath(HexBlocks.SLATE_AMETHYST_PILLAR)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/slate_amethyst_pillar"))); + getBuilder(getPath(HexBlocks.AKASHIC_RECORD)).parent( new ModelFile.UncheckedModelFile(modLoc("block/akashic_record"))); simpleItem(modLoc("edified_door")); @@ -164,6 +177,14 @@ public class HexItemModels extends PaucalItemModelProvider { new ModelFile.UncheckedModelFile(modLoc("block/edified_trapdoor_bottom"))); getBuilder(getPath(HexBlocks.EDIFIED_LOG)).parent( new ModelFile.UncheckedModelFile(modLoc("block/edified_log"))); + getBuilder(getPath(HexBlocks.EDIFIED_LOG_AMETHYST)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/edified_log_amethyst"))); + getBuilder(getPath(HexBlocks.EDIFIED_LOG_AVENTURINE)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/edified_log_aventurine"))); + getBuilder(getPath(HexBlocks.EDIFIED_LOG_CITRINE)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/edified_log_citrine"))); + getBuilder(getPath(HexBlocks.EDIFIED_LOG_PURPLE)).parent( + new ModelFile.UncheckedModelFile(modLoc("block/edified_log_purple"))); getBuilder(getPath(HexBlocks.STRIPPED_EDIFIED_LOG)).parent( new ModelFile.UncheckedModelFile(modLoc("block/stripped_edified_log"))); getBuilder(getPath(HexBlocks.EDIFIED_WOOD)).parent( diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java index 593ae2bd..84ab9bab 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/interop/jei/EdifyRecipeCategory.java @@ -63,7 +63,11 @@ public class EdifyRecipeCategory implements IRecipeCategory { .addItemStack(new ItemStack(HexBlocks.AVENTURINE_EDIFIED_LEAVES)) .addItemStack(new ItemStack(HexBlocks.CITRINE_EDIFIED_LEAVES)); builder.addSlot(RecipeIngredientRole.OUTPUT, 51, 35) - .addItemStack(new ItemStack(HexBlocks.EDIFIED_LOG)); + .addItemStack(new ItemStack(HexBlocks.EDIFIED_LOG)) + .addItemStack(new ItemStack(HexBlocks.EDIFIED_LOG_AMETHYST)) + .addItemStack(new ItemStack(HexBlocks.EDIFIED_LOG_AVENTURINE)) + .addItemStack(new ItemStack(HexBlocks.EDIFIED_LOG_CITRINE)); +// .addItemStack(new ItemStack(HexBlocks.EDIFIED_LOG_PURPLE)); } From a051f853965250dc62fbe6c12805645743511c36 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Sun, 4 Jun 2023 22:49:28 +1000 Subject: [PATCH 45/48] casting sounds are back for casting items! --- .../casting/eval/env/PackagedItemCastEnv.java | 4 ++++ .../common/items/magic/ItemPackagedHex.java | 19 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java index 4411eb34..1b4011c1 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PackagedItemCastEnv.java @@ -58,4 +58,8 @@ public class PackagedItemCastEnv extends PlayerBasedCastEnv { var casterHexHolder = IXplatAbstractions.INSTANCE.findHexHolder(casterStack); return casterHexHolder.getPigment(); } + + public EvalSound getSound() { + return sound; + } } 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 d12830b0..157556ae 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 @@ -1,5 +1,6 @@ package at.petrak.hexcasting.common.items.magic; +import at.petrak.hexcasting.api.casting.ParticleSpray; import at.petrak.hexcasting.api.casting.eval.env.PackagedItemCastEnv; import at.petrak.hexcasting.api.casting.eval.vm.CastingVM; import at.petrak.hexcasting.api.casting.iota.Iota; @@ -13,6 +14,7 @@ import net.minecraft.nbt.Tag; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundSource; import net.minecraft.stats.Stat; import net.minecraft.stats.Stats; import net.minecraft.world.InteractionHand; @@ -21,6 +23,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.UseAnim; import net.minecraft.world.level.Level; +import net.minecraft.world.phys.Vec3; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -123,7 +126,7 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold var sPlayer = (ServerPlayer) player; var ctx = new PackagedItemCastEnv(sPlayer, usedHand); var harness = CastingVM.empty(ctx); - harness.queueExecuteAndWrapIotas(instrs, sPlayer.getLevel()); + var clientView = harness.queueExecuteAndWrapIotas(instrs, sPlayer.getLevel()); boolean broken = breakAfterDepletion() && getMedia(stack) == 0; @@ -137,6 +140,20 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold sPlayer.getCooldowns().addCooldown(this, this.cooldown()); + if (clientView.getResolutionType().getSuccess()) { + // Somehow we lost spraying particles on each new pattern, so do it here + // this also nicely prevents particle spam on trinkets + new ParticleSpray(player.position(), new Vec3(0.0, 1.5, 0.0), 0.4, Math.PI / 3, 30) + .sprayParticles(sPlayer.getLevel(), ctx.getColorizer()); + } + + var sound = ctx.getSound().sound(); + if (sound != null) { + var soundPos = sPlayer.position(); + sPlayer.level.playSound(null, soundPos.x, soundPos.y, soundPos.z, + sound, SoundSource.PLAYERS, 1f, 1f); + } + if (broken) { stack.shrink(1); player.broadcastBreakEvent(usedHand); From c51b49f62a1fe3a453d9041bbf5d783d99d867ec Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Tue, 6 Jun 2023 15:25:57 +1000 Subject: [PATCH 46/48] added even bigger phial visuals --- .../8f7cd5c924d3264b7777ef1696459761f9a70902 | 14 +++- .../hexcasting/models/item/battery.json | 70 ++++++++++++++++++ .../models/item/phial_larger_0.json | 6 ++ .../models/item/phial_larger_1.json | 6 ++ .../models/item/phial_larger_2.json | 6 ++ .../models/item/phial_larger_3.json | 6 ++ .../models/item/phial_larger_4.json | 6 ++ .../models/item/phial_largest_0.json | 6 ++ .../models/item/phial_largest_1.json | 6 ++ .../models/item/phial_largest_2.json | 6 ++ .../models/item/phial_largest_3.json | 6 ++ .../models/item/phial_largest_4.json | 6 ++ .../client/RegisterClientStuff.java | 2 +- .../textures/item/phial/phial_larger_0.png | Bin 0 -> 283 bytes .../textures/item/phial/phial_larger_1.png | Bin 0 -> 389 bytes .../textures/item/phial/phial_larger_2.png | Bin 0 -> 417 bytes .../textures/item/phial/phial_larger_3.png | Bin 0 -> 412 bytes .../textures/item/phial/phial_larger_4.png | Bin 0 -> 405 bytes .../textures/item/phial/phial_largest_0.png | Bin 0 -> 295 bytes .../textures/item/phial/phial_largest_1.png | Bin 0 -> 291 bytes .../textures/item/phial/phial_largest_2.png | Bin 0 -> 380 bytes .../textures/item/phial/phial_largest_3.png | Bin 0 -> 406 bytes .../textures/item/phial/phial_largest_4.png | Bin 0 -> 415 bytes .../forge/datagen/xplat/HexItemModels.java | 2 +- 24 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_4.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_0.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_1.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_2.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_3.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_4.json create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_3.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_4.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_0.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_1.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_2.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_3.png create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_4.png diff --git a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 index 60558fda..23f779dc 100644 --- a/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 +++ b/Common/src/generated/resources/.cache/8f7cd5c924d3264b7777ef1696459761f9a70902 @@ -1,4 +1,4 @@ -// 1.19.2 2023-06-04T21:59:01.7641342 Item Models: hexcasting +// 1.19.2 2023-06-05T15:45:45.9658447 Item Models: hexcasting 2fc68dcd6d73da3deaa6a33240dd9160a2b79592 assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json d59af7a48b20b210240b26115fb172d6202f9254 assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json a62eeebbca2d145c22f25725bd848ed4d673cefa assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json @@ -35,7 +35,7 @@ c499e86bb5b5bc2fe29914ce14832212ca23df10 assets/hexcasting/models/item/artifact_ ccb8a41fdd4bc1b493a11cfa2ea4a39b7f7c3888 assets/hexcasting/models/item/artifact_6_filled.json 6461c5261ec1eb92a608bd2db420b1e5b0c3591a assets/hexcasting/models/item/artifact_7.json 373617635cf75ee236da52eb5b9f341d2b77eac3 assets/hexcasting/models/item/artifact_7_filled.json -82e3be7bbdad92d2b4c728be54d9d2f2809a0ac2 assets/hexcasting/models/item/battery.json +c77fe07e43f7a46e04f16e43054588cdcdf4c01e assets/hexcasting/models/item/battery.json ec7c3a51882a432185fdbb6a449e66165b6a4c4c assets/hexcasting/models/item/charged_amethyst.json 3ed3e3d86dcbc29d2e6fb59b9c6a7e455e9a3332 assets/hexcasting/models/item/cherry_staff.json c64ed609ece68994ce23dd2809145040bce13579 assets/hexcasting/models/item/conjured_block.json @@ -115,6 +115,16 @@ abfc028c974a02780aed3d7a5859352503bbd920 assets/hexcasting/models/item/lens.json a34a6d777ae265c7e49c8bb23c15f04359236544 assets/hexcasting/models/item/lore_fragment.json a3e134b79977545049da01671f3a1bd636d14789 assets/hexcasting/models/item/old_staff.json 82fa0a2bb17e40c0b3f826e97b2e95445ec24ab8 assets/hexcasting/models/item/patchouli_book.json +91186c79af073cc390a1f1e6712540e1a49b716e assets/hexcasting/models/item/phial_larger_0.json +548d6999c6b5cb2c5b8d36d190fc849632f9f8ea assets/hexcasting/models/item/phial_larger_1.json +3162e3b88e59a9ab4b9df345724a0964db695688 assets/hexcasting/models/item/phial_larger_2.json +4e8f120d8472135ba1d8c332848fd0cc4c9ef1a0 assets/hexcasting/models/item/phial_larger_3.json +7b0d93186cd60cf31049512ca1147262a2bf203f assets/hexcasting/models/item/phial_larger_4.json +8943ca4912ab23d507725744f675ddcc56ccf1a9 assets/hexcasting/models/item/phial_largest_0.json +e20faba33418dac72ff3ad360eeb6fce3fce2728 assets/hexcasting/models/item/phial_largest_1.json +f0623e9b9192098dff982fabf1e598a27f96b7a8 assets/hexcasting/models/item/phial_largest_2.json +911736f4e2e3d825fb01f13dd32bf0108b68df99 assets/hexcasting/models/item/phial_largest_3.json +86d475f4c5bda63a564604e828f408ac6769e9eb assets/hexcasting/models/item/phial_largest_4.json d69d10e6cb967b98b3294cc86174182c671de671 assets/hexcasting/models/item/phial_large_0.json 9b7805bec9481956b0ccc6c65dd8e02d3b3cdf54 assets/hexcasting/models/item/phial_large_1.json 596a866a0fac7cfe916d1e78f2a5f20856493c62 assets/hexcasting/models/item/phial_large_2.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/battery.json b/Common/src/generated/resources/assets/hexcasting/models/item/battery.json index b446fb0e..11be0c6c 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/battery.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/battery.json @@ -104,6 +104,76 @@ "hexcasting:max_media": 2.0, "hexcasting:media": 1.0 } + }, + { + "model": "hexcasting:item/phial_larger_0", + "predicate": { + "hexcasting:max_media": 3.0, + "hexcasting:media": 0.0 + } + }, + { + "model": "hexcasting:item/phial_larger_1", + "predicate": { + "hexcasting:max_media": 3.0, + "hexcasting:media": 0.25 + } + }, + { + "model": "hexcasting:item/phial_larger_2", + "predicate": { + "hexcasting:max_media": 3.0, + "hexcasting:media": 0.5 + } + }, + { + "model": "hexcasting:item/phial_larger_3", + "predicate": { + "hexcasting:max_media": 3.0, + "hexcasting:media": 0.75 + } + }, + { + "model": "hexcasting:item/phial_larger_4", + "predicate": { + "hexcasting:max_media": 3.0, + "hexcasting:media": 1.0 + } + }, + { + "model": "hexcasting:item/phial_largest_0", + "predicate": { + "hexcasting:max_media": 4.0, + "hexcasting:media": 0.0 + } + }, + { + "model": "hexcasting:item/phial_largest_1", + "predicate": { + "hexcasting:max_media": 4.0, + "hexcasting:media": 0.25 + } + }, + { + "model": "hexcasting:item/phial_largest_2", + "predicate": { + "hexcasting:max_media": 4.0, + "hexcasting:media": 0.5 + } + }, + { + "model": "hexcasting:item/phial_largest_3", + "predicate": { + "hexcasting:max_media": 4.0, + "hexcasting:media": 0.75 + } + }, + { + "model": "hexcasting:item/phial_largest_4", + "predicate": { + "hexcasting:max_media": 4.0, + "hexcasting:media": 1.0 + } } ] } \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_0.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_0.json new file mode 100644 index 00000000..d5e18bb2 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_larger_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_1.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_1.json new file mode 100644 index 00000000..b19928c4 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_larger_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_2.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_2.json new file mode 100644 index 00000000..ac7ed775 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_larger_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_3.json new file mode 100644 index 00000000..b02ce98e --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_larger_3" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_4.json new file mode 100644 index 00000000..8b313df8 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_larger_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_larger_4" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_0.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_0.json new file mode 100644 index 00000000..0e44b418 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_largest_0" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_1.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_1.json new file mode 100644 index 00000000..4f456814 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_largest_1" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_2.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_2.json new file mode 100644 index 00000000..ab2bdf4a --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_largest_2" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_3.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_3.json new file mode 100644 index 00000000..10d70aca --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_3.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_largest_3" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_4.json b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_4.json new file mode 100644 index 00000000..3c0682e5 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/phial_largest_4.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:item/phial/phial_largest_4" + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java index 74d79a42..4594acca 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java @@ -88,7 +88,7 @@ public class RegisterClientStuff { (stack, level, holder, holderID) -> { var item = (ItemMediaBattery) stack.getItem(); var max = item.getMaxMedia(stack); - return (float) Math.sqrt((float) max / MediaConstants.CRYSTAL_UNIT / 10); + return 1.049658f * (float) Math.log((float) max / MediaConstants.CRYSTAL_UNIT + 9.06152f) - 2.1436f; }); registerScrollOverrides(HexItems.SCROLL_SMOL); diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_0.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_0.png new file mode 100644 index 0000000000000000000000000000000000000000..d6adff4f9cf5aa8e0a95ea2526b4568cc5dc415a GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|u6nvShFJ6_ zCoC}Ucx(Sfe&+cm|Buf;=RfGG<#m;K_~)PVe{u0!hL5&#MjBhyfBtFy|6*(t<2swa z|Kw*o^6<>Kr*M*Ck%_W&1FwQK6aSI3&+q>U7kQkP00cY!ztTSZH$1*`QwQs^o7V$a z>Q_86X1FQJ!!tqS@Us{Rhdw7UHa51lQ1*3(3$l+aOWd{dMm|&;%apHgIUJ@`-gP% dQ`#y92I&i>oreA@r-2@1@O1TaS?83{1OP^VbXNcX literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_1.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_1.png new file mode 100644 index 0000000000000000000000000000000000000000..bf33ea0e6e3f8178118e0b7ae2b128b769a2d7ce GIT binary patch literal 389 zcmV;00eb$4P)Px$KS@MER5*>jk-bYoVHAg-*Y08nuH5KUGzw6rueHHmZoL*f+F z=w@xVn!_N9pgX8R5xCqNWOoa5veWcluK77cKRECnIKSt7yzt*TUKtmE9_UtVTCV8O z=J@hr6Qm=+v|L$@hR~rQ0Hec09z=Bll$^TEO$JrUE(*X&>JES-`w)PG`>N`>0>Ju5 z7=Xd)2mrUc=bpJQ06;b}uO`;Q%F&S0CoztdoH1tCrN7|bF<7(y739pF(kiUKciLnv? zYzy%lek-60^2*}!CWJJ~EgiebJEDeMWT%iuS-v0MB(;6k6K436Tsoo16ohPym)GaM jCTP2x|8U**{}cTH>4tye5RZr400000NkvXXu0mjf*T}A# literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_2.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_2.png new file mode 100644 index 0000000000000000000000000000000000000000..17952bf5dc2409445c0ee68ba4590af59b777f19 GIT binary patch literal 417 zcmV;S0bc%zP)Px$TS-JgR5*>jlD$hpQ5c7xV?rcciqgPKOM^5-VMRql4vx~+($dh_6hi+;H8nWe zByJaLkqC_-8m^=TiqPT*#f7F42YVaphS!_o5dGi`hxh$G@5edt-#T5NmhQV}P_kiK zVjtVQxwhhf^aU8EB^zOlY@kUt(8PuSOiqluI&rB~Z^=QeD3-LvlC~VwiZZsHkkj>P z8LER`ogLQzxYMbeNTVj}& zJiWXDuy9@wfMP7H^k~pk#A}>wGBD2{T%$r1pSY8gU<0l&`H{mz5t{}X)znZA_;N~#OL00000 LNkvXXu0mjf3iG?J literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_3.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_larger_3.png new file mode 100644 index 0000000000000000000000000000000000000000..bc8ae5d5fa1463b737d6844703f823176e3d00e3 GIT binary patch literal 412 zcmV;N0b~A&P)Px$R!KxbR5*>jlD|traTLWr&s^8OOr9HPl4 zX%m~IK_O`A8QSpdfe_CmaSBu%;x^b5pHIahI`AF7_kPd0=X|;F-$+FRGJJPUdz{r; zVjYWoxVLK)nJAFeTCyMUk@q*q`x{sy0LzOD4kr#&>Rm~gWob!ITGEq*S(f>eYe_`| zGLwT*++LXgJf7Wg`P5Xbx-yASsdwf4MYq*H9vXCNCZ`7*q}7-L;2zE#3U~piHQUsh zZHH*^XcgnewAI`e`FQ)YZ)t9GtgEg2k^p!@>rR1T$oH$r^AfqDkE)?l3U~Sq{R@D| zns;Cye*YkzEJ)`bYyC!eWvYN}57KH($tc=PlP!$R7Ecxin>H=~pWp`#ua3_vFmjgw0000Px$Pf0{UR5*>jlD|s=aTtf66PFC>2PmZwG)O@ZLXb4*&{|tdi%?^e_?KKw4h;=9 zg_{ZuBBT+tbdoJva1f`G+!kI4#oJJKsE5`NJ#fRl-1GT<-Y*CLO(qtU!FSK3kMo)- z_G8QO&5fauu>pC_l&z?rQlLXA(7_G?n4g_-HF5FKdXtn<7gPFTN?%e&U8eRw{{b`s2yHLYE<^6RK~k+qHl0w00`i(E%fV>?^llHm z+ZzahcDaM48?HmVw!FLk;tbaopm4GTt2pvFTr0@k9L1_1fP=z2wTMMD{MC%`3IKL} z00khaRwVl9BYhZhWSa{`8xltG*on1>MX~BT+y#*9zHmLP4!a^UMdp zb4&kGb{Y(Z)FRfeW%#~>QIcxK`O_xt|0jF`WSEcc)q_GN00000NkvXXu0mjf4iKPx#;Ymb6R5*=eV4ydM?LYLNY|Wd`zxluU{G0#ChOppLeC6r)|My>gMG^Bg6k&uJ z#L$1}|KdVBMx2`QxrCrM@EL%vnF+5+36XF|8#S)|0~^9 z|4%m;LrqAqfMZ}lBo<^a-CXRyt(h^y)mwKM-hKFpBFDtQz`(G$(2kK%;y~7%dGZz9 t5)|8F`w#sObI?N32y+q4*~pry0sx>4ia7s;!&LwP002ovPDHLkV1i{PgzW$T literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_1.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_1.png new file mode 100644 index 0000000000000000000000000000000000000000..28e2998a27feb0a11c13fbdeb646662dc497d13b GIT binary patch literal 291 zcmV+;0o?wHP)Px#-AP12R5*=eV4ydcZZ7s8na@P3W?M636hl~WDZcXb`~Ul|zM_ad$y9f$^YX2%(SVy!>BWcfnmx1QVIQy SH>-fb$>8bg=d#Wzp$Py@AgL(; literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_3.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_3.png new file mode 100644 index 0000000000000000000000000000000000000000..55ee09f45dff4fdb6cfd5fa10029e9f01c388689 GIT binary patch literal 406 zcmV;H0crk;P)Px$P)S5VR5*>jkv&U7Q5eU6h6ED!B4I-j1VIo%M36Kj`T?XNkQPUwTEvzh`T`9Z zO%9E2)@IQXA_hSe6`3~PkgJk}4Pw$DPlMdc)ypM==)awFp8wl<;J*>~xW#zx`z?88 zX|Y4ZZZ-T|YKl^Ablj;MvjDh;hlqQS&6}#tk}R#fNGmU?SY1-Fy6zbFxW$;DrwV~> zr|xvUeu~lAQb6uUI6ImI{}-u;cL9j3o=Eqc{s-DnGE)HH{K^TylzV{viFHN|c-$ zL{=VW1}Ud20Bv#)=!h0N%!*b)LttUlGX9_78@P&x4`!Y2A^-pY07*qoM6N<$f{P}u AJpcdz literal 0 HcmV?d00001 diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_4.png b/Common/src/main/resources/assets/hexcasting/textures/item/phial/phial_largest_4.png new file mode 100644 index 0000000000000000000000000000000000000000..cd276734aa5bdcac0c2ea41a6d79afec72573985 GIT binary patch literal 415 zcmV;Q0bu@#P)Px$SxH1eR5*>jk-tkqQ545NnluZ3=vX*9%Zc)Uw5Qw*XnT)6j~^ZlOly$Ajqai3HD`ZoWT zys^4s5V7U;A5IL60_`%t4r#boM5UYL3UK)tq;F4%aiRsgVGZ2}N2 zDyD%fqzg82uQentcT$4f*Mi=e;JX&6!i?KPi;kgA2%O!#ssPDc+0fbJ9N{QgVhJm? zh6J-NgMeB0yf4?;JuQ*CsEA}H{0x92_o9)1fcS&Z;*bbRN}ILVa4&b=0+Q0^&^<@x zIK=k4S0uA{9{{uhE^!huzhQG-pBN5kyAGZ|h-to)x&)HBGMP!c)>YQJHnTDvsSXFz zeJxl35;4CiLSDV~j?&D^02+A!7)Fbn Date: Sat, 10 Jun 2023 17:02:09 +1000 Subject: [PATCH 47/48] fixed a bunchhh of lang file stuff, and fixed Mason Directrix's model textures rendering both directions glowy. --- .../d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 | 26 +-- .../directrix/redstone/lit_powered_down.json | 2 +- .../directrix/redstone/lit_powered_east.json | 2 +- .../directrix/redstone/lit_powered_north.json | 2 +- .../directrix/redstone/lit_powered_south.json | 2 +- .../directrix/redstone/lit_powered_up.json | 2 +- .../directrix/redstone/lit_powered_west.json | 2 +- .../redstone/lit_unpowered_down.json | 2 +- .../redstone/lit_unpowered_east.json | 2 +- .../redstone/lit_unpowered_north.json | 2 +- .../redstone/lit_unpowered_south.json | 2 +- .../directrix/redstone/lit_unpowered_up.json | 2 +- .../redstone/lit_unpowered_west.json | 2 +- .../hexcasting/common/lib/HexBlocks.java | 6 +- .../hexcasting/lang/en_us.flatten.json5 | 164 +++++++++++------- .../en_us/entries/lore/cardamom1.json | 17 ++ .../en_us/entries/lore/cardamom2.json | 16 ++ .../en_us/entries/lore/cardamom3.json | 21 +++ .../en_us/entries/lore/cardamom4.json | 19 ++ .../en_us/entries/lore/cardamom5.json | 14 ++ .../en_us/entries/lore/terabithia1.json | 17 -- .../en_us/entries/lore/terabithia2.json | 16 -- .../en_us/entries/lore/terabithia3.json | 21 --- .../en_us/entries/lore/terabithia4.json | 19 -- .../en_us/entries/lore/terabithia5.json | 14 -- .../xplat/HexBlockStatesAndModels.java | 9 +- 26 files changed, 226 insertions(+), 177 deletions(-) create mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom1.json create mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom2.json create mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom3.json create mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom4.json create mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom5.json delete mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia1.json delete mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia2.json delete mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia3.json delete mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia4.json delete mode 100644 Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia5.json diff --git a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 index 0f4cbf37..b79fbd1b 100644 --- a/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 +++ b/Common/src/generated/resources/.cache/d2fe5b6fab5fdc7ee7ca336c062752306bdf6128 @@ -1,4 +1,4 @@ -// 1.19.2 2023-06-04T22:11:58.5791186 Block States: hexcasting +// 1.19.2 2023-06-10T16:57:29.5188333 Block States: hexcasting 901e38574bdaa40ea4a0f6e773a88a95d9c03e55 assets/hexcasting/blockstates/akashic_bookshelf.json 32a77ef668198002563d68be35a24fa93c8d454a assets/hexcasting/blockstates/akashic_connector.json 85080ce0a0387583a839e4788517d675a1a35e24 assets/hexcasting/blockstates/akashic_record.json @@ -91,18 +91,18 @@ c0a2818ae1162e8b93d32a913602ba8523476695 assets/hexcasting/models/block/ancient_ 5a61959d58c2e01b970aea64980b854f5611dd7c assets/hexcasting/models/block/circle/directrix/redstone/dim_unpowered_south.json 5a61959d58c2e01b970aea64980b854f5611dd7c assets/hexcasting/models/block/circle/directrix/redstone/dim_unpowered_up.json 5a61959d58c2e01b970aea64980b854f5611dd7c assets/hexcasting/models/block/circle/directrix/redstone/dim_unpowered_west.json -2d5e4a8848a8c856a2712ddb72b4adc83cf952a2 assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_down.json -2d5e4a8848a8c856a2712ddb72b4adc83cf952a2 assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_east.json -2d5e4a8848a8c856a2712ddb72b4adc83cf952a2 assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_north.json -2d5e4a8848a8c856a2712ddb72b4adc83cf952a2 assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_south.json -2d5e4a8848a8c856a2712ddb72b4adc83cf952a2 assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_up.json -2d5e4a8848a8c856a2712ddb72b4adc83cf952a2 assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_west.json -1a51c4f6d2d749c85562da1df2fa97392eeec40a assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_down.json -1a51c4f6d2d749c85562da1df2fa97392eeec40a assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_east.json -1a51c4f6d2d749c85562da1df2fa97392eeec40a assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_north.json -1a51c4f6d2d749c85562da1df2fa97392eeec40a assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_south.json -1a51c4f6d2d749c85562da1df2fa97392eeec40a assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_up.json -1a51c4f6d2d749c85562da1df2fa97392eeec40a assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_west.json +985d84a2d334b491d50ab434bdb402d35d31420a assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_down.json +985d84a2d334b491d50ab434bdb402d35d31420a assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_east.json +985d84a2d334b491d50ab434bdb402d35d31420a assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_north.json +985d84a2d334b491d50ab434bdb402d35d31420a assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_south.json +985d84a2d334b491d50ab434bdb402d35d31420a assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_up.json +985d84a2d334b491d50ab434bdb402d35d31420a assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_west.json +04dd35d39851feb1b1203b698da39aef2f672e04 assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_down.json +04dd35d39851feb1b1203b698da39aef2f672e04 assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_east.json +04dd35d39851feb1b1203b698da39aef2f672e04 assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_north.json +04dd35d39851feb1b1203b698da39aef2f672e04 assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_south.json +04dd35d39851feb1b1203b698da39aef2f672e04 assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_up.json +04dd35d39851feb1b1203b698da39aef2f672e04 assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_west.json 85a51b4253b01a236df8c691364f14566b964b8e assets/hexcasting/models/block/circle/impetus/empty/dim_down.json 85a51b4253b01a236df8c691364f14566b964b8e assets/hexcasting/models/block/circle/impetus/empty/dim_east.json 85a51b4253b01a236df8c691364f14566b964b8e assets/hexcasting/models/block/circle/impetus/empty/dim_north.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_down.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_down.json index e26157f3..5ba4750e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_down.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_down.json @@ -5,7 +5,7 @@ "east": "hexcasting:block/circle/directrix/redstone/left_powered", "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", "particle": "hexcasting:block/slate", - "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", + "south": "hexcasting:block/circle/directrix/redstone/back_dim_powered", "up": "hexcasting:block/circle/directrix/redstone/top_powered", "west": "hexcasting:block/circle/directrix/redstone/right_powered" } diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_east.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_east.json index e26157f3..5ba4750e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_east.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_east.json @@ -5,7 +5,7 @@ "east": "hexcasting:block/circle/directrix/redstone/left_powered", "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", "particle": "hexcasting:block/slate", - "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", + "south": "hexcasting:block/circle/directrix/redstone/back_dim_powered", "up": "hexcasting:block/circle/directrix/redstone/top_powered", "west": "hexcasting:block/circle/directrix/redstone/right_powered" } diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_north.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_north.json index e26157f3..5ba4750e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_north.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_north.json @@ -5,7 +5,7 @@ "east": "hexcasting:block/circle/directrix/redstone/left_powered", "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", "particle": "hexcasting:block/slate", - "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", + "south": "hexcasting:block/circle/directrix/redstone/back_dim_powered", "up": "hexcasting:block/circle/directrix/redstone/top_powered", "west": "hexcasting:block/circle/directrix/redstone/right_powered" } diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_south.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_south.json index e26157f3..5ba4750e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_south.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_south.json @@ -5,7 +5,7 @@ "east": "hexcasting:block/circle/directrix/redstone/left_powered", "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", "particle": "hexcasting:block/slate", - "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", + "south": "hexcasting:block/circle/directrix/redstone/back_dim_powered", "up": "hexcasting:block/circle/directrix/redstone/top_powered", "west": "hexcasting:block/circle/directrix/redstone/right_powered" } diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_up.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_up.json index e26157f3..5ba4750e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_up.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_up.json @@ -5,7 +5,7 @@ "east": "hexcasting:block/circle/directrix/redstone/left_powered", "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", "particle": "hexcasting:block/slate", - "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", + "south": "hexcasting:block/circle/directrix/redstone/back_dim_powered", "up": "hexcasting:block/circle/directrix/redstone/top_powered", "west": "hexcasting:block/circle/directrix/redstone/right_powered" } diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_west.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_west.json index e26157f3..5ba4750e 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_west.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_powered_west.json @@ -5,7 +5,7 @@ "east": "hexcasting:block/circle/directrix/redstone/left_powered", "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", "particle": "hexcasting:block/slate", - "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", + "south": "hexcasting:block/circle/directrix/redstone/back_dim_powered", "up": "hexcasting:block/circle/directrix/redstone/top_powered", "west": "hexcasting:block/circle/directrix/redstone/right_powered" } diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_down.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_down.json index 9c14b624..e597b41d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_down.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_down.json @@ -3,7 +3,7 @@ "textures": { "down": "hexcasting:block/circle/bottom", "east": "hexcasting:block/circle/directrix/redstone/left_unpowered", - "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", + "north": "hexcasting:block/circle/directrix/redstone/front_dim_unpowered", "particle": "hexcasting:block/slate", "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", "up": "hexcasting:block/circle/directrix/redstone/top_unpowered", diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_east.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_east.json index 9c14b624..e597b41d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_east.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_east.json @@ -3,7 +3,7 @@ "textures": { "down": "hexcasting:block/circle/bottom", "east": "hexcasting:block/circle/directrix/redstone/left_unpowered", - "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", + "north": "hexcasting:block/circle/directrix/redstone/front_dim_unpowered", "particle": "hexcasting:block/slate", "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", "up": "hexcasting:block/circle/directrix/redstone/top_unpowered", diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_north.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_north.json index 9c14b624..e597b41d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_north.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_north.json @@ -3,7 +3,7 @@ "textures": { "down": "hexcasting:block/circle/bottom", "east": "hexcasting:block/circle/directrix/redstone/left_unpowered", - "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", + "north": "hexcasting:block/circle/directrix/redstone/front_dim_unpowered", "particle": "hexcasting:block/slate", "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", "up": "hexcasting:block/circle/directrix/redstone/top_unpowered", diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_south.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_south.json index 9c14b624..e597b41d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_south.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_south.json @@ -3,7 +3,7 @@ "textures": { "down": "hexcasting:block/circle/bottom", "east": "hexcasting:block/circle/directrix/redstone/left_unpowered", - "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", + "north": "hexcasting:block/circle/directrix/redstone/front_dim_unpowered", "particle": "hexcasting:block/slate", "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", "up": "hexcasting:block/circle/directrix/redstone/top_unpowered", diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_up.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_up.json index 9c14b624..e597b41d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_up.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_up.json @@ -3,7 +3,7 @@ "textures": { "down": "hexcasting:block/circle/bottom", "east": "hexcasting:block/circle/directrix/redstone/left_unpowered", - "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", + "north": "hexcasting:block/circle/directrix/redstone/front_dim_unpowered", "particle": "hexcasting:block/slate", "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", "up": "hexcasting:block/circle/directrix/redstone/top_unpowered", diff --git a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_west.json b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_west.json index 9c14b624..e597b41d 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_west.json +++ b/Common/src/generated/resources/assets/hexcasting/models/block/circle/directrix/redstone/lit_unpowered_west.json @@ -3,7 +3,7 @@ "textures": { "down": "hexcasting:block/circle/bottom", "east": "hexcasting:block/circle/directrix/redstone/left_unpowered", - "north": "hexcasting:block/circle/directrix/redstone/front_lit_powered", + "north": "hexcasting:block/circle/directrix/redstone/front_dim_unpowered", "particle": "hexcasting:block/slate", "south": "hexcasting:block/circle/directrix/redstone/back_lit_unpowered", "up": "hexcasting:block/circle/directrix/redstone/top_unpowered", diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index 99d53750..92a4d76f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -162,6 +162,9 @@ public class HexBlocks { public static final BlockQuenchedAllay QUENCHED_ALLAY = blockItem("quenched_allay", new BlockQuenchedAllay(quenched())); // Decoration?! + public static final BlockQuenchedAllay QUENCHED_ALLAY_TILES = blockItem("quenched_allay_tiles", new BlockQuenchedAllay(quenched())); + public static final BlockQuenchedAllay QUENCHED_ALLAY_BRICKS = blockItem("quenched_allay_bricks", new BlockQuenchedAllay(quenched())); + public static final BlockQuenchedAllay QUENCHED_ALLAY_BRICKS_SMALL = blockItem("quenched_allay_bricks_small", new BlockQuenchedAllay(quenched())); public static final Block SLATE_BLOCK = blockItem("slate_block", new Block(slateish().strength(2f, 4f))); public static final Block SLATE_TILES = blockItem("slate_tiles", new Block(slateish().strength(2f, 4f))); public static final Block SLATE_BRICKS = blockItem("slate_bricks", new Block(slateish().strength(2f, 4f))); @@ -183,9 +186,6 @@ public class HexBlocks { public static final Block SLATE_AMETHYST_BRICKS_SMALL = blockItem("slate_amethyst_bricks_small", new Block(slateish().strength(2f, 4f))); public static final RotatedPillarBlock SLATE_AMETHYST_PILLAR = blockItem("slate_amethyst_pillar", new RotatedPillarBlock(slateish().strength(2f, 4f))); - public static final BlockQuenchedAllay QUENCHED_ALLAY_TILES = blockItem("quenched_allay_tiles", new BlockQuenchedAllay(quenched())); - public static final BlockQuenchedAllay QUENCHED_ALLAY_BRICKS = blockItem("quenched_allay_bricks", new BlockQuenchedAllay(quenched())); - public static final BlockQuenchedAllay QUENCHED_ALLAY_BRICKS_SMALL = blockItem("quenched_allay_bricks_small", new BlockQuenchedAllay(quenched())); public static final Block SCROLL_PAPER = blockItem("scroll_paper", new BlockFlammable(papery(MaterialColor.TERRACOTTA_WHITE), 100, 60)); public static final Block ANCIENT_SCROLL_PAPER = blockItem("ancient_scroll_paper", 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 2d8560ab..0527513a 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 @@ -94,27 +94,44 @@ "block.hexcasting": { "conjured_light": "Conjured Light", "conjured_block": "Conjured Block", + "slate": "Slate", "slate.blank": "Blank Slate", "slate.written": "Patterned Slate", - "empty_impetus": "Empty Impetus", - "directrix_redstone": "Mason Directrix", - "empty_directrix": "Empty Directrix", - "impetus_rightclick": "Toolsmith Impetus", - "impetus_look": "Fletcher Impetus", - "impetus_redstone": "Cleric Impetus", + "directrix.empty": "Empty Directrix", + "directrix.redstone": "Mason Directrix", + "directrix.boolean": "??? Directrix", + "impetus.empty": "Empty Impetus", + "impetus.rightclick": "Toolsmith Impetus", + "impetus.look": "Fletcher Impetus", + "impetus.redstone": "Cleric Impetus", "akashic_record": "Akashic Record", "akashic_bookshelf": "Akashic Bookshelf", "akashic_connector": "Akashic Ligature", - + "slate_block": "Block of Slate", + "slate_tiles": "Slate Tiles", + "slate_bricks": "Slate Bricks", + "slate_bricks_small": "Small Slate Bricks", + "slate_pillar": "Slate Pillar", "amethyst_dust_block": "Block of Amethyst Dust", "amethyst_tiles": "Amethyst Tiles", + "amethyst_bricks": "Amethyst Bricks", + "amethyst_bricks_small": "Small Amethyst Bricks", + "amethyst_pillar": "Amethyst Pillar", + "slate_amethyst_tiles": "Slate & Amethyst Tiles", + "slate_amethyst_bricks": "Slate & Amethyst Bricks", + "slate_amethyst_bricks_small": "Small Slate & Amethyst Bricks", + "slate_amethyst_pillar": "Slate & Amethyst Pillar", "scroll_paper": "Scroll Paper", "ancient_scroll_paper": "Ancient Scroll Paper", "scroll_paper_lantern": "Paper Lantern", "ancient_scroll_paper_lantern": "Ancient Paper Lantern", "amethyst_sconce": "Amethyst Sconce", "edified_log": "Edified Log", + "edified_log_amethyst": "Amethyst Edified Log", + "edified_log_aventurine": "Aventurine Edified Log", + "edified_log_citrine": "Citrine Edified Log", + "edified_log_purple": "Purple Edified Log", "stripped_edified_log": "Stripped Edified Log", "edified_wood": "Edified Wood", "stripped_edified_wood": "Stripped Edified Wood", @@ -131,6 +148,9 @@ "aventurine_edified_leaves": "Aventurine Edified Leaves", "citrine_edified_leaves": "Citrine Edified Leaves", "quenched_allay": "Quenched Allay", + "quenched_allay_tiles": "Quenched Allay Tiles", + "quenched_allay_bricks": "Quenched Allay Bricks", + "quenched_allay_bricks_small": "Small Quenched Allay Bricks", "slate": "Slate", }, @@ -211,16 +231,16 @@ "advancement.hexcasting:opened_eyes.desc": "Have nature take a piece of your mind in payment for a hex. What might happen if you let it have more?", "advancement.hexcasting:lore": "Hexcasting Lore", "advancement.hexcasting:lore.desc": "Read a Lore Fragment", - "advancement.hexcasting:lore/terabithia1": "Cardamom Steles #1", - "advancement.hexcasting:lore/terabithia1.desc": "Letter from Cardamom Steles to Her Father, #1", - "advancement.hexcasting:lore/terabithia2": "Cardamom Steles #2", - "advancement.hexcasting:lore/terabithia2.desc": "Letter from Cardamom Steles to Her Father, #2", - "advancement.hexcasting:lore/terabithia3": "Cardamom Steles #3", - "advancement.hexcasting:lore/terabithia3.desc": "Letter from Cardamom Steles to Her Father, #3, 1/2", - "advancement.hexcasting:lore/terabithia4": "Cardamom Steles #3 pt2", - "advancement.hexcasting:lore/terabithia4.desc": "Letter from Cardamom Steles to Her Father, #3, 2/2", - "advancement.hexcasting:lore/terabithia5": "Cardamom Steles #4", - "advancement.hexcasting:lore/terabithia5.desc": "Letter from Cardamom Steles to Her Father, #4", + "advancement.hexcasting:lore/cardamom1": "Cardamom Steles #1", + "advancement.hexcasting:lore/cardamom1.desc": "Letter from Cardamom Steles to Her Father, #1", + "advancement.hexcasting:lore/cardamom2": "Cardamom Steles #2", + "advancement.hexcasting:lore/cardamom2.desc": "Letter from Cardamom Steles to Her Father, #2", + "advancement.hexcasting:lore/cardamom3": "Cardamom Steles #3", + "advancement.hexcasting:lore/cardamom3.desc": "Letter from Cardamom Steles to Her Father, #3, 1/2", + "advancement.hexcasting:lore/cardamom4": "Cardamom Steles #3 pt2", + "advancement.hexcasting:lore/cardamom4.desc": "Letter from Cardamom Steles to Her Father, #3, 2/2", + "advancement.hexcasting:lore/cardamom5": "Cardamom Steles #4", + "advancement.hexcasting:lore/cardamom5.desc": "Letter from Cardamom Steles to Her Father, #4", "advancement.hexcasting:lore/experiment1": "Wooleye Instance Notes", "advancement.hexcasting:lore/experiment2": "Wooleye Interview Logs", "advancement.hexcasting:lore/inventory": "Restoration Log 72", @@ -297,6 +317,8 @@ "brainsweep.product": "Mindless Body", "media": "%d dust", + "media_amount": "Contains: %s (%s)", + "media_amount.advanced": "Contains: %s/%s (%s)", "list_contents": "[%s]", "null_iota": "Null", @@ -745,6 +767,19 @@ | I have seen I have seen I have s$(k)get stick bugged lmao/$", // alwinfy you think you're so funny }, + + lore: { + "": "Lore", + desc: ">>>\ +| I have uncovered some letters and text not of direct relevance to my art.\ +| But, I think I may be able to divine some of the history of the world from these. Let me see..." + }, + + interop: { + "": "Cross-Mod Compatibility", + desc: ">>>\ +| It appears I have installed some mods Hexcasting interoperates with! I've detailed them here." + }, patterns: { "": "Patterns", @@ -841,7 +876,16 @@ weather_manip: "Weather Manipulation", zeniths: "Zeniths", - lore: "Lore", + lore: { + "cardamom1": "Cardamom Steles, #1", + "cardamom2": "Cardamom Steles, #2", + "cardamom3": "Cardamom Steles, #3", + "cardamom4": "Cardamom Steles, #4", + "cardamom5": "Cardamom Steles, #5", + "experiment1": "Wooleye Instance Notes", + "experiment2": "Wooleye Interview Logs", + "inventory": "Restoration Log #72" + }, interop: { "": "Cross-Mod Interations", @@ -1412,56 +1456,56 @@ - "lore.terabithia1.1": "$(italic)Full title: Letter from Cardamom Steles to Her Father, #1/$$(br2)Dear Papa,$(br)Every day it seems I have more reason to thank you for saving up to send me to the Grand Library. The amount I am learning is incredible! I feel I don't have the skill with words needed to express myself fully... it is wonderful to be here.", - "lore.terabithia1.2": "I sit in the main dome as I write this. It's maintained by the Hexcasting Corps; they have some sort of peculiar mechanism at the top that captures the stray thought energy as it leaks out from the desks and desks of hard-working students, as I understand it. One of my friends in the dormitory, Amanita, is studying the subject, and oh how she loves to explain it to me at length, although I confess I do not understand it very well.", - "lore.terabithia1.3": "The way I understand it, our processes of thought--the intangible mechanisms by which I move my pen and by which you read this letter--are not completely efficient. A small amount of that energy is released into the environment, like how a wagon's axle is hot to the touch after it has been turning for a while. This spare energy is called \"media.\" One person's spare media is trifiling, but the hundreds of thinking people in the main dome have a sort of multiplicative effect, and combined with some sort of ingenious mechanism, it can be solidified into a sort of purple crystal.", - "lore.terabithia1.4": "But that's enough about her studies. I returned from my first expedition with the Geology Corps today! My apologies for not sending a letter before I left; the date crept up on me. We ventured into a crack in the earth to the east of the Grand and spent the night camping under the rock and soil. We kept to well-lit and well-traveled areas of the cave, of course, and in all honesty it was likely safer in there than the night surface, but oh how I was scared!", - "lore.terabithia1.5": "Fortunately the night passed without mishap, and we proceeded deeper into the cave for our examination of the local veins of ore. We were looking for trace veins of a purple crystal called \"amethyst,\" which supposedly occurs in small amounts deep in the rock. We did not find anything, sadly, and returned to the sunlit surface empty-handed.", - "lore.terabithia1.6": "Come to think of it, the description of this \"amethyst\" I now realize closely matches those crystals of media Amanita speaks of. Imagine if these nuggets of thought occurred naturally under the ground! I can't imagine why that might happen, though... ", - "lore.terabithia1.7": "As a student, I am entitled to send one letter by Akashic post every three months, free of charge. Unfortunately, you know how thin my moneybags are ... so I am afraid this offer is the only method I may communicate with you. I will of course appreciate immensely if you manage to scrounge together the money to send a letter back, but it seems our communications may be limited. I hate to be cut off from you so, but the skills I gain here will be more than repayment. Imagine, I will be the first member of our family to be anything other than a farmer!", - "lore.terabithia1.8": "So, I suppose I will write again in three months' time.$(br2)Yours,$(br)-- Cardamom Steles", + "lore.cardamom1.1": "$(italic)Full title: Letter from Cardamom Steles to Her Father, #1/$$(br2)Dear Papa,$(br)Every day it seems I have more reason to thank you for saving up to send me to the Grand Library. The amount I am learning is incredible! I feel I don't have the skill with words needed to express myself fully... it is wonderful to be here.", + "lore.cardamom1.2": "I sit in the main dome as I write this. It's maintained by the Hexcasting Corps; they have some sort of peculiar mechanism at the top that captures the stray thought energy as it leaks out from the desks and desks of hard-working students, as I understand it. One of my friends in the dormitory, Amanita, is studying the subject, and oh how she loves to explain it to me at length, although I confess I do not understand it very well.", + "lore.cardamom1.3": "The way I understand it, our processes of thought--the intangible mechanisms by which I move my pen and by which you read this letter--are not completely efficient. A small amount of that energy is released into the environment, like how a wagon's axle is hot to the touch after it has been turning for a while. This spare energy is called \"media.\" One person's spare media is trifiling, but the hundreds of thinking people in the main dome have a sort of multiplicative effect, and combined with some sort of ingenious mechanism, it can be solidified into a sort of purple crystal.", + "lore.cardamom1.4": "But that's enough about her studies. I returned from my first expedition with the Geology Corps today! My apologies for not sending a letter before I left; the date crept up on me. We ventured into a crack in the earth to the east of the Grand and spent the night camping under the rock and soil. We kept to well-lit and well-traveled areas of the cave, of course, and in all honesty it was likely safer in there than the night surface, but oh how I was scared!", + "lore.cardamom1.5": "Fortunately the night passed without mishap, and we proceeded deeper into the cave for our examination of the local veins of ore. We were looking for trace veins of a purple crystal called \"amethyst,\" which supposedly occurs in small amounts deep in the rock. We did not find anything, sadly, and returned to the sunlit surface empty-handed.", + "lore.cardamom1.6": "Come to think of it, the description of this \"amethyst\" I now realize closely matches those crystals of media Amanita speaks of. Imagine if these nuggets of thought occurred naturally under the ground! I can't imagine why that might happen, though... ", + "lore.cardamom1.7": "As a student, I am entitled to send one letter by Akashic post every three months, free of charge. Unfortunately, you know how thin my moneybags are ... so I am afraid this offer is the only method I may communicate with you. I will of course appreciate immensely if you manage to scrounge together the money to send a letter back, but it seems our communications may be limited. I hate to be cut off from you so, but the skills I gain here will be more than repayment. Imagine, I will be the first member of our family to be anything other than a farmer!", + "lore.cardamom1.8": "So, I suppose I will write again in three months' time.$(br2)Yours,$(br)-- Cardamom Steles", - "lore.terabithia2.1": "$(italic)Full title: Letter from Cardamom Steles to Her Father, #2/$$(br2)Dear Papa,$(br)... Goodness, what an ordeal it is to try to summarize the last three months into a short letter. Such a cruel task set before me by this miracle I receive entirely for free! Woe is me.", - "lore.terabithia2.2": "My studies with the Geology Corps have been progressing smoothly. We have gone on more expeditions, deeper into the earth, to where the smooth gray stone makes way to a hard, flaky slate. It creates such an awful, choking dust under your feet... it's incredible what hostility there is below all of our feet all the time, even disregarding the creatures of the dark. (I have had one or two encounters with them, but I know how you shudder to think of me having to fight for my life, so I will not write of them.)", - "lore.terabithia2.3": "We did manage to find some of this amethyst, however. There was a small vein with a few trace crystals on one of our expeditions. We were under strict instructions to keep none of them and turn them in to our Corps prefect immediately. I find the whole affair rather ridiculous; they treat it like some matter of enormous importance and secrecy, and yet have a group of a dozen students, all barely six months at the Grand Library, trying to excavate barely ten drams of the stuff with twelve prospector's picks in a square foot...", - "lore.terabithia2.4": "I cannot imagine for what purpose, either. A librarian pointed me to an encyclopedia of gems, and amethyst seems to have next to no purpose; it's used for certain specialty types of glass and lenses, of all things.$(br2)If I were to speculate, I would guess that these amethyst crystals and the media they so resemble are one and the same, as I wrote of last time.", - "lore.terabithia2.5": "If this is true, the secrecy, not to mention the prefect's aversion to questioning, may be because this is an original piece of research the Grand Library is not eager to let into the hands of enemy factions.$(br2)However, this theory does not sit quite right with me. The amethyst I handled in the cave and the crystals of media Amanita has shown to me do seem quite similar, but not identical. I would like to see them side-by-side to be sure, but media has a peculiar buzzing or rumbling feel beneath the fingers that amethyst does not.", - "lore.terabithia2.6": "It is quite possible I was unable to sense it on the amethyst in the cave due to the stress of being undergound-- my hands were shaking the one time I managed to touch some, and the feeling is very light --but it does not seem the same to me. The light reflects slightly differently.$(br2)I suppose if I ever manage to get my hands on a crystal of amethyst outside of a cave, I will ask Amanita to see if she can cast a spell with it. Every time we meet she seems to have some new fantastic trick.", - "lore.terabithia2.7": "Just last week she suspended me in the air supported by nothing at all! It is an immensely strange feeling to have your body tingling and lighter than air with your clothing still the same weight... I am just glad she tugged me over my bed before the effect ran out.$(br2)Yours,$(br)-- Cardamom Steles", + "lore.cardamom2.1": "$(italic)Full title: Letter from Cardamom Steles to Her Father, #2/$$(br2)Dear Papa,$(br)... Goodness, what an ordeal it is to try to summarize the last three months into a short letter. Such a cruel task set before me by this miracle I receive entirely for free! Woe is me.", + "lore.cardamom2.2": "My studies with the Geology Corps have been progressing smoothly. We have gone on more expeditions, deeper into the earth, to where the smooth gray stone makes way to a hard, flaky slate. It creates such an awful, choking dust under your feet... it's incredible what hostility there is below all of our feet all the time, even disregarding the creatures of the dark. (I have had one or two encounters with them, but I know how you shudder to think of me having to fight for my life, so I will not write of them.)", + "lore.cardamom2.3": "We did manage to find some of this amethyst, however. There was a small vein with a few trace crystals on one of our expeditions. We were under strict instructions to keep none of them and turn them in to our Corps prefect immediately. I find the whole affair rather ridiculous; they treat it like some matter of enormous importance and secrecy, and yet have a group of a dozen students, all barely six months at the Grand Library, trying to excavate barely ten drams of the stuff with twelve prospector's picks in a square foot...", + "lore.cardamom2.4": "I cannot imagine for what purpose, either. A librarian pointed me to an encyclopedia of gems, and amethyst seems to have next to no purpose; it's used for certain specialty types of glass and lenses, of all things.$(br2)If I were to speculate, I would guess that these amethyst crystals and the media they so resemble are one and the same, as I wrote of last time.", + "lore.cardamom2.5": "If this is true, the secrecy, not to mention the prefect's aversion to questioning, may be because this is an original piece of research the Grand Library is not eager to let into the hands of enemy factions.$(br2)However, this theory does not sit quite right with me. The amethyst I handled in the cave and the crystals of media Amanita has shown to me do seem quite similar, but not identical. I would like to see them side-by-side to be sure, but media has a peculiar buzzing or rumbling feel beneath the fingers that amethyst does not.", + "lore.cardamom2.6": "It is quite possible I was unable to sense it on the amethyst in the cave due to the stress of being undergound-- my hands were shaking the one time I managed to touch some, and the feeling is very light --but it does not seem the same to me. The light reflects slightly differently.$(br2)I suppose if I ever manage to get my hands on a crystal of amethyst outside of a cave, I will ask Amanita to see if she can cast a spell with it. Every time we meet she seems to have some new fantastic trick.", + "lore.cardamom2.7": "Just last week she suspended me in the air supported by nothing at all! It is an immensely strange feeling to have your body tingling and lighter than air with your clothing still the same weight... I am just glad she tugged me over my bed before the effect ran out.$(br2)Yours,$(br)-- Cardamom Steles", - "lore.terabithia3.1": "$(italic)Full title: Letter from Cardamom Steles to her father, #3, part 1/2/$$(br2)Dear Papa,$(br)Two very peculiar things have happened since I last wrote.$(br2)Firstly, the professor in charge of the entry-level Hexcasting Corps students has disappeared. Nobody knows where he has gone. His office and living quarters were found locked, but still in their usual state of disarray.", - "lore.terabithia3.2": "Even more peculiarly, any attempts by the students of the Grand to rouse the administrative portions of the gnarled bureaucracy have been very firmly rejected. Even other professors seem reluctant to talk about him.$(br2)As you might imagine, Amanita is sorely distressed. Whatever replacement professors the Grand managed to dredge up have none of the old professor's tact or skill with beginners.", - "lore.terabithia3.3": "But amazingly, that is not the stranger of the two things I have to tell you. The most horrendous thing I hope to ever experience happened on another trip out with the Geology Corps. This time, we were due for an expedition near a village.", - "lore.terabithia3.4": "Usually when we do such a thing, there is a long process of communication with the mayor or elder of the village to ensure we have permission and establish boundaries on where we are allowed to go and what we are allowed to do. But on this expedition, there was very little of that; we were notified where we were going by a prefect of the Hexcasting Corps scarcely two days before we left.", - "lore.terabithia3.5": "We camped near the village, but in a thick forest, even though the nearby plains would have been much more hospitable. We could barely see the village from where we pitched our tents. As I laid down my bedroll the evening we arrived, the peculiar silence troubled me. Even if we couldn't see the village, we should have been able to hear it. But the whole time we were above-ground, there was next to no sound.", - "lore.terabithia3.6": "The few things I did hear all sounded like work: the peal of hammers on anvils and the scrape of hoe on dirt, for example. I never heard a shred of conversation.$(br2)The next morning we readied our lanterns and descended into the earth.", - "lore.terabithia3.7": "We weren't told exactly what it was we were spelunking for, but one of the other students had overheard we were looking for more amethyst, which seemed reasonable enough. I had my eyes trained for any specks of purple I might find in the cave walls, but just as the gray stone was making way to black slate, an incredible sight unfolded before me.$(br2)It was an entire chamber made of amethyst, nearly ten times as tall as I am. The inside seemed to glow with purple sparks and lanternlight glint, every surface covered with jagged crystal. There was more amethyst here than our entire group had ever excavated since I came to the Grand.", - "lore.terabithia3.8": "Gloves were distributed and we were told to get to mining. One of the prefects along with us had a peculiar lavender box I've seen some of the higher-ups in the Grand using for storage, and the other students and I dutifully got to shattering the glassy crystals off the walls of the cave and putting them in the box. Under the outer layers of brittle crystal there seemed to be two types of denser growth. One of them seemed of similar composition to the loose crystal, but one seemed more ... I struggle to find the word.", - "lore.terabithia3.9": "I hesitate to say \"important,\" but that's the best I can think of. It had a certain ... gravitas, like the dark, sunken X in its surface held some sacred meaning. Whatever the reason we were under strict instructions not to touch them. Occasionally a misplaced pickaxe would shatter one, and the student responsible would get quite the earful. Although the labor was hard and took most of my attention, I couldn't help but notice how ... lucid I felt. It was a strange mix of feelings: I felt incredibly clear-headed, but I also felt if I stopped to examine the feeling I might never stop.", - "lore.terabithia3.10": "It was like each breath in erected a friendly signpost in my head promising the way forward, pointing directly down a steep cliff. I shook my head and immersed myself in the work of mining, which seemed to stave off the signposts.$(br2)I did manage, however, to hide a shard of the crystal in my knapsack.$(br2)We spent nearly the whole day mining, excavating most of the crystal by the time the prefects' chronometer said the sun would set soon.", - "lore.terabithia3.11": "As we left, I couldn't help but notice that on the surfaces of those dark, scored places we left unmined, there seemed to be the faintest buds of new crystal, like they were somehow growing out of them. Everything I had learned about the geology of crystals said they took thousands of years to grow, but here there was new growth in less than a day. I suppose the prefects' warnings against breaking those spots were warranted, at least.", - "lore.terabithia3.12": "Our journey back to the surface was uneventful, and we got back to our tents just as the sun was setting-- My apologies, I am nearly out of paper for this letter. There's only so much you can write on one Akashic letter ... This tale is worth purchasing another letter for. I'll send them both at once, so they should arrive together.$(br2)Yours,$(br)-- Cardamom Steles", + "lore.cardamom3.1": "$(italic)Full title: Letter from Cardamom Steles to her father, #3, part 1/2/$$(br2)Dear Papa,$(br)Two very peculiar things have happened since I last wrote.$(br2)Firstly, the professor in charge of the entry-level Hexcasting Corps students has disappeared. Nobody knows where he has gone. His office and living quarters were found locked, but still in their usual state of disarray.", + "lore.cardamom3.2": "Even more peculiarly, any attempts by the students of the Grand to rouse the administrative portions of the gnarled bureaucracy have been very firmly rejected. Even other professors seem reluctant to talk about him.$(br2)As you might imagine, Amanita is sorely distressed. Whatever replacement professors the Grand managed to dredge up have none of the old professor's tact or skill with beginners.", + "lore.cardamom3.3": "But amazingly, that is not the stranger of the two things I have to tell you. The most horrendous thing I hope to ever experience happened on another trip out with the Geology Corps. This time, we were due for an expedition near a village.", + "lore.cardamom3.4": "Usually when we do such a thing, there is a long process of communication with the mayor or elder of the village to ensure we have permission and establish boundaries on where we are allowed to go and what we are allowed to do. But on this expedition, there was very little of that; we were notified where we were going by a prefect of the Hexcasting Corps scarcely two days before we left.", + "lore.cardamom3.5": "We camped near the village, but in a thick forest, even though the nearby plains would have been much more hospitable. We could barely see the village from where we pitched our tents. As I laid down my bedroll the evening we arrived, the peculiar silence troubled me. Even if we couldn't see the village, we should have been able to hear it. But the whole time we were above-ground, there was next to no sound.", + "lore.cardamom3.6": "The few things I did hear all sounded like work: the peal of hammers on anvils and the scrape of hoe on dirt, for example. I never heard a shred of conversation.$(br2)The next morning we readied our lanterns and descended into the earth.", + "lore.cardamom3.7": "We weren't told exactly what it was we were spelunking for, but one of the other students had overheard we were looking for more amethyst, which seemed reasonable enough. I had my eyes trained for any specks of purple I might find in the cave walls, but just as the gray stone was making way to black slate, an incredible sight unfolded before me.$(br2)It was an entire chamber made of amethyst, nearly ten times as tall as I am. The inside seemed to glow with purple sparks and lanternlight glint, every surface covered with jagged crystal. There was more amethyst here than our entire group had ever excavated since I came to the Grand.", + "lore.cardamom3.8": "Gloves were distributed and we were told to get to mining. One of the prefects along with us had a peculiar lavender box I've seen some of the higher-ups in the Grand using for storage, and the other students and I dutifully got to shattering the glassy crystals off the walls of the cave and putting them in the box. Under the outer layers of brittle crystal there seemed to be two types of denser growth. One of them seemed of similar composition to the loose crystal, but one seemed more ... I struggle to find the word.", + "lore.cardamom3.9": "I hesitate to say \"important,\" but that's the best I can think of. It had a certain ... gravitas, like the dark, sunken X in its surface held some sacred meaning. Whatever the reason we were under strict instructions not to touch them. Occasionally a misplaced pickaxe would shatter one, and the student responsible would get quite the earful. Although the labor was hard and took most of my attention, I couldn't help but notice how ... lucid I felt. It was a strange mix of feelings: I felt incredibly clear-headed, but I also felt if I stopped to examine the feeling I might never stop.", + "lore.cardamom3.10": "It was like each breath in erected a friendly signpost in my head promising the way forward, pointing directly down a steep cliff. I shook my head and immersed myself in the work of mining, which seemed to stave off the signposts.$(br2)I did manage, however, to hide a shard of the crystal in my knapsack.$(br2)We spent nearly the whole day mining, excavating most of the crystal by the time the prefects' chronometer said the sun would set soon.", + "lore.cardamom3.11": "As we left, I couldn't help but notice that on the surfaces of those dark, scored places we left unmined, there seemed to be the faintest buds of new crystal, like they were somehow growing out of them. Everything I had learned about the geology of crystals said they took thousands of years to grow, but here there was new growth in less than a day. I suppose the prefects' warnings against breaking those spots were warranted, at least.", + "lore.cardamom3.12": "Our journey back to the surface was uneventful, and we got back to our tents just as the sun was setting-- My apologies, I am nearly out of paper for this letter. There's only so much you can write on one Akashic letter ... This tale is worth purchasing another letter for. I'll send them both at once, so they should arrive together.$(br2)Yours,$(br)-- Cardamom Steles", - "lore.terabithia4.1": "$(italic)Full title: Letter from Cardamom Steles to her father, #3, part 2/2/$$(br2)Dear Papa,$(br)As I was saying, I was running out of paper to write my story, so the rest of it is in this letter. We made it back to camp just as the sun was setting. And that night was the most horrible event of the whole strange outing.", - "lore.terabithia4.2": "I had gotten up in the middle of the night to relieve myself. The moon was covered with clouds, and I confess I got lost in the winds of the forest and could not find the way back to the camp. Fearing the monsters of the night, I decided I would find my way to the village and see if I could find a bed there. At the least, I would be protected there.", - "lore.terabithia4.3": "The village was easy enough to find, though there was very little sound. Even this late at night I would expect the inn to be, if not bustling, at least not silent. But peeking through the inn door I saw absolutely nobody.$(br2)I knocked on the door of one of the houses to no response. The next two houses, too, seemed completely empty.", - "lore.terabithia4.4": "My pulse started to rise, and I resolved to enter the next house. I figured whoever might be inside would be understanding of their rest being disturbed. At the least, hearing another voice would have been reassuring, even if they didn't let me stay the night under their roof.$(br2)The house was very small, barely more than a cartographer's table and a bed. I could see there was someone in the bed, and I tried to reassure myself that everyone in the village was just deeply asleep as I turned to leave.", - "lore.terabithia4.5": "But then the clouds shifted, and moonlight glinted across the bed's occupant.$(br2)I screamed, and its eyes snapped open. It was ... distinctly, horrendously not human. It was like some awful de-evolution of a man, its forehead too high, its body stocky and dense. I believe it is appropriate to say \"it,\" at least; the thing before me was obviously not as wise as a human, despite how it resembled us.", - "lore.terabithia4.6": "Its eyes trained on me-- oh, its eyes were awful, dull and unintelligent like a sheep's! It opened its mouth but a pained mockery of speech poured out, a shuddering, nasal groan.", - "lore.terabithia4.7": "I ran. In the light of the newly-revealed moon I caught glimpses of other townspeople through windows, and they were all warped and simplified as the first $(italic)thing/$ I had seen. I sprinted into the darkness of the forest, away from those terrible, terrible animal eyes in those distorted faces.$(br2)The camp was easier to find now that I could see in the moonlight. No-one seemed to have noticed my prolonged absence, thankfully. I crawled back into my bedroll and did my very best to forget the whole night.", - "lore.terabithia4.8": "As you can tell from this letter, I did not do a very good job. That warped visage still haunts my dreams. I shudder to think that it once might have been human.$(br2)After we got back to the Grand I showed the shard of crystal I had smuggled out to Amanita. She confirmed my suspicions: it is definitely a crystal of media. What an enormous geode full of it is doing underground, though, is beyond her.", - "lore.terabithia4.9": "She also mentioned something interesting: apparently media can be used in a similar way to true amethyst in those niche glasses I mentioned a few letters ago. The physical manner in which they both crystallise happens to be nearly identical, and it has nothing to do with media's magical properties, or so she says.$(br2)I chose not to tell her of the village full of monsters.", - "lore.terabithia4.10": "I know how tight money is for you, and how expensive it is to send a letter all the way back to the Grand, but I beg of you, please send a word of advice back. I am greatly distraught, and reading your words would do me much good.$(br2)Yours,$(br)-- Cardamom Steles", + "lore.cardamom4.1": "$(italic)Full title: Letter from Cardamom Steles to her father, #3, part 2/2/$$(br2)Dear Papa,$(br)As I was saying, I was running out of paper to write my story, so the rest of it is in this letter. We made it back to camp just as the sun was setting. And that night was the most horrible event of the whole strange outing.", + "lore.cardamom4.2": "I had gotten up in the middle of the night to relieve myself. The moon was covered with clouds, and I confess I got lost in the winds of the forest and could not find the way back to the camp. Fearing the monsters of the night, I decided I would find my way to the village and see if I could find a bed there. At the least, I would be protected there.", + "lore.cardamom4.3": "The village was easy enough to find, though there was very little sound. Even this late at night I would expect the inn to be, if not bustling, at least not silent. But peeking through the inn door I saw absolutely nobody.$(br2)I knocked on the door of one of the houses to no response. The next two houses, too, seemed completely empty.", + "lore.cardamom4.4": "My pulse started to rise, and I resolved to enter the next house. I figured whoever might be inside would be understanding of their rest being disturbed. At the least, hearing another voice would have been reassuring, even if they didn't let me stay the night under their roof.$(br2)The house was very small, barely more than a cartographer's table and a bed. I could see there was someone in the bed, and I tried to reassure myself that everyone in the village was just deeply asleep as I turned to leave.", + "lore.cardamom4.5": "But then the clouds shifted, and moonlight glinted across the bed's occupant.$(br2)I screamed, and its eyes snapped open. It was ... distinctly, horrendously not human. It was like some awful de-evolution of a man, its forehead too high, its body stocky and dense. I believe it is appropriate to say \"it,\" at least; the thing before me was obviously not as wise as a human, despite how it resembled us.", + "lore.cardamom4.6": "Its eyes trained on me-- oh, its eyes were awful, dull and unintelligent like a sheep's! It opened its mouth but a pained mockery of speech poured out, a shuddering, nasal groan.", + "lore.cardamom4.7": "I ran. In the light of the newly-revealed moon I caught glimpses of other townspeople through windows, and they were all warped and simplified as the first $(italic)thing/$ I had seen. I sprinted into the darkness of the forest, away from those terrible, terrible animal eyes in those distorted faces.$(br2)The camp was easier to find now that I could see in the moonlight. No-one seemed to have noticed my prolonged absence, thankfully. I crawled back into my bedroll and did my very best to forget the whole night.", + "lore.cardamom4.8": "As you can tell from this letter, I did not do a very good job. That warped visage still haunts my dreams. I shudder to think that it once might have been human.$(br2)After we got back to the Grand I showed the shard of crystal I had smuggled out to Amanita. She confirmed my suspicions: it is definitely a crystal of media. What an enormous geode full of it is doing underground, though, is beyond her.", + "lore.cardamom4.9": "She also mentioned something interesting: apparently media can be used in a similar way to true amethyst in those niche glasses I mentioned a few letters ago. The physical manner in which they both crystallise happens to be nearly identical, and it has nothing to do with media's magical properties, or so she says.$(br2)I chose not to tell her of the village full of monsters.", + "lore.cardamom4.10": "I know how tight money is for you, and how expensive it is to send a letter all the way back to the Grand, but I beg of you, please send a word of advice back. I am greatly distraught, and reading your words would do me much good.$(br2)Yours,$(br)-- Cardamom Steles", - "lore.terabithia5.1": "$(italic)Full title: Letter from Cardamom Steles to her father, #4/$$(br2)Amanita has disappeared.$(br2)I don't know where she has gone, Papa. The last I saw her was over dinner, and she had just spoken to someone about the disappearances, and then--", - "lore.terabithia5.2": "then-- then she was gone too. And no one speaks of her, and I am so so scared, Papa, do they all know? Everyone must have a friend who's just $(italic)vanished/$, into thin air, into non-being.$(br2)Where did they $(italic)go/$?", - "lore.terabithia5.3": "They keep shutting things down, too-- we haven't been on a trip for the Geology Corps in weeks, all the apparati that collect media in the main dome are gone, the Apothecary Corps haven't been open for months... it's like termites are eating the Grand from the inside, leaving a hollow shell.$(br2)I think they've started scanning the letters, we write too...", - "lore.terabithia5.4": "This letter has taken so much courage to write, and I don't have the courage to tell people myself, but if no one here can hold the knowledge I hope and pray you can send the word out... it's a vain hope for this to spread from somewhere as backwater as Brackenfalls, but please, please, do your best. Remember them, Papa... Amanita Libera, Jasmine Ward, Theodore Cha... please, remember them... and please forgive my cowardice, that I foist the responsibility onto you.", - "lore.terabithia5.5": "i can no longer write, my hands shake so much, please, rescue us.", + "lore.cardamom5.1": "$(italic)Full title: Letter from Cardamom Steles to her father, #4/$$(br2)Amanita has disappeared.$(br2)I don't know where she has gone, Papa. The last I saw her was over dinner, and she had just spoken to someone about the disappearances, and then--", + "lore.cardamom5.2": "then-- then she was gone too. And no one speaks of her, and I am so so scared, Papa, do they all know? Everyone must have a friend who's just $(italic)vanished/$, into thin air, into non-being.$(br2)Where did they $(italic)go/$?", + "lore.cardamom5.3": "They keep shutting things down, too-- we haven't been on a trip for the Geology Corps in weeks, all the apparati that collect media in the main dome are gone, the Apothecary Corps haven't been open for months... it's like termites are eating the Grand from the inside, leaving a hollow shell.$(br2)I think they've started scanning the letters, we write too...", + "lore.cardamom5.4": "This letter has taken so much courage to write, and I don't have the courage to tell people myself, but if no one here can hold the knowledge I hope and pray you can send the word out... it's a vain hope for this to spread from somewhere as backwater as Brackenfalls, but please, please, do your best. Remember them, Papa... Amanita Libera, Jasmine Ward, Theodore Cha... please, remember them... and please forgive my cowardice, that I foist the responsibility onto you.", + "lore.cardamom5.5": "i can no longer write, my hands shake so much, please, rescue us.", "lore.inventory.1": "Cell 39, Restoration Log #72, Detainment Center Beta$(br2)Prisoner Name: Raphael Barr$(br)Crime: Knowledge of Project Wooleye$(br)Reason for Cell Vacancy: Death$(br)Additional notes: The following letter was scrawled over most of the wall space.", diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom1.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom1.json new file mode 100644 index 00000000..3c61cf35 --- /dev/null +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom1.json @@ -0,0 +1,17 @@ +{ + "name": "hexcasting.entry.lore.cardamom1", + "icon": "hexcasting:lore_fragment", + "category": "hexcasting:lore", + "advancement": "hexcasting:lore/cardamom1", + "sortnum": 0, + "pages": [ + "hexcasting.page.lore.cardamom1.1", + "hexcasting.page.lore.cardamom1.2", + "hexcasting.page.lore.cardamom1.3", + "hexcasting.page.lore.cardamom1.4", + "hexcasting.page.lore.cardamom1.5", + "hexcasting.page.lore.cardamom1.6", + "hexcasting.page.lore.cardamom1.7", + "hexcasting.page.lore.cardamom1.8" + ] +} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom2.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom2.json new file mode 100644 index 00000000..979c8f08 --- /dev/null +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom2.json @@ -0,0 +1,16 @@ +{ + "name": "hexcasting.entry.lore.cardamom2", + "icon": "hexcasting:lore_fragment", + "category": "hexcasting:lore", + "advancement": "hexcasting:lore/cardamom2", + "sortnum": 1, + "pages": [ + "hexcasting.page.lore.cardamom2.1", + "hexcasting.page.lore.cardamom2.2", + "hexcasting.page.lore.cardamom2.3", + "hexcasting.page.lore.cardamom2.4", + "hexcasting.page.lore.cardamom2.5", + "hexcasting.page.lore.cardamom2.6", + "hexcasting.page.lore.cardamom2.7" + ] +} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom3.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom3.json new file mode 100644 index 00000000..9bd1ca48 --- /dev/null +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom3.json @@ -0,0 +1,21 @@ +{ + "name": "hexcasting.entry.lore.cardamom3", + "icon": "hexcasting:lore_fragment", + "category": "hexcasting:lore", + "advancement": "hexcasting:lore/cardamom3", + "sortnum": 2, + "pages": [ + "hexcasting.page.lore.cardamom3.1", + "hexcasting.page.lore.cardamom3.2", + "hexcasting.page.lore.cardamom3.3", + "hexcasting.page.lore.cardamom3.4", + "hexcasting.page.lore.cardamom3.5", + "hexcasting.page.lore.cardamom3.6", + "hexcasting.page.lore.cardamom3.7", + "hexcasting.page.lore.cardamom3.8", + "hexcasting.page.lore.cardamom3.9", + "hexcasting.page.lore.cardamom3.10", + "hexcasting.page.lore.cardamom3.11", + "hexcasting.page.lore.cardamom3.12" + ] +} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom4.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom4.json new file mode 100644 index 00000000..c149a6c0 --- /dev/null +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom4.json @@ -0,0 +1,19 @@ +{ + "name": "hexcasting.entry.lore.cardamom4", + "icon": "hexcasting:lore_fragment", + "category": "hexcasting:lore", + "advancement": "hexcasting:lore/cardamom4", + "sortnum": 3, + "pages": [ + "hexcasting.page.lore.cardamom4.1", + "hexcasting.page.lore.cardamom4.2", + "hexcasting.page.lore.cardamom4.3", + "hexcasting.page.lore.cardamom4.4", + "hexcasting.page.lore.cardamom4.5", + "hexcasting.page.lore.cardamom4.6", + "hexcasting.page.lore.cardamom4.7", + "hexcasting.page.lore.cardamom4.8", + "hexcasting.page.lore.cardamom4.9", + "hexcasting.page.lore.cardamom4.10" + ] +} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom5.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom5.json new file mode 100644 index 00000000..3823641d --- /dev/null +++ b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/cardamom5.json @@ -0,0 +1,14 @@ +{ + "name": "hexcasting.entry.lore.cardamom5", + "icon": "hexcasting:lore_fragment", + "category": "hexcasting:lore", + "advancement": "hexcasting:lore/cardamom5", + "sortnum": 4, + "pages": [ + "hexcasting.page.lore.cardamom5.1", + "hexcasting.page.lore.cardamom5.2", + "hexcasting.page.lore.cardamom5.3", + "hexcasting.page.lore.cardamom5.4", + "hexcasting.page.lore.cardamom5.5" + ] +} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia1.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia1.json deleted file mode 100644 index ad6029a3..00000000 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia1.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "hexcasting.entry.lore.terabithia1", - "icon": "hexcasting:lore_fragment", - "category": "hexcasting:lore", - "advancement": "hexcasting:lore/terabithia1", - "sortnum": 0, - "pages": [ - "hexcasting.page.lore.terabithia1.1", - "hexcasting.page.lore.terabithia1.2", - "hexcasting.page.lore.terabithia1.3", - "hexcasting.page.lore.terabithia1.4", - "hexcasting.page.lore.terabithia1.5", - "hexcasting.page.lore.terabithia1.6", - "hexcasting.page.lore.terabithia1.7", - "hexcasting.page.lore.terabithia1.8" - ] -} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia2.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia2.json deleted file mode 100644 index abf59f90..00000000 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia2.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "hexcasting.entry.lore.terabithia2", - "icon": "hexcasting:lore_fragment", - "category": "hexcasting:lore", - "advancement": "hexcasting:lore/terabithia2", - "sortnum": 1, - "pages": [ - "hexcasting.page.lore.terabithia2.1", - "hexcasting.page.lore.terabithia2.2", - "hexcasting.page.lore.terabithia2.3", - "hexcasting.page.lore.terabithia2.4", - "hexcasting.page.lore.terabithia2.5", - "hexcasting.page.lore.terabithia2.6", - "hexcasting.page.lore.terabithia2.7" - ] -} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia3.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia3.json deleted file mode 100644 index f9571468..00000000 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia3.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "hexcasting.entry.lore.terabithia3", - "icon": "hexcasting:lore_fragment", - "category": "hexcasting:lore", - "advancement": "hexcasting:lore/terabithia3", - "sortnum": 2, - "pages": [ - "hexcasting.page.lore.terabithia3.1", - "hexcasting.page.lore.terabithia3.2", - "hexcasting.page.lore.terabithia3.3", - "hexcasting.page.lore.terabithia3.4", - "hexcasting.page.lore.terabithia3.5", - "hexcasting.page.lore.terabithia3.6", - "hexcasting.page.lore.terabithia3.7", - "hexcasting.page.lore.terabithia3.8", - "hexcasting.page.lore.terabithia3.9", - "hexcasting.page.lore.terabithia3.10", - "hexcasting.page.lore.terabithia3.11", - "hexcasting.page.lore.terabithia3.12" - ] -} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia4.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia4.json deleted file mode 100644 index bce76dc4..00000000 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia4.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "hexcasting.entry.lore.terabithia4", - "icon": "hexcasting:lore_fragment", - "category": "hexcasting:lore", - "advancement": "hexcasting:lore/terabithia4", - "sortnum": 3, - "pages": [ - "hexcasting.page.lore.terabithia4.1", - "hexcasting.page.lore.terabithia4.2", - "hexcasting.page.lore.terabithia4.3", - "hexcasting.page.lore.terabithia4.4", - "hexcasting.page.lore.terabithia4.5", - "hexcasting.page.lore.terabithia4.6", - "hexcasting.page.lore.terabithia4.7", - "hexcasting.page.lore.terabithia4.8", - "hexcasting.page.lore.terabithia4.9", - "hexcasting.page.lore.terabithia4.10" - ] -} diff --git a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia5.json b/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia5.json deleted file mode 100644 index 035d018f..00000000 --- a/Common/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/lore/terabithia5.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "hexcasting.entry.lore.terabithia5", - "icon": "hexcasting:lore_fragment", - "category": "hexcasting:lore", - "advancement": "hexcasting:lore/terabithia5", - "sortnum": 4, - "pages": [ - "hexcasting.page.lore.terabithia5.1", - "hexcasting.page.lore.terabithia5.2", - "hexcasting.page.lore.terabithia5.3", - "hexcasting.page.lore.terabithia5.4", - "hexcasting.page.lore.terabithia5.5" - ] -} diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java index 8a5b7494..6e2309a0 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexBlockStatesAndModels.java @@ -315,8 +315,13 @@ public class HexBlockStatesAndModels extends PaucalBlockStateAndModelProvider { // The front face can never be both lit and unpowered (b/c otherwise it would exit the other way) String frontEnding, backEnding; if (isLit) { - frontEnding = "lit_powered"; - backEnding = "lit_unpowered"; + if (isPowered) { + frontEnding = "lit_powered"; + backEnding = "dim_powered"; + } else { + frontEnding = "dim_unpowered"; + backEnding = "lit_unpowered"; + } } else { frontEnding = "dim_" + poweredness; backEnding = "dim_" + poweredness; From 045618fbc002ce560aa7e731002e14ae8cd74390 Mon Sep 17 00:00:00 2001 From: Talia-12 Date: Tue, 13 Jun 2023 01:44:47 +1000 Subject: [PATCH 48/48] made impeti display messages when they print #473. Fixed some lang stuff. --- .../circles/BlockEntityAbstractImpetus.java | 50 ++++++++++--------- .../casting/circles/CircleExecutionState.java | 2 +- .../api/casting/eval/CastingEnvironment.java | 3 ++ .../api/casting/eval/env/CircleCastEnv.java | 9 ++++ .../casting/eval/env/PlayerBasedCastEnv.java | 6 +++ .../impetuses/BlockEntityRedstoneImpetus.java | 4 +- .../impetuses/BlockRedstoneImpetus.java | 2 +- .../common/casting/actions/spells/OpPrint.kt | 2 +- .../hexcasting/common/lib/HexSounds.java | 2 +- .../hexcasting/lang/en_us.flatten.json5 | 13 +++-- .../assets/hexcasting/lang/ru_ru.json | 2 +- .../assets/hexcasting/lang/zh_cn.json | 2 +- .../resources/assets/hexcasting/sounds.json5 | 4 +- 13 files changed, 63 insertions(+), 38 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/BlockEntityAbstractImpetus.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/BlockEntityAbstractImpetus.java index 0e8ed5b6..44b7573a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/BlockEntityAbstractImpetus.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/BlockEntityAbstractImpetus.java @@ -59,9 +59,9 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen // these are null together @Nullable - protected Component errorMsg = null; + protected Component displayMsg = null; @Nullable - protected ItemStack errorDisplay = null; + protected ItemStack displayItem = null; public BlockEntityAbstractImpetus(BlockEntityType pType, BlockPos pWorldPosition, BlockState pBlockState) { @@ -73,29 +73,33 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen } @Nullable - public Component getErrorMsg() { - return errorMsg; + public Component getDisplayMsg() { + return displayMsg; } - public void clearError() { - this.errorMsg = null; - this.errorDisplay = null; + public void clearDisplay() { + this.displayMsg = null; + this.displayItem = null; this.sync(); } - public void postError(Component error, ItemStack display) { - this.errorMsg = error; - this.errorDisplay = display; + public void postDisplay(Component error, ItemStack display) { + this.displayMsg = error; + this.displayItem = display; this.sync(); } public void postMishap(Component mishapDisplay) { - this.postError(mishapDisplay, new ItemStack(Items.MUSIC_DISC_11)); + this.postDisplay(mishapDisplay, new ItemStack(Items.MUSIC_DISC_11)); + } + + public void postPrint(Component printDisplay) { + this.postDisplay(printDisplay, new ItemStack(Items.BOOK)); } // Pull this out because we may need to call it both on startup and halfway thru public void postNoExits(BlockPos pos) { - this.postError( + this.postDisplay( Component.translatable("hexcasting.tooltip.circle.no_exit", Component.literal(pos.toShortString()).withStyle(ChatFormatting.RED)), new ItemStack(Items.OAK_SIGN)); @@ -164,7 +168,7 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen this.postNoExits(this.getBlockPos()); } else { ICircleComponent.sfx(errPos, this.level.getBlockState(errPos), this.level, null, false); - this.postError(Component.translatable("hexcasting.tooltip.circle.no_closure", + this.postDisplay(Component.translatable("hexcasting.tooltip.circle.no_closure", Component.literal(errPos.toShortString()).withStyle(ChatFormatting.RED)), new ItemStack(Items.LEAD)); } @@ -173,7 +177,7 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen } this.executionState = result.unwrap(); - this.clearError(); + this.clearDisplay(); var serverLevel = (ServerLevel) this.level; serverLevel.scheduleTick(this.getBlockPos(), this.getBlockState().getBlock(), this.executionState.getTickSpeed()); @@ -268,10 +272,10 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen tag.putLong(TAG_MEDIA, this.media); - if (this.errorMsg != null && this.errorDisplay != null) { - tag.putString(TAG_ERROR_MSG, Component.Serializer.toJson(this.errorMsg)); + if (this.displayMsg != null && this.displayItem != null) { + tag.putString(TAG_ERROR_MSG, Component.Serializer.toJson(this.displayMsg)); var itemTag = new CompoundTag(); - this.errorDisplay.save(itemTag); + this.displayItem.save(itemTag); tag.put(TAG_ERROR_DISPLAY, itemTag); } } @@ -292,11 +296,11 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen if (tag.contains(TAG_ERROR_MSG, Tag.TAG_STRING) && tag.contains(TAG_ERROR_DISPLAY, Tag.TAG_COMPOUND)) { var msg = Component.Serializer.fromJson(tag.getString(TAG_ERROR_MSG)); var display = ItemStack.of(tag.getCompound(TAG_ERROR_DISPLAY)); - this.errorMsg = msg; - this.errorDisplay = display; + this.displayMsg = msg; + this.displayItem = display; } else { - this.errorMsg = null; - this.errorDisplay = null; + this.displayMsg = null; + this.displayItem = null; } } @@ -312,8 +316,8 @@ public abstract class BlockEntityAbstractImpetus extends HexBlockEntity implemen lines.add(new Pair<>(new ItemStack(HexItems.AMETHYST_DUST), dustCmp)); } - if (this.errorMsg != null && this.errorDisplay != null) { - lines.add(new Pair<>(this.errorDisplay, this.errorMsg)); + if (this.displayMsg != null && this.displayItem != null) { + lines.add(new Pair<>(this.displayItem, this.displayMsg)); } } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 0d392058..c0857ed0 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -247,7 +247,7 @@ public class CircleExecutionState { && cc.canEnterFromDirection(exit.getSecond(), exit.getFirst(), there, world)) { if (found != null) { // oh no! - impetus.postError( + impetus.postDisplay( Component.translatable("hexcasting.tooltip.circle.many_exits", Component.literal(this.currentPos.toShortString()).withStyle(ChatFormatting.RED)), new ItemStack(Items.COMPASS)); diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java index b9976aa6..bf6323d3 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/CastingEnvironment.java @@ -10,6 +10,7 @@ import at.petrak.hexcasting.api.mod.HexConfig; import at.petrak.hexcasting.api.pigment.FrozenPigment; import at.petrak.hexcasting.api.utils.HexUtils; import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; @@ -291,4 +292,6 @@ public abstract class CastingEnvironment { public abstract FrozenPigment getColorizer(); public abstract void produceParticles(ParticleSpray particles, FrozenPigment colorizer); + + public abstract void printMessage(Component message); } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/CircleCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/CircleCastEnv.java index ae642014..7df1b3d9 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/CircleCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/CircleCastEnv.java @@ -12,6 +12,7 @@ import at.petrak.hexcasting.api.pigment.FrozenPigment; import at.petrak.hexcasting.common.lib.HexItems; import net.minecraft.Util; import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundSource; @@ -168,4 +169,12 @@ public class CircleCastEnv extends CastingEnvironment { public void produceParticles(ParticleSpray particles, FrozenPigment colorizer) { particles.sprayParticles(this.world, colorizer); } + + @Override + public void printMessage(Component message) { + var impetus = getImpetus(); + if (impetus == null) + return; + impetus.postPrint(message); + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PlayerBasedCastEnv.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PlayerBasedCastEnv.java index 3f445db4..ff22daad 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PlayerBasedCastEnv.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/env/PlayerBasedCastEnv.java @@ -16,6 +16,7 @@ import at.petrak.hexcasting.api.pigment.FrozenPigment; import at.petrak.hexcasting.api.utils.HexUtils; import at.petrak.hexcasting.api.utils.MediaHelper; import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerPlayer; import net.minecraft.util.Mth; import net.minecraft.world.InteractionHand; @@ -212,4 +213,9 @@ public abstract class PlayerBasedCastEnv extends CastingEnvironment { // not sure what the diff between this and isCreative() is return this.caster.getAbilities().instabuild; } + + @Override + public void printMessage(Component message) { + caster.sendSystemMessage(message); + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java index b0a104eb..c46b7aee 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockEntityRedstoneImpetus.java @@ -107,10 +107,10 @@ public class BlockEntityRedstoneImpetus extends BlockEntityAbstractImpetus { cachedDisplayStack = head; } lines.add(new Pair<>(cachedDisplayStack, - Component.translatable("hexcasting.tooltip.lens.impetus.storedplayer", name.getName()))); + Component.translatable("hexcasting.tooltip.lens.impetus.redstone.bound", name.getName()))); } else { lines.add(new Pair<>(new ItemStack(Items.BARRIER), - Component.translatable("hexcasting.tooltip.lens.impetus.storedplayer.none"))); + Component.translatable("hexcasting.tooltip.lens.impetus.redstone.bound.none"))); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockRedstoneImpetus.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockRedstoneImpetus.java index 12b9d136..58b3ac7c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockRedstoneImpetus.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/impetuses/BlockRedstoneImpetus.java @@ -60,7 +60,7 @@ public class BlockRedstoneImpetus extends BlockAbstractImpetus { tile.setPlayer(player.getGameProfile(), entity.getUUID()); tile.sync(); - pLevel.playSound(pPlayer, pPos, HexSounds.IMPETUS_STOREDPLAYER_DING, + pLevel.playSound(pPlayer, pPos, HexSounds.IMPETUS_REDSTONE_DING, SoundSource.BLOCKS, 1f, 1f); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt index 719d47cd..bd9ee453 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/spells/OpPrint.kt @@ -34,7 +34,7 @@ object OpPrint : Action { private data class Spell(val datum: Iota) : RenderedSpell { override fun cast(ctx: CastingEnvironment) { - ctx.caster?.sendSystemMessage(datum.display()) // TODO: how to handle in cirles + ctx.printMessage(datum.display()) } } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java index ca14649e..deaeef11 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java @@ -41,7 +41,7 @@ public class HexSounds { public static final SoundEvent SCROLL_SCRIBBLE = sound("scroll.scribble"); public static final SoundEvent IMPETUS_LOOK_TICK = sound("impetus.fletcher.tick"); - public static final SoundEvent IMPETUS_STOREDPLAYER_DING = sound("impetus.cleric.register"); + public static final SoundEvent IMPETUS_REDSTONE_DING = sound("impetus.redstone.register"); public static final SoundEvent READ_LORE_FRAGMENT = sound("lore_fragment.read"); 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 0527513a..d222e4e6 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 @@ -300,16 +300,19 @@ no_closure: "The flow of media will not be able to return to the impetus at %s" }, - impetus: { - "redstone.bound": "Bound to %s", - "redstone.bound.none": "Unbound", - }, + lens: { + impetus: { + "redstone.bound": "Bound to %s", + "redstone.bound.none": "Unbound", + }, "pattern.invalid": "Invalid Pattern", "akashic.bookshelf.location": "Record at %s", "akashic.record.count": "%s iotas stored", "akashic.record.count.single": "%s iota stored", + "bee": "%s bees", + "bee.single": "%s bee", }, "brainsweep.min_level": "Level %s or higher", @@ -362,7 +365,7 @@ "scroll.dust": "Scroll covers with dust", "scroll.scribble": "Scroll is scribbled", "impetus.fletcher.tick": "Fletcher Impetus ticks", - "impetus.cleric.register": "Cleric Impetus dings", + "impetus.redstone.register": "Cleric Impetus dings", "lore_fragment.read": "Read lore fragment", "flight.ambience": "Player flies", "flight.finish": "Flight ends", diff --git a/Common/src/main/resources/assets/hexcasting/lang/ru_ru.json b/Common/src/main/resources/assets/hexcasting/lang/ru_ru.json index 7cf08959..e0a5d533 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/ru_ru.json +++ b/Common/src/main/resources/assets/hexcasting/lang/ru_ru.json @@ -170,7 +170,7 @@ "hexcasting.subtitles.scroll.dust": "Свиток покрывается пылью", "hexcasting.subtitles.scroll.scribble": "Свиток очищен", "hexcasting.subtitles.impetus.fletcher.tick": "Fletcher Impetus ticks", - "hexcasting.subtitles.impetus.cleric.register": "Cleric Impetus dings", + "hexcasting.subtitles.redstone.cleric.register": "Cleric Impetus dings", "hexcasting.spell.hexcasting:get_caster": "Зеркало нарцисса", "hexcasting.spell.hexcasting:get_entity_pos": "Положение сущности", diff --git a/Common/src/main/resources/assets/hexcasting/lang/zh_cn.json b/Common/src/main/resources/assets/hexcasting/lang/zh_cn.json index d3142eda..5a577d5a 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/zh_cn.json +++ b/Common/src/main/resources/assets/hexcasting/lang/zh_cn.json @@ -298,7 +298,7 @@ "hexcasting.subtitles.scroll.dust": "卷轴:被施粉", "hexcasting.subtitles.scroll.scribble": "卷轴:被涂写", "hexcasting.subtitles.impetus.fletcher.tick": "制箭师促动石:咔哒", - "hexcasting.subtitles.impetus.cleric.register": "牧师促动石:叮~", + "hexcasting.subtitles.impetus.redstone.register": "牧师促动石:叮~", "hexcasting.subtitles.lore_fragment.read": "故事残卷:被阅读", "hexcasting.subtitles.flight.ambience": "玩家:飞翔", "hexcasting.subtitles.flight.finish": "飞翔结束", diff --git a/Common/src/main/resources/assets/hexcasting/sounds.json5 b/Common/src/main/resources/assets/hexcasting/sounds.json5 index 8cc7eb3f..94b51cc8 100644 --- a/Common/src/main/resources/assets/hexcasting/sounds.json5 +++ b/Common/src/main/resources/assets/hexcasting/sounds.json5 @@ -126,11 +126,11 @@ ], "subtitle": "hexcasting.subtitles.impetus.fletcher.tick" }, - "impetus.cleric.register": { + "impetus.redstone.register": { "sounds": [ "minecraft:random/orb" ], - "subtitle": "hexcasting.subtitles.impetus.cleric.register" + "subtitle": "hexcasting.subtitles.impetus.redstone.register" }, "lore_fragment.read": {