A framework for Minecraft Forge that allows for client modifications to be scripted in JavaScript
MIT License
Bot releases are visible (Hide)
Published by mattco98 over 4 years ago
FieldBuilder
and RemoveBuilder
to the ASM helper
ASM.removeBuilder
and ASM.fieldBuilder
Published by mattco98 over 4 years ago
Added coremod (ASM) support. Checkout the ASM Injection wiki page for more information.
Published by mattco98 over 4 years ago
/ct settings
entityDamage
, entityDeath
, attackEntity
, and hitBlock
triggersprint
now handles undefined
valuesItem#getItemNBT
now returns an NBTTagCompound
objectPublished by mattco98 over 4 years ago
Image.draw
now respects Renderer transformsPlayer.draw
and PlayerMP.draw
as an alias Renderer.drawPlayer
PlayerMP
methods now return null instead of crashingpostGuiRender
trigger
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 GUIClient.disconnect()
console
polyfill to providedLibs. See MDN's console documentation for method details/ct settings
not displaying due to a bad image URLspawnParticle
trigger is disabled if you have Frames+ present)index.js
file instead of throwing an errornew
is an errorThis 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
Published by mattco98 almost 5 years ago
Item#getRawNBT()
Published by kerbybit almost 5 years ago
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()
Published by kerbybit almost 5 years ago
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 }
Published by mattco98 about 5 years ago
spawnParticle
trigger, which passes through the ct Particle
instance, the position as a Vector3d
, and the event, which can be cancelled.Published by mattco98 about 5 years ago
.setCriteria()
to accept JS RegExp objects..setStart()
, .setContains()
, .setEnd()
, and .setExact()
methods to set the parameter directly..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
.try-catch
statement that will print errors to console.Renderer.setDrawMode(int)
and Renderer.getDrawMode()
.Renderer.image
, Renderer.text
, Renderer.rectangle
, Renderer.shape
.renderBlock
trigger due to unreliability.playerJoin
trigger not passing in the correct argument.messageSent
, soundPlay
, noteblockPlay
, noteblockChange
, drawBlockHighlight
Published by mattco98 about 5 years ago
Fixes:
Player.facing()
only working for five out of the eight directionsText
and ParticleEffect
constructors requiring all parameters to be specifiedAdditions:
renderEntity
trigger/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
)Published by mattco98 over 5 years ago
Fixed the build for 1.12.2
Published by kerbybit over 5 years ago
Breaking Changes:
Settings
object has moved to Client.settings
MathLib.clampFloat
is deprecated, use MathLib.clampDouble
Changes:
Sound
bug that caused the game to crashChatLib.chat
now automatically casts the object to a string if it is not an instance of one of the various chat objectsPotionEffect.getLocalizedName
register
function is now case-insensitive (e.g.: register('CHAT', ...)
is the same as register('chat', ...)
)easeColor
function, which just uses easeOut
for each colorTabList
methods for getting the header and footer textNew Triggers:
PlayerInteract
: Fires when the player left/right clicks an item or entity.BlockBreak
GuiRender
: Fires on the GUI render event. Used for drawing objects over the GUI rather than behind them, as RenderOverlay
did.GuiKey
: Fires when a key is pressed while a GUI is openGuiClick
: Fires when a mouse button is pressed while a GUI is openGuiMouseRelease
: Fires when a mouse button is released while a GUI is openGuiMouseDrag
: Fires when the mouse is dragged while a GUI is openPacketSent
: Fires when a packet is sent from the Client to the ServerChatComponentClicked
: Fires when a clickable chat component is clickedChatComponentHovered
: Fires when a hoverable chat component is hoveredPublished by kerbybit almost 6 years ago
Published by kerbybit about 6 years ago
This is a pre-release of 0.17
Things might be broken or changed from 0.16.x
Change log will be available for full 0.17 release
Published by kerbybit about 6 years ago
Published by kerbybit about 6 years ago
Published by kerbybit about 6 years ago
Display.getWidth()
Display.getHeight()
FileLib.getUrlContent(url, userAgent)
Published by kerbybit about 6 years ago
Published by kerbybit over 6 years ago
Potions effects now have their own wrapper that is much more in depth than what getting the player's active potion effects used to be. This means that Player.getActivePotionEffects now returns a list of PotionEffects instead of a list of Strings
var myDisplay = new Display();
register("tick", function() {
myDisplay.clearLines();
Player.getActivePotionEffects().forEach(function(effect) {
myDisplay.addLine(
effect.getName() + " " +
effect.getAmplifier() + " " +
effect.getDuration()
);
}
});