-
Talia-12 authored
Mucking around with build.gradles Update README.md Setup barebones mod (only fabric since forge isn't even building the gradle properly et, just gonna wait for help on that one) Renaming package to `ram.talia.hexal` to follow convention. Fix Fabric initialiser name. Added OpCompareBlocks as a first test, as well as supporting code to get it properly registered. Added new action OpCompareTypes, as well as giving English identifiers to both actions. fixing new_actions to line up with package renaming Added OpCompareEntities to check if two entities are exactly the same type (and for itementities if they're the same type of item), and changed OpCompareTypes to be based off of DatumType Added OpSmelt to smelt blocks/items in the world. Added language file entries for all the patterns, as well as adding pages to the Hex Casting Patchouli book to display how to use the new patterns. Rebase testing_entities onto main Setup ClientXplatAbstractions, which abstracts over things that are different between forge & fabric but need to be used a lot in common (in particular for this, things related to rendering entities). Added everything required to get a super basic entity (Wisp) into the game, as well as a pattern to summon one. This included a WispRenderer, and setting up RegisterClientStuff to actually connect the WispRenderer to the Wisp entity. An accesswidener needed to be added for Projectile::new since it isn't wasn't done automatically in common/fabric for some reason. refactored BaseWisp to be kotlin instead of java so that I can use OperatorUtils for vector addition and subtraction. Made OpSummonWisp take in a velocity as well as a direction. Moved setPos() in BaseWisp.tick() to above the playParticles() call so that the delta referenced inside playParticles isn't vec 0. Added setColouriser, load, addAdditionalSaveData, and defineSynchedData to BaseWisp to properly sync the colouriser that the player uses between server and client so that the renderer can use it. Also added a companion object containing the static variables for BaseWisp since that's apparently how you do that in Kotlin (thanks wiresegal!!) Successfully get Projectile Wisps working! they move forward at the passed speed, and cast the contained hex when the collide with something, with the stack starting as ProjectileWisp, ThingCollidedWith (either an entity or a Vec3 for the block position). This was done by making a new class ProjectileWisp and shifting a fair chunk of the code from BaseWisp to it. castSpell was added to BaseWisp based off of the casting code in abstract casting item (or whatever the class was called). Successfully made a mixin that means that CastingContext.isVecInRange() actually works sensibly with Wisps! Made another Mixin that means that wisps are properly charged for the media that they use in their casting, and fail to cast if they don't have enough media. This required adding a new argument to OpSummonWisp for how much media should be spent Added pattern to get how much media the wisp has accessible - mishaps when cast by a non-wisp context. Made WispCastingManager, which is in charge of scheduling and execuing wisp casts (each instance is bound to a player, and is responsible for that player's casts). Cardinal Components is used for the linking on Fabric, and also ensures that the manager's executeSpells() method is called every tick. BaseWisp.castSpell() has been replaced with scheduleCast which schedules a casting with the caster's WispCastingManager. Added HexalNBTHelper to help deal with some of the NBT writing required to ensure that WispCastingManager doesn't break if the player logs off while there are still casts scheduled (not at all sure this actually works). While a Wisp has a cast scheduled, it won't execute any ticks until its castCallback() method is called. Also made the callback call tick() to ensure that if the ticking order is Wisp, Player, the wisp doesn't get its tick skipped on the tick that it is cast. Fixed problem with WispCastingManager that was causing things to not get cast (wrong constructor for WispCast was being used in scheduleCast, and executeCast wasn't trying to refresh from the uuid if a cast's wisp was null. It actually works now!! I'm amazed that the code I wrote in basically one go with no testing only had this one tiny problem (that I know of so far). Also edited ProjectileWisp's constrctors to make it more extendable, for special types of projectile wisps (homing, orbiting, etc. to crib some more things from Ars XD). Made OpCurrentTicks, which adds the current serverLevel.gameTime (number of ticks since world was created, I'm *pretty* sure) to the stack. Wrote patchouli entries for all of the patterns currently missing them. Figured out sort order handles fractional entries fine so I can put type_comparisons next to logic where it should be. Made summon projectile wisp's explanation clearer. Also mucked around with BaseWisp to actually sync media properly between server and client since that is kinda important, and changed it so that velocity depends on how much media the wisp has (more volumous wisps move slower). Also tried mucking around with playParticles to make wisps with more media look larger, but it wasn't very successful. Renamed some resource names, added OpConsumeWisp which is used by a wisp A to decompose wisp B and reuse its media. Costs more media than returned when targeting someone else's wisp. Wrote descriptions for OpConsumeWisp. Same changes as 036dc7e (wisps_maybe), but without the stuff that I don't want to release at the moment. Made the per-tick cost of TickingWisp approximately exponential in distribution (so the more media it has, the faster it loses media). Changed the max range of wisps to depend on the kind of wisp. Changed the velocity calculations stuff to be a bit less janky. Mucked around with how tick() in BaseWisp works a bit to try and fix the issue with TickingWisps that was causing them to be not properly deleted serverside, ended up getting rid of the call of tick() in castCallback to fix it, I'll make a modification to have that all work properly later. Changed OpSummonWisp to have a constructor so that it can be reused for TickingWisps. Added pattern for TickingWisps. Changed WispCastingManager.executeCasts() to make it add all the WispCastResults to a list and execute them *after* the loop over the queue's iterator since that was causing a concurrent modification error (though plausibly that would have also been fixed by the removal of tick() from BaseWisp.castCallback() Updated the patchouli book as well as commented out a bunch of debug statements More Mixins! made it so that wisp casts don't cause particles under the player , and made it so that hexasting.message.cant_overcast isn't displayed when a ticking wisp doesn't have enough media. Soft reset all the changes from f9f509f and undid the renaming to Lemma - Projectile Wisps are still called that, Ticking Wisps are now Cyclic Wisps (in player-visible docs, can't be bothered renaming all the classes and etc.) rewrote the wisp entry for the patchouli book to be more better Make patchouli actually work when not in the dev environment - added stuff to book.json even though it isn't used, and renamed the directory they're in Changed maxSrqCastingDistance to actually properly return the *square* of the radius. Mucked around with ProjectileWisp to make it so that the fixed cost increases with the square of the initial velocity, and ensure that the wisp is actually at the point the collision happened when its spell resolves. Changed BaseWisp to also accomodate that, changed scheduleCast to be synced so that clientside wisps don't move while they're waiting on a callback, and made addVelocity scale the new velocity so that regardless of media contained a projectile wisp with the same initial conditions will follow the same trajectory (except for discretisation errors). Also made moar particles play. more rewriting descriptions to get everything important in. Fixed wisps not being able to use greater sentinel range. Fixed cyclic wisps not saving stack/ravenmind when unloaded. Reduced cost of OpConsumeWisp to match book, increased price in book to match OpSummonWisp cost, added description of stack stuff to CyclicWisp in book, incremented to 0.1.1. Reduced cost of all wisps to summon and to maintain. OpCompareBlocks able to force load arbitrary number of chunks at any distance. Added OpFallingBlock based on botania's LensWeight. Deleted the silk touchability restriction to make OpFallingBlock more fun Add OpFreeze (though haven't connected it to anything), and start setting up FreezeRecipe to make it so that freeze recipes are easy to add. Added initialisation code forRecipeSerializers to FabricHexalInitializer, added non-recipeable stuff to OpFreeze, added pattern for OpFreeze. Got the recipes for OpFreeze (only blocks) working! Revert "Deleted the silk touchability restriction to make OpFallingBlock more fun" This reverts commit be13eedd7370252b87b492adf4b579ccf7844d11. changed OpFallingBlock to not delete blockentities, and to drop if it can drop at all, e.g. if the block below is a torch/slab it'll drop now (compact farms using it a bit) make cardinal-components version requirements match Hex Casting's mucking around with trying to get forge working (it did not succeed) - on the upside, successfully depending on the release version of 0.9.2 now that it's got a final release! Added OpFreeze converting water cauldrons to powdered snow cauldrons. made it so that all wisps look in the direction of their velocity Getting Forge Compiling - This approach is /incredibly/ jank, but does seem to be at least be getting the HexCasting library in properly. - Still getting errors related to the mixin refmap. Derp Sorry. made setLookVector get called for all wisps whenever deltaMovement changes, to ensure that it is always looking in the direction of its movement - took some code from wiresegal to get setLookVector to actually work setting up all the forge stuff! Moar forge stuff, getting all the Xplat things setup, making sure all the events are on the right bus and successfully triggered, etc. Fixing problem with ListTags not being saved properly when the game is saved/loaded - also mucked around more with the cost of wisps, using object's python script to determine exactly how long a wisp with a given cost will last. Fixed issue of spelldatums containing entites getting loaded before Level.getEntity works properly by swapping to lazy evaluation of the Tag to a SpellDatum using Either deleted the Exp_Factor part of cyclic wisp's cost, and made projectile wisps half as expensive as ticking wisps. version 0.1.2 released here, pushed to server inc version number now, so all dev builds till next release will be 0.1.2.X Started doing interwisp communication, with associated problems! BaseWisp now extends LinkableEntity rather than Projectile, and the ~Projectile code necessary to keep things functioning has been reimplimented in BaseWisp/ProjectileWisp depending on what it was. Added Ops to interact with the entities linked to a wisp, and the iotas that it has received, as well as create links and send iotas. Increased the hitboxes of wisps to make them easier to target. Next thing to do is sync the list of Render_Links in BaseWisp to the client so that I can use it for (temp) displaying particles between them and (later) rendering lightning between them. Added @Surpress("CAST_NEVER_SUCCEEDS") in a bunch of places, there are definitely more it needs to go. Also swapped renderLinks to sync to the client using Entity.id rather than uuid since id is both synced between server and client and *actually searchable on the client* Added OpLinkWisps for debugging purposes, probably going to leave it in for allowing players to debug links too XD Overengineering things! ripped out more of the internals of things and moved them to other places to make it easier to add other Linkable things later - basically, made ILinkable, which can be implemented by anything (block, entity, whatever - anything with a position in the world that can be referenced on the client and server shouldd work). Then added LinkableRegistry and LinkableTypes to make that uh, actually work with saving and sycing references. Added book entries for all the new patterns in their own section. Added a pattern for getting a wisp's hex. Made it so that a cast erroring destroys the wisp that attempted it. Mucked around with debugging many issues with the linking system, fixing links not being removed properly when a wisp is discarded. Fully swap to hiding the Either stuff for lazy evaluation under the hood so that I don't need to think about it and don't bloat every single function with the evaluation code. Fixed LinkableEntity.link and unlink not actually calling *other*.link and unlink,instead linking to themselves or unlinking from themselves. Mucked around for ages trying to get consuming a wisp to properly remove the links between it and other wisps, and it has been made very hard - traced it back now to tick() not being called on removed entities so the linked.forEach{ unlink(it) } was never actually being run. Fixed issues with links remaining between removed wisps. Essentially, the concurrent modification was cause I was removing things from a list while for looping over it - swapping to an index based look (from the top for the reasons) fixed it. This loop runs on the unremoved wisp and checks for removed wisps since tick() isn't run on the removed wisp. Added pattern for OpWispHex, and added names and book entries for OpWispHex and OpFreeze Created specific exceptions for problems with the LinkableRegistry rather than temp using PatternRegistry.RegisterPatternException Modified LinkableEntity, BaseWisp, and TickingWisp to make them fail gracefully if expected NBT data is missing. also not meant to be on main (+1 squashed commits) Squashed commits: [bbfa393] Not meant to be on main branch yet Corrections and elaborations for the patchouli book (still need to add Link costs though), as well as a solution for wisp bounding boxes being off center from their visuals (not one that I like though) moar null safety a better fix for the wisp off-centre hitbox issues - override makeBoundingBox to offset the bounding box downwards - also looks like it might work for having distinct X and Z widths if I ever need that? Link operations now include costs, reduced costs of Unlink and SendIota OpRemainingEvals implemented OpGetLinkedIndex implemented Made IMediaEntity interface that BaseWisp extends and OpConsumeWisp uses - will want to rename BaseWisp to BaseCastingWisp or something, BasePlayerWisp maybe - the goal of this branch is to add random wisps around the place that player wisps can omnomnom. made fightConsume be based on wisp rather than caster. Added Block and BlockEntity for the Slipway which will be spawning the wandering wisps, had to change ForgeHexalInitializer from kotlin to java to make it work. Made some changes to other places as well to get rid of errors (removed nullability of some inputs from, added @JvmStatic decorators, changed IMediaEntity.fightConsume to accept an Either<BaseWisp, ServerPlayer> since if a player is casting consume wisp (not through a wisp) it should still work. Fixed BaseWisp after rebase (undid undoing changes XD), and fixed warnings from HexalplatRecipes, FreezeRecipe, and LazyLoad Added Slipway block model and image and etc. Made it uncollideable. Added WanderingWisps, renamed BaseWisp to BaseCastingWisp and added a BaseWisp that BaseCastingWisp and WanderingWisp extend, which handles media storage, contains particle rendering methods, colouriser stuff, etc. It took me a while to figure out that I need to sync() in BlockEntitySlipway every time data that I want saved gets changed. Started slowly figuring out how to use the rendering engine. Mucked around with the exact jerk range, acceleration caps, and velocity caps (it can move/accelerate faster diagonally but I can't be bothered fixing it) also added reflecting off of walls and floors. moved HexalEntities to common/lib, and started stealing Sound handling code from Create to make a sustained casting sound for the wisps. initialisers and ect for HexalSounds, added WispCastingSound instance Added sound file for wisp_casting_continue (from Envato Elements), and setup the WispCastingSoundInstance to work how Create's whistle sound does, with a couple tick sustain that gets refreshed each tick by the wisp casting. Also cleaned up a variety of comments around the place, reduced the attenuationDistance of WISP_CASTING_CONTINUE, etc. Removed initial velocity multiplier on ProjectileWisp to make ballistics easier, decreased cost to compensate (so it costs the same to get the same velocity, it's just the 'default' velocity is now lower) added IWispTriggers, a system for preventing a casting from going through unless the trigger lets it through - the currently implemented triggers are TickTrigger, which allows casts through if they're after X tick, and CommTrigger, which allows casts through if the wisp has received a communication. Did the whole Registry and Types stuff for it again cause Overengineering! Also made OpWispHex only able to target your own wisps, some general cleaning, etc. Made BlockEntitySlipwayRenderer create a cloud of rainbow particles at the slipway's position (this is easy and slipways are gonna be part of the release on friday at this point so easy is good) Halved Slipway particles *again*, and sorted out a solution for how WanderingWisp media should work - just keeping tract of how long the wisp's been alive and steadily increasing the media till it maxes out when the wisp dies. Got a SlipwayGeode feature successfully working and generating! (in forge, haven't tested fabric yet but it *should* also work). There were many different regestries to interact with to get this working, and the actual Slipway is still generating in the corner of the geode rather than the centre of the air blocks. Made geodes not generate in the nether/end on forge. Added HexalBlockEntities.register to fabric and now it's successfully generating the geodes and everything appears to be working. Made it so that the Slipway generates at the centre of the geode, rather than the corner. changed to match default amethyst more, but rarer. Made slipway spawn interval a bit random, decreased maximum media from wandering wisps but gave them a minimum media, and fixed OpConsumeWisp (the check for cost on consumed.fightConsume was the wrong way around - if they fought back it cost less, if they didn't it cost more). version inc for push Wisp cost reduced when not triggering and increased per active link, fixed link in patchouli trigger, found bug in link on first page of links, links to other pages don't seem to be working there for some reason. Added entity purification and zone distillations for wisps. version inc Added a bunch of extra comments to places other people are likely to touch, as well as adding a basic explanation in the Patchouli book for what Slipways are. Once more fixing OpConsumeWisp, need to invert the equality check between casters in BaseCastingWisp.fightConsume - if the casters are equal then it shouldn't fight (return false), if they are equal it should fight (return true). Also changed it so that if the wisps caster is null it fights all consume attempts (if a player is offline their wisps can't just be snaffled up. Made art for the mod and updated the license to have rights addressed to me rather than petra. version inc! addon guide! The very beginning of having this working, many things not yet implemented. Created a Linkstore for player links, as well as a LinkableType for it. Need to add a CC and etc. to make sure each player gets one, set up saving and syncing, rendering the links, etc. Actually made LazyLoad a thing and implemented LazyILinkableList and others to make those less hacky. Replaced the Either stuff for lists of ILinkables and Iotas in LinkableEntity, BaseCastingWisp, and TickingWisp with LazyLoads, and added to PlayerLinkstore. Changed the way that RenderCentres work - there's now a separate interface for it (LinkableEntity extends this as well cause that was easy). PlayerLinkstore now defines a RenderCentre which takes a ClientPlayer and just returns a point above their head (will see how it looks). Added to both forge and fabric a record for each player's PlayerLinkstore, made it readable by IXPlatAbstractions, and used that in all the Link actions to make them work if the player uses them as well (still need to make it possible to link *to* players, useable by both wisps and to link *players to other players this would be cool*). made it possible to actually link with other players properly! Successfully getting to the point where the world opens, only to immediately crash because I didn't implement ClientTick XD; time to do some rendering shuffling. Extracted out playLinkParticles from BaseWisp, and got fabric to the point where it isn't crashing. Now need to add a bunch of debug statements everywhere to figure out why it isn't working Fixed the problem! the either.map RIGHT half of LazyILinkableList.get() wasn't saving the resulting loaded directly back to the either meaning that the list that it made was being created, filled with an ILinkable, and then immediately discarded since nothing kept any reference to it. Player link rendering fully working on fabric! Started implementing the visual link rendering for player links on forge as well. This has required a fair bit of (ugh) networking. Gonna need to rewrite some stuff in PlayerLinkstore to make it so that I can send just AddRenderLink and RemoveRenderLink type packages for dramatically reduced network transmissions (should do the same for fabric). added range check to make it so that if two linked things get far enough apart their link breaks. Successfully mucked around with fabric networking! now it only sends CCPlayerLinkstore packets when the render links actually change - one update is sent when the CCPlayerLinkstore is created which contains every ILinkable, and then every subsequent update only occurs when addRenderLink and removeRenderLink are called, which only happen when the PlayerLinkstore actually adds/removes links. Some shenanigans were neccessary to make removing deleted wisps work properly (since the naive "make a list of all the deleted wisps, send it over to the client and have the client remove those IRenderCentres failed by way of Level.getEntity not working if the entity has been removed) Got rendering of renderLinks working on Forge! spent ages trying to debug an issue that I'm now pretty confident was caused by registering HexMod.CapSyncers rather than Hexal.CapSyncers which is a bit frustrating. version inc Made it so that links blend between colourisers in the middle, very pretty. OpLinkEntity/Entities now error if you try and link entities that are too far from each other. Made it so that LinkableEntity calls syncRenderLinks() the first time it is ticked so that when you relog all the entities are linked properly (can't do it in loadAdditionalData for the same reason I'm using LazyLoad in the first place). Had to implement Random.nextBeta in RenderHelper which was fun (stolen from numpy, but basically it's doing a random sample by repeated uniform samples and checking against the pdf, same as I learned in stats last semester). Wisps can move!! Added OpSetMoveTarget, OpGetMoveTarget, and a new Trigger that triggers when the wisp's reached its target. Wisps move in a straight line till they reach their target. Added OpGetBreath (Diver's Purification), OpGetHealth (Nurse's Purification), and OpGetLightLevel (Lamplighter's Purification) - also changed some naming stuff, since I learned how to have the patchouli book name for a pattern be different (namely, a shortening of) to the main name for the pattern! started working on web version of the book - changed python to indent with tabs. fixed collate_data.py to work with Hexal. added the hex patchouli book to /docs so that website gen works properly inconsistent naming schemes yay! Mucked around with sounds for a while trying to get it to not be infinite range; this did not work, but I did find a plausibly server crashing error where I was calling client sound methods on the server (WHOOPS), so I've fixed that with packets and networking (ugh). Also got HexalSounds data generator actually hooked up to the data generation system (specifically the forge one; turns out that the forge RunXPlatDatagen is in charge of generating the data that is shared between both; wacky but oh well). inc fixed the mixin to CastingContext that gets rid of the particle side effect also uh, getting rid of the blindDiversion side effect (oops). inc Fixed the next set of client-code-on-server crashes. misc changes to make code cleaner/fix minor warnings. Made a class to store the Everbook (a playerbound interworld akashic library), and tested the FileEncrypterDecrypter which is responsible for saving a player's Everbook somewhere every world can access (and encrypting it so that it isn't copy-pasteable to other players). Started implementing all the stuff to make the Everbook actually stored and synced properly. Needs to be a bit different to the others I've done since it is being synced both server to client and client to server. Seems like I need a mixin on fabric to learn when a player is logging out? Maybe have a fully functional system at this point? who knows! Fixed errors when no file present, added EverbookEventHandler to the forge event bus, added null checks on everbooks.get(player.getUUID()), added the new packets to ForgePacketHandler. Got Forge working properly! Required deleting the EVERBOOK_PATH variable from Everbook since it was accessing Minecraft on the server, changing EverbookEventHandler.clientPlayerLoggedIn to clientPlayerTick since apparently forge's network infrastructure isn't set up at the login point, and actually adding a call to localEverbook.saveToDisk() in clientPlayerLoggedOut. asd;jhlgsjaf; truename protection Got fabric working thanks to Aresiel! turns out ClientPlayConnectionEvents.DISCONNECT (NOT ClientLoginConnectionEvents) does what I want it to do. Also made FileEncryptorDecryptor not break if the file you're reading from was encrypted with a different key than expected. make it so that OpEverbookRead and Write need to target an akashic library, and read/write thier entries from/to that library. Contents of your everbook are visible in the patchouli book! (basically, need to make it look nicer but the feature exists!) Added Patchouli stuff for the patterns added, and an explanation of what the Everbook is. Also made it so that the everbook_entries entry has a short description, and each page has the page number at the top. Moved schedueCast and playCastSoundClient to BaseCastingWisp I spent ALL DAY strugging with gradle, and have FINALLY got runGameTestServer working and depending on the test sourceset and everything working, wooooo got the test successfully running! The structure file needs to be SNBT (use NbtStudio), and it needs to have the palette as a list of strings rather than a list of compound tags. It also needs to be located in run/gameteststructures. renamed to WispTests Cherry Picked FakePlayer system from npc_wisps branch Added getRandom to fake player so I can make many fake players easily. Added a registerSendMessageListener method to FakePlayer for testing purposes. Created Patterns to hold references to the patterns for everything that I might need in GameTest methods. basicTickingWIspTest now succeeds if the wisp successfully reveals the iota for itself, and added linkWispsMessageTest which succeeds if the receivingWisp receives and reveals the number 4 from the sending wisp. Created MacroHolder, which contains all the macros that a player has. Players make macros by adding them to their Everbook and then tagging them as macros. Added integration to EverbookEventHandler and CCEverbook to make macros accessible, and added IXplatAbstractions methods for it as well. Added OpToggleMacro to make macros toggleable, and added another method to MixinCastingContext to make it work. Added a pattern for OpToggleMacro, as well as a Patchouli description. Added MsgToggleMacroAck to sync the toggling of Macros to the client so that it can be saved, and rendered in the Patchouli book. Cursed (CastingHarness) (Object) this stuff in MixinCastingHarness to get a reference to the harness so that I ca get the context and call executeIotas(). Fixed the bug introdeuced in commit 79b030 that made wisps play casting particles under the player again. Made it so that wisps can only summon one child per cast. Also cleaned up some conditions in the wisp ops. Fixed issue with wisp links to players once again not being deleted when wisps are removed (this was introduced by properly separating client and server logic, my old solution was abusing the fact that I was running client code on the server). Also added compileKotlin and compileTestKotlin to Common:build.gradle so that the errors about targeting the wrong jvm disappear! minor fixes Added OpOpenTransmit and OpCloseTransmit, as well as made modifications to MixinCastingContext to store which linkable the player is transmitting to, and further modifications to MixinCastingHarness to make iotas get sent straight to the transmitee when transmitting. Also renamed MixinCastingContextInterface to IMixinCastingContext, which is what caused most of the file changes. Sucessfully working! moved the storing of caster linkables from MixinCastingContext to CCPlayerLinkstore and PlayerLinkstoreEventHandler, since A) the casting context isn't preserved and B) less mixin is good. Should probably actually move it inside PlayerLinkstore itself though, so it's easy to save. Shifted the store of transmittingTo into the PlayerLinkstore so that it's saved when the game saves, and to centralise logic. Changed LazyLoad to not use Either at all so that it can be properly used with the loaded type L as a nullable type. Changed lazyLoad some more to make it properly save the loaded object again once it's been loaded (this isn't the first time I've had this bug). Made it so that you can use Consideration properly while transmitting to send macro patterns & OpCloseTransmitting patterns. Made it so open & close transmitting aren't rendered yellow when you draw them. actually saving this so it doesn't get lost Added names and descriptions for OpOpenTransmit and OpCloseTransmit, as well as making OpFactorial. Made it so that LinkableRegistry.fromNbt returns a result so that ILinkable.LazyILinkableList can throw away any attempts to load things with invalid Linkable Types, rather than crashing completely (done so that later when ComputerCraft integration happens installing it, linking to a thing, and then uninstalling it while still linked doesn't brick that world forever). Cleaning up various unnecessary code bits. All HexPatterns for my actions are now stored in Patterns.kt, and RegisterPatterns is just in charge of actually registering them. This is so I can access the patterns in, e.g., test code. Added @JvmFields to everything. Made the doc generator work again. Made it so the doc generator doesn't try to display everbook entries. Fixed Everbook not working on Fabric (crash from getClientPattern being called before everbook was initialised in CCEverbook, and MsgToggleMacroAck was apparently never tested on fabric). Also fixed anchor for the wisp/consume patchouli entry. Fixed different problem on fabric (client everbook delete was calling the wrong method), and made it so that the entries into the everbook are (partially) rendered in the patchouli book. Changed where Everbook is saved, makes it save some backups, and makes the files saved contain your UUID so that multiple accounts playing in the same minecraft instance don't break each other's Everbooks. Compiles and runs on forge! dealing with issues on fabric, but forge is working!! Getting macros properly working again by changing how MacroHolder.extractList works to actually use the HexIotaTypes registry, and also turns out deleting iotas wasn't deleting macros. Added custom Mishaps, and changed OpSmelt to respect whether breaking is allowed. started getting testing working again probably finished getting WispTests working again but I can't be sure cause Hex Casting seems to be broken on the dedicated server. Updated to pre-453, ConstManaAction was renamed to ConstMediaAction. Added some custom Iota types! the ones I added where BlockTypeIota, EntityTypeIota, IotaTypeIota, and ItemTypeIota, to replace the old OpCompareBlocks, OpCompareEntities, and OpCompareTypes with actions that return the type of their argument, rather than comparing the types of two arguments. This makes using OpTypeEntity significantly easier. HexalNBTHelper.kt is now in the nbt package as it should be. Added an extra test to FileEncrypterDecrypterTest.kt to test the whole Everbook saving process. Made it so that cyclic wisps that get teleported don't try to move to their TargetMovePos unless they were teleported in the middle of moving towards it. Added OpWispOwner which accepts a wisp and an entity and returns 1 if the entity owns the wisp and 0 otherwise. Updated to the latest 1.0 snapshot, reworded wisp/owner and the comparison entries to match how they're implemented now. Removed BlockTypeIota and instead incorporated it into ItemTypeIota, which can now store blocks that don't have an item representation (using an Either). ignoring testEncryptDecryptEverbook since DoubleIota needs the registry system working for it to function, apparently. Copying Hexal repository and deleting all the unneceassry things, renaming to MoreIotas/moreiotas everywhereee.
4008f4c6Talia-12 authoredMucking around with build.gradles Update README.md Setup barebones mod (only fabric since forge isn't even building the gradle properly et, just gonna wait for help on that one) Renaming package to `ram.talia.hexal` to follow convention. Fix Fabric initialiser name. Added OpCompareBlocks as a first test, as well as supporting code to get it properly registered. Added new action OpCompareTypes, as well as giving English identifiers to both actions. fixing new_actions to line up with package renaming Added OpCompareEntities to check if two entities are exactly the same type (and for itementities if they're the same type of item), and changed OpCompareTypes to be based off of DatumType Added OpSmelt to smelt blocks/items in the world. Added language file entries for all the patterns, as well as adding pages to the Hex Casting Patchouli book to display how to use the new patterns. Rebase testing_entities onto main Setup ClientXplatAbstractions, which abstracts over things that are different between forge & fabric but need to be used a lot in common (in particular for this, things related to rendering entities). Added everything required to get a super basic entity (Wisp) into the game, as well as a pattern to summon one. This included a WispRenderer, and setting up RegisterClientStuff to actually connect the WispRenderer to the Wisp entity. An accesswidener needed to be added for Projectile::new since it isn't wasn't done automatically in common/fabric for some reason. refactored BaseWisp to be kotlin instead of java so that I can use OperatorUtils for vector addition and subtraction. Made OpSummonWisp take in a velocity as well as a direction. Moved setPos() in BaseWisp.tick() to above the playParticles() call so that the delta referenced inside playParticles isn't vec 0. Added setColouriser, load, addAdditionalSaveData, and defineSynchedData to BaseWisp to properly sync the colouriser that the player uses between server and client so that the renderer can use it. Also added a companion object containing the static variables for BaseWisp since that's apparently how you do that in Kotlin (thanks wiresegal!!) Successfully get Projectile Wisps working! they move forward at the passed speed, and cast the contained hex when the collide with something, with the stack starting as ProjectileWisp, ThingCollidedWith (either an entity or a Vec3 for the block position). This was done by making a new class ProjectileWisp and shifting a fair chunk of the code from BaseWisp to it. castSpell was added to BaseWisp based off of the casting code in abstract casting item (or whatever the class was called). Successfully made a mixin that means that CastingContext.isVecInRange() actually works sensibly with Wisps! Made another Mixin that means that wisps are properly charged for the media that they use in their casting, and fail to cast if they don't have enough media. This required adding a new argument to OpSummonWisp for how much media should be spent Added pattern to get how much media the wisp has accessible - mishaps when cast by a non-wisp context. Made WispCastingManager, which is in charge of scheduling and execuing wisp casts (each instance is bound to a player, and is responsible for that player's casts). Cardinal Components is used for the linking on Fabric, and also ensures that the manager's executeSpells() method is called every tick. BaseWisp.castSpell() has been replaced with scheduleCast which schedules a casting with the caster's WispCastingManager. Added HexalNBTHelper to help deal with some of the NBT writing required to ensure that WispCastingManager doesn't break if the player logs off while there are still casts scheduled (not at all sure this actually works). While a Wisp has a cast scheduled, it won't execute any ticks until its castCallback() method is called. Also made the callback call tick() to ensure that if the ticking order is Wisp, Player, the wisp doesn't get its tick skipped on the tick that it is cast. Fixed problem with WispCastingManager that was causing things to not get cast (wrong constructor for WispCast was being used in scheduleCast, and executeCast wasn't trying to refresh from the uuid if a cast's wisp was null. It actually works now!! I'm amazed that the code I wrote in basically one go with no testing only had this one tiny problem (that I know of so far). Also edited ProjectileWisp's constrctors to make it more extendable, for special types of projectile wisps (homing, orbiting, etc. to crib some more things from Ars XD). Made OpCurrentTicks, which adds the current serverLevel.gameTime (number of ticks since world was created, I'm *pretty* sure) to the stack. Wrote patchouli entries for all of the patterns currently missing them. Figured out sort order handles fractional entries fine so I can put type_comparisons next to logic where it should be. Made summon projectile wisp's explanation clearer. Also mucked around with BaseWisp to actually sync media properly between server and client since that is kinda important, and changed it so that velocity depends on how much media the wisp has (more volumous wisps move slower). Also tried mucking around with playParticles to make wisps with more media look larger, but it wasn't very successful. Renamed some resource names, added OpConsumeWisp which is used by a wisp A to decompose wisp B and reuse its media. Costs more media than returned when targeting someone else's wisp. Wrote descriptions for OpConsumeWisp. Same changes as 036dc7e (wisps_maybe), but without the stuff that I don't want to release at the moment. Made the per-tick cost of TickingWisp approximately exponential in distribution (so the more media it has, the faster it loses media). Changed the max range of wisps to depend on the kind of wisp. Changed the velocity calculations stuff to be a bit less janky. Mucked around with how tick() in BaseWisp works a bit to try and fix the issue with TickingWisps that was causing them to be not properly deleted serverside, ended up getting rid of the call of tick() in castCallback to fix it, I'll make a modification to have that all work properly later. Changed OpSummonWisp to have a constructor so that it can be reused for TickingWisps. Added pattern for TickingWisps. Changed WispCastingManager.executeCasts() to make it add all the WispCastResults to a list and execute them *after* the loop over the queue's iterator since that was causing a concurrent modification error (though plausibly that would have also been fixed by the removal of tick() from BaseWisp.castCallback() Updated the patchouli book as well as commented out a bunch of debug statements More Mixins! made it so that wisp casts don't cause particles under the player , and made it so that hexasting.message.cant_overcast isn't displayed when a ticking wisp doesn't have enough media. Soft reset all the changes from f9f509f and undid the renaming to Lemma - Projectile Wisps are still called that, Ticking Wisps are now Cyclic Wisps (in player-visible docs, can't be bothered renaming all the classes and etc.) rewrote the wisp entry for the patchouli book to be more better Make patchouli actually work when not in the dev environment - added stuff to book.json even though it isn't used, and renamed the directory they're in Changed maxSrqCastingDistance to actually properly return the *square* of the radius. Mucked around with ProjectileWisp to make it so that the fixed cost increases with the square of the initial velocity, and ensure that the wisp is actually at the point the collision happened when its spell resolves. Changed BaseWisp to also accomodate that, changed scheduleCast to be synced so that clientside wisps don't move while they're waiting on a callback, and made addVelocity scale the new velocity so that regardless of media contained a projectile wisp with the same initial conditions will follow the same trajectory (except for discretisation errors). Also made moar particles play. more rewriting descriptions to get everything important in. Fixed wisps not being able to use greater sentinel range. Fixed cyclic wisps not saving stack/ravenmind when unloaded. Reduced cost of OpConsumeWisp to match book, increased price in book to match OpSummonWisp cost, added description of stack stuff to CyclicWisp in book, incremented to 0.1.1. Reduced cost of all wisps to summon and to maintain. OpCompareBlocks able to force load arbitrary number of chunks at any distance. Added OpFallingBlock based on botania's LensWeight. Deleted the silk touchability restriction to make OpFallingBlock more fun Add OpFreeze (though haven't connected it to anything), and start setting up FreezeRecipe to make it so that freeze recipes are easy to add. Added initialisation code forRecipeSerializers to FabricHexalInitializer, added non-recipeable stuff to OpFreeze, added pattern for OpFreeze. Got the recipes for OpFreeze (only blocks) working! Revert "Deleted the silk touchability restriction to make OpFallingBlock more fun" This reverts commit be13eedd7370252b87b492adf4b579ccf7844d11. changed OpFallingBlock to not delete blockentities, and to drop if it can drop at all, e.g. if the block below is a torch/slab it'll drop now (compact farms using it a bit) make cardinal-components version requirements match Hex Casting's mucking around with trying to get forge working (it did not succeed) - on the upside, successfully depending on the release version of 0.9.2 now that it's got a final release! Added OpFreeze converting water cauldrons to powdered snow cauldrons. made it so that all wisps look in the direction of their velocity Getting Forge Compiling - This approach is /incredibly/ jank, but does seem to be at least be getting the HexCasting library in properly. - Still getting errors related to the mixin refmap. Derp Sorry. made setLookVector get called for all wisps whenever deltaMovement changes, to ensure that it is always looking in the direction of its movement - took some code from wiresegal to get setLookVector to actually work setting up all the forge stuff! Moar forge stuff, getting all the Xplat things setup, making sure all the events are on the right bus and successfully triggered, etc. Fixing problem with ListTags not being saved properly when the game is saved/loaded - also mucked around more with the cost of wisps, using object's python script to determine exactly how long a wisp with a given cost will last. Fixed issue of spelldatums containing entites getting loaded before Level.getEntity works properly by swapping to lazy evaluation of the Tag to a SpellDatum using Either deleted the Exp_Factor part of cyclic wisp's cost, and made projectile wisps half as expensive as ticking wisps. version 0.1.2 released here, pushed to server inc version number now, so all dev builds till next release will be 0.1.2.X Started doing interwisp communication, with associated problems! BaseWisp now extends LinkableEntity rather than Projectile, and the ~Projectile code necessary to keep things functioning has been reimplimented in BaseWisp/ProjectileWisp depending on what it was. Added Ops to interact with the entities linked to a wisp, and the iotas that it has received, as well as create links and send iotas. Increased the hitboxes of wisps to make them easier to target. Next thing to do is sync the list of Render_Links in BaseWisp to the client so that I can use it for (temp) displaying particles between them and (later) rendering lightning between them. Added @Surpress("CAST_NEVER_SUCCEEDS") in a bunch of places, there are definitely more it needs to go. Also swapped renderLinks to sync to the client using Entity.id rather than uuid since id is both synced between server and client and *actually searchable on the client* Added OpLinkWisps for debugging purposes, probably going to leave it in for allowing players to debug links too XD Overengineering things! ripped out more of the internals of things and moved them to other places to make it easier to add other Linkable things later - basically, made ILinkable, which can be implemented by anything (block, entity, whatever - anything with a position in the world that can be referenced on the client and server shouldd work). Then added LinkableRegistry and LinkableTypes to make that uh, actually work with saving and sycing references. Added book entries for all the new patterns in their own section. Added a pattern for getting a wisp's hex. Made it so that a cast erroring destroys the wisp that attempted it. Mucked around with debugging many issues with the linking system, fixing links not being removed properly when a wisp is discarded. Fully swap to hiding the Either stuff for lazy evaluation under the hood so that I don't need to think about it and don't bloat every single function with the evaluation code. Fixed LinkableEntity.link and unlink not actually calling *other*.link and unlink,instead linking to themselves or unlinking from themselves. Mucked around for ages trying to get consuming a wisp to properly remove the links between it and other wisps, and it has been made very hard - traced it back now to tick() not being called on removed entities so the linked.forEach{ unlink(it) } was never actually being run. Fixed issues with links remaining between removed wisps. Essentially, the concurrent modification was cause I was removing things from a list while for looping over it - swapping to an index based look (from the top for the reasons) fixed it. This loop runs on the unremoved wisp and checks for removed wisps since tick() isn't run on the removed wisp. Added pattern for OpWispHex, and added names and book entries for OpWispHex and OpFreeze Created specific exceptions for problems with the LinkableRegistry rather than temp using PatternRegistry.RegisterPatternException Modified LinkableEntity, BaseWisp, and TickingWisp to make them fail gracefully if expected NBT data is missing. also not meant to be on main (+1 squashed commits) Squashed commits: [bbfa393] Not meant to be on main branch yet Corrections and elaborations for the patchouli book (still need to add Link costs though), as well as a solution for wisp bounding boxes being off center from their visuals (not one that I like though) moar null safety a better fix for the wisp off-centre hitbox issues - override makeBoundingBox to offset the bounding box downwards - also looks like it might work for having distinct X and Z widths if I ever need that? Link operations now include costs, reduced costs of Unlink and SendIota OpRemainingEvals implemented OpGetLinkedIndex implemented Made IMediaEntity interface that BaseWisp extends and OpConsumeWisp uses - will want to rename BaseWisp to BaseCastingWisp or something, BasePlayerWisp maybe - the goal of this branch is to add random wisps around the place that player wisps can omnomnom. made fightConsume be based on wisp rather than caster. Added Block and BlockEntity for the Slipway which will be spawning the wandering wisps, had to change ForgeHexalInitializer from kotlin to java to make it work. Made some changes to other places as well to get rid of errors (removed nullability of some inputs from, added @JvmStatic decorators, changed IMediaEntity.fightConsume to accept an Either<BaseWisp, ServerPlayer> since if a player is casting consume wisp (not through a wisp) it should still work. Fixed BaseWisp after rebase (undid undoing changes XD), and fixed warnings from HexalplatRecipes, FreezeRecipe, and LazyLoad Added Slipway block model and image and etc. Made it uncollideable. Added WanderingWisps, renamed BaseWisp to BaseCastingWisp and added a BaseWisp that BaseCastingWisp and WanderingWisp extend, which handles media storage, contains particle rendering methods, colouriser stuff, etc. It took me a while to figure out that I need to sync() in BlockEntitySlipway every time data that I want saved gets changed. Started slowly figuring out how to use the rendering engine. Mucked around with the exact jerk range, acceleration caps, and velocity caps (it can move/accelerate faster diagonally but I can't be bothered fixing it) also added reflecting off of walls and floors. moved HexalEntities to common/lib, and started stealing Sound handling code from Create to make a sustained casting sound for the wisps. initialisers and ect for HexalSounds, added WispCastingSound instance Added sound file for wisp_casting_continue (from Envato Elements), and setup the WispCastingSoundInstance to work how Create's whistle sound does, with a couple tick sustain that gets refreshed each tick by the wisp casting. Also cleaned up a variety of comments around the place, reduced the attenuationDistance of WISP_CASTING_CONTINUE, etc. Removed initial velocity multiplier on ProjectileWisp to make ballistics easier, decreased cost to compensate (so it costs the same to get the same velocity, it's just the 'default' velocity is now lower) added IWispTriggers, a system for preventing a casting from going through unless the trigger lets it through - the currently implemented triggers are TickTrigger, which allows casts through if they're after X tick, and CommTrigger, which allows casts through if the wisp has received a communication. Did the whole Registry and Types stuff for it again cause Overengineering! Also made OpWispHex only able to target your own wisps, some general cleaning, etc. Made BlockEntitySlipwayRenderer create a cloud of rainbow particles at the slipway's position (this is easy and slipways are gonna be part of the release on friday at this point so easy is good) Halved Slipway particles *again*, and sorted out a solution for how WanderingWisp media should work - just keeping tract of how long the wisp's been alive and steadily increasing the media till it maxes out when the wisp dies. Got a SlipwayGeode feature successfully working and generating! (in forge, haven't tested fabric yet but it *should* also work). There were many different regestries to interact with to get this working, and the actual Slipway is still generating in the corner of the geode rather than the centre of the air blocks. Made geodes not generate in the nether/end on forge. Added HexalBlockEntities.register to fabric and now it's successfully generating the geodes and everything appears to be working. Made it so that the Slipway generates at the centre of the geode, rather than the corner. changed to match default amethyst more, but rarer. Made slipway spawn interval a bit random, decreased maximum media from wandering wisps but gave them a minimum media, and fixed OpConsumeWisp (the check for cost on consumed.fightConsume was the wrong way around - if they fought back it cost less, if they didn't it cost more). version inc for push Wisp cost reduced when not triggering and increased per active link, fixed link in patchouli trigger, found bug in link on first page of links, links to other pages don't seem to be working there for some reason. Added entity purification and zone distillations for wisps. version inc Added a bunch of extra comments to places other people are likely to touch, as well as adding a basic explanation in the Patchouli book for what Slipways are. Once more fixing OpConsumeWisp, need to invert the equality check between casters in BaseCastingWisp.fightConsume - if the casters are equal then it shouldn't fight (return false), if they are equal it should fight (return true). Also changed it so that if the wisps caster is null it fights all consume attempts (if a player is offline their wisps can't just be snaffled up. Made art for the mod and updated the license to have rights addressed to me rather than petra. version inc! addon guide! The very beginning of having this working, many things not yet implemented. Created a Linkstore for player links, as well as a LinkableType for it. Need to add a CC and etc. to make sure each player gets one, set up saving and syncing, rendering the links, etc. Actually made LazyLoad a thing and implemented LazyILinkableList and others to make those less hacky. Replaced the Either stuff for lists of ILinkables and Iotas in LinkableEntity, BaseCastingWisp, and TickingWisp with LazyLoads, and added to PlayerLinkstore. Changed the way that RenderCentres work - there's now a separate interface for it (LinkableEntity extends this as well cause that was easy). PlayerLinkstore now defines a RenderCentre which takes a ClientPlayer and just returns a point above their head (will see how it looks). Added to both forge and fabric a record for each player's PlayerLinkstore, made it readable by IXPlatAbstractions, and used that in all the Link actions to make them work if the player uses them as well (still need to make it possible to link *to* players, useable by both wisps and to link *players to other players this would be cool*). made it possible to actually link with other players properly! Successfully getting to the point where the world opens, only to immediately crash because I didn't implement ClientTick XD; time to do some rendering shuffling. Extracted out playLinkParticles from BaseWisp, and got fabric to the point where it isn't crashing. Now need to add a bunch of debug statements everywhere to figure out why it isn't working Fixed the problem! the either.map RIGHT half of LazyILinkableList.get() wasn't saving the resulting loaded directly back to the either meaning that the list that it made was being created, filled with an ILinkable, and then immediately discarded since nothing kept any reference to it. Player link rendering fully working on fabric! Started implementing the visual link rendering for player links on forge as well. This has required a fair bit of (ugh) networking. Gonna need to rewrite some stuff in PlayerLinkstore to make it so that I can send just AddRenderLink and RemoveRenderLink type packages for dramatically reduced network transmissions (should do the same for fabric). added range check to make it so that if two linked things get far enough apart their link breaks. Successfully mucked around with fabric networking! now it only sends CCPlayerLinkstore packets when the render links actually change - one update is sent when the CCPlayerLinkstore is created which contains every ILinkable, and then every subsequent update only occurs when addRenderLink and removeRenderLink are called, which only happen when the PlayerLinkstore actually adds/removes links. Some shenanigans were neccessary to make removing deleted wisps work properly (since the naive "make a list of all the deleted wisps, send it over to the client and have the client remove those IRenderCentres failed by way of Level.getEntity not working if the entity has been removed) Got rendering of renderLinks working on Forge! spent ages trying to debug an issue that I'm now pretty confident was caused by registering HexMod.CapSyncers rather than Hexal.CapSyncers which is a bit frustrating. version inc Made it so that links blend between colourisers in the middle, very pretty. OpLinkEntity/Entities now error if you try and link entities that are too far from each other. Made it so that LinkableEntity calls syncRenderLinks() the first time it is ticked so that when you relog all the entities are linked properly (can't do it in loadAdditionalData for the same reason I'm using LazyLoad in the first place). Had to implement Random.nextBeta in RenderHelper which was fun (stolen from numpy, but basically it's doing a random sample by repeated uniform samples and checking against the pdf, same as I learned in stats last semester). Wisps can move!! Added OpSetMoveTarget, OpGetMoveTarget, and a new Trigger that triggers when the wisp's reached its target. Wisps move in a straight line till they reach their target. Added OpGetBreath (Diver's Purification), OpGetHealth (Nurse's Purification), and OpGetLightLevel (Lamplighter's Purification) - also changed some naming stuff, since I learned how to have the patchouli book name for a pattern be different (namely, a shortening of) to the main name for the pattern! started working on web version of the book - changed python to indent with tabs. fixed collate_data.py to work with Hexal. added the hex patchouli book to /docs so that website gen works properly inconsistent naming schemes yay! Mucked around with sounds for a while trying to get it to not be infinite range; this did not work, but I did find a plausibly server crashing error where I was calling client sound methods on the server (WHOOPS), so I've fixed that with packets and networking (ugh). Also got HexalSounds data generator actually hooked up to the data generation system (specifically the forge one; turns out that the forge RunXPlatDatagen is in charge of generating the data that is shared between both; wacky but oh well). inc fixed the mixin to CastingContext that gets rid of the particle side effect also uh, getting rid of the blindDiversion side effect (oops). inc Fixed the next set of client-code-on-server crashes. misc changes to make code cleaner/fix minor warnings. Made a class to store the Everbook (a playerbound interworld akashic library), and tested the FileEncrypterDecrypter which is responsible for saving a player's Everbook somewhere every world can access (and encrypting it so that it isn't copy-pasteable to other players). Started implementing all the stuff to make the Everbook actually stored and synced properly. Needs to be a bit different to the others I've done since it is being synced both server to client and client to server. Seems like I need a mixin on fabric to learn when a player is logging out? Maybe have a fully functional system at this point? who knows! Fixed errors when no file present, added EverbookEventHandler to the forge event bus, added null checks on everbooks.get(player.getUUID()), added the new packets to ForgePacketHandler. Got Forge working properly! Required deleting the EVERBOOK_PATH variable from Everbook since it was accessing Minecraft on the server, changing EverbookEventHandler.clientPlayerLoggedIn to clientPlayerTick since apparently forge's network infrastructure isn't set up at the login point, and actually adding a call to localEverbook.saveToDisk() in clientPlayerLoggedOut. asd;jhlgsjaf; truename protection Got fabric working thanks to Aresiel! turns out ClientPlayConnectionEvents.DISCONNECT (NOT ClientLoginConnectionEvents) does what I want it to do. Also made FileEncryptorDecryptor not break if the file you're reading from was encrypted with a different key than expected. make it so that OpEverbookRead and Write need to target an akashic library, and read/write thier entries from/to that library. Contents of your everbook are visible in the patchouli book! (basically, need to make it look nicer but the feature exists!) Added Patchouli stuff for the patterns added, and an explanation of what the Everbook is. Also made it so that the everbook_entries entry has a short description, and each page has the page number at the top. Moved schedueCast and playCastSoundClient to BaseCastingWisp I spent ALL DAY strugging with gradle, and have FINALLY got runGameTestServer working and depending on the test sourceset and everything working, wooooo got the test successfully running! The structure file needs to be SNBT (use NbtStudio), and it needs to have the palette as a list of strings rather than a list of compound tags. It also needs to be located in run/gameteststructures. renamed to WispTests Cherry Picked FakePlayer system from npc_wisps branch Added getRandom to fake player so I can make many fake players easily. Added a registerSendMessageListener method to FakePlayer for testing purposes. Created Patterns to hold references to the patterns for everything that I might need in GameTest methods. basicTickingWIspTest now succeeds if the wisp successfully reveals the iota for itself, and added linkWispsMessageTest which succeeds if the receivingWisp receives and reveals the number 4 from the sending wisp. Created MacroHolder, which contains all the macros that a player has. Players make macros by adding them to their Everbook and then tagging them as macros. Added integration to EverbookEventHandler and CCEverbook to make macros accessible, and added IXplatAbstractions methods for it as well. Added OpToggleMacro to make macros toggleable, and added another method to MixinCastingContext to make it work. Added a pattern for OpToggleMacro, as well as a Patchouli description. Added MsgToggleMacroAck to sync the toggling of Macros to the client so that it can be saved, and rendered in the Patchouli book. Cursed (CastingHarness) (Object) this stuff in MixinCastingHarness to get a reference to the harness so that I ca get the context and call executeIotas(). Fixed the bug introdeuced in commit 79b030 that made wisps play casting particles under the player again. Made it so that wisps can only summon one child per cast. Also cleaned up some conditions in the wisp ops. Fixed issue with wisp links to players once again not being deleted when wisps are removed (this was introduced by properly separating client and server logic, my old solution was abusing the fact that I was running client code on the server). Also added compileKotlin and compileTestKotlin to Common:build.gradle so that the errors about targeting the wrong jvm disappear! minor fixes Added OpOpenTransmit and OpCloseTransmit, as well as made modifications to MixinCastingContext to store which linkable the player is transmitting to, and further modifications to MixinCastingHarness to make iotas get sent straight to the transmitee when transmitting. Also renamed MixinCastingContextInterface to IMixinCastingContext, which is what caused most of the file changes. Sucessfully working! moved the storing of caster linkables from MixinCastingContext to CCPlayerLinkstore and PlayerLinkstoreEventHandler, since A) the casting context isn't preserved and B) less mixin is good. Should probably actually move it inside PlayerLinkstore itself though, so it's easy to save. Shifted the store of transmittingTo into the PlayerLinkstore so that it's saved when the game saves, and to centralise logic. Changed LazyLoad to not use Either at all so that it can be properly used with the loaded type L as a nullable type. Changed lazyLoad some more to make it properly save the loaded object again once it's been loaded (this isn't the first time I've had this bug). Made it so that you can use Consideration properly while transmitting to send macro patterns & OpCloseTransmitting patterns. Made it so open & close transmitting aren't rendered yellow when you draw them. actually saving this so it doesn't get lost Added names and descriptions for OpOpenTransmit and OpCloseTransmit, as well as making OpFactorial. Made it so that LinkableRegistry.fromNbt returns a result so that ILinkable.LazyILinkableList can throw away any attempts to load things with invalid Linkable Types, rather than crashing completely (done so that later when ComputerCraft integration happens installing it, linking to a thing, and then uninstalling it while still linked doesn't brick that world forever). Cleaning up various unnecessary code bits. All HexPatterns for my actions are now stored in Patterns.kt, and RegisterPatterns is just in charge of actually registering them. This is so I can access the patterns in, e.g., test code. Added @JvmFields to everything. Made the doc generator work again. Made it so the doc generator doesn't try to display everbook entries. Fixed Everbook not working on Fabric (crash from getClientPattern being called before everbook was initialised in CCEverbook, and MsgToggleMacroAck was apparently never tested on fabric). Also fixed anchor for the wisp/consume patchouli entry. Fixed different problem on fabric (client everbook delete was calling the wrong method), and made it so that the entries into the everbook are (partially) rendered in the patchouli book. Changed where Everbook is saved, makes it save some backups, and makes the files saved contain your UUID so that multiple accounts playing in the same minecraft instance don't break each other's Everbooks. Compiles and runs on forge! dealing with issues on fabric, but forge is working!! Getting macros properly working again by changing how MacroHolder.extractList works to actually use the HexIotaTypes registry, and also turns out deleting iotas wasn't deleting macros. Added custom Mishaps, and changed OpSmelt to respect whether breaking is allowed. started getting testing working again probably finished getting WispTests working again but I can't be sure cause Hex Casting seems to be broken on the dedicated server. Updated to pre-453, ConstManaAction was renamed to ConstMediaAction. Added some custom Iota types! the ones I added where BlockTypeIota, EntityTypeIota, IotaTypeIota, and ItemTypeIota, to replace the old OpCompareBlocks, OpCompareEntities, and OpCompareTypes with actions that return the type of their argument, rather than comparing the types of two arguments. This makes using OpTypeEntity significantly easier. HexalNBTHelper.kt is now in the nbt package as it should be. Added an extra test to FileEncrypterDecrypterTest.kt to test the whole Everbook saving process. Made it so that cyclic wisps that get teleported don't try to move to their TargetMovePos unless they were teleported in the middle of moving towards it. Added OpWispOwner which accepts a wisp and an entity and returns 1 if the entity owns the wisp and 0 otherwise. Updated to the latest 1.0 snapshot, reworded wisp/owner and the comparison entries to match how they're implemented now. Removed BlockTypeIota and instead incorporated it into ItemTypeIota, which can now store blocks that don't have an item representation (using an Either). ignoring testEncryptDecryptEverbook since DoubleIota needs the registry system working for it to function, apparently. Copying Hexal repository and deleting all the unneceassry things, renaming to MoreIotas/moreiotas everywhereee.
Loading