Skip to content

Commit

Permalink
Rendering is my passion
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucomics committed Jul 1, 2024
1 parent fbdf31c commit 369e5fd
Show file tree
Hide file tree
Showing 45 changed files with 364 additions and 252 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
- added semi-permeable modifier for : only sprinting creatures have collision
- added semi-permeable mage block modifier: only sprinting creatures have collision
- changed Identify pattern to have ambit limitation
- changed speed and variance of living scroll patterns
- changed specks to be one block big by default, can be scaled
- dropped support for Forge in order to prioritize development speed and features
- fixed specks being slightly off-center
- fixed advancements occasionally breaking
Expand All @@ -34,6 +36,7 @@
- fixed bug with archgenie lamps where it can cast for free if it wasn't in your main inventory
- fixed bug with conjured staff where inputs aren't always neatly intercepted and you can accidentally break blocks
- fixed Finale Reflection that always returned null
- optimize speck and living scroll rendering massively
- overhauled project structure completely
- overhauled genie lamps completely and entirely
- removed casting sounds from conjured staves and replaced it with staff drawing sounds
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package miyucomics.hexical.casting.patterns

import at.petrak.hexcasting.api.misc.MediaConstants
import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
import at.petrak.hexcasting.api.spell.SpellAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getVec3
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapOthersName
import at.petrak.hexcasting.api.utils.putCompound
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package miyucomics.hexical.casting.patterns

