ChatTriggers

A framework for Minecraft Forge that allows for client modifications to be scripted in JavaScript

MIT License

Stars
169
Committers
25

Bot releases are hidden (Show)

ChatTriggers - 2.2.1 Latest Release

Published by mattco98 3 months ago

  • Fix certificate issue on older Java versions that caused issues with importing (@MisterCheezeCake)
  • Fix modules sometimes evaluating twice when imported from different locations
  • Fix trigger priorities sometimes not working correctly (@camnwalter)
  • Color required modules gray in the /ct modules menu (@NoahTheNerd)
ChatTriggers - 2.2.0

Published by mattco98 over 1 year ago

  • Added extra parameter to Image.fromUrl to control the cached image name
  • Added FileLib.{encodeBase64,decodeBase64} (@Debuggingss)
  • Added Gui.register{Opened,Closed} (@DalwynWasTaken)
  • Added Player.isMoving (@realfork)
  • Added ability to filter the class type using .setFilteredClass(Class) for the following triggers: renderEntity, postRenderEntity, renderTileEntity, postRenderTileEntity (@Marvinschs)
  • Added a top-level NBT helper to make parsing NBT easier (@camnwalter)
  • Added KeyBind.{unregisterKeyPress,unregisterKeyRelease,unregisterKeyDown}() (@Marvinschs)
  • Added Display.{unregisterClicked,unregisterHovered,unregisterMouseLeave,unregisterDragged}() (@Marvinschs)
  • Added ability to pass Class<*> objects which inherit from Forge's Event class into the first parameter of register. This allows you to register for arbitrary events.
  • Show module dependencies on the module graph GUI (@camnwalter)
  • Fixed step trigger firing a bunch of extra times when registering it after a call to unregister.
  • Fixed links in TextComponent instances not being clickable (@camnwalter )
  • Fixed ChatLib.say not triggering messageSent (@Debuggingss)
  • Fixed not being able to /ct load after a /ct unload (@camnwalter)
  • Fixed not having to manually /ct load after importing a module with a .jar file (@camnwalter)
ChatTriggers - 2.1.5

Published by mattco98 about 2 years ago

  • Added Image.destroy() to clean up an image's texture from memory (@Soopyboo32)
  • Added Image(java.io.File) (@Squagward)
  • Added a method to perform class filtering for packet triggers:
    register('packetSent', () => {}).setPacketClass(MyPacketClass.class);
    register('packetSent', () => {}).setPacketClasses([A.class, B.class, C.class]);
    
ChatTriggers - 2.1.4

Published by mattco98 over 2 years ago

Fix rhino-related performance issue relating to packet triggers (@Squagward)

ChatTriggers - 2.1.3

Published by mattco98 over 2 years ago

  • Fixed performance issue relating to Threads
  • Implemented custom tab completions for command triggers (@Squagward)
  • Added some utility Display methods: removeLine, show, hide (@Squagward)
ChatTriggers - 2.1.2

Published by mattco98 over 2 years ago

Fixed a significant performance issue.

ChatTriggers - 2.1.1

Published by mattco98 over 2 years ago

Fixed not being able to call register from new Threads.

ChatTriggers - 2.1.0

Published by mattco98 over 2 years ago

Additions

  • Added Display::setRegisterType("RENDER_OVERLAY_EVENT" | "POST_GUI_RENDER_EVENT") to control when the GUI draws (@DalwynWasTaken)
  • Added Particle::getColor() (@Debuggingss)
  • Added FileLib::{delete,deleteDirectory}() (@Squagward)
  • Added Client.currentGui.getSlotUnderMouse(), which returns a new CT Slot wrapper class (@appable0)
  • Added Item::{setName, setLore}() (@Squagward)
  • Added support for newlines in Renderer.drawStringWithShadow (@Squagward)
  • Added Client.connect(ip: String) (@Squagward)
  • Added end argument to print so the newline can be omitted (@Debuggingss)
    • E.g.: print('a string', '')
  • New triggers:
    • renderTitle(title: String, subtitle: String, event: Event) triggers when a title is drawn to the screen (@Squagward)
    • renderSlot(slot: Slot, gui: GuiContainer, event: Event) triggers when a slot is being drawn (@appable0)
    • renderItemIntoGui(item: Item, x: Int, y: Int, event: Event) triggers when an item is drawn into a gui (@appable0)
    • renderItemOverlayIntoGui(item: Item, x: Int, y: Int, event: Event) triggers when an item overlay (stack count/damage) is drawn into a gui (@appable0)
    • renderHand(event: Event) triggers for the hand drawing, can be cancelled (@Squagward)

