Skip to content

Commit

Permalink
Added more entity purifications
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucomics committed Mar 2, 2024
1 parent e1582b6 commit e8ce4af
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package miyucomics.hexical.casting.patterns.operators

import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getEntity
import at.petrak.hexcasting.api.spell.iota.BooleanIota
import at.petrak.hexcasting.api.spell.iota.Iota

class OpGetEntityBurning : ConstMediaAction {
override val argc = 1

override fun execute(args: List<Iota>, ctx: CastingContext): List<Iota> {
return listOf(BooleanIota(args.getEntity(0, argc).isOnFire))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package miyucomics.hexical.casting.patterns.operators

import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getEntity
import at.petrak.hexcasting.api.spell.iota.DoubleIota
import at.petrak.hexcasting.api.spell.iota.Iota

class OpGetEntityBurningTime : ConstMediaAction {
override val argc = 1

override fun execute(args: List<Iota>, ctx: CastingContext): List<Iota> {
return listOf(DoubleIota(args.getEntity(0, argc).fireTicks.toDouble()))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package miyucomics.hexical.casting.patterns.operators

import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getEntity
import at.petrak.hexcasting.api.spell.iota.BooleanIota
import at.petrak.hexcasting.api.spell.iota.Iota

class OpGetEntityWet : ConstMediaAction {
override val argc = 1

override fun execute(args: List<Iota>, ctx: CastingContext): List<Iota> {
return listOf(BooleanIota(args.getEntity(0, argc).isWet))
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package miyucomics.hexical.casting.patterns.operators.lamp
package miyucomics.hexical.casting.patterns.operators

import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import miyucomics.hexical.blocks.MageBlock
import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Vec3d

class OpConfigureMageBlock(private val property: String, arguments: Int = 0) : SpellAction {
class OpModifyMageBlock(private val property: String, arguments: Int = 0) : SpellAction {
override val argc = arguments + 1

override fun execute(args: List<Iota>, ctx: CastingContext): Triple<RenderedSpell, Int, List<ParticleSpray>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ import at.petrak.hexcasting.api.spell.Action
import at.petrak.hexcasting.api.spell.math.HexDir
import at.petrak.hexcasting.api.spell.math.HexPattern
import miyucomics.hexical.Hexical
import miyucomics.hexical.casting.patterns.operators.OpGetEntityBurning
import miyucomics.hexical.casting.patterns.operators.OpGetEntityBurningTime
import miyucomics.hexical.casting.patterns.operators.OpGetEntityWet
import miyucomics.hexical.casting.patterns.operators.OpGetPlayerSprinting
import miyucomics.hexical.casting.patterns.operators.eval.OpNephthys
import miyucomics.hexical.casting.patterns.operators.lamp.OpGetArchLampData
import miyucomics.hexical.casting.patterns.operators.lamp.OpGetLampData
import miyucomics.hexical.casting.patterns.operators.lamp.OpGetPlayerSprinting
import miyucomics.hexical.casting.patterns.operators.lamp.OpIsUsingArchLamp
import miyucomics.hexical.casting.patterns.spells.*
import net.minecraft.util.Identifier
Expand All @@ -20,18 +23,22 @@ object HexicalPatterns {
var NEPHTHYS_GAMBIT = register(HexPattern.fromAngles("deaqqdq", HexDir.SOUTH_EAST), "nephthys", OpNephthys);

var CONJURE_ADVANCED_BLOCK: HexPattern = register(HexPattern.fromAngles("dee", HexDir.NORTH_WEST), "conjure_mage_block", OpConjureMageBlock())
var CONFIGURE_BLOCK_BOUNCY: HexPattern = register(HexPattern.fromAngles("deeqa", HexDir.NORTH_WEST), "modify_block_bouncy", OpConfigureMageBlock("bouncy"))
var CONFIGURE_BLOCK_EPHEMERAL: HexPattern = register(HexPattern.fromAngles("deewwaawd", HexDir.NORTH_WEST), "modify_block_ephemeral", OpConfigureMageBlock("ephemeral", 1))
var CONFIGURE_BLOCK_INVISIBLE: HexPattern = register(HexPattern.fromAngles("deeqedeaqqqwqqq", HexDir.NORTH_WEST), "modify_block_invisible", OpConfigureMageBlock("invisible"))
var CONFIGURE_BLOCK_REPLACEABLE: HexPattern = register(HexPattern.fromAngles("deewqaqqqqq", HexDir.NORTH_WEST), "modify_block_replaceable", OpConfigureMageBlock("replaceable"))
var CONFIGURE_BLOCK_VOLATILE: HexPattern = register(HexPattern.fromAngles("deewedeeeee", HexDir.NORTH_WEST), "modify_block_volatile", OpConfigureMageBlock("volatile"))
var MODIFY_BLOCK_BOUNCY: HexPattern = register(HexPattern.fromAngles("deeqa", HexDir.NORTH_WEST), "modify_block_bouncy", OpModifyMageBlock("bouncy"))
var MODIFY_BLOCK_EPHEMERAL: HexPattern = register(HexPattern.fromAngles("deewwaawd", HexDir.NORTH_WEST), "modify_block_ephemeral", OpModifyMageBlock("ephemeral", 1))
var MODIFY_BLOCK_INVISIBLE: HexPattern = register(HexPattern.fromAngles("deeqedeaqqqwqqq", HexDir.NORTH_WEST), "modify_block_invisible", OpModifyMageBlock("invisible"))
var MODIFY_BLOCK_REPLACEABLE: HexPattern = register(HexPattern.fromAngles("deewqaqqqqq", HexDir.NORTH_WEST), "modify_block_replaceable", OpModifyMageBlock("replaceable"))
var MODIFY_BLOCK_VOLATILE: HexPattern = register(HexPattern.fromAngles("deewedeeeee", HexDir.NORTH_WEST), "modify_block_volatile", OpModifyMageBlock("volatile"))

var CHORUS_BLINK: HexPattern = register(HexPattern.fromAngles("aawqqqq", HexDir.SOUTH_EAST), "chorus_blink", OpChorusBlink())
var PROGRAM_LAMP: HexPattern = register(HexPattern.fromAngles("wwqqqqq", HexDir.EAST), "program_lamp", OpProgramLamp())

var CONJURE_STAFF: HexPattern = register(HexPattern.fromAngles("wweeeed", HexDir.NORTH_EAST), "conjure_staff", OpConjureStaff())
var CONJURE_STAFF: HexPattern = register(HexPattern.fromAngles("wwwwwaqqqqqeaqeaeaeaeaeq", HexDir.NORTH_EAST), "conjure_staff", OpConjureStaff())

var ENTITY_BURNING: HexPattern = register(HexPattern.fromAngles("qqwaqda", HexDir.EAST), "is_burning", OpGetEntityBurning())
var ENTITY_BURNING_TIME: HexPattern = register(HexPattern.fromAngles("eewdead", HexDir.WEST), "burning_time", OpGetEntityBurningTime())
var ENTITY_WET: HexPattern = register(HexPattern.fromAngles("qqqqwaadq", HexDir.SOUTH_WEST), "is_wet", OpGetEntityWet())
var PLAYER_SPRINTING: HexPattern = register(HexPattern.fromAngles("eaq", HexDir.WEST), "is_sprinting", OpGetPlayerSprinting())

var PROGRAM_LAMP: HexPattern = register(HexPattern.fromAngles("wwqqqqq", HexDir.EAST), "program_lamp", OpProgramLamp())
var LAMP_POSITION: HexPattern = register(HexPattern.fromAngles("qwddedqdd", HexDir.SOUTH_WEST), "get_lamp_position", OpGetLampData(0))
var LAMP_ROTATION: HexPattern = register(HexPattern.fromAngles("qwddedadw", HexDir.SOUTH_WEST), "get_lamp_rotation", OpGetLampData(1))
var LAMP_VELOCITY: HexPattern = register(HexPattern.fromAngles("qwddedqew", HexDir.SOUTH_WEST), "get_lamp_velocity", OpGetLampData(2))
Expand Down Expand Up @@ -68,4 +75,4 @@ object HexicalPatterns {
PER_WORLD_PATTERNS.add(triple)
return pattern
}
}
}
11 changes: 9 additions & 2 deletions common/src/main/resources/assets/hexical/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"hexcasting.spell.hexical:modify_block_replaceable": "Modify Block: Replaceable",
"hexcasting.spell.hexical:modify_block_volatile": "Modify Block: Volatile",
"hexcasting.spell.hexical:surveil_sentinel": "Surveil Sentinel",
"hexcasting.spell.hexical:is_burning": "Inferno Purification",
"hexcasting.spell.hexical:burning_time": "Inferno Purification II",
"hexcasting.spell.hexical:is_wet": "Enderman's Purification",
"hexcasting.spell.hexical:is_sprinting": "Sprinter's Purification",
"hexcasting.spell.hexical:nephthys": "Nephthys Gambit",

Expand Down Expand Up @@ -92,8 +95,12 @@
"hexical.page.chorus_blink.0": "Between Blink, Greater Teleport, ender pearls, and chorus fruit, this spell serves a harmonious midpoint for safe, precise, and cheap teleportation.",
"hexical.page.chorus_blink.1": "It consumes a chorus fruit from my inventory and teleports me up to 16 blocks using an offset vector. The cost is constant whether I teleport the full 16 blocks or less, and has no penalty for multiple casts in one hex. With a lot of chorus fruit, it can be a significantly cheaper Greater Teleport.",

"hexical.page.entity_purifications": "Entity Purifications",
"hexical.page.is_sprinting": "Pushes whether the entity is sprinting. Interestingly, that includes swimming and if I start sprinting before lifting off the ground.",
"hexical.page.entity_purifications.title": "Entity Purifications",
"hexical.page.entity_purifications": "I have discovered a few more specialized entity purifications that allow me to divine extra information about an entity.",
"hexical.page.is_burning": "Pushes whether the entity is burning.",
"hexical.page.burning_time": "Pushes how long the entity will continue burning if not put out.",
"hexical.page.is_wet": "Pushes whether the entity is touching rain, water, or in a bubble column.",
"hexical.page.is_sprinting": "Pushes whether the player is sprinting. Interestingly, that includes swimming or if I started sprinting but left the ground.",

"hexical.page.conjure_staff.0": "Conjures a staff at the location with the amount of media, rank, and hex respectively.",
"hexical.page.conjure_staff.1": "A conjured staff is not unlike a cypher. It has a media bank that it relies on for casting and breaks when it runs out, unable to consume my health or my inventory's media. It is not rechargable or programmable. Using erase item on it simply destroys it. However, its true power is $(o)input interception$().",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,43 @@
{
"name": "hexical.page.entity_purifications",
"name": "hexical.page.entity_purifications.title",
"icon": "minecraft:spyglass",
"category": "hexcasting:patterns",
"pages": [
{
"type": "patchouli:text",
"text": "hexical.page.entity_purifications"
},
{
"type": "hexcasting:pattern",
"op_id": "hexical:is_burning",
"anchor": "hexical:is_burning",
"input": "entity",
"output": "boolean",
"text": "hexical.page.is_burning"
},
{
"type": "hexcasting:pattern",
"op_id": "hexical:burning_time",
"anchor": "hexical:burning_time",
"input": "entity",
"output": "number",
"text": "hexical.page.burning_time"
},
{
"type": "hexcasting:pattern",
"op_id": "hexical:is_wet",
"anchor": "hexical:is_wet",
"input": "entity",
"output": "boolean",
"text": "hexical.page.is_wet"
},
{
"type": "hexcasting:pattern",
"op_id": "hexical:is_sprinting",
"anchor": "hexical:is_sprinting",
"input": "entity",
"input": "player entity",
"output": "boolean",
"text": "hexical.page.is_sprinting"
}
]
}
}

0 comments on commit e8ce4af

Please sign in to comment.