import at.petrak.hexcasting.api.misc.MediaConstants
import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
import at.petrak.hexcasting.api.spell.SpellAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getVec3
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapLocationTooFarAway
import net.minecraft.util.math.MathHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import miyucomics.hexical.registry.HexicalItems.NULL_MEDIA_ITEM
import miyucomics.hexical.state.EvokeState
import miyucomics.hexical.state.PersistentStateHandler
import miyucomics.hexical.state.PersistentStateHandler.Companion.getEvocation
import miyucomics.hexical.utils.HexicalUtils
import miyucomics.hexical.utils.CastingUtils
import net.minecraft.item.ItemStack
import net.minecraft.server.network.ServerPlayerEntity
import net.minecraft.server.world.ServerWorld
Expand Down Expand Up @@ -46,7 +46,7 @@ class OpInternalizeHex : SpellAction {
val hex = getEvocation((player as ServerPlayerEntity?)!!) ?: return
val stack = player.mainHandStack
player.setStackInHand(Hand.MAIN_HAND, ItemStack(NULL_MEDIA_ITEM))
HexicalUtils.castSpecial(player.world as ServerWorld, player, (HexIotaTypes.deserialize(hex, player.world as ServerWorld) as ListIota).list.toList(), SpecializedSource.EVOCATION, false)
CastingUtils.castSpecial(player.world as ServerWorld, player, (HexIotaTypes.deserialize(hex, player.world as ServerWorld) as ListIota).list.toList(), SpecializedSource.EVOCATION, false)
player.world.playSound(null, player.x, player.y, player.z, SoundEvents.ENTITY_EVOKER_CAST_SPELL, SoundCategory.PLAYERS, 1f, 1f)
player.setStackInHand(Hand.MAIN_HAND, stack)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package miyucomics.hexical.casting.patterns

import at.petrak.hexcasting.api.misc.MediaConstants
import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
import at.petrak.hexcasting.api.spell.SpellAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getVec3
import at.petrak.hexcasting.api.spell.iota.Iota
import miyucomics.hexical.entities.MagicMissileEntity
import miyucomics.hexical.registry.HexicalEntities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import at.petrak.hexcasting.api.spell.iota.EntityIota
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.iota.NullIota
import at.petrak.hexcasting.api.spell.iota.Vec3Iota
import miyucomics.hexical.data.DyeData
import miyucomics.hexical.casting.iota.DyeIota
import miyucomics.hexical.data.DyeData
import net.minecraft.block.Block
import net.minecraft.block.SignBlock
import net.minecraft.block.entity.SignBlockEntity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package miyucomics.hexical.casting.patterns.eval

import at.petrak.hexcasting.api.spell.*
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.eval.FrameEvaluate
import at.petrak.hexcasting.api.spell.casting.eval.SpellContinuation
import at.petrak.hexcasting.api.spell.evaluatable
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.iota.ListIota
import at.petrak.hexcasting.api.spell.iota.PatternIota
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package miyucomics.hexical.casting.patterns.getters

import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.iota.*
import at.petrak.hexcasting.api.spell.iota.BooleanIota
import at.petrak.hexcasting.api.spell.iota.DoubleIota
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapInvalidIota
import java.lang.IllegalStateException

class OpGetFoodData(private val mode: Int) : ConstMediaAction {
override val argc = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ package miyucomics.hexical.casting.patterns.getters
import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getItemEntity
import at.petrak.hexcasting.api.spell.iota.*
import at.petrak.hexcasting.api.spell.iota.BooleanIota
import at.petrak.hexcasting.api.spell.iota.DoubleIota
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.iota.ListIota
import miyucomics.hexical.casting.iota.IdentifierIota
import net.minecraft.enchantment.EnchantmentHelper
import net.minecraft.item.EnchantedBookItem
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.util.registry.Registry
import java.lang.IllegalStateException

class OpGetItemStackData(private val mode: Int) : ConstMediaAction {
override val argc = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ package miyucomics.hexical.casting.patterns.getters
import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getLivingEntityButNotArmorStand
import at.petrak.hexcasting.api.spell.iota.*
import at.petrak.hexcasting.api.spell.iota.BooleanIota
import at.petrak.hexcasting.api.spell.iota.DoubleIota
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.iota.ListIota
import miyucomics.hexical.casting.iota.IdentifierIota
import net.minecraft.util.registry.Registry
import java.lang.IllegalStateException

class OpGetLivingEntityData(private val mode: Int) : ConstMediaAction {
override val argc = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.iota.NullIota
import miyucomics.hexical.casting.iota.IdentifierIota
import net.minecraft.util.registry.Registry
import java.lang.IllegalStateException

class OpGetPlayerData(private val mode: Int) : ConstMediaAction {
override val argc = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import at.petrak.hexcasting.api.spell.iota.NullIota
import at.petrak.hexcasting.api.spell.mishaps.MishapInvalidIota
import miyucomics.hexical.casting.iota.getIdentifier
import net.minecraft.util.registry.Registry
import java.lang.IllegalStateException

class OpGetStatusEffectInstanceData(private val mode: Int) : ConstMediaAction {
override val argc = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import miyucomics.hexical.state.PersistentStateHandler
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.util.registry.Registry
import java.lang.IllegalStateException

class OpGetWristpocket(private val mode: Int) : ConstMediaAction {
override val argc = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package miyucomics.hexical.casting.patterns.lamp

import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
import at.petrak.hexcasting.api.spell.SpellAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getList
import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapBadOffhandItem
import at.petrak.hexcasting.xplat.IXplatAbstractions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import miyucomics.hexical.casting.mishaps.NeedsSourceMishap
import miyucomics.hexical.enums.SpecializedSource
import miyucomics.hexical.interfaces.CastingContextMinterface
import miyucomics.hexical.items.LampItem
import java.lang.IllegalStateException

class OpGetHandLampData(private val mode: Int) : ConstMediaAction {
override val argc = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package miyucomics.hexical.casting.patterns.prestidigitation

import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ConstMediaAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.getBlockPos
import at.petrak.hexcasting.api.spell.getEntity
import at.petrak.hexcasting.api.spell.iota.BooleanIota
import at.petrak.hexcasting.api.spell.iota.EntityIota
import at.petrak.hexcasting.api.spell.iota.Iota
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package miyucomics.hexical.casting.patterns.specks

import at.petrak.hexcasting.api.spell.*
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.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapBadEntity
import miyucomics.hexical.entities.SpeckEntity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package miyucomics.hexical.casting.patterns.specks

import at.petrak.hexcasting.api.spell.*
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.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapBadEntity
import miyucomics.hexical.interfaces.Specklike
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import at.petrak.hexcasting.api.spell.iota.Iota
import at.petrak.hexcasting.api.spell.mishaps.MishapBadEntity
import miyucomics.hexical.interfaces.Specklike
import net.minecraft.command.argument.EntityAnchorArgumentType
import java.lang.IllegalStateException

class OpSpecklikeProperty(val mode: Int) : ConstMediaAction {
override val argc = 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package miyucomics.hexical.casting.patterns.wristpocket

import at.petrak.hexcasting.api.misc.MediaConstants
import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
import at.petrak.hexcasting.api.spell.SpellAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.iota.Iota
import miyucomics.hexical.casting.mishaps.InedibleMishap
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package miyucomics.hexical.casting.patterns.wristpocket

import at.petrak.hexcasting.api.misc.MediaConstants
import at.petrak.hexcasting.api.spell.*
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.RenderedSpell
import at.petrak.hexcasting.api.spell.SpellAction
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.iota.Iota
import miyucomics.hexical.state.PersistentStateHandler
Expand Down
1 change: 0 additions & 1 deletion src/main/java/miyucomics/hexical/data/DyeData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import net.minecraft.util.Identifier
import net.minecraft.util.registry.Registry
import java.io.InputStream
import java.io.InputStreamReader
import kotlin.collections.HashMap

object DyeData {
private val flatBlockLookup = HashMap<String, String>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ object PrestidigitationData {
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("ring_bell"), RingBellEffect())

Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("right_click"), UseItemOnEffect(ItemStack.EMPTY))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("use_shears"), UseItemOnEffect(ItemStack(Items.SHEARS)))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("use_axe"), UseItemOnEffect(ItemStack(Items.DIAMOND_AXE)))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("use_hoe"), UseItemOnEffect(ItemStack(Items.DIAMOND_HOE)))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("use_shears"), UseItemOnEffect(ItemStack(Items.SHEARS)))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("use_shovel"), UseItemOnEffect(ItemStack(Items.DIAMOND_SHOVEL)))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("ignite"), UseItemOnEffect(ItemStack(Items.FLINT_AND_STEEL)))

Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("delete"), TransformBlockEffect(Blocks.AIR.defaultState))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("drain_cauldron"), TransformBlockEffect(Blocks.CAULDRON.defaultState))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("dry_mud"), TransformBlockEffect(Blocks.CLAY.defaultState))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("light"), BooleanPropertyEffect(Properties.LIT))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("open"), BooleanPropertyEffect(Properties.OPEN))
Registry.register(PRESTIDIGITATION_EFFECTS, HexicalMain.id("squirt_squid"), SquirtSquidsEffect())
Expand Down
Loading

0 comments on commit 369e5fd

Please sign in to comment.