Skip to content

Releases: ChatTriggers/ChatTriggers

1.1.0

07 Mar 04:48
Compare
Choose a tag to compare

CT Changes

Added coremod (ASM) support. Checkout the ASM Injection wiki page for more information.

1.0.0

06 Mar 00:09
Compare
Choose a tag to compare

CT Changes

  • Fixed /ct settings
  • Added entityDamage, entityDeath, attackEntity, and hitBlock triggers
  • print now handles undefined values
  • Item#getItemNBT now returns an NBTTagCompound object
  • Added syntax highlighting to the console, as well as a multiline input text area

1.0.0 RC5

28 Feb 05:52
Compare
Choose a tag to compare
1.0.0 RC5 Pre-release
Pre-release

CT Changes

  • Trimmed console stack traces to only include relevant information
  • Image.draw now respects Renderer transforms
  • Added Player.draw and PlayerMP.draw as an alias Renderer.drawPlayer
  • PlayerMP methods now return null instead of crashing
  • Added postGuiRender trigger
    • Like renderOverlay, but runs after the currently open GUI screen is drawn. Use this trigger if you need to draw over a GUI, such as the chat GUI
  • Added Client.disconnect()
  • Added extensive console polyfill to providedLibs. See MDN's console documentation for method details
  • Fixed /ct settings not displaying due to a bad image URL
  • Switched from Mixins to ASM
    • This means that certain mod incompatibilities should no longer be a problem. For example, Frames+ now works with ct (note that the spawnParticle trigger is disabled if you have Frames+ present)
    • ct is now compatible with LiteLoader
  • Reduced the jar size by over half

Rhino changes:

  • Added partial application
  • Added operator overloading (see below)
  • Added inline exporting support
  • Added logical assignment operators
  • Importing from a directory now looks for an index.js file instead of throwing an error
  • Constructing a Java class without new is an error
  • Fixed const variables sometimes not retaining their value
  • Classes are now block-scoped
  • Allowed const variables in for loops, as well as disallowed assignment in for-in loops in strict mode

Operator overloading

This is a modification of a stage 0 ECMAScript proposal that we thought was useful enough to implement. A brief example is included below; feel free to ask us for help if you need more information.

class Foo {
  constructor(num) {
    this.num = num;
  }

  [Symbol.operator('+')](other) {
    return new Foo(this.num + other.num);
  }

  [Symbol.unaryOperator('-')]() {
    return new Foo(-this.num);
  }
}

const foo1 = new Foo(5);
const foo2 = new Foo(10);
const foo3 = foo1 + foo2;
print(foo3.num);     // prints 15
print((-foo3).num);  // prints -15

1.0.0 RC4

04 Jan 00:09
Compare
Choose a tag to compare
1.0.0 RC4 Pre-release
Pre-release
  • Updated cape textures
  • Added Item#getRawNBT()
  • Update to the latest version of our Rhino fork.

1.0.0 RC3

23 Dec 03:45
Compare
Choose a tag to compare
1.0.0 RC3 Pre-release
Pre-release
  • Rearranged overloaded Inventory.click and fixed it
  • Added Client.isControlDown
  • Added Client.isShiftDown
  • Added Client.isAltDown
  • Fixed Entity.getLastZ
  • Updated to the latest fork of rhino. Keep updated with rhino changes on our fork

1.0.0 RC2

20 Dec 18:33
Compare
Choose a tag to compare
1.0.0 RC2 Pre-release
Pre-release

Added options for console font and font size
Made Displays thread safe
Overloaded Inventory.click(slot, button = "LEFT", shift = false)
Added Entity.getLastX(), Entity.getLastY(), and Entity.getLastZ()
Added Entity.getRenderX(), Entity.getRenderY(), and Entity.getRenderZ()

1.0.0 RC1

09 Dec 02:44
Compare
Choose a tag to compare
1.0.0 RC1 Pre-release
Pre-release

1.0.0 Release Candidate 1

JS engine change and partial ES6 support

ChatTriggers is switching JS engines to Rhino but we wanted it to be special so @FalseHonesty and @mattco98 have been working hard on adding more and more ES6 support as time goes on. Modules released by @kerbybit will showcase a lot of the new supported features but you can always keep track of updates from the github fork

The biggest change will be how the engine handles files. Each module gets its own 'sandbox' so you no longer have to worry about conflicting variable or function names but you do have to export and import functions and variables to use them across files. A simple example is shown below.


metadata.json

{
     "name": "ExampleModule",
     "entry": "index.js"
}

index.js

const { myFunction, myVariable } = require("ExampleModule/extra")

register("command", () => {
     myFunction("testing special function")
     print(myVariable)
}).setName("example")

extra.js

function myFunction(out) {
     ChatLib.chat(out)
}
myVariable = "test"

module.exports = { myFunction, myVariable }

Other misc (but not small) changes

  • Cleaned up the userdocs and moved some things around
  • Added TriggerRegister.regsiterRenderArmor
  • Removed XMLHttpRequest
  • Fixed threaded loading
  • Added support to change keybind category
  • Added client side command running
  • Changed TabList.getNames to be more usable
  • Changed Inventory.getName to be more usable
  • Added Message.getFormattedText and Message.getFormattedText
  • Added Tessellator.getRenderPos
  • Changed console font to monospace "FiraCode" font
  • Changed Client.gui to Client.currentGui
  • Fixed Client.currentGui.close
  • Moved World.showTitle to Client.showTitle
  • Added capes back
  • Added Gui.drawCreativeTabHoveringString and Gui.drawHoveringString
  • Added Inventory.getItems
  • Changed Inventory.contains and Inventory.indexOf to be more usable

0.18.4

05 Aug 15:45
Compare
Choose a tag to compare

Additions

  • Added spawnParticle trigger, which passes through the ct Particle instance, the position as a Vector3d, and the event, which can be cancelled.

Changes

  • Added config option to disable load threading, which should hopefully make trigger loading more reliable.

0.18.3

03 Aug 18:39
Compare
Choose a tag to compare

Chat triggers

  • Added ability for .setCriteria() to accept JS RegExp objects.
  • Added .setStart(), .setContains(), .setEnd(), and .setExact() methods to set the parameter directly.
  • Added .setCaseInsensitive() to ignore case when matching chat messages. Note that this is unnecessary when using RegExp objects, as you can use the built-in case insensitive flag: /regex here/i.

Error reporting

  • Errors that occur in scripts (both top-level and inside triggers) now list the file name and actual line number where the error occurred.
  • This will not happen in threads, however all thread functions are now automatically wrapped in a try-catch statement that will print errors to console.

Misc

  • Added Renderer.setDrawMode(int) and Renderer.getDrawMode().
  • Removed the following deprecated Renderer methods: Renderer.image, Renderer.text, Renderer.rectangle, Renderer.shape.
  • Removed renderBlock trigger due to unreliability.
  • Fixed playerJoin trigger not passing in the correct argument.
  • Fixed the following triggers passing their events as the first parameter instead of the last: messageSent, soundPlay, noteblockPlay, noteblockChange, drawBlockHighlight

0.18.2

29 Jul 15:13
Compare
Choose a tag to compare

Fixes:

  • Fixed Player.facing() only working for five out of the eight directions
  • Fixed Text and ParticleEffect constructors requiring all parameters to be specified
  • Fixed the game crashing on launch without an internet connection

Additions:

  • Added renderEntity trigger
  • Improved /ct dump, which now takes two args: the type of chat to dump (either chat or actionbar, chat by default), and the amount of lines to dump (defaults to 100)