Fixes/Changes:

  • Media keys no longer trigger all keybinds (@Squagward)
  • chatComponentClicked no longer triggers more often than it should (@Squagward)
  • A criteria now counts as formatted if it contains the § character (@Squagward)
  • Deleting modules with jar files is now possible (@Squagward)
  • gameLoad now properly triggers on game load (previously it would only trigger on /ct load) (@Debuggingss)
  • Fixed cast error in Sound (@Squagward)
  • Removed unused /generatebindings command and associated logic (@Debuggingss)
  • Fixed slots being incorrect for certain GUIs (@Squagward)
  • Enable color in the console by default (@Debuggingss)
ChatTriggers - 2.0.4

Published by mattco98 over 2 years ago

Additions:

  • Add renderScoreboard trigger (@Squagward)
  • Add Scoreboard.setTitle (@Squagward)
  • Add Player{,MP}.getTeam() (@Squagward)
  • Add World.stopAllSounds() (@Squagward)
  • Add NBTTagList.insertTag() (@Squagward)
  • Add Scoreboard.getScoreboard() and Scoreboard.getSidebar() (@Squagward)
  • Add a bunch of NBTTagCompound setters (@Squagward)
  • Add ability for Display to use postGuiRender trigger (@DalwynWasTaken)

Changes:

  • DisplayLine.addLine now returns itself for method chaining (@DalwynWasTaken)

Fixes:

  • Fixed invokeJS (@Squagward)
  • Only trigger Gui scroll when open, fix NPE (@Squagward)
  • Fixed Sound cast error (@Squagward)
  • Fixed Display clicking/dragging when using alignment (@Squagward)
ChatTriggers - 2.0.3

Published by mattco98 over 2 years ago

Fix an issue with some Client methods being unavailable.

ChatTriggers - 2.0.2

Published by mattco98 over 2 years ago

Additions:

  • Add newline support to Text (@Squagward)
  • New triggers: renderPortal, renderJumpBar, renderChat, renderHelmet (@Squagward)
  • Add option to command trigger to override existing commands (@Debuggingss)
  • Add aliases to command triggers (@Squagward)
  • Add trigger methods to KeyBind similar to Gui (@Squagward)
  • Add Chunk::getAllTileEntities and Entity::getChunk (@Squagward)

Fixes:

  • Fix Shape::setLine not drawing (@Squagward)
  • Fix editChat and deleteChat not working correctly (@Squagward)
ChatTriggers - 2.0.1

Published by mattco98 almost 3 years ago

  • Fixed a critical Rhino regression which caused most modules to error.
  • Send mod version along with hashed and salted UUID.
ChatTriggers - 2.0.0

Published by mattco98 almost 3 years ago

This is the second major version release of ChatTriggers, and includes some breaking changes. The largest addition is the inclusion of Essential, which in addition to a bunch of cosmetic and social features, will always include the latest versions of Elementa and Vigilance. These modules have already been updated on the website, and are available for module authors to start using.

Additions

  • [BREAKING] Added a bunch of GL and NBT imports to moduleProvidedLibs.js
    • If your modules has these defined, it will error.
  • Integrated Essential into CT
  • Track hashed UUIDs on launch. These UUIDs are hashed with SHA256 and salted with your computer's username, so
    it is impossible to reverse the hash. This tracking gives us nice usage statistics.
  • Added a bunch of Tessellator methods, most notably pushMatrix and popMatrix
  • Added Entity#{getMaxHP,distanceTo} methods
  • Added Player#asEntity method which returns the player as a CT Entity object
  • Added FileLib.{exists,isDirectory}
  • Added an optional changelog field to metadata.json for authors to write a basic changelog (@Squagward)
  • Added NBTTagCompound#toObject to convert NBT to a JS object
    • Note that this is potentially performance-adverse, and should probably not be used in hot code
  • Added Player.getLast{X,Y,Z} and Player.getRender{X,Y,Z} methods (@kerbybit)
  • Added ChatLib.addToSentMessageHistory (@Squagward)
  • Added EntityLivingBase wrapper (@Squagward)
  • Added ability to clear TabList's header and footer (@Squagward)
  • Added a bunch of methods to Gui for handling buttons (@Squagward)
  • Added some more wrapper methods to Chunk (@Squagward)
  • Added methods to ChatLib for deleting sent messages, much like the current methods for editing sent messages
  • Added TileEntity wrapper (@Squagward)
  • Added a bunch of new triggers:
    • preItemRender (@Squagward)
    • renderSlotHighlight (@Squagward)
    • postRenderEntity (@Debuggingss)
    • serverConnect/serverDisconnect (@Squagward)
    • guiClosed (@Debuggingss)
    • guiDrawBackground (@Squagward)
    • renderTileEntity/postRenderTileEntity (@Debuggingss)

