mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-26 10:05:10 +00:00
.
This commit is contained in:
7
public/resources/mods/downloads/autoclicker.js
Normal file
7
public/resources/mods/downloads/autoclicker.js
Normal file
@@ -0,0 +1,7 @@
|
||||
let cps = 2
|
||||
|
||||
function click() {
|
||||
ModAPI.clickMouse()
|
||||
}
|
||||
let intervalTime = 1000 / cps;
|
||||
let intervalID = setInterval(click, intervalTime);
|
||||
42
public/resources/mods/downloads/autofish.js
Normal file
42
public/resources/mods/downloads/autofish.js
Normal file
@@ -0,0 +1,42 @@
|
||||
ModAPI.require("player"); //Require the player, we need to select their fishing rod.
|
||||
var timer;
|
||||
var fishRodId = ModAPI.items.fishing_rod.getID(); //Store the item id of fishing rods, so we don't have to recalculate it every time.
|
||||
ModAPI.addEventListener("packetsoundeffect", (ev) => { //When we receive a sound effect packet
|
||||
if (ev.soundName === "random.splash") { //If it is a splash
|
||||
rightClick(); //run the rightClick() function
|
||||
}
|
||||
});
|
||||
ModAPI.addEventListener("update", () => { //every client tick
|
||||
if ( //If the player is holding a fishing rod
|
||||
ModAPI.player.inventory.mainInventory[
|
||||
ModAPI.player.inventory.currentItem
|
||||
] &&
|
||||
ModAPI.player.inventory.mainInventory[
|
||||
ModAPI.player.inventory.currentItem
|
||||
].itemId === fishRodId
|
||||
) {
|
||||
if (timer > 0) { //If timer is greater than 0
|
||||
timer--; //Decrease the timer by 1
|
||||
return; //Exit the function
|
||||
}
|
||||
if (ModAPI.player.fishEntity) { //If the fish bobber exists
|
||||
return; //Exit the function
|
||||
}
|
||||
|
||||
rightClick(); //run the rightClick() function
|
||||
}
|
||||
});
|
||||
function rightClick() {
|
||||
if ( //If the player is not holding a fishing rod
|
||||
!ModAPI.player.inventory.mainInventory[
|
||||
ModAPI.player.inventory.currentItem
|
||||
] ||
|
||||
!ModAPI.player.inventory.mainInventory[
|
||||
ModAPI.player.inventory.currentItem
|
||||
].itemId === fishRodId
|
||||
) {
|
||||
return; //Exit the function
|
||||
}
|
||||
ModAPI.rightClickMouse(); //Tell the ModAPI to trigger a right click.
|
||||
timer = 15; // Set the timer to 15
|
||||
}
|
||||
BIN
public/resources/mods/downloads/barebones-bossbars.zip
Normal file
BIN
public/resources/mods/downloads/barebones-bossbars.zip
Normal file
Binary file not shown.
201
public/resources/mods/downloads/barneys-music-mod.js
Normal file
201
public/resources/mods/downloads/barneys-music-mod.js
Normal file
@@ -0,0 +1,201 @@
|
||||
var playButton = document.createElement('button');
|
||||
playButton.textContent = 'Music';
|
||||
playButton.style.position = 'fixed';
|
||||
playButton.style.top = '20px';
|
||||
playButton.style.right = '20px';
|
||||
playButton.style.padding = '10px 20px';
|
||||
playButton.style.backgroundColor = '#007bff';
|
||||
playButton.style.color = '#fff';
|
||||
playButton.style.border = 'none';
|
||||
playButton.style.borderRadius = '5px';
|
||||
playButton.style.cursor = 'pointer';
|
||||
playButton.style.fontFamily = 'Poppins, sans-serif';
|
||||
|
||||
document.body.appendChild(playButton);
|
||||
|
||||
var songs = JSON.parse(localStorage.getItem('songs')) || {};
|
||||
|
||||
var audioElement = new Audio();
|
||||
|
||||
playButton.addEventListener('click', function() {
|
||||
var modal = document.createElement('div');
|
||||
modal.style.position = 'fixed';
|
||||
modal.style.top = '50%';
|
||||
modal.style.left = '50%';
|
||||
modal.style.transform = 'translate(-50%, -50%)';
|
||||
modal.style.backgroundColor = '#141414';
|
||||
modal.style.borderRadius = '10px';
|
||||
modal.style.padding = '40px';
|
||||
modal.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.5)';
|
||||
modal.style.zIndex = '9999';
|
||||
modal.style.cursor = 'move';
|
||||
|
||||
var isDragging = false;
|
||||
var offsetX, offsetY;
|
||||
|
||||
function handleMouseDown(event) {
|
||||
isDragging = true;
|
||||
offsetX = event.clientX - modal.offsetLeft;
|
||||
offsetY = event.clientY - modal.offsetTop;
|
||||
}
|
||||
|
||||
function handleMouseMove(event) {
|
||||
if (isDragging) {
|
||||
var x = event.clientX - offsetX;
|
||||
var y = event.clientY - offsetY;
|
||||
modal.style.left = x + 'px';
|
||||
modal.style.top = y + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
function handleMouseUp() {
|
||||
isDragging = false;
|
||||
}
|
||||
|
||||
modal.addEventListener('mousedown', handleMouseDown);
|
||||
window.addEventListener('mousemove', handleMouseMove);
|
||||
window.addEventListener('mouseup', handleMouseUp);
|
||||
|
||||
var closeButton = document.createElement('button');
|
||||
closeButton.textContent = '✕';
|
||||
closeButton.style.position = 'absolute';
|
||||
closeButton.style.top = '10px';
|
||||
closeButton.style.right = '10px';
|
||||
closeButton.style.backgroundColor = 'transparent';
|
||||
closeButton.style.border = 'none';
|
||||
closeButton.style.fontSize = '20px';
|
||||
closeButton.style.cursor = 'pointer';
|
||||
closeButton.style.color = 'red';
|
||||
|
||||
closeButton.addEventListener('click', function() {
|
||||
modal.style.display = 'none';
|
||||
});
|
||||
|
||||
var title = document.createElement('h2');
|
||||
title.textContent = 'Barneys Music Player';
|
||||
title.style.color = '#fff';
|
||||
title.style.textAlign = 'center';
|
||||
title.style.marginBottom = '20px';
|
||||
title.style.fontFamily = 'Poppins, sans-serif';
|
||||
|
||||
var songNameInput = document.createElement('input');
|
||||
songNameInput.setAttribute('type', 'text');
|
||||
songNameInput.style.width = '100%';
|
||||
songNameInput.style.marginBottom = '20px';
|
||||
songNameInput.placeholder = 'Enter the name of the song';
|
||||
songNameInput.disabled = false;
|
||||
songNameInput.style.fontFamily = 'Poppins, sans-serif';
|
||||
|
||||
songNameInput.addEventListener('click', function() {
|
||||
var songName = prompt('Please enter the name of the song:');
|
||||
if (songName) {
|
||||
songNameInput.value = songName;
|
||||
}
|
||||
});
|
||||
|
||||
var musicUrlInput = document.createElement('input');
|
||||
musicUrlInput.setAttribute('type', 'text');
|
||||
musicUrlInput.style.width = '100%';
|
||||
musicUrlInput.style.marginBottom = '20px';
|
||||
musicUrlInput.placeholder = 'Enter the URL of the song';
|
||||
musicUrlInput.disabled = false;
|
||||
musicUrlInput.style.fontFamily = 'Poppins, sans-serif';
|
||||
|
||||
musicUrlInput.addEventListener('click', function() {
|
||||
var musicUrl = prompt('Please enter the URL of the song:');
|
||||
if (musicUrl) {
|
||||
musicUrlInput.value = musicUrl;
|
||||
}
|
||||
});
|
||||
|
||||
var addButton = document.createElement('button');
|
||||
addButton.textContent = 'Add';
|
||||
addButton.style.width = '100%';
|
||||
addButton.style.padding = '10px 0';
|
||||
addButton.style.backgroundColor = 'purple';
|
||||
addButton.style.color = '#fff';
|
||||
addButton.style.border = 'none';
|
||||
addButton.style.borderRadius = '5px';
|
||||
addButton.style.cursor = 'pointer';
|
||||
addButton.style.marginBottom = '10px';
|
||||
addButton.style.fontFamily = 'Poppins, sans-serif';
|
||||
|
||||
var playButton = document.createElement('button');
|
||||
playButton.textContent = 'Play';
|
||||
playButton.style.width = '100%';
|
||||
playButton.style.padding = '10px 0';
|
||||
playButton.style.backgroundColor = 'purple';
|
||||
playButton.style.color = '#fff';
|
||||
playButton.style.border = 'none';
|
||||
playButton.style.borderRadius = '5px';
|
||||
playButton.style.cursor = 'pointer';
|
||||
playButton.style.marginBottom = '10px';
|
||||
playButton.style.fontFamily = 'Poppins, sans-serif';
|
||||
|
||||
playButton.addEventListener('click', function() {
|
||||
var selectedSongName = songNameInput.value;
|
||||
if (selectedSongName && songs[selectedSongName]) {
|
||||
var url = songs[selectedSongName];
|
||||
audioElement.pause();
|
||||
audioElement.src = url;
|
||||
audioElement.play();
|
||||
} else {
|
||||
alert('Please select a song from the list.');
|
||||
}
|
||||
});
|
||||
|
||||
modal.appendChild(closeButton);
|
||||
modal.appendChild(title);
|
||||
modal.appendChild(songNameInput);
|
||||
modal.appendChild(musicUrlInput);
|
||||
modal.appendChild(addButton);
|
||||
modal.appendChild(playButton);
|
||||
|
||||
document.body.appendChild(modal);
|
||||
|
||||
addButton.addEventListener('click', function() {
|
||||
var songName = songNameInput.value;
|
||||
var musicUrl = musicUrlInput.value;
|
||||
if (songName && musicUrl) {
|
||||
if (!songs[songName]) {
|
||||
songs[songName] = musicUrl;
|
||||
localStorage.setItem('songs', JSON.stringify(songs));
|
||||
songNameInput.value = '';
|
||||
musicUrlInput.value = '';
|
||||
displaySongs();
|
||||
alert('Song added successfully!');
|
||||
} else {
|
||||
alert('Song with the same name already exists.');
|
||||
}
|
||||
} else {
|
||||
alert('Please enter song name and URL.');
|
||||
}
|
||||
});
|
||||
|
||||
function displaySongs() {
|
||||
while (modal.lastChild && modal.lastChild.tagName === 'UL') {
|
||||
modal.removeChild(modal.lastChild);
|
||||
}
|
||||
|
||||
var songList = document.createElement('ul');
|
||||
songList.style.color = '#fff';
|
||||
for (var song in songs) {
|
||||
var listItem = document.createElement('li');
|
||||
listItem.textContent = song;
|
||||
listItem.style.cursor = 'pointer';
|
||||
listItem.addEventListener('click', function() {
|
||||
songNameInput.value = this.textContent;
|
||||
});
|
||||
songList.appendChild(listItem);
|
||||
}
|
||||
modal.appendChild(songList);
|
||||
}
|
||||
|
||||
displaySongs();
|
||||
});
|
||||
|
||||
function playMusic(url) {
|
||||
audioElement.pause();
|
||||
audioElement.src = url;
|
||||
audioElement.play();
|
||||
}
|
||||
199
public/resources/mods/downloads/blink.js
Normal file
199
public/resources/mods/downloads/blink.js
Normal file
@@ -0,0 +1,199 @@
|
||||
ModAPI.require("network");
|
||||
ModAPI.require("player");
|
||||
var packetsOnTodoList = [];
|
||||
var blinking = false;
|
||||
ModAPI.addEventListener("event", (ev) => {
|
||||
if (
|
||||
blinking &&
|
||||
ev.event.startsWith("sendpacket") &&
|
||||
ev.event !== "sendpacketkeepalive"
|
||||
) {
|
||||
ev.data.preventDefault = true;
|
||||
packetsOnTodoList.push(ev);
|
||||
}
|
||||
});
|
||||
function blinkOn() {
|
||||
if (blinking === true) {
|
||||
return;
|
||||
}
|
||||
blinking = true;
|
||||
ModAPI.displayToChat({ msg: "Blink activated." });
|
||||
}
|
||||
function blinkOff() {
|
||||
if (blinking === false) {
|
||||
return;
|
||||
}
|
||||
blinking = false;
|
||||
ModAPI.displayToChat({ msg: "Blink deactivated." });
|
||||
packetsOnTodoList.forEach((ev) => {
|
||||
var data = ev.data;
|
||||
switch (ev.event) {
|
||||
case "sendpacketanimation":
|
||||
ModAPI.network.sendPacketAnimation();
|
||||
break;
|
||||
case "sendpacketentityaction":
|
||||
ModAPI.network.sendPacketEntityAction({
|
||||
entityId: data.entityID,
|
||||
action: data.action,
|
||||
auxData: data.auxData,
|
||||
});
|
||||
break;
|
||||
case "sendpacketinput":
|
||||
ModAPI.network.sendPacketInput({
|
||||
strafeSpeed: data.strafeSpeed,
|
||||
forwardSpeed: data.forwardSpeed,
|
||||
jumping: data.jumping,
|
||||
sneaking: data.sneaking,
|
||||
});
|
||||
break;
|
||||
case "sendpacketclosewindow":
|
||||
ModAPI.network.sendPacketCloseWindow({ windowId: data.windowId });
|
||||
break;
|
||||
case "sendpacketclickwindow":
|
||||
ModAPI.network.sendPacketClickWindow({
|
||||
windowId: data.windowId,
|
||||
slotId: data.slotId,
|
||||
usedButton: data.usedButton,
|
||||
mode: data.mode,
|
||||
clickedItemRef: data.clickedItem ? data.clickedItem.getRef() : {},
|
||||
actionNumber: data.actionNumber,
|
||||
});
|
||||
break;
|
||||
case "sendpacketconfirmtransaction":
|
||||
ModAPI.network.sendPacketConfirmTransaction({
|
||||
windowId: data.windowId,
|
||||
uid: data.uid,
|
||||
accepted: data.accepted,
|
||||
});
|
||||
break;
|
||||
case "sendpacketchatmessage":
|
||||
ModAPI.network.sendPacketConfirmTransaction({
|
||||
messageIn: data.message,
|
||||
});
|
||||
break;
|
||||
case "sendpacketuseentity":
|
||||
ModAPI.network.sendPacketUseEntity({
|
||||
entityId: data.entityId,
|
||||
action: data.action,
|
||||
});
|
||||
break;
|
||||
case "sendpacketplayerposition":
|
||||
ModAPI.network.sendPacketPlayerPosition({
|
||||
posX: data.x,
|
||||
posY: data.y,
|
||||
posZ: data.z,
|
||||
isOnGround: data.onGround,
|
||||
});
|
||||
case "sendpacketplayerlook":
|
||||
ModAPI.network.sendPacketPlayerLook({
|
||||
playerYaw: data.yaw,
|
||||
playerPitch: data.pitch,
|
||||
isOnGround: data.onGround,
|
||||
});
|
||||
break;
|
||||
case "sendpacketplayerposlook":
|
||||
ModAPI.network.sendPacketPlayerPosLook({
|
||||
playerX: data.x,
|
||||
playerY: data.y,
|
||||
playerZ: data.z,
|
||||
playerYaw: data.yaw,
|
||||
playerPitch: data.pitch,
|
||||
isOnGround: data.onGround,
|
||||
});
|
||||
case "sendpacketplayer":
|
||||
ModAPI.network.sendPacketPlayer({
|
||||
isOnGround: data.onGround,
|
||||
});
|
||||
break;
|
||||
case "sendpacketplayerdigging":
|
||||
ModAPI.network.sendPacketPlayerDigging({
|
||||
pos: data.position,
|
||||
facing: data.facing,
|
||||
action: data.status,
|
||||
});
|
||||
break;
|
||||
case "sendpacketplayerblockplacement":
|
||||
ModAPI.network.sendPacketPlayerBlockPlacement({
|
||||
stackRef: data.stack.getRef(),
|
||||
posRef: data.position.getRef(),
|
||||
placedBlockDirectionIn: data.placedBlockDirection,
|
||||
facingXIn: data.facingX,
|
||||
facingYIn: data.facingY,
|
||||
facingZIn: data.facingZ,
|
||||
});
|
||||
break;
|
||||
case "sendpackethelditemchange":
|
||||
ModAPI.network.sendPacketHeldItemChange({
|
||||
slotId: data.slotId,
|
||||
});
|
||||
break;
|
||||
case "sendpacketcreativeinventoryaction":
|
||||
ModAPI.network.sendPacketCreativeInventoryAction({
|
||||
slotId: data.slotId,
|
||||
stackRef: data.stack.getRef(),
|
||||
});
|
||||
break;
|
||||
case "sendpacketenchantitem":
|
||||
ModAPI.network.sendPacketEnchantItem({
|
||||
windowId: data.windowId,
|
||||
button: data.button,
|
||||
});
|
||||
break;
|
||||
case "sendpacketupdatesign":
|
||||
ModAPI.network.sendPacketUpdateSign({
|
||||
pos: data.pos,
|
||||
lines: data.lines,
|
||||
});
|
||||
break;
|
||||
case "sendpacketplayerabilities":
|
||||
ModAPI.network.sendPacketPlayerAbilities({
|
||||
capabilitiesRef: ModAPI.player.capabilities.getRef(),
|
||||
});
|
||||
break;
|
||||
case "sendpackettabcomplete":
|
||||
ModAPI.network.sendPacketTabComplete({
|
||||
msg: data.message,
|
||||
target: data.targetBlock,
|
||||
});
|
||||
break;
|
||||
case "sendpacketclientsettings":
|
||||
ModAPI.network.sendPacketClientSettings({
|
||||
lang: data.lang,
|
||||
view: data.view,
|
||||
chatVisibility: data.chatVisibility,
|
||||
enableColors: data.enableColors,
|
||||
modelPartFlags: data.modelPartFlags,
|
||||
});
|
||||
break;
|
||||
case "sendpacketclientstatus":
|
||||
ModAPI.network.sendPacketClientStatus({
|
||||
status: data.status,
|
||||
});
|
||||
break;
|
||||
case "sendpacketspectate":
|
||||
ModAPI.network.sendPacketSpectate({
|
||||
uuid: data.id,
|
||||
});
|
||||
break;
|
||||
case "sendpacketresourcepackstatus":
|
||||
ModAPI.network.sendPacketResourcePackStatus({
|
||||
hash: data.hash,
|
||||
status: data.status,
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
packetsOnTodoList = [];
|
||||
}
|
||||
ModAPI.addEventListener("sendchatmessage", (ev) => {
|
||||
if (ev.message.toLowerCase().trim() === ".blinkon") {
|
||||
ev.preventDefault = true;
|
||||
blinkOn();
|
||||
}
|
||||
if (ev.message.toLowerCase().trim() === ".blinkoff") {
|
||||
ev.preventDefault = true;
|
||||
blinkOff();
|
||||
}
|
||||
});
|
||||
25
public/resources/mods/downloads/blur.js
Normal file
25
public/resources/mods/downloads/blur.js
Normal file
@@ -0,0 +1,25 @@
|
||||
(() => {
|
||||
ModAPI.require("settings");
|
||||
var oldFPS = 260;
|
||||
function fcs(){
|
||||
if(ModAPI.settings != null){
|
||||
if(ModAPI.settings.limitFramerate != null){
|
||||
ModAPI.settings.limitFramerate = oldFPS;
|
||||
ModAPI.settings.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function blr(){
|
||||
if(ModAPI.settings != null){
|
||||
if(ModAPI.settings.limitFramerate != null){
|
||||
oldFPS = ModAPI.settings.limitFramerate;
|
||||
ModAPI.settings.limitFramerate = 5;
|
||||
ModAPI.settings.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addEventListener("focus",fcs);
|
||||
addEventListener("blur",blr);
|
||||
})();
|
||||
22
public/resources/mods/downloads/burmod.js
Normal file
22
public/resources/mods/downloads/burmod.js
Normal file
File diff suppressed because one or more lines are too long
143
public/resources/mods/downloads/chat-commands-mod.js
Normal file
143
public/resources/mods/downloads/chat-commands-mod.js
Normal file
@@ -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));
|
||||
}
|
||||
44
public/resources/mods/downloads/chat-shortcuts.js
Normal file
44
public/resources/mods/downloads/chat-shortcuts.js
Normal file
@@ -0,0 +1,44 @@
|
||||
ModAPI.require("player");
|
||||
ModAPI.addEventListener("sendchatmessage", function (event) {
|
||||
event.message = `${event.message}`
|
||||
.replaceAll("{health}", ModAPI.player.getHealth() / 2 + "❤")
|
||||
.replaceAll(
|
||||
"{pos}",
|
||||
Math.floor(ModAPI.player.x) +
|
||||
" " +
|
||||
Math.floor(ModAPI.player.y) +
|
||||
" " +
|
||||
Math.floor(ModAPI.player.z)
|
||||
).replaceAll(
|
||||
"{name}",
|
||||
ModAPI.player.getDisplayName()
|
||||
).replaceAll(
|
||||
"{me}",
|
||||
ModAPI.player.getDisplayName()
|
||||
).replaceAll(
|
||||
"{x}",
|
||||
Math.floor(ModAPI.player.x)
|
||||
).replaceAll(
|
||||
"{y}",
|
||||
Math.floor(ModAPI.player.y)
|
||||
).replaceAll(
|
||||
"{z}",
|
||||
Math.floor(ModAPI.player.z)
|
||||
).replaceAll(
|
||||
"{level}",
|
||||
ModAPI.player.experienceLevel
|
||||
).replaceAll(
|
||||
"{walked}",
|
||||
Math.floor(ModAPI.player.movedDistance)
|
||||
).replaceAll(
|
||||
"{chunk}",
|
||||
Math.floor(ModAPI.player.chunkCoordX) +
|
||||
" " +
|
||||
Math.floor(ModAPI.player.chunkCoordY) +
|
||||
" " +
|
||||
Math.floor(ModAPI.player.chunkCoordZ)
|
||||
).replaceAll(
|
||||
"\\n",
|
||||
"\n"
|
||||
);
|
||||
});
|
||||
BIN
public/resources/mods/downloads/daggers.zip
Normal file
BIN
public/resources/mods/downloads/daggers.zip
Normal file
Binary file not shown.
BIN
public/resources/mods/downloads/faithful-32x.zip
Normal file
BIN
public/resources/mods/downloads/faithful-32x.zip
Normal file
Binary file not shown.
129
public/resources/mods/downloads/fresheaglerui.js
Normal file
129
public/resources/mods/downloads/fresheaglerui.js
Normal file
@@ -0,0 +1,129 @@
|
||||
(() => {
|
||||
|
||||
invAnimDone = false;
|
||||
invAnimSpeed = 300;
|
||||
|
||||
|
||||
function hsl2rgb(h, s, l) {
|
||||
s /= 100;
|
||||
l /= 100;
|
||||
const k = n => (n + h / 30) % 12;
|
||||
const a = s * Math.min(l, 1 - l);
|
||||
const f = n =>
|
||||
l - a * Math.max(-1, Math.min(k(n) - 3, Math.min(9 - k(n), 1)));
|
||||
return [255 * f(0), 255 * f(8), 255 * f(4)];
|
||||
}
|
||||
|
||||
function slideInYGui(yElement,yStart,yEnd,duration){
|
||||
yElement.$guiTop = yStart;
|
||||
this.startTime = Date.now();
|
||||
|
||||
this.calc = yEnd - ((startTime+duration - Date.now()) / duration) * yEnd;
|
||||
yElement.$guiTop = this.calc;
|
||||
|
||||
this.slidn = setInterval(function(){
|
||||
if(Date.now()-duration-startTime < 0 && yElement != yEnd){
|
||||
this.calc = yEnd - ((startTime+duration - Date.now()) / duration) * yEnd;
|
||||
yElement.$guiTop = this.calc;
|
||||
}else{
|
||||
yElement.$guiTop = yEnd;
|
||||
clearInterval(slidn);
|
||||
}
|
||||
}
|
||||
,16);
|
||||
}
|
||||
|
||||
function invSlideIn(){
|
||||
if (ModAPI.mcinstance.$currentScreen != null) {
|
||||
if(ModAPI.mcinstance.$currentScreen.$guiTop != null){
|
||||
if(!invAnimDone){
|
||||
slideInYGui(ModAPI.mcinstance.$currentScreen,0,ModAPI.mcinstance.$currentScreen.$guiTop,invAnimSpeed)
|
||||
invAnimDone = true;
|
||||
}
|
||||
} else {
|
||||
invAnimDone = false;
|
||||
}
|
||||
} else {
|
||||
invAnimDone = false;
|
||||
}
|
||||
}
|
||||
|
||||
function customMainMenu() {
|
||||
if (ModAPI.mcinstance.$currentScreen != null) {
|
||||
if (
|
||||
ModAPI.currentScreen().startsWith("net.minecraft.client.gui.GuiMainMenu")
|
||||
) {
|
||||
|
||||
var singlePlayer =
|
||||
ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[0];
|
||||
|
||||
var multiPlayer =
|
||||
ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[1];
|
||||
|
||||
var mods = ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[2];
|
||||
|
||||
var forkOnGitHub =
|
||||
ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[3];
|
||||
|
||||
var options =
|
||||
ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[4];
|
||||
|
||||
var editProfile =
|
||||
ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[5];
|
||||
|
||||
var launguage =
|
||||
ModAPI.mcinstance.$currentScreen.$buttonList.$array1.data[6];
|
||||
|
||||
var currentScreen = ModAPI.mcinstance.$currentScreen;
|
||||
|
||||
var buttonDistance = 42;
|
||||
var buttonDistanceRel = 22;
|
||||
var buttonSpacing = 2;
|
||||
var buttonWidth = 100;
|
||||
var enc = new TextEncoder();
|
||||
//options
|
||||
options.$width13 = buttonWidth;
|
||||
options.$yPosition = currentScreen.$height7 - buttonDistance;
|
||||
//mods
|
||||
mods.$width13 = buttonWidth / 2;
|
||||
mods.$xPosition0 = options.$xPosition0 - buttonWidth / 2 - buttonSpacing;
|
||||
mods.$yPosition = currentScreen.$height7 - buttonDistance;
|
||||
//SinglePlayer
|
||||
singlePlayer.$width13 = buttonWidth;
|
||||
singlePlayer.$yPosition = options.$yPosition - buttonDistanceRel;
|
||||
//MultiPlayer
|
||||
multiPlayer.$width13 = buttonWidth + launguage.$width13 + buttonSpacing;
|
||||
multiPlayer.$xPosition0 =
|
||||
singlePlayer.$xPosition0 + buttonWidth + buttonSpacing;
|
||||
multiPlayer.$yPosition = options.$yPosition - buttonDistanceRel;
|
||||
//Edit profile
|
||||
editProfile.$width13 = buttonWidth;
|
||||
editProfile.$yPosition = currentScreen.$height7 - buttonDistance;
|
||||
//Lang
|
||||
launguage.$xPosition0 =
|
||||
editProfile.$xPosition0 + editProfile.$width13 + buttonSpacing;
|
||||
launguage.$yPosition = currentScreen.$height7 - buttonDistance;
|
||||
//Fork
|
||||
forkOnGitHub.$width13 = buttonWidth / 2;
|
||||
forkOnGitHub.$yPosition = mods.$yPosition - buttonDistanceRel;
|
||||
forkOnGitHub.$xPosition0 = mods.$xPosition0;
|
||||
forkOnGitHub.$displayString.$characters.data = enc.encode("Fork");
|
||||
|
||||
currentScreen.$openGLWarning1.$characters.data = enc.encode("");
|
||||
//currentScreen.$splashText.$characters.data = enc.encode("Justin is the sped version of Daniel")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function drawHudThings(){
|
||||
|
||||
}
|
||||
|
||||
function setIntervalThings(){
|
||||
invSlideIn();
|
||||
customMainMenu();
|
||||
}
|
||||
|
||||
ModAPI.addEventListener("drawhud",drawHudThings);
|
||||
var interv = setInterval(setIntervalThings,16);
|
||||
})();
|
||||
21
public/resources/mods/downloads/fullbright.js
Normal file
21
public/resources/mods/downloads/fullbright.js
Normal file
@@ -0,0 +1,21 @@
|
||||
ModAPI.require("settings");
|
||||
var gamma = 1000
|
||||
var toggled = true
|
||||
ModAPI.settings.gammaSetting = gamma
|
||||
ModAPI.settings.reload()
|
||||
ModAPI.addEventListener("key", function(ev){
|
||||
if(ev.key == 33){
|
||||
if(!toggled){
|
||||
ModAPI.settings.gammaSetting = gamma
|
||||
ModAPI.settings.reload()
|
||||
ModAPI.displayToChat({msg: "fullbright enabled!"})
|
||||
toggled = true
|
||||
} else{
|
||||
ModAPI.settings.gammaSetting = 1
|
||||
ModAPI.settings.reload()
|
||||
ModAPI.displayToChat({msg: "fullbright disabled!"})
|
||||
toggled = false
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
42
public/resources/mods/downloads/grapplehook.js
Normal file
42
public/resources/mods/downloads/grapplehook.js
Normal file
@@ -0,0 +1,42 @@
|
||||
ModAPI.require("player"); //Require the player
|
||||
var GrappleHookMod = {
|
||||
oldXYZ: [0, 0, 0], //The previous hook position.
|
||||
prev: "NONE", //The previous state
|
||||
scaleH: 0.25, //Used for X and Z velocity
|
||||
scaleV: 0.15, //((Grapple Y) minus (Player Y)) times scaleV
|
||||
lift: 0.4, //Base vertical motion
|
||||
crouchToCancel: true //Whether or not crouching should disable the grappling hook.
|
||||
};
|
||||
ModAPI.addEventListener("update", () => { //Every client tick
|
||||
if (!ModAPI.player.fishEntity) { //If the fish hook does not exist.
|
||||
if (GrappleHookMod.prev === "GROUND" && (!GrappleHookMod.crouchToCancel || !ModAPI.player.isSneaking())) { //If the old state was ground
|
||||
GrappleHookMod.prev = "NONE"; //Update the state
|
||||
var mx = GrappleHookMod.oldXYZ[0] - ModAPI.player.x; //Get delta X
|
||||
var my = GrappleHookMod.oldXYZ[1] - ModAPI.player.y; //Get delta Y
|
||||
var mz = GrappleHookMod.oldXYZ[2] - ModAPI.player.z; //Get delta Z
|
||||
mx *= GrappleHookMod.scaleH; //Multiply by horizontal scale
|
||||
my *= GrappleHookMod.scaleV; //Multiply by vertical scale
|
||||
mz *= GrappleHookMod.scaleH; //Multiply by horizontal scale
|
||||
ModAPI.player.motionX += mx; //Add x motion
|
||||
ModAPI.player.motionY += my + GrappleHookMod.lift; //Add y motion, plus base lift.
|
||||
ModAPI.player.motionZ += mz; //Add z motion
|
||||
ModAPI.player.reload(); //Push changes
|
||||
} else {
|
||||
GrappleHookMod.prev = "NONE";
|
||||
}
|
||||
} else if (GrappleHookMod.prev === "NONE") { //If the hook exists, but the previous state was NONE, update the state.
|
||||
GrappleHookMod.prev = "AIR";
|
||||
}
|
||||
if (
|
||||
ModAPI.player.fishEntity !== undefined && //If the fish hook exists
|
||||
GrappleHookMod.prev === "AIR" && //And the hook was previously in the air
|
||||
ModAPI.player.fishEntity.inGround //And the hook is in the ground
|
||||
) {
|
||||
GrappleHookMod.oldXYZ = [ //Set old grapple hook position
|
||||
ModAPI.player.fishEntity.x,
|
||||
ModAPI.player.fishEntity.y,
|
||||
ModAPI.player.fishEntity.z,
|
||||
];
|
||||
GrappleHookMod.prev = "GROUND";//Update state
|
||||
}
|
||||
});
|
||||
19
public/resources/mods/downloads/jetpack.js
Normal file
19
public/resources/mods/downloads/jetpack.js
Normal file
@@ -0,0 +1,19 @@
|
||||
ModAPI.require("player"); //We need to add vertical velocity
|
||||
var jetpackActive = false; //Variable to track wether or not the jetpack is active
|
||||
window.addEventListener("keydown", (event) => { //When a key is pressed
|
||||
if (event.key.toLowerCase() === "h") { //If the key is h
|
||||
jetpackActive = true; //Set jetpack to be active
|
||||
}
|
||||
});
|
||||
window.addEventListener("keyup", (event) => { //When a key is released
|
||||
if (event.key.toLowerCase() === "h") { //If the key is h
|
||||
jetpackActive = false; //Set jetpack to be inactive
|
||||
}
|
||||
});
|
||||
ModAPI.addEventListener("update", ()=>{ //Every client tick
|
||||
if(!jetpackActive){ //If the jetpack is not active
|
||||
return; //Exit
|
||||
}
|
||||
ModAPI.player.motionY += 0.2; //Add 0.2 to the players vertical moition
|
||||
ModAPI.player.reload(); //Push changes
|
||||
});
|
||||
BIN
public/resources/mods/downloads/low-on-fire.zip
Normal file
BIN
public/resources/mods/downloads/low-on-fire.zip
Normal file
Binary file not shown.
9
public/resources/mods/downloads/nofall.js
Normal file
9
public/resources/mods/downloads/nofall.js
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
ModAPI.require("player"); //Require the player, we need to see their fall height.
|
||||
ModAPI.require("network"); //Require the network, we need to send network packets.
|
||||
|
||||
ModAPI.addEventListener("update", ()=>{ // Every client tick
|
||||
if (ModAPI.player.fallDistance > 2.0) { // If the player is at a height that they can take damage from hitting the ground:
|
||||
ModAPI.network.sendPacketPlayer({isOnGround: true}); // Tell the server the player is on the ground
|
||||
}
|
||||
});
|
||||
47
public/resources/mods/downloads/semiautologin.js
Normal file
47
public/resources/mods/downloads/semiautologin.js
Normal file
@@ -0,0 +1,47 @@
|
||||
(() => {
|
||||
var popupCenter = ({url, title, w, h}) => {
|
||||
var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;
|
||||
var dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;
|
||||
|
||||
var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
|
||||
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
|
||||
|
||||
var systemZoom = width / window.screen.availWidth;
|
||||
var left = (width - w) / 2 / systemZoom + dualScreenLeft
|
||||
var top = (height - h) / 2 / systemZoom + dualScreenTop
|
||||
var newWindow = window.open(url, title,
|
||||
`
|
||||
scrollbars=yes,
|
||||
width=${w / systemZoom},
|
||||
height=${h / systemZoom},
|
||||
top=${top},
|
||||
left=${left}
|
||||
`
|
||||
)
|
||||
|
||||
return newWindow;
|
||||
}
|
||||
ModAPI.require("player");
|
||||
var w = 200;
|
||||
var h = 200;
|
||||
var newWin = popupCenter({url: '', title: '', w: 200, h: 100});
|
||||
var pass = "";
|
||||
|
||||
if(!newWin || newWin.closed || typeof newWin.closed=='undefined')
|
||||
{
|
||||
pass = prompt("login (popup failed!)");
|
||||
} else {
|
||||
newWin.document.body.innerHTML="<center><form id='form'><input id='pass' type='password' autofocus/><br><br><input type='submit' value='Register'></form></center>";
|
||||
newWin.document.getElementById("form").onsubmit=function(){
|
||||
pass = newWin.document.getElementById("pass").value;
|
||||
newWin.close();
|
||||
};
|
||||
}
|
||||
|
||||
function loginModFunc(e){
|
||||
if(e.key == 38){
|
||||
ModAPI.player.sendChatMessage({message:"/login "+pass})
|
||||
}
|
||||
};
|
||||
ModAPI.addEventListener("key",loginModFunc);
|
||||
})();
|
||||
BIN
public/resources/mods/downloads/serified-font.zip
Normal file
BIN
public/resources/mods/downloads/serified-font.zip
Normal file
Binary file not shown.
11
public/resources/mods/downloads/speed-mod.js
Normal file
11
public/resources/mods/downloads/speed-mod.js
Normal file
@@ -0,0 +1,11 @@
|
||||
var newspeed = 10
|
||||
|
||||
var oldspeed = ModAPI.player.getSpeed()
|
||||
ModAPI.addEventListener("update", function (){
|
||||
// console.log(ModAPI.player.isMoving())
|
||||
if(ModAPI.player.isMoving() == true){
|
||||
ModAPI.player.setSpeed({speed: newspeed})
|
||||
} else {
|
||||
ModAPI.player.setSpeed({speed: oldspeed})
|
||||
}
|
||||
})
|
||||
1
public/resources/mods/downloads/statshud.js
Normal file
1
public/resources/mods/downloads/statshud.js
Normal file
File diff suppressed because one or more lines are too long
42
public/resources/mods/downloads/xray.js
Normal file
42
public/resources/mods/downloads/xray.js
Normal file
@@ -0,0 +1,42 @@
|
||||
//Coalest xray mod to ever exist!
|
||||
|
||||
//IIFE. I like scoped variables.
|
||||
(function () {
|
||||
var enabled = false
|
||||
ModAPI.addEventListener("key", function(ev){
|
||||
if(ev.key == 45){// the "x" key
|
||||
if(enabled){
|
||||
disable()
|
||||
enabled = false
|
||||
} else{
|
||||
update(); //Trigger the coal xray.
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
})
|
||||
var targets = ["diamond_block","diamond_ore","gold_block","gold_ore","iron_block","iron_ore","coal_block","coal_ore","emerald_ore","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 IDsw
|
||||
function update() {
|
||||
ModAPI.displayToChat({msg: "xray Enabled!"})
|
||||
allblocks.forEach(block=>{ //Loop through all the blocks
|
||||
if (targets.includes(block)) { //If it is in the targets list, force it to render.
|
||||
ModAPI.blocks[block].forceRender = true;
|
||||
ModAPI.blocks[block].reload(); //Push the changes.
|
||||
} else if (ModAPI.blocks[block] && ("noRender" in ModAPI.blocks[block])) { //Otherwise, if it is a valid block, and can be set to not render, do so.
|
||||
ModAPI.blocks[block].noRender = true;
|
||||
ModAPI.blocks[block].reload(); //Push the changes.
|
||||
}
|
||||
});
|
||||
ModAPI.reloadchunks()
|
||||
}
|
||||
function disable(){
|
||||
ModAPI.displayToChat({msg: "xray 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(); //Push the changes.
|
||||
}
|
||||
});
|
||||
ModAPI.reloadchunks()
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user