more bugfixes and patchi cleanups
This commit is contained in:
parent
26b2d3266d
commit
2d00a0aa16
9 changed files with 32 additions and 29 deletions
|
@ -196,7 +196,7 @@ class GuiSpellcasting(private val handOpenedWith: InteractionHand) : Screen(Text
|
|||
override fun onClose() {
|
||||
HexMessages.getNetwork().sendToServer(MsgQuitSpellcasting())
|
||||
|
||||
this.ambianceSoundInstance?.let { Minecraft.getInstance().soundManager.stop(it) }
|
||||
Minecraft.getInstance().soundManager.stop(HexSounds.CASTING_AMBIANCE.id, null)
|
||||
|
||||
super.onClose()
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package at.petrak.hex.common.network;
|
||||
|
||||
import at.petrak.hex.client.gui.GuiSpellcasting;
|
||||
import at.petrak.hex.common.lib.HexSounds;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
@ -53,7 +54,9 @@ public record MsgNewSpellPatternAck(boolean quitCasting, List<String> stackDesc)
|
|||
var screen = Minecraft.getInstance().screen;
|
||||
if (screen instanceof GuiSpellcasting) {
|
||||
if (this.quitCasting) {
|
||||
Minecraft.getInstance().setScreen(null);
|
||||
var mc = Minecraft.getInstance();
|
||||
mc.setScreen(null);
|
||||
mc.getSoundManager().stop(HexSounds.CASTING_AMBIANCE.getId(), null);
|
||||
} else {
|
||||
var spellGui = (GuiSpellcasting) screen;
|
||||
spellGui.setStackDescs(this.stackDesc);
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
"hex:add_pattern"
|
||||
]
|
||||
},
|
||||
"casting.ambience": {
|
||||
"casting.ambiance": {
|
||||
"sounds": [
|
||||
"hex:casting_ambience"
|
||||
"hex:casting_ambiance"
|
||||
]
|
||||
},
|
||||
"casting.cast": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"pages": [
|
||||
{
|
||||
"type": "patchouli:text",
|
||||
"text": "Casting a _Hex is quite difficult-- no wonder this art was lost to time! I'll have to re-read my notes carefully.$(br2)I can start a _Hex by pressing $(k:use) with a $(item)Staff/$ in my hand-- this will cause a triangular grid of dots to appear in front of me. Then I can click and drag from dot to dot to draw patterns in the _media of the grid; finishing a pattern will run its corresponding action (more on that later)."
|
||||
"text": "Casting a _Hex is quite difficult-- no wonder this art was lost to time! I'll have to re-read my notes carefully.$(br2)I can start a _Hex by pressing $(k:use) with a $(item)Staff/$ in my hand-- this will cause a hexagonal grid of dots to appear in front of me. Then I can click and drag from dot to dot to draw patterns in the _media of the grid; finishing a pattern will run its corresponding action (more on that later)."
|
||||
},
|
||||
{
|
||||
"type": "patchouli:text",
|
||||
|
@ -20,7 +20,7 @@
|
|||
{
|
||||
"type": "hex:pattern_nosig",
|
||||
"header": "An Example",
|
||||
"text": "It's interesting to note that the $(italic)rotation/$ of a pattern in doesn't seem to matter at all. These two patterns both perform the $(action)Mind's Reflection/$, for example.",
|
||||
"text": "It's interesting to note that the $(italic)rotation/$ of a pattern doesn't seem to matter at all. These two patterns both perform the $(action)Mind's Reflection/$, for example.",
|
||||
"patterns": [{
|
||||
"startdir": "NORTH_EAST",
|
||||
"signature": "qaq"
|
||||
|
@ -36,7 +36,7 @@
|
|||
},
|
||||
{
|
||||
"type": "patchouli:text",
|
||||
"text": "For example, the $(l:patterns/basic#OpGetCaster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. The $(l:patterns/basic#OpentityPos)$(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.$(p)(If I find I am not quite sure what a stack is, I might want to read $(l:casting/stack)this entry on the subject$(/l).)"
|
||||
"text": "For example, the $(l:patterns/basic#OpGetCaster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. The $(l:patterns/basic#OpentityPos)$(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."
|
||||
},
|
||||
{
|
||||
"type": "patchouli:text",
|
||||
|
@ -44,7 +44,7 @@
|
|||
},
|
||||
{
|
||||
"type": "patchouli:text",
|
||||
"text": "$(li)Entities, like myself, chickens, and minecarts;$(li)Influences, peculiar types of iota that seem to represent abstract ideas; and$(li)Patterns themselves, used for crafting magic items and truly mind-boggling feats like $(italic)spells that cast other spells/$$(li)And a list of several of the above, gathered into a single iota."
|
||||
"text": "$(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."
|
||||
},
|
||||
{
|
||||
"type": "patchouli:text",
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"type": "patchouli:crafting",
|
||||
"anchor": "artifact",
|
||||
"recipe": "hex:artifact",
|
||||
"text": "$(italic)We have a saying in our field: 'Magic isn't'. It doesn't 'just work', it doesn't respond to your thoughts, you can't throw fireballs or create a roast dinner from thin air or turn a bunch of muggers into frogs and snails./$"
|
||||
"text": "$(italic)We have a saying in our field: \"Magic isn't\". It doesn't \"just work,\" it doesn't respond to your thoughts, you can't throw fireballs or create a roast dinner from thin air or turn a bunch of muggers into frogs and snails./$"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"pages": [
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Entity Distillation",
|
||||
"header": "Entity Purification",
|
||||
"anchor": "OpGetEntityAt",
|
||||
"input": "vector",
|
||||
"output": "entity or null",
|
||||
|
@ -20,7 +20,7 @@
|
|||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Entity Dstln.: Animal",
|
||||
"header": "Entity Prfn.: Animal",
|
||||
"anchor": "OpGetEntityAtAnimal",
|
||||
"input": "vector",
|
||||
"output": "entity or null",
|
||||
|
@ -32,7 +32,7 @@
|
|||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Entity Dstln.: Monster",
|
||||
"header": "Entity Prfn.: Monster",
|
||||
"anchor": "OpGetEntityAtMonster",
|
||||
"input": "vector",
|
||||
"output": "entity or null",
|
||||
|
@ -44,7 +44,7 @@
|
|||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Entity Dstln.: Item",
|
||||
"header": "Entity Prfn.: Item",
|
||||
"anchor": "OpGetEntityAtItem",
|
||||
"input": "vector",
|
||||
"output": "entity or null",
|
||||
|
@ -56,7 +56,7 @@
|
|||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Entity Dstln.: Player",
|
||||
"header": "Entity Prfn.: Player",
|
||||
"anchor": "OpGetEntityAtPlayer",
|
||||
"input": "vector",
|
||||
"output": "entity or null",
|
||||
|
@ -68,7 +68,7 @@
|
|||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Entity Dstln.: Living",
|
||||
"header": "Entity Prfn.: Living",
|
||||
"anchor": "OpGetEntityAtLiving",
|
||||
"input": "vector",
|
||||
"output": "entity or null",
|
||||
|
@ -78,18 +78,6 @@
|
|||
"signature": "qqqqqdaqaawd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Zone Dstln.: Any",
|
||||
"anchor": "OpGetEntitiesBy",
|
||||
"input": "vector, number",
|
||||
"output": "list of entities",
|
||||
"text": "$(br)Take a position and maximum distance on the stack, and combine them into a list of entities near the position.",
|
||||
"patterns": {
|
||||
"startdir": "NORTH_WEST",
|
||||
"signature": "qqqqqwded"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Zone Dstln.: Animal",
|
||||
|
@ -209,6 +197,18 @@
|
|||
"startdir": "SOUTH_WEST",
|
||||
"signature": "eeeeewaqaawd"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "hex:pattern",
|
||||
"header": "Zone Dstln.: Any",
|
||||
"anchor": "OpGetEntitiesBy",
|
||||
"input": "vector, number",
|
||||
"output": "list of entities",
|
||||
"text": "$(br)Take a position and maximum distance on the stack, and combine them into a list of all entities near the position.",
|
||||
"patterns": {
|
||||
"startdir": "NORTH_WEST",
|
||||
"signature": "qqqqqwded"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
{
|
||||
"type": "hex:pattern_nosig",
|
||||
"header": "Example 4",
|
||||
"text": "This pattern pushes 4.5: 5 / 2 + 1 + 1",
|
||||
"text": "This pattern pushes 4.5: 5 / 2 + 1 + 1.",
|
||||
"patterns": {
|
||||
"startdir": "SOUTH_EAST",
|
||||
"signature": "aqaaqdww"
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"item": "hex:amethyst_dust"
|
||||
}
|
||||
],
|
||||
"book": "hex"
|
||||
"book": "hex:thehexbook"
|
||||
}
|
Loading…
Reference in a new issue