change cooler readable as well
This commit is contained in:
parent
1d6bb87864
commit
51275356ab
2 changed files with 8 additions and 8 deletions
|
@ -6,7 +6,7 @@ import at.petrak.hexcasting.api.spell.asSpellResult
|
||||||
import at.petrak.hexcasting.api.spell.casting.CastingContext
|
import at.petrak.hexcasting.api.spell.casting.CastingContext
|
||||||
import at.petrak.hexcasting.api.spell.getChecked
|
import at.petrak.hexcasting.api.spell.getChecked
|
||||||
import at.petrak.hexcasting.xplat.IXplatAbstractions
|
import at.petrak.hexcasting.xplat.IXplatAbstractions
|
||||||
import net.minecraft.world.entity.item.ItemEntity
|
import net.minecraft.world.entity.Entity
|
||||||
|
|
||||||
object OpTheCoolerReadable : ConstManaOperator {
|
object OpTheCoolerReadable : ConstManaOperator {
|
||||||
override val argc = 1
|
override val argc = 1
|
||||||
|
@ -15,15 +15,15 @@ object OpTheCoolerReadable : ConstManaOperator {
|
||||||
args: List<SpellDatum<*>>,
|
args: List<SpellDatum<*>>,
|
||||||
ctx: CastingContext
|
ctx: CastingContext
|
||||||
): List<SpellDatum<*>> {
|
): List<SpellDatum<*>> {
|
||||||
val target = args.getChecked<ItemEntity>(0, argc)
|
val target = args.getChecked<Entity>(0, OpTheCoolerRead.argc)
|
||||||
ctx.assertEntityInRange(target)
|
ctx.assertEntityInRange(target)
|
||||||
|
|
||||||
val stack = target.item
|
val datumHolder = IXplatAbstractions.INSTANCE.findDataHolder(target)
|
||||||
val datumHolder = IXplatAbstractions.INSTANCE.findDataHolder(stack)
|
|
||||||
?: return false.asSpellResult
|
?: return false.asSpellResult
|
||||||
|
|
||||||
if (datumHolder.readDatum(ctx.world) == null && datumHolder.emptyDatum() == null)
|
datumHolder.readDatum(ctx.world)
|
||||||
return false.asSpellResult
|
?: datumHolder.emptyDatum()
|
||||||
|
?: return false.asSpellResult
|
||||||
|
|
||||||
return true.asSpellResult
|
return true.asSpellResult
|
||||||
}
|
}
|
||||||
|
|
|
@ -899,8 +899,8 @@
|
||||||
"hexcasting.entry.readwrite": "Reading and Writing",
|
"hexcasting.entry.readwrite": "Reading and Writing",
|
||||||
"hexcasting.page.readwrite.read": "Copy the iota stored in the item (such as a $(l:items/scroll)$(item)Scroll/$, $(l:items/focus)$(item)Focus/$, $(l:items/abacus)$(item)Abacus/$ or $(l:items/spellbook)$(item)Spellbook/$) in my other hand, and add it to the stack.",
|
"hexcasting.page.readwrite.read": "Copy the iota stored in the item (such as a $(l:items/scroll)$(item)Scroll/$, $(l:items/focus)$(item)Focus/$, $(l:items/abacus)$(item)Abacus/$ or $(l:items/spellbook)$(item)Spellbook/$) in my other hand, and add it to the stack.",
|
||||||
"hexcasting.page.readwrite.readable": "If the item in my other hand holds an iota I can read, returns 1. Otherwise, returns 0.",
|
"hexcasting.page.readwrite.readable": "If the item in my other hand holds an iota I can read, returns 1. Otherwise, returns 0.",
|
||||||
"hexcasting.page.readwrite.read/entity": "Like $(l:patterns/readwrite#hexcasting:read)$(action)Scribe's Reflection/$, but the iota is read out of an item entity instead of my other hand.",
|
"hexcasting.page.readwrite.read/entity": "Like $(l:patterns/readwrite#hexcasting:read)$(action)Scribe's Reflection/$, but the iota is read out of an entity instead of my other hand. Pairs well with $(l:items/scroll)$(item)Scrolls/$ or $(item)Item Frames/$.",
|
||||||
"hexcasting.page.readwrite.readable/entity": "Also like $(l:patterns/readwrite#hexcasting:readable)$(action)Auditor's Reflection/$, but the status is once again read out of an item entity instead of my other hand.",
|
"hexcasting.page.readwrite.readable/entity": "Also like $(l:patterns/readwrite#hexcasting:readable)$(action)Auditor's Reflection/$, but the status is once again read out of an entity instead of my other hand.",
|
||||||
"hexcasting.page.readwrite.write.1": "Remove the top iota from the stack, and save it into the item in my other hand.",
|
"hexcasting.page.readwrite.write.1": "Remove the top iota from the stack, and save it into the item in my other hand.",
|
||||||
"hexcasting.page.readwrite.write.2": "I can use this spell to save iotas into an (unsealed) $(l:items/focus)$(item)Focus/$ or $(l:items/spellbook)$(item)Spellbook/$, or I can copy patterns onto $(l:items/scroll)$(item)Scrolls/$ or $(l:items/slate)$(item)Slates/$ with the help of $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Consideration/$.$(br2)However, it seems I am unable to save a reference to another player, only me. I suppose an entity reference is similar to the idea of a True Name; perhaps Nature is helping to keep our Names out of the hands of enemies. If I want a friend to have my Name I can make a $(l:items/focus)$(item)Focus/$ for them.",
|
"hexcasting.page.readwrite.write.2": "I can use this spell to save iotas into an (unsealed) $(l:items/focus)$(item)Focus/$ or $(l:items/spellbook)$(item)Spellbook/$, or I can copy patterns onto $(l:items/scroll)$(item)Scrolls/$ or $(l:items/slate)$(item)Slates/$ with the help of $(l:patterns/patterns_as_iotas#hexcasting:escape)$(action)Consideration/$.$(br2)However, it seems I am unable to save a reference to another player, only me. I suppose an entity reference is similar to the idea of a True Name; perhaps Nature is helping to keep our Names out of the hands of enemies. If I want a friend to have my Name I can make a $(l:items/focus)$(item)Focus/$ for them.",
|
||||||
"hexcasting.page.readwrite.writable": "If I could save the given iota into the item in my other hand, returns 1. Otherwise, returns 0.",
|
"hexcasting.page.readwrite.writable": "If I could save the given iota into the item in my other hand, returns 1. Otherwise, returns 0.",
|
||||||
|
|
Loading…
Reference in a new issue