Fixes

  • [BREAKING] Tick trigger now correctly fires 20 times a second (it previously fired 40 times a second) (@FalseHonesty)
    • The tick trigger is not meant for timing. If you need precise timing control, use the step trigger instead.
  • Fixed step not firing in certain GUIs.
  • Removed old Frames+ check, which caused log spam and the occasional crash
  • Fixed hang on launch on Ubuntu
  • Fixed Book#{add,set}Page crashing due to a ClassCastException (@Maxssho13)
  • Fixed TabList#setFooter setting the header (@Maxssho13)
  • Fixed package{Sent,Received} triggers not firing properly (@Maxssho13)
  • Fixed not firing gameUnload trigger during shutdown
  • Fixed blockBreak trigger not working (@Squagward)
  • Fixed hitBlock trigger always passing (0, 0, 0) as the block's position
  • Fixed ASMLib's invokeJS function accessing a non-existant property
  • Fixed ASMLib having an incorrect signature for invokeDynamic (@Squagward)
  • Fixed Player.getSaturation returning the player's food level
  • Fixed PacketReceived/Sent triggers being unreliable
  • Fixed Display setting it's height to an incorrect value (@Squagward)
  • Fixed dropItem trigger not firing correctly on servers
  • Fixed Message not always converting TextComponents correctly (@Squagward)
  • Fixed Renderer only drawing vertices if they were positioned counter-clockwise (@Squagward)
  • Fixed Image not deleting it's GL texture on reload, which leaked memory

Changes

  • [BREAKING] Completely overhaul the Block API
    • Previously, Block represented both the abstract idea of a block and a particular block placed in the world. These have now been separated into BlockType and Block (which is a particular BlockType at a BlockPos)
    • Also includes more moduleProvidedLibs.js imports
  • [BREAKING] The Inventory class is now much more null safe (@Squagward and @Debuggingss)
    • Some methods which returns an Item wrapping a null ItemStack now simply return null
  • [BREAKING] Commands cannot have multiple names. If you need an alias for a command, register a second command trigger
  • Triggers are now internally sorted by type instead of all being in one big set, which will improve performance
  • The loader now recursively searched for .jar files, meaning they can be placed in nested folders instead of having to be top level
  • Updated to Kotlin 1.6 (this should improve compatibility with some other mods)
  • The CT section in crashlogs now only prints the name and version
  • Added some flags to Renderer.drawPlayer and PlayerMP.draw to allow more fine-grained control over the player rendering
  • Rewrote the /ct config GUI to use Vigilance
  • The update checker will now consider patch versions
  • The ChatTriggers repository now has automated CI via github actions, and publishes a built jar for every pushed commit (@DJtheRedstoner)

Rhino

  • Fixed let/const use in for-each loop head
  • Fixed instanceof for java classes and objects (@FalseHonesty)
  • Fixed Proxy incorrectly checking handler prototype for existence of trap methods
  • Fixed not being able to convert Symbol to object
  • Fixed typeof crashing when given a Symbol
ChatTriggers - 1.3.2

Published by mattco98 over 3 years ago

This is a quick hotfix for 1.3.1 that primarily upgrades Kotlin to 1.5.21 for compatibility with other mods, as well as updates gradle to 6.8.1.

ChatTriggers - 1.3.1

Published by kerbybit over 3 years ago

Changed "Update Modules On Boot" to "Automatically Update Modules" in /ct settings
On top of this setting now actually working, it disables all module auto updating even on /ct load

Fixed ChatLib.getCenteredText not accounting for formatted text

Fixed Priority object in provided libs

Fixed some typos

ChatTriggers - 1.3.0

Published by mattco98 about 4 years ago

Additions

  • Add packetReceived trigger
  • Add DropAction to moduleProvidedLibs.js
  • metadata.json can now take a helpMessage key which is printed when a module is installed. This can be disabled in the settings.

Fixes

  • drawString now completes the draw on newlines
  • Moved some ASM field initializations to class constructors, avoiding a Rhino bug
  • Fixed function name typo: Settings.skin.setLeftPantsLef-> Settings.skin.setLeftPantsLeg
  • String.prototype.addFormatting no longer calls a nonexistent function
  • The playerLeave trigger now properly fires
  • Modules now auto-update correctly

Changes

  • Implemented a proper Gui.registerScrolled method. Previously, scrolls had to be detected in the Gui.registerClicked method. This is a small breaking change, and is the reason for the minor version increment.
ChatTriggers - 1.2.2

Published by kerbybit over 4 years ago

Did the bug fixes and fixed every bug no more bugs

ChatTriggers - 1.2.1

Published by mattco98 over 4 years ago

  • Updated Rhino to latest version
    • Includes lots of spread and rest improvements
  • Added FileLib.append
  • Improved mod stability
ChatTriggers - 1.2.0

Published by mattco98 over 4 years ago

  • Fixed an offline crash related to capes and image assets
  • Fixed crash related to sign lines being nullable
  • Fixed update checker for the 27th time
  • Fixed gameLoad/gameUnload/worldLoad/worldUnload triggers
  • Fixed ASM classpath error on game startup
ChatTriggers - 1.1.2

Published by mattco98 over 4 years ago

  • Update Rhino to fix an importing bug involving importing from directories
Badges
Extracted from project README
forthebadge