Archive astralisllc-eaglerforge-mods (mod, 1.8.8, clean-with-notes)

This commit is contained in:
2026-11-28 00:49:58 -06:00
parent 9491e816ab
commit ac1791047f
12 changed files with 664 additions and 0 deletions
@@ -0,0 +1,39 @@
ModAPI.require('player');
let macroKey = 33;
let ohCmd = '/oh';
ModAPI.addEventListener('key', function(k) {
if (k.key == macroKey) {
let currentEquipped = ModAPI.player.getCurrentEquippedItem().toString()
let shortened = currentEquipped.substr(7)
let item = shortened.slice(0, -2)
ModAPI.player.sendChatMessage({message: `${ohCmd}`})
if (item == 'horsearmorgold') {
ModAPI.displayToChat({msg: `§5[§dOffHand§5] §6Totem §bis now in your OffHand!`})
} else {
ModAPI.displayToChat({msg: `§5[§dOffHand§5] §6${item} §bis now in your OffHand!`})
}
}
});
ModAPI.addEventListener('sendchatmessage', function(m) {
if (m.message.startsWith('.bind')) {
if (m.message.substr(6) != '') {
if (Number(macroKey) != NaN) {
m.preventDefault = true
macroKey = m.message.substr(6);
ModAPI.displayToChat({msg: `§5[§dOffHand§5] §bKeybind is now set to §6${macroKey}`})
} else {
m.preventDefault = true
ModAPI.displayToChat({msg: `§5[§dOffHand§5] '6[§4ERROR§6] §cInvalid key, please use a keycode from §bhttps://eaglerforge.github.io/apidocs/events/addEventListener.html`})
}
}
} else if (m.message.startsWith('.cmd')) {
if (m.message.substr(5).startsWith('/')) {
m.preventDefault = true
ohCmd = m.message.substr(5)
ModAPI.displayToChat({msg: `§5[§dOffHand§5] §bCommand is now set to §6${ohCmd}`})
} else {
m.preventDefault = true
ModAPI.displayToChat({msg: `§5[§dOffHand§5] §6[§4ERROR§6] §cInvalid input, please remember toinclude the\'/\'`})
}
}
});
@@ -0,0 +1 @@
@@ -0,0 +1,39 @@
ModAPI.require('settings')
let oldLight = ModAPI.settings.gammaSetting;
let toggled = false;
let keybind = 38;
// Keybind is L by default
function toggle() {
if (toggled == true) {
ModAPI.settings.gammaSetting = 1000
ModAPI.settings.reload()
toggled = false
} else if (toggled == false) {
ModAPI.settings.gammaSetting = oldLight
ModAPI.settings.reload()
toggled = true
}
};
ModAPI.addEventListener('key', function(a) {
if (a.key == keybind) {
toggle()
ModAPI.displayToChat({msg: `§5[§dFullBright§5] §bFullbright is now toggled to §6${toggled}`})
}
})
ModAPI.addEventListener('sendchatmessage', function(b){
if (b.message.startsWith('.key')) {
b.preventDefault = true
if (b.message.substr(5) != '') {
if (Number(b.message.substr(5) != NaN)) {
keybind = b.message.substr(5);
ModAPI.displayToChat({msg: `§5[§dFullBright§5] §bKeybind is now set to §6${keybind}`})
}
} else {
ModAPI.displayToChat({msg: `§5[§dFullBright§5] §6[§4ERROR§6] §cInvalid key, please use a keycode from the opened window!`})
window.open('https://eaglerforge.github.io/apidocs/events/addEventListener.html')
}
}
})
@@ -0,0 +1,204 @@
ModAPI.require("player");
ModAPI.require("settings");
let playerFound = false;
function checkForGame() {
if (typeof ModAPI.player !== 'undefined') {
playerFound = true;
} else {
console.log('Player doesn\'t exist yet, please join a server or singleplayer world...');
}
}
checkForGame();
const intervalId = setInterval(() => {
if (playerFound) {
clearInterval(intervalId); // Stop the interval
ModAPI.displayToChat({msg: "§5StatsHud is now loading"})
initializeHud();
} else {
checkForGame();
}
}, 1000);
function initializeHud() {
setTimeout(async function () {
const url_to_font_name =
"https://raw.githubusercontent.com/AstralisLLC/fonts/main/PressStart2P.ttf";
const font_name = new FontFace("pressStart", `url(${url_to_font_name})`);
await font_name.load();
document.fonts.add(font_name);
ModAPI.settings.hud24h = false
ModAPI.settings.hudCoords = false
ModAPI.settings.hudFps = false
ModAPI.settings.hudPlayer = false
ModAPI.settings.hudStats = false
ModAPI.settings.hudWorld = false
ModAPI.settings.reload();
const statDisplay = document.createElement("div");
document.body.appendChild(statDisplay);
statDisplay.id = "statsHUD";
statDisplay.style.position = "fixed";
statDisplay.style.width = "350px";
statDisplay.style.height = "160px";
statDisplay.style.top = "10px";
statDisplay.style.left = "10px";
statDisplay.style.background = "rgba(0, 0, 0, 0.7)";
statDisplay.style.zIndex = "1000";
statDisplay.style.boxShadow = "0 0 30px #00ffee";
statDisplay.style.borderRadius = "20px";
statDisplay.style.backdropFilter = "blur(3px)";
const fpsStr = document.createElement("p");
statDisplay.appendChild(fpsStr);
fpsStr.style.fontFamily = "'pressStart', sans-serif";
fpsStr.style.color = "#00ffee";
fpsStr.style.fontSize = "14px";
fpsStr.style.marginLeft = "15px";
function updateFPS() {
fpsStr.innerText = "FPS: " + ModAPI.getFPS();
}
const xStr = document.createElement("p");
statDisplay.appendChild(xStr);
xStr.style.fontFamily = "'pressStart', sans-serif";
xStr.style.color = "#00ffee";
xStr.style.fontSize = "14px";
xStr.style.marginLeft = "15px";
function updateX() {
xStr.innerText = "X: " + Math.floor(ModAPI.player.lastReportedPosX)
}
const yStr = document.createElement("p");
statDisplay.appendChild(yStr);
yStr.style.fontFamily = "'pressStart', sans-serif";
yStr.style.color = "#00ffee";
yStr.style.fontSize = "14px";
yStr.style.marginLeft = "15px";
function updateY() {
yStr.innerText = "Y: " + Math.floor(ModAPI.player.lastReportedPosY)
}
const zStr = document.createElement("p");
statDisplay.appendChild(zStr);
zStr.style.fontFamily = "'pressStart', sans-serif";
zStr.style.color = "#00ffee";
zStr.style.fontSize = "14px";
zStr.style.marginLeft = "15px";
function updateZ() {
zStr.innerText = "Z: " + Math.floor(ModAPI.player.lastReportedPosZ)
}
const timeStr = document.createElement("p");
statDisplay.appendChild(timeStr);
timeStr.style.fontFamily = "'pressStart', sans-serif";
timeStr.style.color = "#00ffee";
timeStr.style.fontSize = "14px";
timeStr.style.marginLeft = "15px";
function updateTime() {
const currentDate = new Date();
const hours = currentDate.getHours();
const period = hours < 12 ? 'AM' : 'PM';
timeStr.innerText = `Time: ${hours}:${currentDate.getMinutes()}:${currentDate.getSeconds()} \[${period}\]`
}
setInterval(updateTime, 10)
setInterval(updateZ, 10)
setInterval(updateY, 10)
setInterval(updateX, 10);
setInterval(updateFPS, 10);
let hudVisible = false;
statDisplay.style.visibility = hudVisible ? "visible" : "hidden";
function checkLoaded() {
if (document.pointerLockElement != null){
hudVisible = true;
statDisplay.style.visibility = hudVisible ? "visible" : "hidden";
} else {
hudVisible = false;
statDisplay.style.visibility = hudVisible ? "visible" : "hidden";
}
}
setInterval(checkLoaded, 1);
ModAPI.clientBrand = "Astralis\'s UI Loader"
ModAPI.displayToChat({msg: "§5StatsHud has succesfully loaded!"})
setTimeout(function() {
const thanksContainer = document.createElement("div");
document.body.appendChild(thanksContainer);
thanksContainer.style.position = "fixed";
thanksContainer.style.fontFamily = "'pressStart', sans-serif";
thanksContainer.style.width = "375px";
thanksContainer.style.height = "55px";
thanksContainer.style.top = "50%";
thanksContainer.style.left = "50%";
thanksContainer.style.transform = "translate(-50%, -50%)"; // Center the div
thanksContainer.style.background = "rgba(0, 0, 0, 0.7)";
thanksContainer.id = "thanksContainer";
thanksContainer.style.borderRadius = "20px";
thanksContainer.style.zIndex = "1001"; // Set a higher z-index than clientTitle
thanksContainer.style.display = "grid";
thanksContainer.style.gridTemplateColumns = "repeat(3, 1fr)";
thanksContainer.style.gridTemplateRows = "repeat(2, 1fr)";
thanksContainer.style.gap = "10px";
thanksContainer.style.boxShadow = "0 0 30px #00ffee"; // Light blue glow with 30px blur radius
thanksContainer.style.backdropFilter = "blur(3px)";
thanksContainer.style.transition = "opacity 1s ease-in-out"; // Add transition for opacity
// Create the animated paragraph element
const animatedParagraph = document.createElement("p");
thanksContainer.appendChild(animatedParagraph);
animatedParagraph.innerText = "Thanks for using our mods!";
// Apply styles for animation
animatedParagraph.style.animation = "fade-in-out 2s ease-in-out infinite";
animatedParagraph.style.whiteSpace = "nowrap";
animatedParagraph.style.position = "fixed";
animatedParagraph.style.top = "50%";
animatedParagraph.style.left = "50%";
animatedParagraph.style.transform = "translate(-50%, -135%)";
// Define the CSS keyframes for the fading animation
const styleSheet = document.styleSheets[0];
styleSheet.insertRule(`
@keyframes fade-in-out {
0% {
color: #00ffee;
}
50% {
color: #0055aa;
}
100% {
color: #00ffee;
}
}
`, styleSheet.cssRules.length);
// Adjust other styles as needed
animatedParagraph.style.fontFamily = "'pressStart', sans-serif";
animatedParagraph.style.fontSize = "14px";
animatedParagraph.style.alignSelf = "center";
// Delayed fade-out effect after 2.5 seconds
setTimeout(() => {
thanksContainer.style.opacity = "0";
}, 2500);
}, 1500);
}, 50);
}
// §
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,143 @@
ModAPI.require('player')
const d = new Date()
let lastX;
let lastY;
let lastZ;
let bugReport;
let webhookURL = 'REPLACE WEBHOOK';
let songplayer = new Audio('https://files.catbox.moe/k4j25x.mp3')
songplayer.volume = 0.1
let oldVolume = songplayer.volume;
let loopToggle = false()
ModAPI.addEventListener('sendchatmessage', function(e) {
if (e.message == '.help') {
e.preventDefault = true
ModAPI.displayToChat({msg: `
§6[-COMMANDS-]
§3.help §6\| §aDisplays this help dialogue
§3.spawn §6\| §aAttempts to set player coordinates to 0, 0
§3.pos §6\| §aSends a chat message with your current position
§3.time §6\| §aSends a chat message with your current time
§3.lastpos §6\| §aAttempts to return you to your last position
§3.goto §6\| §aAttempts to teleport to the set position
§3.setpos §6\| §aSets the position for .goto
§3.bugreport §b[msg] §6\| §aSends a message through a webhook
§3.play §6\| §aPlays the song (Lo-fi by default)
§3.pause §6\| §aPauses the song
§3.replay §6\| §aReplays the song
§3.volume §b[int] §6\| §aSets the volume of the song (max is 100)
§3.src §6\| §aOpens a new tab with the src of the project
§3.setsong §b[url] §6\| §aSets a url for the song player
§3.loop §6\| §aToggles looping on the the song (Off by default)
`})
} else if (e.message == '.time') {
e.preventDefault = true
ModAPI.player.sendChatMessage({message: 'My current date and time is [ '+d+' ]'})
} else if (e.message == '.spawn' ) {
e.preventDefault = true
lastX = ModAPI.player.x
lastY = ModAPI.player.y
lastZ = ModAPI.player.z
setTimeout(() => {
ModAPI.player.x = 0;
ModAPI.player.z = 0;
ModAPI.player.y = 70;
ModAPI.player.reload()
}, 5);
} else if (e.message == '.lastpos') {
e.preventDefault = true
ModAPI.player.x = lastX;
ModAPI.player.y = lastY;
ModAPI.player.z = lastZ;
ModAPI.player.reload()
} else if (e.message == '.pos') {
e.preventDefault = true
ModAPI.player.sendChatMessage({message: 'My current position is [ ' + Math.floor(ModAPI.player.x) + ', ' + Math.floor(ModAPI.player.y) + ', ' + Math.floor(ModAPI.player.z) + ' ] '})
} else if (e.message.startsWith('.bugreport ')) {
e.preventDefault = true
ModAPI.displayToChat({msg: '§3Bug report: §b'+e.message.substr(11)})
sendBugReport(e.message.substr(11).toString())
} else if (e.message == '.setpos') {
e.preventDefault = true
ModAPI.displayToChat({msg: '§3Setting position...'})
lastX = ModAPI.player.x;
lastY = ModAPI.player.y;
lastZ = ModAPI.player.z;
setTimeout(() => {
ModAPI.displayToChat({msg: '§3Position set!'})
}, 100);
} else if (e.message == '.goto') {
e.preventDefault = true
ModAPI.player.x = lastX;
ModAPI.player.y = lastY;
ModAPI.player.z = lastZ;
ModAPI.player.reload()
} else if (e.message.startsWith('.bugreport')) {
e.preventDefault = true
ModAPI.displayToChat({msg: '§6[§4ERROR§6] §cThis command requires a string'})
} else if (e.message == '.src') {
e.preventDefault = true
window.open("https://raw.githubusercontent.com/AstralisLLC/EaglerForge-Mods/main/chat%20utils.js");
window.alert('Opening download!')
} else if (e.message == '.play') {
e.preventDefault = true
songplayer.play();
ModAPI.displayToChat({msg: '§3Now playing lo-fi'})
} else if (e.message == '.pause') {
e.preventDefault = true
songplayer.pause();
ModAPI.displayToChat({msg: '§3Lo-fi paused'})
} else if (e.message == '.replay') {
e.preventDefault = true
songplayer.load();
ModAPI.displayToChat({msg: '§3Replaying lo-fi'})
} else if (e.message.startsWith('.volume ')) {
e.preventDefault = true
try {
songplayer.volume = (e.message.substr(8) / 100)
oldVolume = songplayer.volume
ModAPI.displayToChat({msg: '§3Volume set to '+ e.message.substr(8)})
} catch (error) {
ModAPI.displayToChat({msg: "§6[§4ERROR§6] §c"+error})
}
} else if (e.message.startsWith('.setsong ') && e.message.substr(9).startsWith('https://')) {
e.preventDefault = true
songplayer.pause()
songplayer = new Audio(e.message.substr(9))
songplayer.volume = oldVolume
ModAPI.displayToChat({msg: '§3URL was set to §6[ §b' + e.message.substr(9) + ' §6]'})
} else if (e.message.startsWith('.setsong')) {
e.preventDefault = true
ModAPI.displayToChat({msg: '§6[§4ERROR§6] §cThis command requires a URL'})
} else if (e.message == '.loop') {
e.preventDefault = true
songplayer.loop = loopToggle
loopToggle = !loopToggle
ModAPI.displayToChat({msg: '§3Loop is now set to §6[ §a'+loopToggle+' §6]'})
} else if (e.message.startsWith('.')) {
e.preventDefault = true
ModAPI.displayToChat({msg: '§6[§4ERROR§6] §cNo such command, use .help for available commands'})
}
})
function updateDate() {
const date = new Date()
}
setInterval(updateDate(), 10)
async function sendBugReport(report) {
var request = new XMLHttpRequest();
request.open("POST", webhookURL);
request.setRequestHeader("Content-type", "application/json");
var params = {
content: report
};
request.send(JSON.stringify(params));
}
@@ -0,0 +1,89 @@
let logCount = 0;
function CustomConsole() {
this.create = function(x, y, clr, txtClr, borderRadius, borderClr, width, height, id) {
console.log(`Desired X: ${x}px`);
console.log(`Desired Y: ${y}px`);
console.log(`Desired color: rgb(${clr})`);
console.log(`Desired text color: rgb(${txtClr})`);
console.log(`Desired Border Radius: ${borderRadius}px`);
console.log(`Desired Border Color: ${borderClr}`);
console.log(`Desired Width: ${width}px`);
console.log(`Desired Height: ${height}px`);
console.log(`Desired ID: ${id}`);
this.object = document.createElement('div');
this.object.style.position = 'absolute';
this.object.style.display = 'flex';
this.object.style.flexDirection = 'column';
this.object.style.alignContent = 'bottom';
this.object.style.paddingLeft = '10px';
this.object.style.paddingRight = '10px';
this.object.style.paddingTop = '10px';
this.object.style.paddingBottom = '10px';
this.object.style.fontFamily = 'arial';
this.object.style.left = x + 'px';
this.object.style.top = y + 'px';
this.object.style.backgroundColor = `rgb(${clr})`;
this.object.style.color = `rgb(${txtClr})`;
this.object.style.borderRadius = borderRadius + 'px';
if (borderClr.startsWith('#')) {
this.object.style.border = `2px solid ${borderClr}`;
} else if (borderClr.startsWith('rgb(')) {
this.object.style.border = `2px solid ${borderClr}`;
} else {
console.log(`No borderClr attribute, assuming rgb() format`)
this.object.style.border = `2px solid rgb(${borderClr})`;
}
this.object.style.width = width + 'px';
this.object.style.height = height + 'px';
this.object.id = id;
document.body.appendChild(this.object);
}
this.createLogElement = function(msg, color) {
logCount += 1;
const logElement = document.createElement('p');
logElement.style.color = color;
logElement.innerText = msg;
logElement.id = `log${logCount}`;
this.object.appendChild(logElement);
if (logCount >= 7) {
document.getElementById(`log${logCount - 6}`).remove();
}
}
this.log = function(msg) {
if (this.object) {
this.createLogElement(`[LOG] ${msg}`, 'CadetBlue');
} else {
console.error('No object created yet. Call create() first.');
}
}
this.warn = function(msg) {
if (this.object) {
this.createLogElement(`[WARN] ${msg}`, 'orange');
} else {
console.error('No object created yet. Call create() first.');
}
}
this.fatal = function(msg) {
if (this.object) {
this.createLogElement(`[FATAL] ${msg}`, 'red');
} else {
console.error('No object created yet. Call create() first.');
}
}
this.debug = function(msg) {
if (this.object) {
this.createLogElement(`[DEBUG] ${msg}`, 'white');
} else {
console.error('No object created yet. Call create() first.');
}
}
}
@@ -0,0 +1,56 @@
/* Loads dependencies */ <script src="https://raw.githubusercontent.com/kairocks2006/"></script>
ModAPI.require('player');
ModAPI.require('settings');
ModAPI.require('network');
let username = ModAPI.player.getName();
let ModName = 'NeverFlag';
let ModVer = 'v1.2.2';
document.title = `EaglerForge | ${ModName} \<${ModVer}\>`;
function aura(reach, target, blocking){
this.enable = function(){
if (reach > 1) {
reach = 1;
} else if (typeof target == null) {
target = 'players';
} else if (typeof blocking == null) {
blocking = false;
}
console.log('Attacking!')
}
this.disable = function(){
console.log('Disabling!')
}
}
function playerStep(height, disableOnSneak){
this.enable = function(){
let enabled = false;
if (enabled == true) {
let stepCheck = ModAPI.addEventListener('update', function(){
ModAPI.player.stepHeight = height;
if (disableOnSneak == true) {
if (ModAPI.player.isSneaking() == true) {
ModAPI.player.stepHeight = 0.6;
};
};
}, false);
} else if (enabled == false) {
ModAPI.removeEventListener('update', stepcheck, false);
}
}
}
let step = new playerStep();
let addons = []; // Intended support for user made scripts in the future! Will be used via a menu!
let configs = []; // Intended support for user config saving in the future! Will be used via a menu!
@@ -0,0 +1,44 @@
// Stolen code, not mine
(function () {
var enabled = false
ModAPI.addEventListener("key", function(ev){
if(ev.key == 45){// Toggle
if(enabled){
disable()
enabled = false
} else{
update(); //Trigger the xray
enabled = true
}
}
})
var targets = ["diamond_block","diamond_ore","gold_block","gold_ore","iron_block","iron_ore","coal_block","coal_ore","emerald_ore","obsidian","emerald_block","redstone_ore","redstone_block","lapis_ore","lapis_block","chest","furnace","lit_furnace","ender_chest"]; //The target blocks
var allblocks = Object.keys(ModAPI.blocks); //List of all block IDs
function update() {
ModAPI.displayToChat({msg: "§5[§dXRAY§5] §bXRAY is now enabled!"})
allblocks.forEach(block=>{ //Loop through all the blocks
if (targets.includes(block)) { //Render targets
ModAPI.blocks[block].forceRender = true;
ModAPI.blocks[block].lightValue = 10;
ModAPI.blocks[block].reload(); //Update RenderEngine
} else if (ModAPI.blocks[block] && ("noRender" in ModAPI.blocks[block])) { //Checks if should render
ModAPI.blocks[block].noRender = true;
ModAPI.blocks[block].lightValue = 0;
ModAPI.blocks[block].reload(); //Update RenderEngine
}
});
ModAPI.reloadchunks()
}
function disable(){
ModAPI.displayToChat({msg: "§5[§dXRAY§5] §bXRAY is now disabled!"})
allblocks.forEach(block=>{ //Loop through all the blocks
if (ModAPI.blocks[block] && ("noRender" in ModAPI.blocks[block])) {
ModAPI.blocks[block].noRender = false;
ModAPI.blocks[block].reload(); //Update RenderEngine
}
});
ModAPI.reloadchunks()
}
})();