diff --git a/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java b/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java index a506bc1d..bb727bbb 100644 --- a/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java +++ b/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java @@ -5,13 +5,22 @@ import at.petrak.hexcasting.api.Operator; import at.petrak.hexcasting.api.PatternRegistry; import at.petrak.hexcasting.api.SpellDatum; import at.petrak.hexcasting.common.casting.operators.*; -import at.petrak.hexcasting.common.casting.operators.eval.*; -import at.petrak.hexcasting.common.casting.operators.lists.*; +import at.petrak.hexcasting.common.casting.operators.eval.OpEvalDelay; +import at.petrak.hexcasting.common.casting.operators.eval.OpForEach; +import at.petrak.hexcasting.common.casting.operators.lists.OpAppend; +import at.petrak.hexcasting.common.casting.operators.lists.OpConcat; +import at.petrak.hexcasting.common.casting.operators.lists.OpIndex; import at.petrak.hexcasting.common.casting.operators.math.*; -import at.petrak.hexcasting.common.casting.operators.selectors.*; +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.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.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.eval.*; import at.petrak.hexcasting.common.items.magic.ItemArtifact; import at.petrak.hexcasting.common.items.magic.ItemCypher; import at.petrak.hexcasting.common.items.magic.ItemTrinket; @@ -22,8 +31,6 @@ import net.minecraft.world.phys.Vec3; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import java.util.regex.Pattern; - import static at.petrak.hexcasting.common.lib.RegisterHelper.prefix; public class RegisterPatterns { @@ -286,12 +293,6 @@ public class RegisterPatterns { OpIndex.INSTANCE); PatternRegistry.mapPattern(HexPattern.FromAnglesSig("dadad", HexDir.NORTH_EAST), prefix("for_each"), OpForEach.INSTANCE); - PatternRegistry.mapPattern(HexPattern.FromAnglesSig("aqaeaq", HexDir.EAST), prefix("list_size"), - OpListSize.INSTANCE); - PatternRegistry.mapPattern(HexPattern.FromAnglesSig("adeeed", HexDir.EAST), prefix("singleton"), - OpSingleton.INSTANCE); - PatternRegistry.mapPattern(HexPattern.FromAnglesSig("qqaeaae", HexDir.NORTH_EAST), prefix("empty_list"), - OpEmptyList.INSTANCE); } catch (PatternRegistry.RegisterPatternException exn) { exn.printStackTrace(); diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpEmptyList.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpEmptyList.kt deleted file mode 100644 index 933f4930..00000000 --- a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpEmptyList.kt +++ /dev/null @@ -1,13 +0,0 @@ -package at.petrak.hexcasting.common.casting.operators.lists - -import at.petrak.hexcasting.api.ConstManaOperator -import at.petrak.hexcasting.api.Operator.Companion.spellListOf -import at.petrak.hexcasting.api.SpellDatum -import at.petrak.hexcasting.common.casting.CastingContext - -object OpEmptyList : ConstManaOperator { - override val argc = 0 - override fun execute(args: List>, ctx: CastingContext): List> { - return spellListOf(emptyList>()) // sorry for taking all the easy impls, hudeler - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpListSize.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpListSize.kt deleted file mode 100644 index 9cf6085a..00000000 --- a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpListSize.kt +++ /dev/null @@ -1,15 +0,0 @@ -package at.petrak.hexcasting.common.casting.operators.lists - -import at.petrak.hexcasting.api.ConstManaOperator -import at.petrak.hexcasting.api.Operator.Companion.getChecked -import at.petrak.hexcasting.api.Operator.Companion.spellListOf -import at.petrak.hexcasting.api.SpellDatum -import at.petrak.hexcasting.common.casting.CastingContext - -// it's still called beancounter's distillation in my heart -object OpListSize : ConstManaOperator { - override val argc = 1 - override fun execute(args: List>, ctx: CastingContext): List> { - return spellListOf(args.getChecked>>(0).toList().size.toDouble()) // mmm one-liner - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSingleton.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSingleton.kt deleted file mode 100644 index afe4e0f5..00000000 --- a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpSingleton.kt +++ /dev/null @@ -1,13 +0,0 @@ -package at.petrak.hexcasting.common.casting.operators.lists - -import at.petrak.hexcasting.api.ConstManaOperator -import at.petrak.hexcasting.api.Operator.Companion.spellListOf -import at.petrak.hexcasting.api.SpellDatum -import at.petrak.hexcasting.common.casting.CastingContext - -object OpSingleton : ConstManaOperator { - override val argc = 1 - override fun execute(args: List>, ctx: CastingContext): List> { - return spellListOf(listOf(args[0])) // god i love one-liners - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt index da83ac5c..c0346742 100644 --- a/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpWeather.kt @@ -20,7 +20,7 @@ class OpWeather(val rain: Boolean) : SpellOperator { override fun cast(ctx: CastingContext) { val w = ctx.world if (w.isRaining != rain) { - w.levelData.isRaining = rain // i hex the rains down in minecraftia + w.levelData.isRaining = rain // i bless the rains down in minecraftia } } } diff --git a/src/main/resources/assets/hexcasting/lang/en_us.json b/src/main/resources/assets/hexcasting/lang/en_us.json index eee6b6a4..a142e2d8 100644 --- a/src/main/resources/assets/hexcasting/lang/en_us.json +++ b/src/main/resources/assets/hexcasting/lang/en_us.json @@ -80,9 +80,6 @@ "hexcasting.spell.hexcasting:concat": "Combination Distillation", "hexcasting.spell.hexcasting:index": "Selection Distillation", "hexcasting.spell.hexcasting:for_each": "Thoth's Gambit", - "hexcasting.spell.hexcasting:list_size": "Numerologist's Purification", - "hexcasting.spell.hexcasting:singleton": "Single's Purification", - "hexcasting.spell.hexcasting:empty_list": "Vacant Reflection", "hexcasting.spell.hexcasting:get_entity": "Entity Purification", "hexcasting.spell.hexcasting:get_entity/animal": "Entity Prfn.: Animal", "hexcasting.spell.hexcasting:get_entity/monster": "Entity Prfn.: Monster", diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json index 9d286e94..846ea38c 100644 --- a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json @@ -29,30 +29,6 @@ "input": "list, list", "output": "list", "text": "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." - }, - { - "type": "hexcasting:pattern", - "op_id": "hexcasting:empty_list", - "anchor": "hexcasting:empty_list", - "input": "", - "output": "list", - "text": "Push an empty list to the top of the stack." - }, - { - "type": "hexcasting:pattern", - "op_id": "hexcasting:singleton", - "anchor": "hexcasting:singleton", - "input": "any", - "output": "list", - "text": "Remove the top of the stack, then push a list containing only that element." - }, - { - "type": "hexcasting:pattern", - "op_id": "hexcasting:list_size", - "anchor": "hexcasting:list_size", - "input": "list", - "output": "num", - "text": "Remove the list at the top of the stack, then push the number of elements in the list to the stack." } ] }