Mostly make this thing work
@@ -0,0 +1,32 @@
|
||||
.gradle
|
||||
.gradlew/
|
||||
run
|
||||
run/
|
||||
run/*
|
||||
build/
|
||||
.idea
|
||||
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
@@ -0,0 +1 @@
|
||||
https://github.com/cabaletta/baritone
|
||||
@@ -0,0 +1,128 @@
|
||||
---- Minecraft Crash Report ----
|
||||
// Would you like a cupcake?
|
||||
|
||||
Time: 2024-07-22 13:44:42
|
||||
Description: Initializing game
|
||||
|
||||
java.lang.ExceptionInInitializerError
|
||||
at net.minecraft.client.font.TextRenderLayerSet.of(TextRenderLayerSet.java:22)
|
||||
at net.minecraft.client.font.FontStorage.getGlyphRenderer(FontStorage.java:176)
|
||||
at net.minecraft.client.font.BuiltinEmptyGlyph.bake(BuiltinEmptyGlyph.java:53)
|
||||
at net.minecraft.client.font.FontStorage.clear(FontStorage.java:65)
|
||||
at net.minecraft.client.font.FontStorage.setActiveFilters(FontStorage.java:54)
|
||||
at net.minecraft.client.font.FontStorage.setFonts(FontStorage.java:49)
|
||||
at net.minecraft.client.font.FontManager.method_27540(FontManager.java:66)
|
||||
at net.minecraft.util.Util.make(Util.java:537)
|
||||
at net.minecraft.client.font.FontManager.<init>(FontManager.java:66)
|
||||
at net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:558)
|
||||
at net.minecraft.client.main.Main.main(Main.java:239)
|
||||
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
|
||||
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
|
||||
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
|
||||
Caused by: java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /home/astatin3/GitHub/no-more-render/run/.fabric/processedMods/meteor-client-0.5.8-2136-64b5720b4b825f21.jar
|
||||
at net.fabricmc.loader.impl.util.LoaderUtil.normalizeExistingPath(LoaderUtil.java:46)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getCodeSource(KnotClassDelegate.java:515)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getMetadata(KnotClassDelegate.java:363)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:338)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119)
|
||||
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
|
||||
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
|
||||
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1023)
|
||||
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119)
|
||||
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
|
||||
at net.minecraft.client.render.RenderLayer.getClouds(RenderLayer.java:724)
|
||||
at net.minecraft.client.render.RenderLayer.<clinit>(RenderLayer.java:719)
|
||||
... 15 more
|
||||
Caused by: java.nio.file.NoSuchFileException: /home/astatin3/GitHub/no-more-render/run/.fabric/processedMods/meteor-client-0.5.8-2136-64b5720b4b825f21.jar
|
||||
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
|
||||
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
|
||||
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
|
||||
at java.base/sun.nio.fs.UnixPath.toRealPath(UnixPath.java:886)
|
||||
at net.fabricmc.loader.impl.util.LoaderUtil.normalizeExistingPath(LoaderUtil.java:44)
|
||||
... 31 more
|
||||
|
||||
|
||||
A detailed walkthrough of the error, its code path and all known details is as follows:
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
-- Head --
|
||||
Thread: Render thread
|
||||
Stacktrace:
|
||||
at net.minecraft.client.font.TextRenderLayerSet.of(TextRenderLayerSet.java:22)
|
||||
at net.minecraft.client.font.FontStorage.getGlyphRenderer(FontStorage.java:176)
|
||||
at net.minecraft.client.font.BuiltinEmptyGlyph.bake(BuiltinEmptyGlyph.java:53)
|
||||
at net.minecraft.client.font.FontStorage.clear(FontStorage.java:65)
|
||||
at net.minecraft.client.font.FontStorage.setActiveFilters(FontStorage.java:54)
|
||||
at net.minecraft.client.font.FontStorage.setFonts(FontStorage.java:49)
|
||||
at net.minecraft.client.font.FontManager.method_27540(FontManager.java:66)
|
||||
at net.minecraft.util.Util.make(Util.java:537)
|
||||
at net.minecraft.client.font.FontManager.<init>(FontManager.java:66)
|
||||
at net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:558)
|
||||
|
||||
-- Initialization --
|
||||
Details:
|
||||
Modules:
|
||||
Stacktrace:
|
||||
at net.minecraft.client.main.Main.main(Main.java:239)
|
||||
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
|
||||
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
|
||||
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
|
||||
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
|
||||
|
||||
-- System Details --
|
||||
Details:
|
||||
Minecraft Version: 1.21
|
||||
Minecraft Version ID: 1.21
|
||||
Operating System: Linux (amd64) version 6.8.9-arch1-2
|
||||
Java Version: 22, N/A
|
||||
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
|
||||
Memory: 303479936 bytes (289 MiB) / 937426944 bytes (894 MiB) up to 4173332480 bytes (3980 MiB)
|
||||
CPUs: 12
|
||||
Processor Vendor: GenuineIntel
|
||||
Processor Name: Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz
|
||||
Identifier: Intel64 Family 6 Model 165 Stepping 5
|
||||
Microarchitecture: Comet Lake
|
||||
Frequency (GHz): 4.10
|
||||
Number of physical packages: 1
|
||||
Number of physical CPUs: 6
|
||||
Number of logical CPUs: 12
|
||||
Graphics card #0 name: GA104 [GeForce RTX 3070]
|
||||
Graphics card #0 vendor: NVIDIA Corporation (0x10de)
|
||||
Graphics card #0 VRAM (MiB): 288.00
|
||||
Graphics card #0 deviceId: 0x2484
|
||||
Graphics card #0 versionInfo: unknown
|
||||
Virtual memory max (MiB): 12052.49
|
||||
Virtual memory used (MiB): 17154.10
|
||||
Swap memory total (MiB): 4096.00
|
||||
Swap memory used (MiB): 3197.18
|
||||
Space in storage for jna.tmpdir (MiB): <path not set>
|
||||
Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): <path not set>
|
||||
Space in storage for io.netty.native.workdir (MiB): <path not set>
|
||||
Space in storage for java.io.tmpdir (MiB): available: 7841.08, total: 7956.49
|
||||
Space in storage for workdir (MiB): available: 333892.63, total: 467346.75
|
||||
JVM Flags: 0 total;
|
||||
Launched Version: Fabric
|
||||
Backend library: LWJGL version 3.3.3-snapshot
|
||||
Backend API: NV174 GL version 4.3 (Core Profile) Mesa 24.0.7-arch1.3, Mesa
|
||||
Window size: <not initialized>
|
||||
GFLW Platform: x11
|
||||
GL Caps: Using framebuffer using OpenGL 3.2
|
||||
GL debug messages:
|
||||
Is Modded: Definitely; Client brand changed to 'fabric'
|
||||
Universe: 404
|
||||
Type: Client (map_client.txt)
|
||||
Locale: en_US
|
||||
System encoding: UTF-8
|
||||
File encoding: UTF-8
|
||||
CPU: 12x Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz
|
||||
|
||||
-- Meteor Client --
|
||||
|
||||
Version: 0.5.8
|
||||
Dev Build: 2136
|
||||
|
After Width: | Height: | Size: 689 B |
|
After Width: | Height: | Size: 661 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 255 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,142 @@
|
||||
version:3953
|
||||
ao:false
|
||||
biomeBlendRadius:0
|
||||
enableVsync:false
|
||||
entityDistanceScaling:1.0
|
||||
entityShadows:true
|
||||
forceUnicodeFont:false
|
||||
japaneseGlyphVariants:false
|
||||
fov:0.0
|
||||
fovEffectScale:1.0
|
||||
darknessEffectScale:1.0
|
||||
glintSpeed:0.5
|
||||
glintStrength:0.75
|
||||
prioritizeChunkUpdates:1
|
||||
fullscreen:false
|
||||
gamma:0.5
|
||||
graphicsMode:0
|
||||
guiScale:0
|
||||
maxFps:10
|
||||
mipmapLevels:4
|
||||
narrator:0
|
||||
particles:2
|
||||
reducedDebugInfo:false
|
||||
renderClouds:"false"
|
||||
renderDistance:12
|
||||
simulationDistance:12
|
||||
screenEffectScale:1.0
|
||||
soundDevice:""
|
||||
autoJump:false
|
||||
operatorItemsTab:false
|
||||
autoSuggestions:true
|
||||
chatColors:true
|
||||
chatLinks:true
|
||||
chatLinksPrompt:true
|
||||
discrete_mouse_scroll:false
|
||||
invertYMouse:false
|
||||
realmsNotifications:true
|
||||
showSubtitles:false
|
||||
directionalAudio:false
|
||||
touchscreen:false
|
||||
bobView:true
|
||||
toggleCrouch:false
|
||||
toggleSprint:false
|
||||
darkMojangStudiosBackground:false
|
||||
hideLightningFlashes:false
|
||||
hideSplashTexts:false
|
||||
mouseSensitivity:0.5
|
||||
damageTiltStrength:1.0
|
||||
highContrast:false
|
||||
narratorHotkey:true
|
||||
resourcePacks:["vanilla","fabric"]
|
||||
incompatibleResourcePacks:[]
|
||||
lastServer:localhost
|
||||
lang:en_us
|
||||
chatVisibility:0
|
||||
chatOpacity:1.0
|
||||
chatLineSpacing:0.0
|
||||
textBackgroundOpacity:0.5
|
||||
backgroundForChatOnly:true
|
||||
hideServerAddress:false
|
||||
advancedItemTooltips:false
|
||||
pauseOnLostFocus:true
|
||||
overrideWidth:0
|
||||
overrideHeight:0
|
||||
chatHeightFocused:1.0
|
||||
chatDelay:0.0
|
||||
chatHeightUnfocused:0.4375
|
||||
chatScale:1.0
|
||||
chatWidth:1.0
|
||||
notificationDisplayTime:1.0
|
||||
useNativeTransport:true
|
||||
mainHand:"right"
|
||||
attackIndicator:1
|
||||
tutorialStep:open_inventory
|
||||
mouseWheelSensitivity:1.0
|
||||
rawMouseInput:true
|
||||
glDebugVerbosity:1
|
||||
skipMultiplayerWarning:true
|
||||
hideMatchedNames:true
|
||||
joinedFirstServer:true
|
||||
hideBundleTutorial:false
|
||||
syncChunkWrites:false
|
||||
showAutosaveIndicator:true
|
||||
allowServerListing:true
|
||||
onlyShowSecureChat:false
|
||||
panoramaScrollSpeed:1.0
|
||||
telemetryOptInExtra:false
|
||||
onboardAccessibility:false
|
||||
menuBackgroundBlurriness:5
|
||||
key_key.attack:key.mouse.left
|
||||
key_key.use:key.mouse.right
|
||||
key_key.forward:key.keyboard.w
|
||||
key_key.left:key.keyboard.a
|
||||
key_key.back:key.keyboard.s
|
||||
key_key.right:key.keyboard.d
|
||||
key_key.jump:key.keyboard.space
|
||||
key_key.sneak:key.keyboard.left.shift
|
||||
key_key.sprint:key.keyboard.left.control
|
||||
key_key.drop:key.keyboard.q
|
||||
key_key.inventory:key.keyboard.e
|
||||
key_key.chat:key.keyboard.t
|
||||
key_key.playerlist:key.keyboard.tab
|
||||
key_key.pickItem:key.mouse.middle
|
||||
key_key.command:key.keyboard.slash
|
||||
key_key.socialInteractions:key.keyboard.p
|
||||
key_key.screenshot:key.keyboard.f2
|
||||
key_key.togglePerspective:key.keyboard.f5
|
||||
key_key.smoothCamera:key.keyboard.unknown
|
||||
key_key.fullscreen:key.keyboard.f11
|
||||
key_key.spectatorOutlines:key.keyboard.unknown
|
||||
key_key.swapOffhand:key.keyboard.f
|
||||
key_key.saveToolbarActivator:key.keyboard.c
|
||||
key_key.loadToolbarActivator:key.keyboard.x
|
||||
key_key.advancements:key.keyboard.l
|
||||
key_key.hotbar.1:key.keyboard.1
|
||||
key_key.hotbar.2:key.keyboard.2
|
||||
key_key.hotbar.3:key.keyboard.3
|
||||
key_key.hotbar.4:key.keyboard.4
|
||||
key_key.hotbar.5:key.keyboard.5
|
||||
key_key.hotbar.6:key.keyboard.6
|
||||
key_key.hotbar.7:key.keyboard.7
|
||||
key_key.hotbar.8:key.keyboard.8
|
||||
key_key.hotbar.9:key.keyboard.9
|
||||
key_key.meteor-client.open-gui:key.keyboard.right.shift
|
||||
key_key.meteor-client.open-commands:key.keyboard.period
|
||||
soundCategory_master:1.0
|
||||
soundCategory_music:1.0
|
||||
soundCategory_record:1.0
|
||||
soundCategory_weather:1.0
|
||||
soundCategory_block:1.0
|
||||
soundCategory_hostile:1.0
|
||||
soundCategory_neutral:1.0
|
||||
soundCategory_player:1.0
|
||||
soundCategory_ambient:1.0
|
||||
soundCategory_voice:1.0
|
||||
modelPart_cape:true
|
||||
modelPart_jacket:true
|
||||
modelPart_left_sleeve:true
|
||||
modelPart_right_sleeve:true
|
||||
modelPart_left_pants_leg:true
|
||||
modelPart_right_pants_leg:true
|
||||
modelPart_hat:true
|
||||
@@ -0,0 +1,12 @@
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
|
||||
[*.{json, yml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Publish Development Build
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: adopt
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
- name: Release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
automatic_release_tag: latest
|
||||
prerelease: true
|
||||
title: Dev Build
|
||||
files: |
|
||||
./build/libs/*.jar
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Build Pull Request
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: adopt
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2.2.4
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: build/libs
|
||||
@@ -0,0 +1,33 @@
|
||||
# gradle
|
||||
|
||||
.gradle/
|
||||
build/
|
||||
out/
|
||||
classes/
|
||||
|
||||
# eclipse
|
||||
|
||||
*.launch
|
||||
|
||||
# idea
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# vscode
|
||||
|
||||
.settings/
|
||||
.vscode/
|
||||
bin/
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# macos
|
||||
|
||||
*.DS_Store
|
||||
|
||||
# fabric
|
||||
|
||||
run/
|
||||
@@ -0,0 +1,8 @@
|
||||
# Meteor Addon Template
|
||||
|
||||
A template to allow easy usage of the Meteor Addon API.
|
||||
|
||||
### How to use:
|
||||
- Clone this project
|
||||
- Use this template to create new modules/commands
|
||||
- Run the mod with Meteor.
|
||||
@@ -0,0 +1,53 @@
|
||||
plugins {
|
||||
id "fabric-loom" version "1.6-SNAPSHOT"
|
||||
id "java"
|
||||
}
|
||||
|
||||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "Meteor Dev Releases"
|
||||
url = "https://maven.meteordev.org/releases"
|
||||
}
|
||||
maven {
|
||||
name = "Meteor Dev Snapshots"
|
||||
url = "https://maven.meteordev.org/snapshots"
|
||||
}
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "https://jitpack.io"
|
||||
}
|
||||
maven {
|
||||
url "https://alwyn974.github.io/maven"
|
||||
}
|
||||
maven {
|
||||
url "https://repo.opencollab.dev/maven-releases/"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Fabric
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
// Meteor
|
||||
modImplementation "meteordevelopment:meteor-client:${project.meteor_version}"
|
||||
|
||||
// MeteorBot
|
||||
}
|
||||
|
||||
processResources {
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version, "mc_version": project.minecraft_version
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding("UTF-8")
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties (https://fabricmc.net/develop)
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.2
|
||||
loader_version=0.15.1
|
||||
|
||||
# Mod Properties
|
||||
mod_version=0.1.0
|
||||
maven_group=com.example
|
||||
archives_base_name=addon-template
|
||||
|
||||
# Dependencies
|
||||
|
||||
# Meteor (https://maven.meteordev.org)
|
||||
meteor_version=0.5.6-SNAPSHOT
|
||||
@@ -0,0 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,10 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
}
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.astatin3.meteorbot;
|
||||
|
||||
import com.astatin3.meteorbot.commands.CommandExample;
|
||||
import com.astatin3.meteorbot.hud.HudExample;
|
||||
import com.astatin3.meteorbot.modules.ModuleExample;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import meteordevelopment.meteorclient.addons.MeteorAddon;
|
||||
import meteordevelopment.meteorclient.commands.Commands;
|
||||
import meteordevelopment.meteorclient.systems.hud.Hud;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudGroup;
|
||||
import meteordevelopment.meteorclient.systems.modules.Category;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class Addon extends MeteorAddon {
|
||||
public static final Logger LOG = LogUtils.getLogger();
|
||||
public static final Category CATEGORY = new Category("MeteorBot");
|
||||
public static final HudGroup HUD_GROUP = new HudGroup("MeteorBot");
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
// LOG.info("Initializing Meteor Addon Template");
|
||||
|
||||
// Modules
|
||||
ModuleExample module = new ModuleExample();
|
||||
Modules.get().add(module);
|
||||
|
||||
// Commands
|
||||
Commands.add(new CommandExample(module));
|
||||
|
||||
// HUD
|
||||
Hud.get().register(HudExample.INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterCategories() {
|
||||
Modules.registerCategory(CATEGORY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackage() {
|
||||
return "com.astatin3.meteorbot";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.astatin3.meteorbot.commands;
|
||||
|
||||
import com.astatin3.meteorbot.modules.ModuleExample;
|
||||
import com.mojang.brigadier.arguments.IntegerArgumentType;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import meteordevelopment.meteorclient.commands.Command;
|
||||
import net.minecraft.command.CommandSource;
|
||||
|
||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||
|
||||
public class CommandExample extends Command {
|
||||
private ModuleExample module;
|
||||
|
||||
public CommandExample(ModuleExample module) {
|
||||
super("mb", "Sends a message.");
|
||||
this.module = module;
|
||||
}
|
||||
|
||||
private void printHelpInfo(){
|
||||
// info("\n" +
|
||||
// "-- Meteor Bot Help --\n" +
|
||||
// "\n" +
|
||||
// ".mb help - Print this help info\n" +
|
||||
// ".mb chat <msg> - Send chat message\n" +
|
||||
// ".mb cmd <cmd> - Send command (No '/')\n" +
|
||||
// ".mb goto <x> <y> <z> - Go to xyz choord\n" +
|
||||
// ".mb follow - Follow player\n" +
|
||||
// ".mb stop - Stop current action\n" +
|
||||
// ".mb rawsend <type> <content> - Send raw message to bot\n" +
|
||||
// ".mb quit - Make bot leave the game");
|
||||
info("\n" +
|
||||
"-- Meteor Bot Help --\n" +
|
||||
"\n" +
|
||||
".mb help - Print this help info\n" +
|
||||
".mb cmd <cmd> - Send cmd");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||
builder.executes(context -> {
|
||||
printHelpInfo();
|
||||
return SINGLE_SUCCESS;
|
||||
});
|
||||
|
||||
builder.then(literal("help").executes(context -> {
|
||||
printHelpInfo();
|
||||
return SINGLE_SUCCESS;
|
||||
}));
|
||||
|
||||
builder.then(literal("chat")
|
||||
.then(
|
||||
argument(
|
||||
"msg", StringArgumentType.greedyString())
|
||||
.executes(context -> {
|
||||
// module.writeSTDIN("chat:" + context.getArgument("msg", String.class));
|
||||
return SINGLE_SUCCESS;
|
||||
})));
|
||||
|
||||
builder.then(literal("cmd")
|
||||
.then(
|
||||
argument(
|
||||
"cmd", StringArgumentType.greedyString())
|
||||
.executes(context -> {
|
||||
// module.writeSTDIN("cmd:" + context.getArgument("cmd", String.class));
|
||||
return SINGLE_SUCCESS;
|
||||
})));
|
||||
|
||||
|
||||
builder.then(literal("stop").executes(context -> {
|
||||
// module.writeSTDIN("Stop");
|
||||
// if(module.followMode){
|
||||
// module.followMode = false;
|
||||
// }
|
||||
return SINGLE_SUCCESS;
|
||||
}));
|
||||
|
||||
|
||||
builder.then(literal("quit").executes(context -> {
|
||||
// module.quitBot();
|
||||
return SINGLE_SUCCESS;
|
||||
}));
|
||||
|
||||
|
||||
builder.then(literal("goto")
|
||||
.then(
|
||||
argument(
|
||||
"x", IntegerArgumentType.integer())
|
||||
.then(
|
||||
argument(
|
||||
"y", IntegerArgumentType.integer())
|
||||
.then(
|
||||
argument(
|
||||
"z", IntegerArgumentType.integer())
|
||||
.executes(context -> {
|
||||
|
||||
// module.writeSTDIN(
|
||||
// "goto:" + context.getArgument("x", Integer.class) + "," +
|
||||
// context.getArgument("y", Integer.class) + "," +
|
||||
// context.getArgument("z", Integer.class));
|
||||
return SINGLE_SUCCESS;
|
||||
})))));
|
||||
|
||||
builder.then(literal("rawsend")
|
||||
.then(
|
||||
argument(
|
||||
"type", StringArgumentType.string())
|
||||
.then(
|
||||
argument(
|
||||
"content", StringArgumentType.greedyString())
|
||||
.executes(context -> {
|
||||
// module.writeSTDIN(context.getArgument("type", String.class) + ":" + context.getArgument("content", String.class));
|
||||
return SINGLE_SUCCESS;
|
||||
}))));
|
||||
|
||||
builder.then(literal("follow")
|
||||
.executes(context -> {
|
||||
// module.startFollowMode();
|
||||
return SINGLE_SUCCESS;
|
||||
}));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.astatin3.meteorbot.hud;
|
||||
|
||||
import com.astatin3.meteorbot.Addon;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudElement;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudElementInfo;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudRenderer;
|
||||
import meteordevelopment.meteorclient.utils.render.color.Color;
|
||||
|
||||
public class HudExample extends HudElement {
|
||||
public static final HudElementInfo<HudExample> INFO = new HudElementInfo<>(Addon.HUD_GROUP, "example", "HUD element example.", HudExample::new);
|
||||
|
||||
public HudExample() {
|
||||
super(INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(HudRenderer renderer) {
|
||||
setSize(renderer.textWidth("Example element", true), renderer.textHeight(true));
|
||||
|
||||
renderer.text("Example element", x, y, Color.WHITE, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.astatin3.meteorbot.modules;
|
||||
|
||||
import com.astatin3.meteorbot.Addon;
|
||||
import meteordevelopment.meteorclient.settings.BoolSetting;
|
||||
import meteordevelopment.meteorclient.settings.Setting;
|
||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||
import meteordevelopment.meteorclient.settings.StringSetting;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
public class ModuleExample extends Module {
|
||||
public ModuleExample() {
|
||||
super(Addon.CATEGORY, "Meteor-Bot", "An example module in a custom category.");
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<String> botpath = sgGeneral.add(new StringSetting.Builder()
|
||||
.name("Path")
|
||||
.description("The location of the bot .minecraft folder")
|
||||
.defaultValue("/home/astatin3/GitHub/meteorbot/instance")
|
||||
.visible(() -> true)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Boolean> verboseMode = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("Verbose")
|
||||
.description("Enable verbose output")
|
||||
.defaultValue(true)
|
||||
.visible(() -> true)
|
||||
.build()
|
||||
);
|
||||
|
||||
private Process process;
|
||||
private BufferedOutputStream stdin;
|
||||
|
||||
private Thread cmdThread = null;
|
||||
|
||||
|
||||
public void startBot(){
|
||||
try {
|
||||
// Set up the classpath and main class
|
||||
String minecraftJar = "path/to/minecraft.jar";
|
||||
String mainClass = "net.minecraft.client.main.Main";
|
||||
|
||||
// Set up JVM arguments
|
||||
List<String> jvmArgs = new ArrayList<>();
|
||||
jvmArgs.add("java");
|
||||
jvmArgs.add("-Xmx2G"); // Adjust max heap size as needed
|
||||
jvmArgs.add("-XX:+UnlockExperimentalVMOptions");
|
||||
jvmArgs.add("-XX:+UseG1GC");
|
||||
jvmArgs.add("-XX:G1NewSizePercent=20");
|
||||
jvmArgs.add("-XX:G1ReservePercent=20");
|
||||
jvmArgs.add("-XX:MaxGCPauseMillis=50");
|
||||
jvmArgs.add("-XX:G1HeapRegionSize=32M");
|
||||
jvmArgs.add("-cp");
|
||||
jvmArgs.add(minecraftJar);
|
||||
jvmArgs.add(mainClass);
|
||||
|
||||
// Add Minecraft arguments
|
||||
jvmArgs.add("--username");
|
||||
jvmArgs.add("Player");
|
||||
jvmArgs.add("--version");
|
||||
jvmArgs.add("1.19.4"); // Adjust to your Minecraft version
|
||||
jvmArgs.add("--gameDir");
|
||||
jvmArgs.add(".");
|
||||
jvmArgs.add("--assetsDir");
|
||||
jvmArgs.add("assets");
|
||||
jvmArgs.add("--assetIndex");
|
||||
jvmArgs.add("1.19"); // Adjust to your asset index
|
||||
jvmArgs.add("--uuid");
|
||||
jvmArgs.add(java.util.UUID.randomUUID().toString());
|
||||
jvmArgs.add("--accessToken");
|
||||
jvmArgs.add("0"); // Use a valid access token for online play
|
||||
jvmArgs.add("--userType");
|
||||
jvmArgs.add("mojang");
|
||||
|
||||
// Create process builder
|
||||
ProcessBuilder pb = new ProcessBuilder(jvmArgs);
|
||||
pb.directory(new File("."));
|
||||
pb.inheritIO();
|
||||
|
||||
// Start the process
|
||||
process = pb.start();
|
||||
|
||||
// Wait for the process to finish
|
||||
int exitCode = process.waitFor();
|
||||
info("Minecraft exited with code: " + exitCode);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void startThread(){
|
||||
cmdThread = new Thread(() -> {
|
||||
startBot();
|
||||
});
|
||||
cmdThread.start();
|
||||
}
|
||||
|
||||
public void stopThread(){
|
||||
if(cmdThread != null) {
|
||||
cmdThread.interrupt();
|
||||
cmdThread = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onActivate() {
|
||||
startThread();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
stopThread();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "meteorbot",
|
||||
"version": "${version}",
|
||||
"name": "Meteor-Bot",
|
||||
"description": "An addon template for the Meteor addons.",
|
||||
"authors": [
|
||||
"seasnail"
|
||||
],
|
||||
"contact": {
|
||||
"repo": "https://github.com/MeteorDevelopment/meteor-addon-template"
|
||||
},
|
||||
"icon": "assets/template/icon.png",
|
||||
"environment": "client",
|
||||
"entrypoints": {
|
||||
"meteor": [
|
||||
"com.astatin3.meteorbot.Addon"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"meteorbot.mixins.json"
|
||||
],
|
||||
"custom": {
|
||||
"meteor-client:color": "225,25,25"
|
||||
},
|
||||
"depends": {
|
||||
"java": ">=17",
|
||||
"minecraft": ">=${mc_version}",
|
||||
"meteor-client": "*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"required": true,
|
||||
"package": "com.example.addon.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"client": [],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
|
||||
[*.{json, yml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Publish Development Build
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Wrapper Validation
|
||||
uses: gradle/actions/wrapper-validation@v3
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: adopt
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
automatic_release_tag: latest
|
||||
prerelease: true
|
||||
title: Dev Build
|
||||
files: |
|
||||
./build/libs/*.jar
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Build Pull Request Artifacts
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Wrapper Validation
|
||||
uses: gradle/actions/wrapper-validation@v3
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 21
|
||||
distribution: adopt
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Release
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
||||
@@ -0,0 +1,33 @@
|
||||
# gradle
|
||||
|
||||
.gradle/
|
||||
build/
|
||||
out/
|
||||
classes/
|
||||
|
||||
# eclipse
|
||||
|
||||
*.launch
|
||||
|
||||
# idea
|
||||
|
||||
.idea/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# vscode
|
||||
|
||||
.settings/
|
||||
.vscode/
|
||||
bin/
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# macos
|
||||
|
||||
*.DS_Store
|
||||
|
||||
# fabric
|
||||
|
||||
run/
|
||||
@@ -0,0 +1,59 @@
|
||||
plugins {
|
||||
id "fabric-loom" version "1.7-SNAPSHOT"
|
||||
}
|
||||
|
||||
base {
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "Meteor Dev Releases"
|
||||
url = "https://maven.meteordev.org/releases"
|
||||
}
|
||||
maven {
|
||||
name = "Meteor Dev Snapshots"
|
||||
url = "https://maven.meteordev.org/snapshots"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Fabric
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
// Meteor
|
||||
modImplementation "meteordevelopment:meteor-client:${project.meteor_version}"
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
def propertyMap = [
|
||||
"version" : project.version,
|
||||
"mc_version": project.minecraft_version,
|
||||
]
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(propertyMap)
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.base.archivesBaseName}" }
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = 21
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties (https://fabricmc.net/develop)
|
||||
minecraft_version=1.21
|
||||
yarn_mappings=1.21+build.8
|
||||
loader_version=0.15.11
|
||||
|
||||
# Mod Properties
|
||||
mod_version=0.1.0
|
||||
maven_group=com.example
|
||||
archives_base_name=addon-template
|
||||
|
||||
# Dependencies
|
||||
|
||||
# Meteor (https://maven.meteordev.org)
|
||||
meteor_version=0.5.8-SNAPSHOT
|
||||
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,244 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,10 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
}
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.example.addon;
|
||||
|
||||
import com.example.addon.commands.CommandExample;
|
||||
import com.example.addon.hud.HudExample;
|
||||
import com.example.addon.modules.ModuleExample;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import meteordevelopment.meteorclient.addons.GithubRepo;
|
||||
import meteordevelopment.meteorclient.addons.MeteorAddon;
|
||||
import meteordevelopment.meteorclient.commands.Commands;
|
||||
import meteordevelopment.meteorclient.systems.hud.Hud;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudGroup;
|
||||
import meteordevelopment.meteorclient.systems.modules.Category;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
public class AddonTemplate extends MeteorAddon {
|
||||
public static final Logger LOG = LogUtils.getLogger();
|
||||
public static final Category CATEGORY = new Category("Example");
|
||||
public static final HudGroup HUD_GROUP = new HudGroup("Example");
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
LOG.info("Initializing Meteor Addon Template");
|
||||
|
||||
LauncherManger lm = new LauncherManger();
|
||||
|
||||
// Modules
|
||||
ModuleExample m = new ModuleExample(lm);
|
||||
Modules.get().add(m);
|
||||
|
||||
// Commands
|
||||
Commands.add(new CommandExample(lm));
|
||||
|
||||
// HUD
|
||||
Hud.get().register(HudExample.INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRegisterCategories() {
|
||||
Modules.registerCategory(CATEGORY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackage() {
|
||||
return "com.example.addon";
|
||||
}
|
||||
|
||||
@Override
|
||||
public GithubRepo getRepo() {
|
||||
return new GithubRepo("MeteorDevelopment", "meteor-addon-template");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.example.addon;
|
||||
|
||||
import net.minecraft.client.network.ServerAddress;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LauncherManger {
|
||||
public LauncherManger(){}
|
||||
|
||||
public List<launcher> launcherList = null;
|
||||
|
||||
public void start(String gamedir, int num, String usernamePrefix, ServerAddress address){
|
||||
launcherList = new ArrayList<>();
|
||||
for(int i = 0; i < num; i++){
|
||||
launcher l = new launcher(gamedir, usernamePrefix, i, address);
|
||||
l.start();
|
||||
launcherList.add(l);
|
||||
}
|
||||
}
|
||||
|
||||
public void stop(){
|
||||
if(launcherList == null) return;
|
||||
|
||||
for(int i = 0; i < launcherList.size(); i++){
|
||||
launcherList.get(i).stop();
|
||||
}
|
||||
|
||||
launcherList = null;
|
||||
}
|
||||
|
||||
public boolean running(){
|
||||
return launcherList != null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.example.addon.commands;
|
||||
|
||||
import com.example.addon.AddonTemplate;
|
||||
import com.example.addon.LauncherManger;
|
||||
import com.example.addon.modules.ModuleExample;
|
||||
import com.mojang.brigadier.arguments.StringArgumentType;
|
||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||
import meteordevelopment.meteorclient.commands.Command;
|
||||
import net.minecraft.command.CommandSource;
|
||||
|
||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||
|
||||
/**
|
||||
* The Meteor Client command API uses the <a href="https://github.com/Mojang/brigadier">same command system as Minecraft does</a>.
|
||||
*/
|
||||
public class CommandExample extends Command {
|
||||
LauncherManger lm;
|
||||
public CommandExample(LauncherManger lm) {
|
||||
super("bot", "Sends a message.");
|
||||
this.lm = lm;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(LiteralArgumentBuilder<CommandSource> builder) {
|
||||
builder.executes(context -> {
|
||||
info("hi");
|
||||
return SINGLE_SUCCESS;
|
||||
});
|
||||
|
||||
builder.then(literal("name").then(argument("nameArgument", StringArgumentType.greedyString()).executes(context -> {
|
||||
String argument = StringArgumentType.getString(context, "nameArgument");
|
||||
if(!lm.running()){
|
||||
info("The bot has not been initilized yet.");
|
||||
return SINGLE_SUCCESS;
|
||||
}
|
||||
|
||||
for(int i = 0; i < lm.launcherList.size(); i++){
|
||||
lm.launcherList.get(i).mcinput.println(argument);
|
||||
}
|
||||
|
||||
return SINGLE_SUCCESS;
|
||||
})));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.example.addon.hud;
|
||||
|
||||
import com.example.addon.AddonTemplate;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudElement;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudElementInfo;
|
||||
import meteordevelopment.meteorclient.systems.hud.HudRenderer;
|
||||
import meteordevelopment.meteorclient.utils.render.color.Color;
|
||||
|
||||
public class HudExample extends HudElement {
|
||||
/**
|
||||
* The {@code name} parameter should be in kebab-case.
|
||||
*/
|
||||
public static final HudElementInfo<HudExample> INFO = new HudElementInfo<>(AddonTemplate.HUD_GROUP, "example", "HUD element example.", HudExample::new);
|
||||
|
||||
public HudExample() {
|
||||
super(INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(HudRenderer renderer) {
|
||||
setSize(renderer.textWidth("Example element", true), renderer.textHeight(true));
|
||||
|
||||
// Render background
|
||||
renderer.quad(x, y, getWidth(), getHeight(), Color.LIGHT_GRAY);
|
||||
|
||||
// Render text
|
||||
renderer.text("Example element", x, y, Color.WHITE, true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
package com.example.addon;
|
||||
|
||||
import net.minecraft.client.network.ServerAddress;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class launcher {
|
||||
private static String get_classpaths(String libdir){
|
||||
return String.join(":", new String[]{
|
||||
libdir + "/org/lwjgl/lwjgl-freetype-natives-linux/3.3.3/lwjgl-freetype-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-freetype/3.3.3/lwjgl-freetype-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-glfw-natives-linux/3.3.3/lwjgl-glfw-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-glfw/3.3.3/lwjgl-glfw-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-jemalloc-natives-linux/3.3.3/lwjgl-jemalloc-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-jemalloc/3.3.3/lwjgl-jemalloc-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-natives-linux/3.3.3/lwjgl-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-openal-natives-linux/3.3.3/lwjgl-openal-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-openal/3.3.3/lwjgl-openal-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-opengl-natives-linux/3.3.3/lwjgl-opengl-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-opengl/3.3.3/lwjgl-opengl-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-stb-natives-linux/3.3.3/lwjgl-stb-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-stb/3.3.3/lwjgl-stb-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-tinyfd-natives-linux/3.3.3/lwjgl-tinyfd-natives-linux-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl-tinyfd/3.3.3/lwjgl-tinyfd-3.3.3.jar",
|
||||
libdir + "/org/lwjgl/lwjgl/3.3.3/lwjgl-3.3.3.jar",
|
||||
libdir + "/com/github/oshi/oshi-core/6.4.10/oshi-core-6.4.10.jar",
|
||||
libdir + "/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar",
|
||||
libdir + "/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar",
|
||||
libdir + "/com/google/guava/guava/32.1.2-jre/guava-32.1.2-jre.jar",
|
||||
libdir + "/com/ibm/icu/icu4j/73.2/icu4j-73.2.jar",
|
||||
libdir + "/com/mojang/authlib/6.0.54/authlib-6.0.54.jar",
|
||||
libdir + "/com/mojang/blocklist/1.0.10/blocklist-1.0.10.jar",
|
||||
libdir + "/com/mojang/brigadier/1.2.9/brigadier-1.2.9.jar",
|
||||
libdir + "/com/mojang/datafixerupper/8.0.16/datafixerupper-8.0.16.jar",
|
||||
libdir + "/com/mojang/logging/1.2.7/logging-1.2.7.jar",
|
||||
libdir + "/com/mojang/patchy/2.2.10/patchy-2.2.10.jar",
|
||||
libdir + "/com/mojang/text2speech/1.17.9/text2speech-1.17.9.jar",
|
||||
libdir + "/commons-codec/commons-codec/1.16.0/commons-codec-1.16.0.jar",
|
||||
libdir + "/commons-io/commons-io/2.15.1/commons-io-2.15.1.jar",
|
||||
libdir + "/commons-logging/commons-logging/1.2/commons-logging-1.2.jar",
|
||||
libdir + "/io/netty/netty-buffer/4.1.97.Final/netty-buffer-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-codec/4.1.97.Final/netty-codec-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-common/4.1.97.Final/netty-common-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-handler/4.1.97.Final/netty-handler-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-resolver/4.1.97.Final/netty-resolver-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-transport-classes-epoll/4.1.97.Final/netty-transport-classes-epoll-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-aarch_64.jar",
|
||||
libdir + "/io/netty/netty-transport-native-epoll/4.1.97.Final/netty-transport-native-epoll-4.1.97.Final-linux-x86_64.jar",
|
||||
libdir + "/io/netty/netty-transport-native-unix-common/4.1.97.Final/netty-transport-native-unix-common-4.1.97.Final.jar",
|
||||
libdir + "/io/netty/netty-transport/4.1.97.Final/netty-transport-4.1.97.Final.jar",
|
||||
libdir + "/it/unimi/dsi/fastutil/8.5.12/fastutil-8.5.12.jar",
|
||||
libdir + "/net/java/dev/jna/jna-platform/5.14.0/jna-platform-5.14.0.jar",
|
||||
libdir + "/net/java/dev/jna/jna/5.14.0/jna-5.14.0.jar",
|
||||
libdir + "/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar",
|
||||
libdir + "/org/apache/commons/commons-compress/1.26.0/commons-compress-1.26.0.jar",
|
||||
libdir + "/org/apache/commons/commons-lang3/3.14.0/commons-lang3-3.14.0.jar",
|
||||
libdir + "/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar",
|
||||
libdir + "/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar",
|
||||
libdir + "/org/apache/logging/log4j/log4j-api/2.22.1/log4j-api-2.22.1.jar",
|
||||
libdir + "/org/apache/logging/log4j/log4j-core/2.22.1/log4j-core-2.22.1.jar",
|
||||
libdir + "/org/apache/logging/log4j/log4j-slf4j2-impl/2.22.1/log4j-slf4j2-impl-2.22.1.jar",
|
||||
libdir + "/org/jcraft/jorbis/0.0.17/jorbis-0.0.17.jar",
|
||||
libdir + "/org/joml/joml/1.10.5/joml-1.10.5.jar",
|
||||
libdir + "/org/lz4/lz4-java/1.8.0/lz4-java-1.8.0.jar",
|
||||
libdir + "/org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.jar",
|
||||
libdir + "/net/fabricmc/intermediary/1.21/intermediary-1.21.jar",
|
||||
libdir + "/org/ow2/asm/asm/9.6/asm-9.6.jar",
|
||||
libdir + "/org/ow2/asm/asm-analysis/9.6/asm-analysis-9.6.jar",
|
||||
libdir + "/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.jar",
|
||||
libdir + "/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.jar",
|
||||
libdir + "/org/ow2/asm/asm-util/9.6/asm-util-9.6.jar",
|
||||
libdir + "/net/fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/sponge-mixin-0.13.3+mixin.0.8.5.jar",
|
||||
libdir + "/net/fabricmc/fabric-loader/0.15.11/fabric-loader-0.15.11.jar",
|
||||
libdir + "/com/mojang/minecraft/1.21/minecraft-1.21-client.jar"
|
||||
});
|
||||
}
|
||||
|
||||
private static List<String> get_args(String gameDir){
|
||||
String mainClass = "net.fabricmc.loader.impl.launch.knot.KnotClient";
|
||||
|
||||
// Set up JVM arguments
|
||||
List<String> jvmArgs = new ArrayList<>();
|
||||
jvmArgs.add("java");
|
||||
jvmArgs.add("-Xmx512M"); // Adjust max heap size as needed
|
||||
jvmArgs.add("-XX:+UnlockExperimentalVMOptions");
|
||||
jvmArgs.add("-XX:+UseG1GC");
|
||||
jvmArgs.add("-XX:G1NewSizePercent=20");
|
||||
jvmArgs.add("-XX:G1ReservePercent=20");
|
||||
jvmArgs.add("-XX:MaxGCPauseMillis=50");
|
||||
jvmArgs.add("-XX:G1HeapRegionSize=32M");
|
||||
jvmArgs.add("-cp");
|
||||
jvmArgs.add(get_classpaths(gameDir+"/libraries"));
|
||||
jvmArgs.add("-Djava.library.path=\"" + gameDir + "/natives\"");
|
||||
// jvmArgs.add(minecraftJar);
|
||||
jvmArgs.add(mainClass);
|
||||
|
||||
// Add Minecraft arguments
|
||||
jvmArgs.add("--version");
|
||||
jvmArgs.add("1.21"); // Adjust to your Minecraft version
|
||||
jvmArgs.add("--gameDir");
|
||||
jvmArgs.add(gameDir);
|
||||
jvmArgs.add("--assetsDir");
|
||||
jvmArgs.add(gameDir+"/assets");
|
||||
jvmArgs.add("--assetIndex");
|
||||
jvmArgs.add("17"); // Adjust to your asset index
|
||||
jvmArgs.add("--uuid");
|
||||
jvmArgs.add(java.util.UUID.randomUUID().toString());
|
||||
jvmArgs.add("--accessToken");
|
||||
jvmArgs.add("0"); // Use a valid access token for online play
|
||||
jvmArgs.add("--userType");
|
||||
jvmArgs.add("mojang");
|
||||
|
||||
return jvmArgs;
|
||||
}
|
||||
|
||||
private int botid;
|
||||
private String username;
|
||||
private String gamedir;
|
||||
private ServerAddress addr;
|
||||
|
||||
public launcher(String gamedir, String username, int botid, ServerAddress address){
|
||||
this.gamedir = gamedir;
|
||||
this.username = username;
|
||||
this.botid = botid;
|
||||
this.addr = address;
|
||||
}
|
||||
|
||||
private Process process;
|
||||
|
||||
private BufferedOutputStream stdin;
|
||||
|
||||
private Thread processThread = null;
|
||||
private Thread socketThread = null;
|
||||
|
||||
private BufferedReader mcoutput = null;
|
||||
public PrintWriter mcinput;
|
||||
|
||||
private void run(){
|
||||
System.out.println(addr.toString());
|
||||
|
||||
try {
|
||||
List<String> jvmArgs = get_args(gamedir);
|
||||
jvmArgs.add("--username");
|
||||
jvmArgs.add(username + botid);
|
||||
|
||||
System.out.println(String.join(" ", jvmArgs.toArray(new String[0])));
|
||||
|
||||
// Create process builder
|
||||
ProcessBuilder pb = new ProcessBuilder(jvmArgs);
|
||||
pb.directory(new File("."));
|
||||
// pb.inheritIO();
|
||||
|
||||
// Start the process
|
||||
process = pb.start();
|
||||
mcoutput = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
|
||||
String str;
|
||||
while ((str = mcoutput.readLine()) != null) {
|
||||
System.out.println(str);
|
||||
if(str.contains("(no-more-render) Started!"))
|
||||
finishInit();
|
||||
}
|
||||
|
||||
//
|
||||
System.out.println("Minecraft exited with code: " + process.waitFor());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void finishInit(){
|
||||
System.out.println("Started connecting ...");
|
||||
socketThread = new Thread(() -> {
|
||||
while(!socketThread.isInterrupted()) {
|
||||
try (Socket socket = new Socket("localhost", 65000 + botid)) {
|
||||
|
||||
System.out.println("Conencted to bot " + botid + "!");
|
||||
|
||||
mcinput = new PrintWriter(socket.getOutputStream(), true);
|
||||
mcinput.println("connect " + addr.getAddress() + " " + addr.getPort());
|
||||
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
|
||||
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null && !socketThread.isInterrupted()) {
|
||||
System.out.println(line);
|
||||
}
|
||||
} catch (UnknownHostException ex) {
|
||||
|
||||
System.out.println("Server not found: " + ex.getMessage());
|
||||
|
||||
} catch (IOException ex) {
|
||||
|
||||
System.out.println("I/O error: " + ex.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
socketThread.start();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void start(){
|
||||
processThread = new Thread(this::run);
|
||||
processThread.start();
|
||||
}
|
||||
|
||||
public void stop(){
|
||||
if(processThread != null) {
|
||||
processThread.interrupt();
|
||||
processThread = null;
|
||||
}
|
||||
if(process != null){
|
||||
process.destroyForcibly();
|
||||
process = null;
|
||||
}
|
||||
if(socketThread != null){
|
||||
socketThread.interrupt();
|
||||
socketThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.example.addon.modules;
|
||||
|
||||
import com.example.addon.LauncherManger;
|
||||
import com.example.addon.launcher;
|
||||
import it.unimi.dsi.fastutil.objects.ObjectObjectImmutablePair;
|
||||
import meteordevelopment.meteorclient.MeteorClient;
|
||||
import meteordevelopment.meteorclient.events.world.ServerConnectBeginEvent;
|
||||
import meteordevelopment.meteorclient.settings.BoolSetting;
|
||||
import meteordevelopment.meteorclient.settings.Setting;
|
||||
import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||
import meteordevelopment.meteorclient.settings.StringSetting;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.orbit.EventHandler;
|
||||
import net.minecraft.client.input.Input;
|
||||
import net.minecraft.client.network.ServerAddress;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.example.addon.AddonTemplate.CATEGORY;
|
||||
|
||||
|
||||
public class ModuleExample extends Module {
|
||||
ServerAddress current_addr;
|
||||
|
||||
|
||||
LauncherManger lm;
|
||||
public ModuleExample(LauncherManger lm) {
|
||||
super(CATEGORY, "Meteor-Bot", "An example module in a custom category.");
|
||||
MeteorClient.EVENT_BUS.subscribe(new StaticListener());
|
||||
|
||||
this.lm = lm;
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<String> botpath = sgGeneral.add(new StringSetting.Builder()
|
||||
.name("Path")
|
||||
.description("The location of the bot .minecraft folder")
|
||||
.defaultValue("/home/astatin3/GitHub/meteorbot/instance")
|
||||
.visible(() -> true)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Boolean> verboseMode = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("Verbose")
|
||||
.description("Enable verbose output")
|
||||
.defaultValue(true)
|
||||
.visible(() -> true)
|
||||
.build()
|
||||
);
|
||||
|
||||
public void onActivate() {
|
||||
// test = new launcher(botpath.get(), "bot", 0, current_addr);
|
||||
// test.start();
|
||||
lm.start(botpath.get(), 8, "bot", current_addr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
if(lm.running())
|
||||
lm.stop();
|
||||
}
|
||||
|
||||
private class StaticListener {
|
||||
@EventHandler
|
||||
private void onGameJoined(ServerConnectBeginEvent event) {
|
||||
current_addr = event.address;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "addon-template",
|
||||
"version": "${version}",
|
||||
"name": "Addon Template",
|
||||
"description": "An addon template for Meteor Client addons.",
|
||||
"authors": [
|
||||
"seasnail"
|
||||
],
|
||||
"contact": {
|
||||
"repo": "https://github.com/MeteorDevelopment/meteor-addon-template"
|
||||
},
|
||||
"icon": "assets/template/icon.png",
|
||||
"environment": "client",
|
||||
"entrypoints": {
|
||||
"meteor": [
|
||||
"com.example.addon.AddonTemplate"
|
||||
]
|
||||
},
|
||||
"mixins": [],
|
||||
"custom": {
|
||||
"meteor-client:color": "225,25,25"
|
||||
},
|
||||
"depends": {
|
||||
"java": ">=21",
|
||||
"minecraft": ["${mc_version}"],
|
||||
"meteor-client": "*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
|
||||
[*.{json, yml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
@@ -0,0 +1,121 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
@@ -0,0 +1,22 @@
|
||||
# no-more-render
|
||||
|
||||
A Fabric mod that removes Minecraft's window rendering code, to create a headless CLI version
|
||||
|
||||
## Usage
|
||||
This mod runs a tcp server locally that allows for a command line interface
|
||||
The mod runs on the port 65000, and increments this value by 1 if it cannot access that port.
|
||||
You can connect to it via running `ncat localhost 65000` or other similar command
|
||||
### Comamnds:
|
||||
```
|
||||
listelements/elems - List widgets on the screen
|
||||
clickelement/celem <elem index> - Click an element on the screen
|
||||
writeelement/welem <elem index> <text> - Write text into a compatable element
|
||||
|
||||
key <key> - Press and release a key
|
||||
keydown <key> - Press a key
|
||||
keyup <key> - Release a key
|
||||
|
||||
connect <Addr>:[Port] - Forcibly connect to a server
|
||||
|
||||
quit/exit - Close the game
|
||||
```
|
||||
@@ -0,0 +1,89 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.7-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Add repositories to retrieve artifacts from in here.
|
||||
// You should only use this when depending on other mods because
|
||||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
|
||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||
// for more information about repositories.
|
||||
// mavenCentral()
|
||||
// maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
loom {
|
||||
splitEnvironmentSourceSets()
|
||||
|
||||
mods {
|
||||
"modid" {
|
||||
sourceSet sourceSets.main
|
||||
sourceSet sourceSets.client
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// To change the versions see the gradle.properties file
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.release = 21
|
||||
}
|
||||
|
||||
java {
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
create("mavenJava", MavenPublication) {
|
||||
artifactId = project.archives_base_name
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
repositories {
|
||||
// Add repositories to publish to here.
|
||||
// Notice: This block does NOT have the same function as the block in the top level.
|
||||
// The repositories here will be used for publishing your artifact, not for
|
||||
// retrieving dependencies.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="21" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,17 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.21
|
||||
yarn_mappings=1.21+build.2
|
||||
loader_version=0.15.11
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.0.2
|
||||
maven_group=com.astatin3
|
||||
archives_base_name=nomorerender
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.100.3+1.21
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,249 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="UnreachableCode" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Meteor Dev Releases" />
|
||||
<option name="name" value="Meteor Dev Releases" />
|
||||
<option name="url" value="https://maven.meteordev.org/releases" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Meteor Dev Snapshots" />
|
||||
<option name="name" value="Meteor Dev Snapshots" />
|
||||
<option name="url" value="https://maven.meteordev.org/snapshots" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Fabric" />
|
||||
<option name="name" value="Fabric" />
|
||||
<option name="url" value="https://maven.fabricmc.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="LoomLocalMinecraft" />
|
||||
<option name="name" value="LoomLocalMinecraft" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/.gradle/loom-cache/minecraftMaven/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Mojang" />
|
||||
<option name="name" value="Mojang" />
|
||||
<option name="url" value="https://libraries.minecraft.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="LoomLocalRemappedMods" />
|
||||
<option name="name" value="LoomLocalRemappedMods" />
|
||||
<option name="url" value="file:$PROJECT_DIR$/.gradle/loom-cache/remapped_mods/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="LoomGlobalMinecraft" />
|
||||
<option name="name" value="LoomGlobalMinecraft" />
|
||||
<option name="url" value="file:$USER_HOME$/.gradle/caches/fabric-loom/minecraftMaven/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" project-jdk-name="22" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/com.astatin3.no-more-render.client.iml" filepath="$PROJECT_DIR$/.idea/modules/com.astatin3.no-more-render.client.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/com.astatin3.no-more-render.main.iml" filepath="$PROJECT_DIR$/.idea/modules/com.astatin3.no-more-render.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/no-more-render.client.iml" filepath="$PROJECT_DIR$/.idea/modules/no-more-render.client.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/no-more-render.main.iml" filepath="$PROJECT_DIR$/.idea/modules/no-more-render.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/no-more-render.test.iml" filepath="$PROJECT_DIR$/.idea/modules/no-more-render.test.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>MIXIN</platformType>
|
||||
<platformType>MCP</platformType>
|
||||
<platformType>FABRIC</platformType>
|
||||
</autoDetectTypes>
|
||||
<projectReimportVersion>1</projectReimportVersion>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="McpModuleSettings">
|
||||
<option name="minecraftVersion" value="1.21" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>FABRIC</platformType>
|
||||
<platformType>MIXIN</platformType>
|
||||
<platformType>MCP</platformType>
|
||||
</autoDetectTypes>
|
||||
<projectReimportVersion>1</projectReimportVersion>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="McpModuleSettings">
|
||||
<option name="minecraftVersion" value="1.21" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="minecraft" name="Minecraft">
|
||||
<configuration>
|
||||
<autoDetectTypes>
|
||||
<platformType>FABRIC</platformType>
|
||||
<platformType>MIXIN</platformType>
|
||||
<platformType>MCP</platformType>
|
||||
</autoDetectTypes>
|
||||
<projectReimportVersion>1</projectReimportVersion>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="McpModuleSettings">
|
||||
<option name="minecraftVersion" value="1.21" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -0,0 +1,14 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" factoryName="Application" name="Minecraft Client" type="Application">
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="/usr/lib/jvm/temurin-22-jdk-amd64"/>
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true"/>
|
||||
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main"/>
|
||||
<module name="no-more-render.main"/>
|
||||
<shortenClasspath name="ARGS_FILE"/>
|
||||
<option name="VM_PARAMETERS" value="-Dfabric.dli.config=$USER_HOME$/GitHub/no-more-render/.gradle/loom-cache/launch.cfg -Dfabric.dli.env=client -Dfabric.dli.main=net.fabricmc.loader.impl.launch.knot.KnotClient"/>
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/"/>
|
||||
<method v="2">
|
||||
<option enabled="true" name="Make"/>
|
||||
</method>
|
||||
<classpathModifications/></configuration>
|
||||
</component>
|
||||