mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
152
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d5dd8a52a | ||
|
|
15168f66e0 | ||
|
|
c2cb18f98b | ||
|
|
a3e69f1194 | ||
|
|
ed03306597 | ||
|
|
3dc556b807 | ||
|
|
16ff546f5c | ||
|
|
3ef682b940 | ||
|
|
b7d1cd2ee1 | ||
|
|
569818f9bd | ||
|
|
0041f04d28 | ||
|
|
3514f9098d | ||
|
|
7bc4e82fdb | ||
|
|
e2f0b85128 | ||
|
|
a4aee25df0 | ||
|
|
761a5631fe | ||
|
|
0d7a4411a2 | ||
|
|
fdd9fde9c9 | ||
|
|
f0ab23044f | ||
|
|
1c70006519 | ||
|
|
93fa055660 | ||
|
|
1c035f6110 | ||
|
|
a47a187d65 | ||
|
|
b8e5fb162d | ||
|
|
6b31762c17 | ||
|
|
cb302ea1fa | ||
|
|
860f2fb467 | ||
|
|
f673dba88b | ||
|
|
e74df49271 | ||
|
|
a43f85b18c | ||
|
|
986a614028 | ||
|
|
c620a87819 | ||
|
|
0a1895370b | ||
|
|
7220faae24 | ||
|
|
36cb1b4b32 | ||
|
|
337a34108d | ||
|
|
49a376b48d | ||
|
|
7a6dd9adaa | ||
|
|
76fdd16906 | ||
|
|
f4623ebf2e | ||
|
|
206c745716 | ||
|
|
ebdfcd21aa | ||
|
|
9637c27159 | ||
|
|
b1ebe33403 | ||
|
|
f03b1dbdb8 | ||
|
|
c51228b1fd | ||
|
|
a0c8fe49a3 | ||
|
|
00688eb30d | ||
|
|
d02ca48a0e | ||
|
|
3c38d3e184 | ||
|
|
e06a4d329b | ||
|
|
5dc630fca9 | ||
|
|
a998af65ce | ||
|
|
0e7b705c54 | ||
|
|
56a6c619ed | ||
|
|
0b1a0b27ba | ||
|
|
a0c174f2e1 | ||
|
|
be11ebc4ef | ||
|
|
a2946967d4 | ||
|
|
06583bdc3c | ||
|
|
d5f02a9d3c | ||
|
|
b94ae7f3e3 | ||
|
|
5e76dea7ec | ||
|
|
9a8a38a4a5 | ||
|
|
3af6751f3c | ||
|
|
35b658a29b | ||
|
|
28352b8c17 | ||
|
|
267d1c4170 | ||
|
|
4fdd2cbcaf | ||
|
|
27b21e8de7 | ||
|
|
d01ede5147 | ||
|
|
9dc46e54f3 | ||
|
|
a61359086b | ||
|
|
ee8a836413 | ||
|
|
3b53b9fcef | ||
|
|
70fc4dcf8c | ||
|
|
e8e77766c4 | ||
|
|
4d221c864b | ||
|
|
55dbe6f4b9 | ||
|
|
1ea745c8a4 | ||
|
|
85c7e8ad25 | ||
|
|
a9e8554f18 | ||
|
|
27ca556182 | ||
|
|
2c96f817d7 | ||
|
|
95c380a5b1 | ||
|
|
ed7507a58e | ||
|
|
c31e218197 | ||
|
|
5ad71c29c2 | ||
|
|
684d419465 | ||
|
|
c7067c7d72 | ||
|
|
f57bd9c353 | ||
|
|
38caffb85d | ||
|
|
6a10291318 | ||
|
|
c7b7e36e10 | ||
|
|
51023c0e6c | ||
|
|
724508e1b0 | ||
|
|
76f5ed7b8f | ||
|
|
76e4c68669 | ||
|
|
25ddb78268 | ||
|
|
804ad7570e | ||
|
|
371277a2a8 | ||
|
|
c8f9403478 | ||
|
|
7d2344b63d | ||
|
|
2acbb60547 | ||
|
|
098254dc82 | ||
|
|
0f810afe90 | ||
|
|
fa66c21a8a | ||
|
|
2b90b7688b | ||
|
|
ca5f27dffc | ||
|
|
6eeafe5a23 | ||
|
|
22d269eda5 | ||
|
|
87ff6bc0ab | ||
|
|
0a74b2494b | ||
|
|
a58bb1e202 | ||
|
|
8c77bf1110 | ||
|
|
35bd58a9d0 | ||
|
|
07474f33f9 | ||
|
|
a4868e8de8 | ||
|
|
19f11ee62e | ||
|
|
c8de7349dc | ||
|
|
410d344b84 | ||
|
|
f8e024f1bb | ||
|
|
06b033e179 | ||
|
|
a432bdeb04 | ||
|
|
d43e108513 | ||
|
|
eeaca66dd5 | ||
|
|
380841b840 | ||
|
|
9d37327993 | ||
|
|
9a1b9f7798 | ||
|
|
3dd168fc8e | ||
|
|
83bfb89d8b | ||
|
|
5d5a03486f | ||
|
|
6103fe96bb | ||
|
|
d3334c7ca8 | ||
|
|
7fc49578ce | ||
|
|
59862bb5ad | ||
|
|
c052edf912 | ||
|
|
79f0c06fa5 | ||
|
|
53f3cffb59 | ||
|
|
c1d8e273fc | ||
|
|
484a9175e7 | ||
|
|
1bb71d9448 | ||
|
|
11ff4a4a6a | ||
|
|
6b3d872fbd | ||
|
|
344b788108 | ||
|
|
b61711280b | ||
|
|
67badb8fcb | ||
|
|
e529ad49cb | ||
|
|
10c19feb0c | ||
|
|
fb0096350c | ||
|
|
1f726e42d3 | ||
|
|
1944aa08f1 |
No files matched your search
@@ -0,0 +1,44 @@
|
||||
* text eol=lf
|
||||
|
||||
*.[jJ][aA][rR] binary
|
||||
|
||||
*.[pP][nN][gG] binary
|
||||
*.[jJ][pP][gG] binary
|
||||
*.[jJ][pP][eE][gG] binary
|
||||
*.[gG][iI][fF] binary
|
||||
*.[tT][iI][fF] binary
|
||||
*.[tT][iI][fF][fF] binary
|
||||
*.[iI][cC][oO] binary
|
||||
*.[sS][vV][gG] text
|
||||
*.[eE][pP][sS] binary
|
||||
*.[xX][cC][fF] binary
|
||||
|
||||
*.[kK][aA][rR] binary
|
||||
*.[mM]4[aA] binary
|
||||
*.[mM][iI][dD] binary
|
||||
*.[mM][iI][dD][iI] binary
|
||||
*.[mM][pP]3 binary
|
||||
*.[oO][gG][gG] binary
|
||||
*.[rR][aA] binary
|
||||
|
||||
*.7[zZ] binary
|
||||
*.[gG][zZ] binary
|
||||
*.[tT][aA][rR] binary
|
||||
*.[tT][gG][zZ] binary
|
||||
*.[zZ][iI][pP] binary
|
||||
|
||||
*.[tT][cC][nN] binary
|
||||
*.[sS][oO] binary
|
||||
*.[dD][lL][lL] binary
|
||||
*.[dD][yY][lL][iI][bB] binary
|
||||
*.[pP][sS][dD] binary
|
||||
*.[tT][tT][fF] binary
|
||||
*.[oO][tT][fF] binary
|
||||
|
||||
*.[pP][aA][tT][cC][hH] -text
|
||||
|
||||
*.[bB][aA][tT] text eol=crlf
|
||||
*.[cC][mM][dD] text eol=crlf
|
||||
*.[pP][sS]1 text eol=crlf
|
||||
|
||||
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
|
||||
@@ -0,0 +1,2 @@
|
||||
patreon: falsepattern
|
||||
ko_fi: falsepattern
|
||||
@@ -5,39 +5,13 @@ labels: ["bug"]
|
||||
assignees:
|
||||
- falsepattern
|
||||
body:
|
||||
# Optional, only for mods that do stuff with rendering/native code
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: OS
|
||||
description: What kind of operating system do you have?
|
||||
options:
|
||||
- Windows
|
||||
- Linux/BSD
|
||||
- MacOS
|
||||
validations:
|
||||
required: true
|
||||
# Optional, only for graphics mods
|
||||
- type: dropdown
|
||||
id: gpu
|
||||
attributes:
|
||||
label: GPU
|
||||
description: What kind of graphics card do you have? If you have multiple, select the one that minecraft uses, you can usually find it somewhere at the top of the crash report.
|
||||
options:
|
||||
- AMD
|
||||
- NVIDIA
|
||||
- Intel
|
||||
validations:
|
||||
required: true
|
||||
# Recommended for precise context
|
||||
- type: input
|
||||
id: modpack
|
||||
attributes:
|
||||
label: Modpack (Optional)
|
||||
description: If you used the mod in a modpack, you should include the pack's exact name and version here to make debugging easier.
|
||||
label: Modpack
|
||||
description: You should include the pack's exact name and version here to make debugging easier.
|
||||
validations:
|
||||
required: false
|
||||
# Essential
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
@@ -45,11 +19,10 @@ body:
|
||||
description: Attach the fml-client-latest.log file here.
|
||||
validations:
|
||||
required: true
|
||||
# Essential
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Describe how and when you experience this bug.
|
||||
validations:
|
||||
required: false
|
||||
required: true
|
||||
@@ -5,7 +5,6 @@ labels: ["compat-request"]
|
||||
assignees:
|
||||
- falsepattern
|
||||
body:
|
||||
# Essential
|
||||
- type: input
|
||||
id: modname
|
||||
attributes:
|
||||
@@ -13,41 +12,20 @@ body:
|
||||
description: The name of the other mod
|
||||
validations:
|
||||
required: true
|
||||
# Essential
|
||||
- type: input
|
||||
id: modurl
|
||||
id: dist
|
||||
attributes:
|
||||
label: Other mod's homepage
|
||||
description: A link to the main site where the other mod is hosted. Preferrably the original website of a mod, but a modrinth/curseforge/whatever page is also acceptable. Do not post a raw download link, those requests will be ignored.
|
||||
label: Other mod's CurseForge/Modrinth/Homepage
|
||||
description: Mods on curseforge/modrinth are the easiest to write compat for. A link to the main site where the other mod is hosted is also fine if it's not on these sites. Do not put just a direct download link here.
|
||||
validations:
|
||||
required: true
|
||||
# Important
|
||||
- type: dropdown
|
||||
id: license
|
||||
attributes:
|
||||
label: Other mod's license
|
||||
description: What license does the other mod have? (Open source mods are easier to write compatibility patches for)
|
||||
options:
|
||||
- AGPLv3
|
||||
- AGPLv2
|
||||
- GPLv3
|
||||
- GPLv2
|
||||
- LGPLv3
|
||||
- LGPLv2
|
||||
- Apache 2.0
|
||||
- Beerware
|
||||
- BSD 3-Clause
|
||||
- BSD 2-Clause
|
||||
- EPL 2.0
|
||||
- MIT
|
||||
- MPL 2.0
|
||||
- Unlicense
|
||||
- WTFPL
|
||||
- Other open source license (please specify in the description)
|
||||
- All Rights Reserved
|
||||
validations:
|
||||
required: true
|
||||
# Recommended
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
@@ -55,24 +33,10 @@ body:
|
||||
description: Attach the fml-client-latest.log file here.
|
||||
validations:
|
||||
required: true
|
||||
# Recommended
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Describe any visual errors that appear, and attach screenshots of them. You can leave this empty if it's a crash without any visible stuff.
|
||||
description: Describe how and when you experience this problem.
|
||||
validations:
|
||||
required: false
|
||||
# Modify this after every added patch
|
||||
# - type: checkboxes
|
||||
# id: existingpatches
|
||||
# attributes:
|
||||
# label: Existing Patches
|
||||
# description: The mods below already have compatibility patches. If you're experiencing issues with those, submit either a crash or a bug report!
|
||||
# options:
|
||||
# - label: This request is not for X
|
||||
# required: true
|
||||
# - label: This request is not for Y
|
||||
# required: true
|
||||
# - label: This request is not for Z
|
||||
# required: true
|
||||
required: true
|
||||
@@ -1,27 +0,0 @@
|
||||
if [[ -d "run/crash-reports" ]]; then
|
||||
echo "Crash reports detected:"
|
||||
cat $directory/*
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "Fatal errors were detected" server.log; then
|
||||
echo "Fatal errors detected:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" server.log; then
|
||||
echo "Server force stopped:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then
|
||||
echo "Server didn't finish startup:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "No crash reports detected"
|
||||
exit 0
|
||||
|
||||
@@ -1,45 +1,17 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Run server for 1.5 minutes
|
||||
run: |
|
||||
mkdir -p run
|
||||
echo "eula=true" > run/eula.txt
|
||||
timeout 90 ./gradlew runServer | tee --append server.log || true
|
||||
|
||||
- name: Test no errors reported during server run
|
||||
run: |
|
||||
chmod +x .github/scripts/test-no-error-reports.sh
|
||||
.github/scripts/test-no-error-reports.sh
|
||||
uses: FalsePattern/fpgradle-workflows/.github/workflows/build-and-test.yml@master
|
||||
with:
|
||||
timeout: 90
|
||||
workspace: setupCIWorkspace
|
||||
client-only: false
|
||||
@@ -1,50 +1,21 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Release tagged build
|
||||
name: Release Tags
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
release-tags:
|
||||
uses: FalsePattern/fpgradle-workflows/.github/workflows/release-tags.yml@master
|
||||
with:
|
||||
workspace: "setupCIWorkspace"
|
||||
secrets:
|
||||
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
|
||||
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
|
||||
- name: Set release version
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Publish to Maven, Modrinth, and CurseForge
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
|
||||
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
|
||||
- name: Release under current tag
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
|
||||
prerelease: false
|
||||
title: "${{ env.RELEASE_VERSION }}"
|
||||
files: build/libs/*.jar
|
||||
+147
-13
@@ -1,6 +1,122 @@
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/java,scala,gradle,kotlin,forgegradle,intellij+all,eclipse,emacs
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=java,scala,gradle,kotlin,forgegradle,intellij+all,eclipse,emacs
|
||||
|
||||
### Eclipse ###
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
### Eclipse Patch ###
|
||||
# Spring Boot Tooling
|
||||
.sts4-cache/
|
||||
|
||||
### Emacs ###
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,gradle,forgegradle,java
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all,gradle,forgegradle,java
|
||||
|
||||
### ForgeGradle ###
|
||||
# Minecraft client/server files
|
||||
@@ -40,14 +156,14 @@ run/
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
.idea/artifacts
|
||||
.idea/compiler.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/modules.xml
|
||||
.idea/*.iml
|
||||
.idea/modules
|
||||
*.iml
|
||||
*.ipr
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
@@ -120,6 +236,23 @@ fabric.properties
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
### Kotlin ###
|
||||
# Compiled class file
|
||||
|
||||
# Log file
|
||||
|
||||
# BlueJ files
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
|
||||
# Package Files #
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
|
||||
### Scala ###
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
**/build/
|
||||
@@ -143,7 +276,8 @@ gradle-app.setting
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/intellij+all,gradle,forgegradle,java
|
||||
!lib/*.jar
|
||||
### Gradle Patch ###
|
||||
# Java heap dump
|
||||
*.hprof
|
||||
|
||||
srgmap.cfg
|
||||
# End of https://www.toptal.com/developers/gitignore/api/java,scala,gradle,kotlin,forgegradle,intellij+all,eclipse,emacs
|
||||
Generated
+4
@@ -11,6 +11,7 @@
|
||||
</option>
|
||||
<option name="IMPORT_LAYOUT_TABLE">
|
||||
<value>
|
||||
<package name="" withSubpackages="true" static="false" module="true" />
|
||||
<package name="" withSubpackages="true" static="false" />
|
||||
<emptyLine />
|
||||
<package name="net.minecraft" withSubpackages="true" static="false" />
|
||||
@@ -29,6 +30,9 @@
|
||||
<JetCodeStyleSettings>
|
||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||
</JetCodeStyleSettings>
|
||||
<ScalaCodeStyleSettings>
|
||||
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
|
||||
</ScalaCodeStyleSettings>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="KEEP_LINE_BREAKS" value="false" />
|
||||
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
|
||||
|
||||
Generated
+6
@@ -0,0 +1,6 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="EndlessIDs Copyright (C) 2022-2026 FalsePattern, The MEGA Team All Rights Reserved The above copyright notice, this permission notice and the word "MEGA" shall be included in all copies or substantial portions of the Software. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, only version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <https://www.gnu.org/licenses/>." />
|
||||
<option name="myName" value="LGPL" />
|
||||
</copyright>
|
||||
</component>
|
||||
Generated
+3
@@ -0,0 +1,3 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="LGPL" />
|
||||
</component>
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -1,5 +1,6 @@
|
||||
The code is a rewrite of NotEnoughIDs, created by fewizz and Player,
|
||||
which was released under the MIT license on CurseForge at https://www.curseforge.com/minecraft/mc-mods/notenoughids
|
||||
The code is originally based on NotEnoughIDs, created by fewizz and Player,
|
||||
which was released under the MIT license on CurseForge at
|
||||
https://www.curseforge.com/minecraft/mc-mods/notenoughids
|
||||
|
||||
Original License text of NotEnoughIDs:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@@ -18,4 +19,12 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
THE SOFTWARE.
|
||||
------------------------------------------------------------------------------
|
||||
Some patches have been adapted from the GTNH fork of NotEnoughIDs,
|
||||
its license is as follows:
|
||||
|
||||
GTNH modifications Copyright (c) 2021-2022 The GTNH Team
|
||||
|
||||
This code is licensed LGPL v3.0 or later. Feel free to use our changes,
|
||||
just give back any changes you make to the community as well!
|
||||
@@ -1,861 +1,19 @@
|
||||
EndlessIDs
|
||||
|
||||
Copyright (C) 2022 FalsePattern
|
||||
Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
All Rights Reserved
|
||||
|
||||
The above copyright notice, this permission notice and the words "MEGA"
|
||||
The above copyright notice, this permission notice and the word "MEGA"
|
||||
shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
the Free Software Foundation, only version 3 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-------------------------------------------------------------------------------
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
-------------------------------------------------------------------------------
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
@@ -1,21 +1,69 @@
|
||||
# EndlessIDs <img src="src/main/resources/endlessids.png" align="right" width=150>
|
||||
|
||||
<sup>**[CurseForge](https://www.curseforge.com/minecraft/mc-mods/endlessids) | [Modrinth](https://modrinth.com/mod/endlessids)**</sup>
|
||||
|
||||
EndlessIDs is the unofficial successor of NotEnoughIDs, with more focus on compatibility, stability, and reaching
|
||||
new limits.
|
||||
|
||||
Comparison of the known limits:
|
||||
## REQUIRED MODS
|
||||
- [FalsePatternLib](https://github.com/FalsePattern/FalsePatternLib)
|
||||
- [UniMixins](https://github.com/LegacyModdingMC/UniMixins)
|
||||
- [ChunkAPI](https://github.com/FalsePattern/ChunkAPI)
|
||||
|
||||
| | Vanilla | NotEnoughIDs | EndlessIDs |
|
||||
|-----------------|----------------------------------------------------|--------------|----------------------------------|
|
||||
| Block IDs | 4,096 | 32,000 | 16,777,216 since 1.3 |
|
||||
| Block Metadata | 16 | 16 | 65,536 since 1.5 |
|
||||
| Item IDs | 32,000 | 32,000 | 16,777,216 since 1.3 |
|
||||
| Biome IDs | 256 | 256 | 65,536 since 1.4 |
|
||||
| Entity IDs | 256 | 256 | 256 right now, extension planned |
|
||||
| Potion IDs | 32 | 32 | 65,536 since 1.5 |
|
||||
| Enchantment IDs | 256 | 256 | 32,768 since 1.5 |
|
||||
| Dimension IDs | Theoretically unlimited, 4,294,967,295 in practice | Same | Same |
|
||||
## NotEnoughIDs world compatibility
|
||||
EndlessIDs can open and upgrade worlds created with NotEnoughIDs without any problems (both the original and the Unofficial version).
|
||||
If you notice any problems when opening NEID worlds with EndlessIDs, please open an issue!
|
||||
|
||||
## Comparison of the known limits
|
||||
|
||||
| | Vanilla | NotEnoughIDs | NEID Unofficial | EndlessIDs |
|
||||
|-----------------|----------------------------------------------------|--------------|-----------------|------------|
|
||||
| Block IDs | 4,096 | 32,000 | 65,536 | 16,777,216 |
|
||||
| Block Metadata | 16 | 16 | 65,536 | 65,536 |
|
||||
| Item IDs | 32,000 | 32,000 | 65,536 | 16,777,216 |
|
||||
| Biome IDs | 256 | 256 | 256 | 65,536 |
|
||||
| Entity IDs | 256 | 256 | 256 | 32,768 |
|
||||
| Potion IDs | 32 | 32 | 32 | 65,536 |
|
||||
| Enchantment IDs | 256 | 256 | 256 | 32,768 |
|
||||
| DataWatcher IDs | 32 | 127 (Broken) | 127 (Broken) | 65,536 |
|
||||
| Dimension IDs | Theoretically unlimited, 4,294,967,295 in practice | Same | Same | Same |
|
||||
|
||||
## A note about biomes
|
||||
|
||||
Minecraft has a system known as "Biome Mutations", where a biome can have modified versions of itself at (id + 128).
|
||||
Older versions of EndlessIDs used to have a system for this called the "conflict avoidance system", where it would temporarily
|
||||
register placeholder biomes at these offsets to avoid conflicts.
|
||||
|
||||
This system has been disabled by default as it was causing weird biome registration problems, so if you want to use this
|
||||
mod, we HIGHLY recommend also installing `AntiIDConflict`.
|
||||
|
||||
## Implementing extended metadatas
|
||||
|
||||
The block/item ID extension module also extends block metadatas. This allows you to use 16-bit metadata, however, you MUST
|
||||
avoid the value of `32767`/`0x7FFF`/`0b0111_1111_1111_1111` for blocks that can be picked up as items, because forge treats
|
||||
metadata `32767` as the OreDictionary wildcard value.
|
||||
|
||||
Using this specific metadata value in the world is fine if you convert it into item NBT or similar when the block is broken for pick-up.
|
||||
|
||||
## Strict No LLM / No AI Policy
|
||||
|
||||
No LLMs for issues.
|
||||
|
||||
No LLMs for patches / pull requests.
|
||||
|
||||
No LLMs for comments on the bug tracker, including translation.
|
||||
|
||||
English is encouraged, but not required. You are welcome to post in your native
|
||||
language and rely on others to have their own translation tools of choice to
|
||||
interpret your words.
|
||||
|
||||
## Mod compat
|
||||
|
||||
This mod also contains patches for the following mods:
|
||||
|
||||
<details>
|
||||
<summary>Mod list</summary>
|
||||
|
||||
- AbyssalCraft
|
||||
- Advanced Rocketry
|
||||
- Alternate Terrain Generation
|
||||
@@ -25,8 +73,10 @@ This mod also contains patches for the following mods:
|
||||
- Atum
|
||||
- Biomes O' Plenty
|
||||
- Biome Wand
|
||||
- BlockPhysics
|
||||
- BuildCraft
|
||||
- ChromatiCraft
|
||||
- Climate Control
|
||||
- Compact Machines
|
||||
- CoFH Lib
|
||||
- Dark World
|
||||
@@ -36,28 +86,44 @@ This mod also contains patches for the following mods:
|
||||
- Enderlicious
|
||||
- Enhanced Biomes
|
||||
- Erebus
|
||||
- Extended Planets
|
||||
- Extra Planets
|
||||
- Extra Utilities
|
||||
- Factorization
|
||||
- FastCraft
|
||||
- Futurepack
|
||||
- Gadomancy
|
||||
- GalactiCraft
|
||||
- Highlands
|
||||
- Immersive Cavegen
|
||||
- Industrial Revolution by Redstone Rebooted
|
||||
- Just Another Spawner
|
||||
- Matter Overdrive
|
||||
- More Fun Quicksand Mod
|
||||
- Mystcraft
|
||||
- Nature's Compass
|
||||
- Netherlicious
|
||||
- Nomadic Tents
|
||||
- Nostalgic World Generation
|
||||
- Old World Gen
|
||||
- Random Things
|
||||
- Restructured
|
||||
- Realistic Terrain Generation
|
||||
- Realistic World Generation
|
||||
- Ruins
|
||||
- Thaumcraft
|
||||
- The Lord of the Rings Mod: Legacy
|
||||
- The Mists of RioV
|
||||
- ThutCore/ThutMods
|
||||
- Tropicraft
|
||||
- Twilight Forest
|
||||
- Underground Biomes Constructs
|
||||
- Witchery
|
||||
- WorldEdit
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
Mods not listed here may or may not work.
|
||||
|
||||
- For item/block IDs:
|
||||
@@ -70,8 +136,3 @@ Mods not listed here may or may not work.
|
||||
user to this GitHub repo.
|
||||
|
||||
If you find any crashes or incompatibilities, don't hesitate to open an issue.
|
||||
|
||||
## Dependencies
|
||||
- [FalsePatternLib](https://github.com/FalsePattern/FalsePatternLib)
|
||||
- [GasStation](https://github.com/FalsePattern/GasStation)
|
||||
- [ChunkAPI](https://github.com/FalsePattern/ChunkAPI) (since 1.5-alpha0006. Incompatible with ChunkAPI in previous versions.)
|
||||
-1151
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,267 @@
|
||||
plugins {
|
||||
id("com.falsepattern.fpgradle-mc") version ("4.0.2")
|
||||
}
|
||||
|
||||
group = "com.falsepattern"
|
||||
|
||||
minecraft_fp {
|
||||
mod {
|
||||
modid = "endlessids"
|
||||
name = "EndlessIDs"
|
||||
rootPkg = "$group.endlessids"
|
||||
}
|
||||
|
||||
mixin {
|
||||
pkg = "mixin.mixins"
|
||||
}
|
||||
|
||||
core {
|
||||
coreModClass = "asm.EndlessIDsCore"
|
||||
accessTransformerFile = "endlessids_at.cfg"
|
||||
}
|
||||
|
||||
tokens {
|
||||
tokenClass = "Tags"
|
||||
modid = "MODID"
|
||||
name = "MODNAME"
|
||||
version = "VERSION"
|
||||
rootPkg = "GROUPNAME"
|
||||
}
|
||||
|
||||
publish {
|
||||
changelog = "https://github.com/GTMEGA/EndlessIDs/releases/tag/$version"
|
||||
maven {
|
||||
repoUrl = "https://mvn.falsepattern.com/releases/"
|
||||
repoName = "mavenpattern"
|
||||
}
|
||||
curseforge {
|
||||
projectId = "665730"
|
||||
dependencies {
|
||||
required("fplib")
|
||||
required("chunkapi")
|
||||
incompatible("notenoughids-unofficial-1-7-10")
|
||||
incompatible("notenoughids")
|
||||
}
|
||||
}
|
||||
modrinth {
|
||||
projectId = "qGHY4QGo"
|
||||
dependencies {
|
||||
required("fplib")
|
||||
required("chunkapi")
|
||||
incompatible("notenoughids-unofficial")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
cursemavenEX()
|
||||
modrinthEX()
|
||||
exclusive(mavenpattern(), "com.falsepattern")
|
||||
exclusive(ivy("mavenpattern_mirror", "https://mvn.falsepattern.com/releases/mirror/", "[orgPath]/[artifact]-[revision].[ext]"), "mirror", "mirror.micdoodle")
|
||||
exclusive(ivy("github", "https://github.com/", "[orgPath]/releases/download/[revision]/[artifact]-[revision].[ext]"), "CannibalVox.DimDoors")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// region Our deps
|
||||
implementationSplit("com.falsepattern:falsepatternlib-mc1.7.10:1.12.0")
|
||||
compileOnly("it.unimi.dsi:fastutil:8.5.16")
|
||||
implementationSplit("com.falsepattern:chunkapi-mc1.7.10:0.8.0")
|
||||
// endregion
|
||||
|
||||
// region maintained mods
|
||||
|
||||
//DragonAPI V33b
|
||||
compileOnly(deobfCurse("dragonapi-235591:4722480"))
|
||||
|
||||
//Immersive Cavegen 1.2g hotfix5
|
||||
compileOnly(deobfCurse("immersivecavegen-521557:4723376"))
|
||||
|
||||
//Hbm's Nuclear Tech Mod 1.0.27X5188
|
||||
compileOnly(deobfCurse("hbm-ntm-235439:6017897"))
|
||||
|
||||
//Salis Arcana 2.3.0
|
||||
compileOnly(deobfCurse("salis-arcana-1162488:7016994"))
|
||||
|
||||
// endregion
|
||||
|
||||
// region unmaintained mods
|
||||
|
||||
//AbyssalCraft 1.9.1.3-FINAL
|
||||
compileOnly(deobfCurse("abyssalcraft-53686:2311135"))
|
||||
|
||||
//Advanced Rocketry 1.4.0-32
|
||||
compileOnly(deobfCurse("advancedrocketry-236542:2985057"))
|
||||
|
||||
//Alternate Terrain Generation 0.12.0
|
||||
compileOnly(deobfCurse("atg-228356:2231155"))
|
||||
|
||||
//Antique Atlas 4.4.4
|
||||
compileOnly(deobfCurse("antiqueatlas-227795:2454232"))
|
||||
|
||||
//Anti ID Conflict 1.3.5
|
||||
compileOnly(deobfCurse("antiidconflict-246288:2308279"))
|
||||
|
||||
//Atum 0.6.77
|
||||
compileOnly(deobfCurse("atum-59621:2256356"))
|
||||
|
||||
//Biomes O' Plenty 2.1.0.2308
|
||||
compileOnly(deobfCurse("biomesoplenty-220318:2499612"))
|
||||
|
||||
//Biome Tweaker 2.0.182
|
||||
compileOnly(deobfCurse("biometweaker-228895:2279911"))
|
||||
|
||||
//Biome Wand 1.1.9
|
||||
//Source: https://spacechase0.com/wp-content/uploads/2014/10/1.7.10-Biome-Wand-1.1.9.jar
|
||||
compileOnly(deobf("mirror:1.7.10-Biome-Wand:1.1.9"))
|
||||
|
||||
//Block Physics 0.9.5
|
||||
compileOnly(deobfCurse("blockphysics-229921:2259034"))
|
||||
|
||||
//Buildcraft 7.1.24
|
||||
compileOnly(deobfCurse("buildcraft-61811:3538651"))
|
||||
|
||||
//Climate Control 0.8.2
|
||||
compileOnly(deobfCurse("climatecontrol-76544:2359685"))
|
||||
|
||||
//CoFH Lib 1.2.1-185
|
||||
compileOnly(deobfCurse("cofh-lib-220333:2388748"))
|
||||
|
||||
//CompactMachines 1.21
|
||||
compileOnly(deobfCurse("compactmachines-224218:2268575"))
|
||||
|
||||
//Dark World 0.2
|
||||
compileOnly(deobfCurse("darkworld-225075:2225172"))
|
||||
|
||||
//DimDoors 2.2.5-test9
|
||||
//Source: https://github.com/CannibalVox/DimDoors/releases/download/2.2.5-test9/DimensionalDoors-2.2.5-test9.jar
|
||||
compileOnly(deobf("CannibalVox.DimDoors:DimensionalDoors:2.2.5-test9"))
|
||||
|
||||
//Dynamic Surroundings 1.0.6.4
|
||||
compileOnly(deobfCurse("dynamicsurrounding-238891:2642381"))
|
||||
|
||||
//Enderlicious 1.1.2
|
||||
compileOnly(deobfCurse("enderlicious-508777:3504111"))
|
||||
|
||||
//Enhanced Biomes 2.5
|
||||
compileOnly(deobf("mirror:enhancedbiomes:2.5"))
|
||||
|
||||
//Erebus 0.4.7
|
||||
compileOnly(deobfCurse("theerebus-220698:2305035"))
|
||||
|
||||
//Extended Planets 0.4.2
|
||||
//Source: https://www.mcmod.cn/class/1301.html
|
||||
compileOnly(deobf("mirror:ExtendedPlanets:0.4.2"))
|
||||
|
||||
//Extra Planets 2.1.4
|
||||
compileOnly(deobfCurse("extraplanets-241291:3214413"))
|
||||
|
||||
//Extra Utilities 1.2.12
|
||||
compileOnly(deobfCurse("extrautilities-225561:2264384"))
|
||||
|
||||
//Factorization 0.8.109
|
||||
compileOnly(deobfModrinth("factorization:0.8.109"))
|
||||
|
||||
//Fastcraft 1.23
|
||||
compileOnly("curse.maven:fastcraft-242677:2292386")
|
||||
|
||||
//Futurepack v18.7
|
||||
compileOnly(deobfCurse("futurepack-237333:2263966"))
|
||||
|
||||
//Gadomancy 1.0.7.3
|
||||
compileOnly(deobfCurse("gadomancy-237271:2338768"))
|
||||
|
||||
//Galacticraft Core 3.0.12.504
|
||||
//micdoodle8.com went down
|
||||
compileOnly(deobf("mirror.micdoodle:GalacticraftCore:1.7-3.0.12.504"))
|
||||
|
||||
//Galacticraft Planets 3.0.12.504
|
||||
compileOnly(deobf("mirror.micdoodle:Galacticraft-Planets:1.7-3.0.12.504"))
|
||||
|
||||
//Highlands 2.2.3
|
||||
compileOnly(deobfCurse("highlands-221226:2227924"))
|
||||
|
||||
//Industrial Revolution by Redstone Rebooted 1.1.1
|
||||
compileOnly(deobfCurse("industrialrevolutionbyredstonerebooted-241812:2538035"))
|
||||
|
||||
//Just Another Spawner 0.17.9
|
||||
compileOnly(deobfCurse("justanotherspawner-228952:2380961"))
|
||||
|
||||
//LOTR Mod 36.15
|
||||
compileOnly(deobfCurse("lotrmod-423748:4091561"))
|
||||
|
||||
//Matter Overdrive 0.4.2-hotfix1
|
||||
compileOnly(deobfCurse("matteroverdrive-229694:2331162"))
|
||||
|
||||
//More Fun Quicksands Mod 1.0.8.8-fixed
|
||||
compileOnly(deobfCurse("more-fun-quicksand-mod-321960:2717318"))
|
||||
|
||||
//Mystcraft 0.12.3.04
|
||||
compileOnly(deobfCurse("mystcraft-224599:2417042"))
|
||||
|
||||
//Nature's Compass 1.3.1
|
||||
compileOnly(deobfCurse("naturescompass-252848:2451823"))
|
||||
|
||||
//Netherlicious 3.2.8
|
||||
compileOnly(deobfCurse("netherlicious-385860:4363437"))
|
||||
|
||||
//Nomadic Tents 1.12.1
|
||||
compileOnly(deobfCurse("nomadictents-238794:2679476"))
|
||||
|
||||
//Nostalgic World Generation 1.0.0
|
||||
compileOnly(deobfCurse("nostalgiagenerator-927053:4816167"))
|
||||
|
||||
//Personal Space 1.0.33
|
||||
compileOnly(deobfCurse("PersonalSpace-819596:6536785"))
|
||||
|
||||
//RandomThings 2.2.4
|
||||
compileOnly(deobfCurse("randomthings-59816:2225310"))
|
||||
|
||||
//Realistic Terrain Generation 1.1.1.7
|
||||
compileOnly(deobfCurse("rtg-237989:2521557"))
|
||||
|
||||
//Restructured 1.0.4.2
|
||||
compileOnly(deobfCurse("restructured-230570:2276784"))
|
||||
|
||||
//Ruins (AtomicStryker) 15.4 nbtfix
|
||||
compileOnly(deobf("mirror:Ruins:1.7.10"))
|
||||
|
||||
//TARDIS Mod 0.995
|
||||
compileOnly(deobfCurse("tardismod-230170:2305503"))
|
||||
|
||||
//Thaumcraft 4.2.3.5
|
||||
compileOnly(deobfCurse("thaumcraft-223628:2227552"))
|
||||
|
||||
//The Mists of RioV 2.5.2
|
||||
compileOnly(deobfCurse("the-mists-of-riov-222477:2389797"))
|
||||
|
||||
//ThutCore 2.0
|
||||
//Only available on dropbox
|
||||
compileOnly(deobf("mirror:thutcore:2.0"))
|
||||
|
||||
//Tropicraft 6.0.5
|
||||
//This is from a mirror file, because the file on curseforge is a zip containing other files too.
|
||||
//Source: https://www.curseforge.com/minecraft/mc-mods/tropicraft/files/2353906
|
||||
compileOnly(deobf("mirror:tropicraft:6.0.5"))
|
||||
|
||||
//Twilight Forest 2.3.8
|
||||
compileOnly(deobfCurse("twilightforest-227639:3039937"))
|
||||
|
||||
//Underground Biomes Constructs 0.8-beta49
|
||||
compileOnly(deobfCurse("undergroundbiomesconstructs-72744:2304497"))
|
||||
|
||||
//Witchery 0.24.1
|
||||
compileOnly(deobfCurse("witchery-69673:2234410"))
|
||||
|
||||
//WorldEdit 6.1.1
|
||||
compileOnly(deobfCurse("worldedit-225608:2309699"))
|
||||
|
||||
// endregion
|
||||
|
||||
////////////////Dependencies for patched mods////////////////
|
||||
|
||||
//SpaceCore 0.7.14
|
||||
//needed by: Biome Wand
|
||||
//Source: http://spacechase0.com/files/mcmod/1.7.10-SpaceCore-0.7.14.jar
|
||||
compileOnly(deobf("mirror:1.7.10-SpaceCore:0.7.14"))
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
//file:noinspection DependencyNotationArgument
|
||||
static def curse(curseDep) {
|
||||
return "curse.maven:" + curseDep
|
||||
}
|
||||
|
||||
def deobfCurse(curseDep) {
|
||||
try {
|
||||
return deobfMaven("https://cursemaven.com/", curse(curseDep))
|
||||
} catch (Exception ignored) {
|
||||
println("Failed to get dep " + curseDep + " from cursemaven. Grabbing from mirror.")
|
||||
return deobfMaven("https://mvn.falsepattern.com/cursemaven/", curse(curseDep))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
////////////////Our dependencies////////////////
|
||||
|
||||
compileOnly("org.projectlombok:lombok:[1.18, 1.19)") {
|
||||
transitive = false
|
||||
}
|
||||
annotationProcessor("org.projectlombok:lombok:[1.18, 1.19)")
|
||||
|
||||
implementation("com.falsepattern:falsepatternlib-mc1.7.10:0.10.15:dev")
|
||||
|
||||
implementation("com.falsepattern:chunkapi-mc1.7.10:0.1.1:dev")
|
||||
|
||||
////////////////Patched mods////////////////
|
||||
|
||||
//AbyssalCraft 1.9.1.3-FINAL
|
||||
compileOnly(deobfCurse("abyssalcraft-53686:2311135"))
|
||||
|
||||
//Advanced Rocketry
|
||||
compileOnly(deobfCurse("advancedrocketry-236542:2985057"))
|
||||
|
||||
//Alternate Terrain Generation 0.12.0
|
||||
compileOnly(deobfCurse("atg-228356:2231155"))
|
||||
|
||||
//Antique Atlas 4.4.4
|
||||
compileOnly(deobfCurse("antiqueatlas-227795:2454232"))
|
||||
|
||||
//Anti ID Conflict 1.3.5
|
||||
compileOnly(deobfCurse("antiidconflict-246288:2308279"))
|
||||
|
||||
// //ArchaicFix 0.2.0
|
||||
// compileOnly("com.github.embeddedt:ArchaicFix:0.2.0:dev")
|
||||
|
||||
//Atum 0.6.77
|
||||
compileOnly(deobfCurse("atum-59621:2256356"))
|
||||
|
||||
//Biomes O' Plenty 2.1.0.2308
|
||||
compileOnly(deobfCurse("biomesoplenty-220318:2499612"))
|
||||
|
||||
//Biome Tweaker 2.0.182
|
||||
compileOnly(deobfCurse("biometweaker-228895:2279911"))
|
||||
|
||||
//Biome Wand 1.1.9
|
||||
//Mirrored at: https://maven.falsepattern.com/releases/mirror/mirror/1.7.10-Biome-Wand-1.1.9.jar
|
||||
compileOnly(deobf("https://spacechase0.com/wp-content/uploads/2014/10/1.7.10-Biome-Wand-1.1.9.jar"))
|
||||
|
||||
//Buildcraft 7.1.24
|
||||
compileOnly(deobfCurse("buildcraft-61811:3538651"))
|
||||
|
||||
//CoFH Lib 1.2.1-185
|
||||
compileOnly(deobfCurse("cofh-lib-220333:2388748"))
|
||||
|
||||
//CompactMachines 1.21
|
||||
compileOnly(deobfCurse("compactmachines-224218:2268575"))
|
||||
|
||||
//Dark World 0.2
|
||||
compileOnly(deobfCurse("darkworld-225075:2225172"))
|
||||
|
||||
//DimDoors 2.2.5-test9
|
||||
compileOnly(deobf("https://github.com/CannibalVox/DimDoors/releases/download/2.2.5-test9/DimensionalDoors-2.2.5-test9.jar"))
|
||||
|
||||
//DragonAPI V31b
|
||||
compileOnly(deobfCurse("dragonapi-235591:3574508"))
|
||||
|
||||
//Dynamic Surroundings 1.0.6.4
|
||||
compileOnly(deobfCurse("dynamicsurrounding-238891:2642381"))
|
||||
|
||||
//Enderlicious 1.1.2
|
||||
compileOnly(deobfCurse("enderlicious-508777:3504111"))
|
||||
|
||||
//Enhanced Biomes 2.5
|
||||
compileOnly(deobf("https://mvn.falsepattern.com/releases/mirror/mirror/enhancedbiomes-2.5.jar"))
|
||||
|
||||
//Erebus 0.4.7
|
||||
compileOnly(deobfCurse("theerebus-220698:2305035"))
|
||||
|
||||
//Extra Planets 2.1.4
|
||||
compileOnly(deobfCurse("extraplanets-241291:3214413"))
|
||||
|
||||
//Extra Utilities 1.2.12
|
||||
compileOnly(deobfCurse("extrautilities-225561:2264384"))
|
||||
|
||||
//Futurepack v18.7
|
||||
compileOnly(deobfCurse("futurepack-237333:2263966"))
|
||||
|
||||
//Galacticraft Core 3.0.12.504
|
||||
//micdoodle8.com went down
|
||||
compileOnly(deobf("https://mvn.falsepattern.com/releases/mirror/mirror/micdoodle/GalacticraftCore-1.7-3.0.12.504.jar"))
|
||||
|
||||
//Galacticraft Planets 3.0.12.504
|
||||
compileOnly(deobf("https://mvn.falsepattern.com/releases/mirror/mirror/micdoodle/Galacticraft-Planets-1.7-3.0.12.504.jar"))
|
||||
|
||||
//Highlands 2.2.3
|
||||
compileOnly(deobfCurse("highlands-221226:2227924"))
|
||||
|
||||
//Immersive Cavegen 1.2g
|
||||
compileOnly(deobfCurse("immersivecavegen-521557:3649411"))
|
||||
|
||||
//Industrial Revolution by Redstone Rebooted 1.1.1
|
||||
compileOnly(deobfCurse("industrialrevolutionbyredstonerebooted-241812:2538035"))
|
||||
|
||||
//LOTR Mod 36.14
|
||||
compileOnly(deobfCurse("lotrmod-423748:3646430"))
|
||||
|
||||
//More Fun Quicksands Mod 1.0.8.8-fixed
|
||||
compileOnly(deobfCurse("more-fun-quicksand-mod-321960:2717318"))
|
||||
|
||||
//Nature's Compass 1.3.1
|
||||
compileOnly(deobfCurse("naturescompass-252848:2451823"))
|
||||
|
||||
//Netherlicious 3.2.3
|
||||
compileOnly(deobfCurse("netherlicious-385860:3858031"))
|
||||
|
||||
//Nomadic Tents 1.12.1
|
||||
compileOnly(deobfCurse("nomadictents-238794:2679476"))
|
||||
|
||||
//RandomThings 2.2.4
|
||||
compileOnly(deobfCurse("randomthings-59816:2225310"))
|
||||
|
||||
//Realistic Terrain Generation 1.1.1.7
|
||||
compileOnly(deobfCurse("rtg-237989:2521557"))
|
||||
|
||||
//Restructured 1.0.4.2
|
||||
compileOnly(deobfCurse("restructured-230570:2276784"))
|
||||
|
||||
//Thaumcraft 4.2.3.5
|
||||
compileOnly(deobfCurse("thaumcraft-223628:2227552"))
|
||||
|
||||
//Tropicraft 6.0.5
|
||||
//This is from a mirror file, because the file on curseforge is a zip containing other files too.
|
||||
//Source: https://www.curseforge.com/minecraft/mc-mods/tropicraft/files/2353906
|
||||
compileOnly(deobf("https://mvn.falsepattern.com/releases/mirror/mirror/tropicraft-6.0.5.jar"))
|
||||
|
||||
//Twilight Forest 2.3.8
|
||||
compileOnly(deobfCurse("twilightforest-227639:3039937"))
|
||||
|
||||
//Underground Biomes Constructs 0.8-beta49
|
||||
compileOnly(deobfCurse("undergroundbiomesconstructs-72744:2304497"))
|
||||
|
||||
//Witchery 0.24.1
|
||||
compileOnly(deobfCurse("witchery-69673:2234410"))
|
||||
|
||||
//WorldEdit 6.1.1
|
||||
compileOnly(deobfCurse("worldedit-225608:2309699"))
|
||||
|
||||
////////////////Dependencies for patched mods////////////////
|
||||
|
||||
//SpaceCore 0.7.14
|
||||
//needed by: Biome Wand
|
||||
//Mirrored at: https://maven.falsepattern.com/releases/mirror/mirror/1.7.10-SpaceCore-0.7.14.jar
|
||||
compileOnly(deobf("http://spacechase0.com/files/mcmod/1.7.10-SpaceCore-0.7.14.jar"))
|
||||
}
|
||||
+2
-203
@@ -1,203 +1,2 @@
|
||||
# Mod settings
|
||||
#region mod
|
||||
|
||||
modName = EndlessIDs
|
||||
|
||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
||||
modId = endlessids
|
||||
|
||||
# The "root package" of your mod. All of your mod classes *should* be placed under this package for simplicity.
|
||||
modGroup = com.falsepattern.endlessids
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
|
||||
apiPackage =
|
||||
|
||||
# WHY is there no version field?
|
||||
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
|
||||
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
|
||||
# However, if you really want to, you can use the VERSION environment variable to override this.
|
||||
|
||||
minecraftVersion = 1.7.10
|
||||
forgeVersion = 10.13.4.1614
|
||||
|
||||
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
|
||||
# restart Minecraft in development. Choose this dependent on your mod:
|
||||
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
|
||||
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
#endregion mod
|
||||
|
||||
# Publishing settings
|
||||
#region publishing
|
||||
|
||||
# Note: Both the modrinth and the curseforge publications are invoked by the "publish" gradle task
|
||||
# (when the respective publication's project ID is set up correctly, of course). You don't need to individually run
|
||||
# each of them.
|
||||
|
||||
# Maven publishing
|
||||
#region maven
|
||||
|
||||
# The maven server to upload the artifacts to
|
||||
repositoryURL = https://mvn.falsepattern.com/releases
|
||||
|
||||
# What name is the login information inside ~/.m2/settings.xml stored under
|
||||
# (see https://gist.github.com/FalsePattern/82d93e3cfab01f671cc5f4a95931cfe3 for an example)
|
||||
# You can also use the MAVEN_DEPLOY_USER and MAVEN_DEPLOY_PASSWORD environment variables to set this information!
|
||||
repositoryName = mavenpattern
|
||||
|
||||
# What the artifact should be called. These will be the "name" of the published package, suffixed with the minecraft
|
||||
# version with a -mc prefix (groupid:artifactid-mcminecraftVersion:version:qualifier).
|
||||
# For instance, the default values this example ships with would turn into com.myname:mymodid-mc1.7.10:version
|
||||
# The version is determined automatically from the git version.
|
||||
mavenGroupId = com.falsepattern
|
||||
mavenArtifactId = endlessids
|
||||
|
||||
#endregion maven
|
||||
|
||||
# Modrinth publishing
|
||||
#region modrinth
|
||||
|
||||
# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
|
||||
|
||||
# The project's ID on Modrinth. Can be either the slug or the ID.
|
||||
# Leave this empty if you don't want to publish on Modrinth.
|
||||
modrinthProjectId = qGHY4QGo
|
||||
|
||||
# The project's dependencies on Modrinth. You can use this to refer to other projects on Modrinth.
|
||||
# Syntax: scope1-type1:name1;scope2-type2:name2;...
|
||||
# Where scope can be one of [required, optional, incompatible, embedded],
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:spongemixin1710;incompatible-project:gregtech
|
||||
modrinthDependencies = required-project:fplib;required-project:chunkapi
|
||||
|
||||
#endregion modrinth
|
||||
|
||||
# CurseForge publishing
|
||||
#region curseforge
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
# The project's numeric ID on CurseForge. You can find this in the About Project box.
|
||||
# Leave this empty if you don't want to publish on CurseForge.
|
||||
curseForgeProjectId = 665730
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||
# and the name is the CurseForge project id of the other mod.
|
||||
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||
curseForgeRelations = requiredDependency:fplib;requiredDependency:chunkapi
|
||||
|
||||
#endregion curseforge
|
||||
|
||||
# This will be inserted as the changelog text in the Modrinth/CurseForge publications.
|
||||
# If the text contains "{version}", it will be replaced with the current mod version. This is useful when the changelog
|
||||
# is just a URL pointing to a GitHub release tag.
|
||||
# If left empty, the changelog text will be set to "No changelog URL was provided."
|
||||
# Example: https://github.com/myname/mymod/releases/tag/{version}
|
||||
changelog = https://github.com/FalsePattern/EndlessIDs/releases/tag/{version}
|
||||
|
||||
# endregion publishing
|
||||
|
||||
# Buildscript automatic update checker settings
|
||||
#region autoupdates
|
||||
|
||||
# Will update your build.gradle automatically whenever an update is available
|
||||
autoUpdateBuildScript = false
|
||||
# Disable checking of buildscript updates.
|
||||
skipBuildScriptUpdateCheck = false
|
||||
|
||||
#endregion autoupdates
|
||||
|
||||
# Gradle token strings
|
||||
#region gradletokens
|
||||
|
||||
# Define a source file of your project with:
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...])
|
||||
# Leave these properties empty to skip individual token replacements
|
||||
replaceGradleTokenInFile = Tags.java
|
||||
gradleTokenModId = GRADLETOKEN_MODID
|
||||
gradleTokenModName = GRADLETOKEN_MODNAME
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenGroupName = GRADLETOKEN_GROUPNAME
|
||||
|
||||
#endregion gradletokens
|
||||
|
||||
# Mixins
|
||||
#region mixins
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = true
|
||||
# Enable this if one of the dependencies uses SpongeMixins.
|
||||
hasMixinDeps = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin = mixin.plugin.MixinPlugin
|
||||
# Whether you want the plugin to be configured as a PREINIT mixin
|
||||
mixinPluginPreInit = false
|
||||
# The minimum SpongePowered Mixins version required by the plugin. Internal default is 0.8.5 (GasStation)
|
||||
mixinPluginMinimumVersion =
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
mixinsPackage = mixin.mixins
|
||||
# Specify any custom mixin .json configs here. If you have multiple, comma-separate them. If you don't want to load
|
||||
# any jsons manually, leave this empty. You can use custom configs even if you already have a plugin added.
|
||||
# note: mixins.<modid>.json is used by the mixinPlugin's autogenerated config. Additionally, the refmap from the mixinsPackage
|
||||
# is always put into mixins.<modid>.refmap.json.
|
||||
# example: mixins.foo.json,mixins.bar.json
|
||||
mixinConfigs =
|
||||
|
||||
#endregion mixins
|
||||
|
||||
# Coremod and access transformers
|
||||
#region core
|
||||
|
||||
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
|
||||
# Example value: mymodid_at.cfg
|
||||
accessTransformersFile =
|
||||
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatibility only
|
||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||
coreModClass = IEPlugin
|
||||
|
||||
#endregion core
|
||||
|
||||
# Dependency deobfuscation settings (advanced)
|
||||
#region ddeobf
|
||||
|
||||
# These 3 entries specify the location where the SRG mappings should be fetched from. Only set these if you know
|
||||
# what you're doing. The defaults inside the buildscript should just work without any extra configuration.
|
||||
remoteMappings =
|
||||
mappingsChannel =
|
||||
mappingsVersion =
|
||||
|
||||
#endregion ddeobf
|
||||
|
||||
# Miscellaneous settings
|
||||
#region misc
|
||||
|
||||
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
||||
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||
containsMixinsAndOrCoreModOnly = false
|
||||
|
||||
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
|
||||
# responsibility check the licence and request permission for distribution, if required.
|
||||
usesShadowedDependencies = false
|
||||
|
||||
# If enabled, class stubbing will be enabled. In this mode, all classes with a package named "stubpackage" in their
|
||||
# path will be removed, and all classes that refer to said classes will be modified so that the "stubpackage" will map
|
||||
# to the root package instead. This is useful for referring to compile-time inaccessible classes, such as classes in the
|
||||
# default package
|
||||
remapStubs = true
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
#customArchiveBaseName =
|
||||
|
||||
#endregion misc
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
Vendored
BIN
Binary file not shown.
+5
-1
@@ -1,5 +1,9 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015 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.
|
||||
@@ -15,80 +15,114 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# 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/3d91ce3b8caaf77ad09f381f43615b715b53f72c/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
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
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
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# 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"'
|
||||
# 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 -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
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
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
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"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@@ -97,92 +131,118 @@ 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.
|
||||
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" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
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
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
# 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.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
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, 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" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# 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" "$@"
|
||||
Vendored
+31
-49
@@ -13,22 +13,28 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@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
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
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"
|
||||
|
||||
@@ -37,64 +43,40 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
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.
|
||||
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
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
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.
|
||||
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
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
: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 %CMD_LINE_ARGS%
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="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!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
@@ -1,19 +0,0 @@
|
||||
// Add any additional repositories for your dependencies here
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "cursemaven"
|
||||
url = "https://mvn.falsepattern.com/cursemaven/"
|
||||
content {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "mavenpattern"
|
||||
url = "https://mvn.falsepattern.com/releases/"
|
||||
}
|
||||
maven {
|
||||
name = "jitpack"
|
||||
url = "https://mvn.falsepattern.com/jitpack/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version("1.0.0")
|
||||
}
|
||||
|
||||
rootProject.name = "EndlessIDs"
|
||||
@@ -1,6 +1,28 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataRegistry;
|
||||
import com.falsepattern.chunk.api.DataRegistry;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.endlessids.managers.BiomeManager;
|
||||
import com.falsepattern.endlessids.managers.BlockIDManager;
|
||||
@@ -20,7 +42,9 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
version = Tags.VERSION,
|
||||
name = Tags.MODNAME,
|
||||
acceptedMinecraftVersions = "[1.7.10]",
|
||||
dependencies = "required-after:falsepatternlib@[0.11.0,);required-after:gasstation@[0.5.0,);after:antiidconflict")
|
||||
dependencies = "required-after:chunkapi@[0.8.0,);" +
|
||||
"required-after:falsepatternlib@[1.12.0,);" +
|
||||
"after:antiidconflict")
|
||||
public class EndlessIDs {
|
||||
public static final byte[] ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER = new byte[0];
|
||||
public static final byte[] FAKE_BIOME_ARRAY_PLACEHOLDER = new byte[256];
|
||||
@@ -38,18 +62,47 @@ public class EndlessIDs {
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent e) {
|
||||
LOG.info("---------------------------------------------------------");
|
||||
LOG.info("Current EndlessIDs configuration:");
|
||||
logConfig(" Biome Extension", GeneralConfig.extendBiome);
|
||||
logConfig(" Block/Item Extension", GeneralConfig.extendBlockItem);
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
logConfig(" Extra Item Bits", GeneralConfig.extraItemIDBits);
|
||||
logConfig(" Extra Block Bits", GeneralConfig.extraBlockIDBits);
|
||||
}
|
||||
logConfig(" DataWatcher Extension", GeneralConfig.extendDataWatcher);
|
||||
logConfig(" Enchantment Extension", GeneralConfig.extendEnchantment);
|
||||
logConfig(" Potion Extension", GeneralConfig.extendPotion);
|
||||
logConfig(" Redstone Extension", GeneralConfig.extendRedstone);
|
||||
if (GeneralConfig.extendRedstone) {
|
||||
LOG.warn(" (Redstone extension is an experimental and dangerous feature, and should NEVER be used in worlds that you worry about getting corrupted!)");
|
||||
logConfig(" Max redstone level", GeneralConfig.maxRedstone);
|
||||
}
|
||||
logConfig(" Registry performance tweak", GeneralConfig.enableRegistryPerformanceTweak);
|
||||
if (GeneralConfig.enableRegistryPerformanceTweak) {
|
||||
LOG.warn(" (This tweak has not gone through proper testing yet, so it might corrupt worlds. USE BACKUPS!)");
|
||||
}
|
||||
LOG.info("---------------------------------------------------------");
|
||||
patchManager.preInit();
|
||||
}
|
||||
|
||||
private static void logConfig(String name, boolean value) {
|
||||
LOG.info(name + (value ? ": ENABLED" : ": disabled"));
|
||||
}
|
||||
|
||||
private static void logConfig(String name, int value) {
|
||||
LOG.info(name + ": " + value);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent e) {
|
||||
patchManager.init();
|
||||
if (GeneralConfig.extendBiome) {
|
||||
ChunkDataRegistry.registerDataManager(new BiomeManager());
|
||||
DataRegistry.registerDataManager(new BiomeManager());
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
ChunkDataRegistry.registerDataManager(new BlockIDManager());
|
||||
ChunkDataRegistry.registerDataManager(new BlockMetaManager());
|
||||
DataRegistry.registerDataManager(new BlockIDManager());
|
||||
DataRegistry.registerDataManager(new BlockMetaManager());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,11 +110,11 @@ public class EndlessIDs {
|
||||
public void postInit(FMLPostInitializationEvent e) {
|
||||
patchManager.postInit();
|
||||
if (GeneralConfig.extendBiome) {
|
||||
ChunkDataRegistry.disableDataManager("minecraft", "biome");
|
||||
DataRegistry.disableDataManager("minecraft", "biome");
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
ChunkDataRegistry.disableDataManager("minecraft", "blockid");
|
||||
ChunkDataRegistry.disableDataManager("minecraft", "metadata");
|
||||
DataRegistry.disableDataManager("minecraft", "blockid");
|
||||
DataRegistry.disableDataManager("minecraft", "metadata");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import com.falsepattern.endlessids.asm.IETransformer;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.val;
|
||||
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import cpw.mods.fml.relauncher.FMLInjectionData;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.DependsOn;
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name;
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
|
||||
|
||||
@MCVersion("1.7.10")
|
||||
@Name(Tags.MODID)
|
||||
@TransformerExclusions({"com.falsepattern.endlessids.asm", "com.falsepattern.endlessids.config.GeneralConfig"})
|
||||
@DependsOn("falsepatternlib")
|
||||
public class IEPlugin implements IFMLLoadingPlugin {
|
||||
|
||||
public IEPlugin() {
|
||||
super();
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public String[] getASMTransformerClass() {
|
||||
val cl = ((LaunchClassLoader) this.getClass().getClassLoader());
|
||||
val field = cl.getClass().getDeclaredField("transformerExceptions");
|
||||
field.setAccessible(true);
|
||||
val exceptions = (Set<String>) field.get(cl);
|
||||
if (exceptions.contains("code.elix_x.coremods")) {
|
||||
IETransformer.logger.info("AntiIDConflict detected!");
|
||||
IETransformer.logger.info("Removing ASM protections so that we can fix its code.");
|
||||
exceptions.remove("code.elix_x.coremods");
|
||||
exceptions.add("code.elix_x.coremods.antiidconflict.core");
|
||||
exceptions.add("code.elix_x.coremods.antiidconflict.ByteCodeTester");
|
||||
}
|
||||
return new String[]{IETransformer.class.getName()};
|
||||
}
|
||||
|
||||
public String getModContainerClass() {
|
||||
if (GeneralConfig.extendBiome) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.BiomeContainer");
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.BlockItemContainer");
|
||||
}
|
||||
if (GeneralConfig.extendDataWatcher) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.DataWatcherContainer");
|
||||
}
|
||||
if (GeneralConfig.extendEnchantment) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.EnchantmentContainer");
|
||||
}
|
||||
if (GeneralConfig.extendPotion) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.PotionContainer");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getSetupClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void injectData(final Map<String, Object> data) {
|
||||
IETransformer.isObfuscated = (Boolean) data.get("runtimeDeobfuscationEnabled");
|
||||
}
|
||||
|
||||
public String getAccessTransformerClass() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
public class Tags {
|
||||
public static final String MODID = "GRADLETOKEN_MODID";
|
||||
public static final String MODNAME = "GRADLETOKEN_MODNAME";
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME";
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
package com.falsepattern.endlessids;
|
||||
|
||||
import lombok.val;
|
||||
import sun.misc.Unsafe;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
public class Unsafer {
|
||||
public static final Unsafe UNSAFE;
|
||||
|
||||
static {
|
||||
Field unsafeField = null;
|
||||
Unsafe unsafe = null;
|
||||
for (val field : Unsafe.class.getDeclaredFields()) {
|
||||
if (Modifier.isStatic(field.getModifiers()) && Modifier.isFinal(field.getModifiers()) &&
|
||||
field.getType().equals(Unsafe.class)) {
|
||||
unsafeField = field;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (unsafeField != null) {
|
||||
unsafeField.setAccessible(true);
|
||||
try {
|
||||
unsafe = (Unsafe) unsafeField.get(null);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (unsafe == null) {
|
||||
UNSAFE = null;
|
||||
new IllegalStateException("Could not retrieve Unsafe! Falling back to bytebuffers!").printStackTrace();
|
||||
} else {
|
||||
UNSAFE = unsafe;
|
||||
}
|
||||
}
|
||||
|
||||
public static void arraycopy(short[] source, int sourceOffset, byte[] target, int targetOffset, int shorts) {
|
||||
if (UNSAFE != null) {
|
||||
val sourceOffsetBytes = sourceOffset * 2;
|
||||
val arrayOffsetSource = UNSAFE.arrayBaseOffset(source.getClass());
|
||||
val arrayOffsetTarget = UNSAFE.arrayBaseOffset(target.getClass());
|
||||
UNSAFE.copyMemory(source, arrayOffsetSource + sourceOffsetBytes, target, arrayOffsetTarget + targetOffset,
|
||||
(long) shorts << 1);
|
||||
} else {
|
||||
ByteBuffer.wrap(target, targetOffset, target.length - targetOffset)
|
||||
.asShortBuffer()
|
||||
.put(source, sourceOffset, shorts);
|
||||
}
|
||||
}
|
||||
|
||||
public static void arraycopy(byte[] source, int sourceOffset, short[] target, int targetOffset, int shorts) {
|
||||
if (UNSAFE != null) {
|
||||
val targetOffsetBytes = targetOffset * 2;
|
||||
val arrayOffsetSource = UNSAFE.arrayBaseOffset(source.getClass());
|
||||
val arrayOffsetTarget = UNSAFE.arrayBaseOffset(target.getClass());
|
||||
UNSAFE.copyMemory(source, arrayOffsetSource + sourceOffset, target, arrayOffsetTarget + targetOffsetBytes,
|
||||
(long) shorts << 1);
|
||||
} else {
|
||||
ShortBuffer.wrap(target, targetOffset, target.length - targetOffset)
|
||||
.put(ByteBuffer.wrap(source, sourceOffset, shorts * 2).asShortBuffer());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import Reika.DragonAPI.Libraries.Java.ReikaJavaLibrary;
|
||||
import com.falsepattern.endlessids.asm.stubpackage.Reika.DragonAPI.ModList;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class ASMHooks {
|
||||
@SneakyThrows
|
||||
public static void DragonAPIModListConstructorTweak(ModList list) {
|
||||
list.successful = false;
|
||||
DragonAPIModListTryLoad(list);
|
||||
}
|
||||
|
||||
public static boolean DragonAPIModListTryLoad(ModList list) {
|
||||
if (!list.successful) {
|
||||
try {
|
||||
list.condition = Loader.isModLoaded(list.modLabel);
|
||||
list.successful = true;
|
||||
if (list.condition) {
|
||||
ReikaJavaLibrary.pConsole(
|
||||
"DRAGONAPI: " + list + " detected in the MC installation. Adjusting behavior accordingly.");
|
||||
} else {
|
||||
ReikaJavaLibrary.pConsole(
|
||||
"DRAGONAPI: " + list + " not detected in the MC installation. No special action taken.");
|
||||
}
|
||||
if (list.condition) {
|
||||
ReikaJavaLibrary.pConsole("DRAGONAPI: Attempting to load data from " + list);
|
||||
if (list.blockClasses == null) {
|
||||
ReikaJavaLibrary.pConsole("DRAGONAPI: Could not block class for " + list +
|
||||
": Specified class was null. This may not be an error.");
|
||||
}
|
||||
if (list.itemClasses == null) {
|
||||
ReikaJavaLibrary.pConsole("DRAGONAPI: Could not item class for " + list +
|
||||
": Specified class was null. This may not be an error.");
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
list.condition = list.successful = false;
|
||||
}
|
||||
}
|
||||
return list.condition;
|
||||
}
|
||||
|
||||
public static void DragonAPIModListSuppressLogging(Object obj) {
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
public class AsmTransformException extends RuntimeException {
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import org.objectweb.asm.tree.AbstractInsnNode;
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import com.falsepattern.endlessids.asm.transformer.ChunkProviderSuperPatcher;
|
||||
import com.falsepattern.endlessids.asm.transformer.DragonAPIModList;
|
||||
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
|
||||
import com.falsepattern.endlessids.asm.transformer.SpaceCoreModInfoGenerator;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import lombok.val;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
public enum ClassEdit {
|
||||
ChunkProviderSuperPatcher(new ChunkProviderSuperPatcher(), () -> GeneralConfig.extendBiome),
|
||||
DragonAPIModList(new DragonAPIModList(), () -> true, "Reika.DragonAPI.ModList"),
|
||||
FmlRegistry(new FmlRegistry(),
|
||||
() -> GeneralConfig.extendBlockItem,
|
||||
"cpw.mods.fml.common.registry.GameData",
|
||||
"cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry"),
|
||||
SpaceCoreModInfoGenerator(new SpaceCoreModInfoGenerator(), () -> true,
|
||||
"com.spacechase0.minecraft.spacecore.mcp.ModInfoGenerator");
|
||||
|
||||
private static final Map<String, ClassEdit> editMap;
|
||||
|
||||
static {
|
||||
editMap = new HashMap<>();
|
||||
for (final ClassEdit edit : values()) {
|
||||
for (final String name : edit.classNames) {
|
||||
ClassEdit.editMap.put(name, edit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final IClassNodeTransformer transformer;
|
||||
private final BooleanSupplier cond;
|
||||
private final String[] classNames;
|
||||
|
||||
ClassEdit(final IClassNodeTransformer transformer, BooleanSupplier cond, final String... classNames) {
|
||||
this.transformer = transformer;
|
||||
this.cond = cond;
|
||||
this.classNames = classNames;
|
||||
}
|
||||
|
||||
public static ClassEdit get(final String className) {
|
||||
val ret = ClassEdit.editMap.get(className);
|
||||
return ret != null && ret.cond.getAsBoolean() ? ret : null;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
public IClassNodeTransformer getTransformer() {
|
||||
return this.transformer;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.endlessids.mixin.plugin.Mixin;
|
||||
import com.gtnewhorizon.gtnhmixins.IEarlyMixinLoader;
|
||||
import com.gtnewhorizon.gtnhmixins.builders.IMixins;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.val;
|
||||
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import cpw.mods.fml.relauncher.FMLInjectionData;
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.DependsOn;
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.Name;
|
||||
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions;
|
||||
|
||||
@MCVersion("1.7.10")
|
||||
@Name(Tags.MODID + "_core")
|
||||
@TransformerExclusions({"com.falsepattern.endlessids.asm", "com.falsepattern.endlessids.config.GeneralConfig"})
|
||||
@DependsOn("falsepatternlib")
|
||||
public class EndlessIDsCore implements IFMLLoadingPlugin, IEarlyMixinLoader {
|
||||
public static boolean deobfuscated;
|
||||
static {
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
try {
|
||||
if (Launch.classLoader.getClassBytes("fastcraft.Tweaker") != null) {
|
||||
FCCompat.patchConfig();
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EndlessIDsCore() {
|
||||
super();
|
||||
try {
|
||||
if (Launch.classLoader.getClassBytes("ru.fewizz.neid.asm.Plugin") != null ||
|
||||
Launch.classLoader.getClassBytes("com.gtnewhorizons.neid.asm.NEIDTransformer") != null) {
|
||||
loudCrash("EndlessIDs replaces NotEnoughIDs! Please uninstall NotEnoughIDs!");
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public String[] getASMTransformerClass() {
|
||||
deobfuscated = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
|
||||
val cl = Launch.classLoader;
|
||||
val field = LaunchClassLoader.class.getDeclaredField("transformerExceptions");
|
||||
field.setAccessible(true);
|
||||
@SuppressWarnings("unchecked")
|
||||
val exceptions = (Set<String>) field.get(cl);
|
||||
if (exceptions.contains("code.elix_x.coremods")) {
|
||||
EndlessIDsTransformer.logger.info("AntiIDConflict detected!");
|
||||
EndlessIDsTransformer.logger.info("Removing ASM protections so that we can fix its code.");
|
||||
exceptions.remove("code.elix_x.coremods");
|
||||
exceptions.add("code.elix_x.coremods.antiidconflict.core");
|
||||
exceptions.add("code.elix_x.coremods.antiidconflict.ByteCodeTester");
|
||||
}
|
||||
return new String[]{EndlessIDsTransformer.class.getName()};
|
||||
}
|
||||
|
||||
private static void loudCrash(String message) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
EndlessIDsTransformer.logger.fatal(message);
|
||||
}
|
||||
val err = new Error(message);
|
||||
err.setStackTrace(new StackTraceElement[0]);
|
||||
throw err;
|
||||
}
|
||||
|
||||
public String getModContainerClass() {
|
||||
if (GeneralConfig.extendBiome) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.BiomeContainer");
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.BlockItemContainer");
|
||||
}
|
||||
if (GeneralConfig.extendDataWatcher) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.DataWatcherContainer");
|
||||
}
|
||||
if (GeneralConfig.extendEnchantment) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.EnchantmentContainer");
|
||||
}
|
||||
if (GeneralConfig.extendPotion) {
|
||||
FMLInjectionData.containers.add(Tags.GROUPNAME + ".containers.PotionContainer");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getSetupClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void injectData(final Map<String, Object> data) {
|
||||
}
|
||||
|
||||
public String getAccessTransformerClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMixinConfig() {
|
||||
return "mixins.endlessids.early.json";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getMixins(Set<String> loadedCoreMods) {
|
||||
return IMixins.getEarlyMixins(Mixin.class, loadedCoreMods);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.transformer.DevFixer;
|
||||
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
|
||||
import com.falsepattern.endlessids.asm.transformer.GameDataAccelerator;
|
||||
import com.falsepattern.endlessids.asm.transformer.SpaceCoreModInfoGenerator;
|
||||
import com.falsepattern.endlessids.asm.transformer.chunk.ChunkProviderSuperPatcher;
|
||||
import com.falsepattern.endlessids.asm.transformer.chunk.LOTRFieldExposer;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.lib.turboasm.MergeableTurboTransformer;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.val;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EndlessIDsTransformer extends MergeableTurboTransformer {
|
||||
public static final Logger logger = LogManager.getLogger(Tags.MODNAME + " ASM");
|
||||
|
||||
private static List<TurboClassTransformer> transformers() {
|
||||
val result = new ArrayList<TurboClassTransformer>();
|
||||
if (GeneralConfig.extendBiome) {
|
||||
result.add(new ChunkProviderSuperPatcher());
|
||||
result.add(new LOTRFieldExposer());
|
||||
}
|
||||
if (GeneralConfig.extendBlockItem) {
|
||||
result.add(new FmlRegistry());
|
||||
}
|
||||
if (GeneralConfig.enableRegistryPerformanceTweak) {
|
||||
new GameDataAccelerator();
|
||||
}
|
||||
if (EndlessIDsCore.deobfuscated) {
|
||||
result.add(new SpaceCoreModInfoGenerator());
|
||||
result.add(new DevFixer());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public EndlessIDsTransformer() {
|
||||
super(transformers());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import com.falsepattern.endlessids.util.ConfigFixUtil;
|
||||
|
||||
public class FCCompat {
|
||||
public static void patchConfig() {
|
||||
//Breaks with the blockitem module
|
||||
ConfigFixUtil.fixConfig("fastcraft.ini", (line) -> {
|
||||
if (line.contains("asyncCulling") || line.contains("enableCullingTweaks")) {
|
||||
return line.replace("true", "false");
|
||||
}
|
||||
return line;
|
||||
}, () -> "[extra tweaks]\nasyncCulling = false\n[transparent tweaks]\nenableCullingTweaks=false\n",
|
||||
e -> {
|
||||
System.err.println(
|
||||
"Failed to apply FastCraft occlusion tweak compatibility patches!");
|
||||
e.printStackTrace();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
public class FieldNotFoundException extends AsmTransformException {
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import com.falsepattern.endlessids.asm.stubpackage.cpw.mods.fml.common.registry.GameData;
|
||||
import com.falsepattern.endlessids.util.WeakIdentityHashMap;
|
||||
import lombok.var;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Collections;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
//Used by ASM
|
||||
@SuppressWarnings("unused")
|
||||
public class GameDataHooks {
|
||||
private static WeakIdentityHashMap<Block, WeakReference<ItemBlock>> forGameData(GameData gameData) {
|
||||
if (gameData.endlessIDsItemBlockCache == null) {
|
||||
gameData.endlessIDsItemBlockCache = new WeakIdentityHashMap<>();
|
||||
}
|
||||
return gameData.endlessIDsItemBlockCache;
|
||||
}
|
||||
|
||||
public static void cacheItemBlock(ItemBlock itemBlock, GameData gameData) {
|
||||
forGameData(gameData).put(itemBlock.field_150939_a, new WeakReference<>(itemBlock));
|
||||
}
|
||||
|
||||
public static ItemBlock fetchCachedItemBlock(Block block, GameData gameData) {
|
||||
var weakItem = forGameData(gameData).get(block);
|
||||
if (weakItem != null) {
|
||||
return weakItem.get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Iterable<Item> fakeIterable() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.transformer.ChunkProviderSuperPatcher;
|
||||
import com.falsepattern.endlessids.asm.transformer.DevFixer;
|
||||
import lombok.val;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
|
||||
import net.minecraft.launchwrapper.IClassTransformer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class IETransformer implements IClassTransformer {
|
||||
public static final Logger logger;
|
||||
private static final List<String> blacklist = new ArrayList<>();
|
||||
public static boolean isObfuscated;
|
||||
|
||||
static {
|
||||
logger = LogManager.getLogger(Tags.MODNAME + " ASM");
|
||||
blacklist.add("net.minecraft.world.chunk.storage.AnvilChunkLoader");
|
||||
}
|
||||
|
||||
public IETransformer() {
|
||||
super();
|
||||
}
|
||||
|
||||
public byte[] transform(final String name, final String transformedName, final byte[] bytes) {
|
||||
if (bytes == null) {
|
||||
return null;
|
||||
}
|
||||
if (blacklist.contains(transformedName)) {
|
||||
return bytes;
|
||||
}
|
||||
ClassEdit[] edits = new ClassEdit[2];
|
||||
edits[0] = ClassEdit.get(transformedName);
|
||||
ClassNode cn = new ClassNode(Opcodes.ASM5);
|
||||
{
|
||||
val reader = new ClassReader(bytes);
|
||||
reader.accept(cn, 0);
|
||||
}
|
||||
boolean expanded = false;
|
||||
if (ChunkProviderSuperPatcher.shouldPatch(cn)) {
|
||||
expanded = true;
|
||||
{
|
||||
cn = new ClassNode(Opcodes.ASM5);
|
||||
val reader = new ClassReader(bytes);
|
||||
reader.accept(cn, ClassReader.EXPAND_FRAMES);
|
||||
}
|
||||
if (edits[0] == null) {
|
||||
edits[0] = ClassEdit.ChunkProviderSuperPatcher;
|
||||
} else {
|
||||
edits[1] = ClassEdit.ChunkProviderSuperPatcher;
|
||||
}
|
||||
}
|
||||
if (edits[0] == null) {
|
||||
return isObfuscated ? bytes : DevFixer.fixDev(bytes);
|
||||
}
|
||||
if (!isObfuscated) {
|
||||
DevFixer.transform(cn);
|
||||
}
|
||||
for (int i = 0; i < edits.length; i++) {
|
||||
val edit = edits[i];
|
||||
if (edit == null) {
|
||||
continue;
|
||||
}
|
||||
IETransformer.logger.debug("Patching {} with {}...", transformedName, edit.getName());
|
||||
try {
|
||||
edit.getTransformer().transform(cn, IETransformer.isObfuscated);
|
||||
} catch (AsmTransformException t) {
|
||||
IETransformer.logger.error("Error transforming {} with {}: {}", transformedName, edit.getName(),
|
||||
t.getMessage());
|
||||
throw t;
|
||||
} catch (Throwable t2) {
|
||||
IETransformer.logger.error("Error transforming {} with {}: {}", transformedName, edit.getName(),
|
||||
t2.getMessage());
|
||||
throw new RuntimeException(t2);
|
||||
}
|
||||
}
|
||||
final ClassWriter writer = new ClassWriter(expanded ? ClassWriter.COMPUTE_FRAMES : 0);
|
||||
cn.accept(writer);
|
||||
IETransformer.logger.debug("Patched {} successfully.", transformedName);
|
||||
return writer.toByteArray();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm;
|
||||
|
||||
public class MethodNotFoundException extends AsmTransformException {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.falsepattern.endlessids.asm.stubpackage.Reika.DragonAPI;
|
||||
|
||||
public class ModList {
|
||||
public String modLabel;
|
||||
public boolean condition;
|
||||
public boolean successful;
|
||||
public String[] itemClasses;
|
||||
public String[] blockClasses;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm.stubpackage.cpw.mods.fml.common.registry;
|
||||
|
||||
import com.falsepattern.endlessids.util.WeakIdentityHashMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class GameData {
|
||||
public WeakIdentityHashMap<Block, WeakReference<ItemBlock>> endlessIDsItemBlockCache;
|
||||
}
|
||||
@@ -1,27 +1,47 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import com.falsepattern.endlessids.asm.IETransformer;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.ClassReader;
|
||||
import org.objectweb.asm.ClassWriter;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.FieldInsnNode;
|
||||
import org.objectweb.asm.util.CheckClassAdapter;
|
||||
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public final class DevFixer {
|
||||
public class DevFixer implements TurboClassTransformer {
|
||||
private static final ClassNode blocks;
|
||||
|
||||
static {
|
||||
if (IETransformer.isObfuscated) {
|
||||
if (!EndlessIDsCore.deobfuscated) {
|
||||
blocks = null;
|
||||
} else {
|
||||
try {
|
||||
@@ -35,41 +55,20 @@ public final class DevFixer {
|
||||
}
|
||||
}
|
||||
|
||||
public static byte[] fixDev(byte[] classBytes) {
|
||||
if (IETransformer.isObfuscated) {
|
||||
return classBytes;
|
||||
}
|
||||
val cn = new ClassNode(Opcodes.ASM5);
|
||||
val reader = new ClassReader(classBytes);
|
||||
reader.accept(cn, 0);
|
||||
transform(cn);
|
||||
val writer = new ClassWriter(0);
|
||||
val check = new CheckClassAdapter(writer);
|
||||
cn.accept(check);
|
||||
return writer.toByteArray();
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public static void transform(final ClassNode cn) {
|
||||
if (IETransformer.isObfuscated) {
|
||||
return;
|
||||
}
|
||||
remapBlocks(cn);
|
||||
if (cn.name.equals("net/minecraft/world/biome/BiomeGenBase")) {
|
||||
biomeTweakerCompat(cn);
|
||||
}
|
||||
}
|
||||
|
||||
private static void biomeTweakerCompat(final ClassNode cn) {
|
||||
private static boolean biomeTweakerCompat(final ClassNode cn) {
|
||||
boolean modified = false;
|
||||
for (val field : cn.fields) {
|
||||
if (field.name.startsWith("spawnable")) {
|
||||
field.access &= ~Opcodes.ACC_PROTECTED;
|
||||
field.access |= Opcodes.ACC_PUBLIC;
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
private static void remapBlocks(final ClassNode cn) {
|
||||
private static boolean remapBlocks(final ClassNode cn) {
|
||||
boolean modified = false;
|
||||
for (val method : cn.methods) {
|
||||
val instructions = method.instructions;
|
||||
int insnCount = instructions.size();
|
||||
@@ -81,11 +80,41 @@ public final class DevFixer {
|
||||
for (val blockField : blocks.fields) {
|
||||
if (blockField.name.equals(field.name) && !blockField.desc.equals(field.desc)) {
|
||||
field.desc = blockField.desc;
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String owner() {
|
||||
return Tags.MODNAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "DevFixer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTransformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
return EndlessIDsCore.deobfuscated && !"net.minecraft.world.chunk.storage.AnvilChunkLoader".equals(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
val cn = classNode.getNode();
|
||||
if (cn == null)
|
||||
return false;
|
||||
boolean modified = false;
|
||||
modified |= remapBlocks(cn);
|
||||
if (className.equals("net.minecraft.world.biome.BiomeGenBase")) {
|
||||
modified |= biomeTweakerCompat(cn);
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import com.falsepattern.endlessids.asm.ASMHooks;
|
||||
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.Type;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.FieldInsnNode;
|
||||
import org.objectweb.asm.tree.FieldNode;
|
||||
import org.objectweb.asm.tree.FrameNode;
|
||||
import org.objectweb.asm.tree.InsnNode;
|
||||
import org.objectweb.asm.tree.LineNumberNode;
|
||||
import org.objectweb.asm.tree.MethodInsnNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
import org.objectweb.asm.tree.VarInsnNode;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class DragonAPIModList implements IClassNodeTransformer {
|
||||
private static final List<String> fields = Arrays.asList("condition", "itemClasses", "blockClasses");
|
||||
|
||||
private static void tweakIsLoaded(MethodNode method) {
|
||||
val iterator = method.instructions.iterator();
|
||||
iterator.next();
|
||||
iterator.next();
|
||||
iterator.next();
|
||||
iterator.next();
|
||||
iterator.set(new MethodInsnNode(Opcodes.INVOKESTATIC, Type.getInternalName(ASMHooks.class),
|
||||
"DragonAPIModListTryLoad", "(LReika/DragonAPI/ModList;)Z", false));
|
||||
}
|
||||
|
||||
private static void tweakInit(MethodNode method) {
|
||||
val iterator = method.instructions.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
var insn = iterator.next();
|
||||
if (insn instanceof LineNumberNode && ((LineNumberNode) insn).line == 154) {
|
||||
//SRC:
|
||||
// L3
|
||||
// LINENUMBER 154 L3
|
||||
// ALOAD 0
|
||||
// ALOAD 0
|
||||
// GETFIELD Reika/DragonAPI/ModList.modLabel : Ljava/lang/String;
|
||||
// INVOKESTATIC cpw/mods/fml/common/Loader.isModLoaded (Ljava/lang/String;)Z
|
||||
// PUTFIELD Reika/DragonAPI/ModList.condition : Z
|
||||
//TGT:
|
||||
// L3
|
||||
// LINENUMBER 154 L3
|
||||
// ALOAD 0
|
||||
// ALOAD 5
|
||||
// PUTFIELD Reika/DragonAPI/ModList.itemClasses : [Ljava/lang/String;
|
||||
// ALOAD 0
|
||||
// ALOAD 4
|
||||
// PUTFIELD Reika/DragonAPI/ModList.blockClasses : [Ljava/lang/String;
|
||||
// ALOAD 0
|
||||
// INVOKESTATIC ASMHooks.isModLoaded (LReika/DragonAPI/ModList;)V
|
||||
// FRAME FULL [Reika/DragonAPI/ModList java/lang/String I java/lang/String [Ljava/lang/String; [Ljava/lang/String;] []
|
||||
// RETURN
|
||||
iterator.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||
iterator.add(new VarInsnNode(Opcodes.ALOAD, 5));
|
||||
iterator.add(new FieldInsnNode(Opcodes.PUTFIELD, "Reika/DragonAPI/ModList", "itemClasses",
|
||||
"[Ljava/lang/String;"));
|
||||
iterator.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||
iterator.add(new VarInsnNode(Opcodes.ALOAD, 4));
|
||||
iterator.add(new FieldInsnNode(Opcodes.PUTFIELD, "Reika/DragonAPI/ModList", "blockClasses",
|
||||
"[Ljava/lang/String;"));
|
||||
iterator.next();
|
||||
iterator.remove();
|
||||
iterator.next();
|
||||
iterator.next();
|
||||
iterator.remove();
|
||||
var methodInsn = (MethodInsnNode) iterator.next();
|
||||
methodInsn.owner = Type.getInternalName(ASMHooks.class);
|
||||
methodInsn.name = "DragonAPIModListConstructorTweak";
|
||||
methodInsn.desc = "(LReika/DragonAPI/ModList;)V";
|
||||
iterator.add(new FrameNode(Opcodes.F_FULL, 6,
|
||||
new Object[]{"Reika/DragonAPI/ModList", "java/lang/String", Opcodes.INTEGER,
|
||||
"java/lang/String", "[Ljava/lang/String;",
|
||||
"[Ljava/lang/String;"}, 0, new Object[]{}));
|
||||
iterator.add(new InsnNode(Opcodes.RETURN));
|
||||
iterator.add(new FrameNode(Opcodes.F_FULL, 6,
|
||||
new Object[]{"Reika/DragonAPI/ModList", "java/lang/String", Opcodes.INTEGER,
|
||||
"java/lang/String", "[Ljava/lang/String;",
|
||||
"[Ljava/lang/String;"}, 0, new Object[]{}));
|
||||
iterator.next();
|
||||
iterator.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void crash() {
|
||||
throw new IllegalStateException("Tweaking failed!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
int state = 0;
|
||||
for (val field : cn.fields) {
|
||||
if (field.name.equals("__MARKER__FALSEPATTERN__MIXINPATCH__")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (val field : cn.fields) {
|
||||
if (field.name.equals("condition") && field.desc.equals("Z")) {
|
||||
field.access &= ~Opcodes.ACC_FINAL;
|
||||
state++;
|
||||
}
|
||||
if (fields.contains(field.name)) {
|
||||
field.access &= ~Opcodes.ACC_PRIVATE;
|
||||
field.access &= ~Opcodes.ACC_PROTECTED;
|
||||
field.access |= Opcodes.ACC_PUBLIC;
|
||||
state++;
|
||||
}
|
||||
}
|
||||
if (state != 4) {
|
||||
crash();
|
||||
}
|
||||
cn.fields.add(new FieldNode(Opcodes.ACC_PUBLIC, "successful", "Z", null, 0));
|
||||
cn.fields.add(new FieldNode(Opcodes.ACC_PRIVATE, "__MARKER__FALSEPATTERN__MIXINPATCH__", "Z", null, 0));
|
||||
|
||||
int state2 = 0;
|
||||
for (val method : cn.methods) {
|
||||
if ((state2 & 1) == 0 && method.name.equals("<init>") &&
|
||||
method.desc.equals("(Ljava/lang/String;ILjava/lang/String;[Ljava/lang/String;[Ljava/lang/String;)V")) {
|
||||
tweakInit(method);
|
||||
state2 |= 1;
|
||||
}
|
||||
if ((state2 & 2) == 0 && method.name.equals("isLoaded") && method.desc.equals("()Z")) {
|
||||
tweakIsLoaded(method);
|
||||
state2 |= 2;
|
||||
}
|
||||
}
|
||||
if (state2 != 3) {
|
||||
crash();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,68 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.AsmTransformException;
|
||||
import com.falsepattern.endlessids.asm.AsmUtil;
|
||||
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
|
||||
public class FmlRegistry implements IClassNodeTransformer {
|
||||
public class FmlRegistry implements TurboClassTransformer {
|
||||
public FmlRegistry() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
public String owner() {
|
||||
return Tags.MODNAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "FMLRegistry";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTransformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
return GeneralConfig.extendBlockItem && ("cpw.mods.fml.common.registry.GameData".equals(className) ||
|
||||
"cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry".equals(className));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
val cn = classNode.getNode();
|
||||
if (cn == null)
|
||||
return false;
|
||||
var field = AsmUtil.findField(cn, "MAX_BLOCK_ID", true);
|
||||
if (field != null) {
|
||||
field.value = ExtendedConstants.maxBlockID;
|
||||
@@ -35,5 +82,6 @@ public class FmlRegistry implements IClassNodeTransformer {
|
||||
if (!found) {
|
||||
throw new AsmTransformException("can't find 4095 constant in any method");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.AsmTransformException;
|
||||
import com.falsepattern.endlessids.asm.EndlessIDsTransformer;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.FieldInsnNode;
|
||||
import org.objectweb.asm.tree.FieldNode;
|
||||
import org.objectweb.asm.tree.InsnNode;
|
||||
import org.objectweb.asm.tree.MethodInsnNode;
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
import org.objectweb.asm.tree.VarInsnNode;
|
||||
|
||||
public class GameDataAccelerator implements TurboClassTransformer {
|
||||
private static final int MASK_REGISTER_BLOCK = 0b1;
|
||||
private static final int MASK_REGISTER_ITEM = 0b10;
|
||||
|
||||
private void transformRegisterItem(MethodNode method) {
|
||||
var iter = method.instructions.iterator();
|
||||
while (iter.hasNext()) {
|
||||
var insn = iter.next();
|
||||
if (!(insn instanceof FieldInsnNode))
|
||||
continue;
|
||||
var typeInsn = (FieldInsnNode) insn;
|
||||
if (!(typeInsn.owner.equals("net/minecraft/item/ItemBlock") &&
|
||||
typeInsn.name.equals("field_150939_a") &&
|
||||
typeInsn.desc.equals("Lnet/minecraft/block/Block;")))
|
||||
continue;
|
||||
iter.previous();
|
||||
iter.add(new InsnNode(Opcodes.DUP));
|
||||
iter.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||
iter.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/falsepattern/endlessids/asm/GameDataHooks", "cacheItemBlock", "(Lnet/minecraft/item/ItemBlock;Lcpw/mods/fml/common/registry/GameData;)V", false));
|
||||
return;
|
||||
}
|
||||
transformError(method);
|
||||
}
|
||||
|
||||
private static void transformError(MethodNode method) {
|
||||
EndlessIDsTransformer.logger.error("Could not add caching code to GameData." + method.name + method.desc);
|
||||
}
|
||||
|
||||
private void transformRegisterBlock(MethodNode method) {
|
||||
var iter = method.instructions.iterator();
|
||||
while (iter.hasNext()) {
|
||||
var insn = iter.next();
|
||||
if ((insn.getOpcode() != Opcodes.GETFIELD) && !(insn instanceof FieldInsnNode))
|
||||
continue;
|
||||
var fieldInsn = (FieldInsnNode) insn;
|
||||
if (!(fieldInsn.owner.equals("cpw/mods/fml/common/registry/GameData") &&
|
||||
fieldInsn.name.equals("iItemRegistry") &&
|
||||
fieldInsn.desc.equals("Lcpw/mods/fml/common/registry/FMLControlledNamespacedRegistry;")))
|
||||
continue;
|
||||
iter.remove();
|
||||
{
|
||||
val testInsn = iter.previous();
|
||||
if (testInsn.getOpcode() != Opcodes.ALOAD || ((VarInsnNode)testInsn).var != 0)
|
||||
throw new AsmTransformException("Opcode assertion 1 failed!");
|
||||
}
|
||||
iter.remove();
|
||||
{
|
||||
val testInsn = iter.next();
|
||||
if (testInsn.getOpcode() != Opcodes.INVOKEVIRTUAL)
|
||||
throw new AsmTransformException("Opcodes assertion 2 failed!");
|
||||
|
||||
val testInvoke = (MethodInsnNode)testInsn;
|
||||
if (!testInvoke.owner.equals("cpw/mods/fml/common/registry/FMLControlledNamespacedRegistry") ||
|
||||
!testInvoke.name.equals("typeSafeIterable"))
|
||||
throw new AsmTransformException("Opcodes assertion 3 failed!");
|
||||
}
|
||||
iter.remove();
|
||||
iter.add(new VarInsnNode(Opcodes.ALOAD, 1));
|
||||
iter.add(new VarInsnNode(Opcodes.ALOAD, 0));
|
||||
iter.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/falsepattern/endlessids/asm/GameDataHooks", "fetchCachedItemBlock", "(Lnet/minecraft/block/Block;Lcpw/mods/fml/common/registry/GameData;)Lnet/minecraft/item/ItemBlock;", false));
|
||||
iter.add(new VarInsnNode(Opcodes.ASTORE, 4));
|
||||
iter.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "com/falsepattern/endlessids/asm/GameDataHooks", "fakeIterable", "()Ljava/lang/Iterable;", false));
|
||||
return;
|
||||
}
|
||||
transformError(method);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String owner() {
|
||||
return Tags.MODNAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "GameDataAccelerator";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTransformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
return GeneralConfig.enableRegistryPerformanceTweak && "cpw.mods.fml.common.registry.GameData".equals(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
val cn = classNode.getNode();
|
||||
if (cn == null)
|
||||
return false;
|
||||
var cacheField = new FieldNode(Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC, "endlessIDsItemBlockCache", "Lcom/falsepattern/endlessids/util/WeakIdentityHashMap;", null, null);
|
||||
cn.fields.add(cacheField);
|
||||
int tweaksLeft = MASK_REGISTER_BLOCK | MASK_REGISTER_ITEM;
|
||||
for (val method: cn.methods) {
|
||||
if ((tweaksLeft & MASK_REGISTER_BLOCK) != 0 &&
|
||||
method.name.equals("registerBlock") &&
|
||||
method.desc.equals("(Lnet/minecraft/block/Block;Ljava/lang/String;I)I")) {
|
||||
transformRegisterBlock(method);
|
||||
tweaksLeft &= ~MASK_REGISTER_BLOCK;
|
||||
} else if ((tweaksLeft & MASK_REGISTER_ITEM) != 0 &&
|
||||
method.name.equals("registerItem") &&
|
||||
method.desc.equals("(Lnet/minecraft/item/Item;Ljava/lang/String;I)I")) {
|
||||
transformRegisterItem(method);
|
||||
tweaksLeft &= ~MASK_REGISTER_ITEM;
|
||||
}
|
||||
if (tweaksLeft == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
throw new AsmTransformException("Failed to accelerate block registration! Disable enableRegistryPerformanceTweak in the EndlessIDs config!");
|
||||
}
|
||||
}
|
||||
+50
-7
@@ -1,22 +1,65 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
||||
import com.falsepattern.endlessids.asm.EndlessIDsTransformer;
|
||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.InsnNode;
|
||||
|
||||
public class SpaceCoreModInfoGenerator implements IClassNodeTransformer {
|
||||
public class SpaceCoreModInfoGenerator implements TurboClassTransformer {
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
if (obfuscated) {
|
||||
return;
|
||||
}
|
||||
public String owner() {
|
||||
return Tags.MODNAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "SpaceCoreModInfoGenerator";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTransformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
return EndlessIDsCore.deobfuscated && "com.spacechase0.minecraft.spacecore.mcp.ModInfoGenerator".equals(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
val cn = classNode.getNode();
|
||||
if (cn == null)
|
||||
return false;
|
||||
for (val method : cn.methods) {
|
||||
if (method.name.equals("generate")) {
|
||||
val iterator = method.instructions.iterator();
|
||||
iterator.add(new InsnNode(Opcodes.RETURN));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+264
-81
@@ -1,11 +1,37 @@
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
|
||||
import com.falsepattern.endlessids.asm.IETransformer;
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
package com.falsepattern.endlessids.asm.transformer.chunk;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.asm.EndlessIDsCore;
|
||||
import com.falsepattern.endlessids.asm.EndlessIDsTransformer;
|
||||
import com.falsepattern.lib.turboasm.BytePatternMatcher;
|
||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.Data;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
import org.objectweb.asm.tree.AbstractInsnNode;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
@@ -21,6 +47,7 @@ import org.objectweb.asm.tree.VarInsnNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
@@ -70,7 +97,13 @@ import java.util.function.Supplier;
|
||||
* //state 8
|
||||
* ILOAD k
|
||||
* //state 9
|
||||
* //Branch X | Y
|
||||
* //X:
|
||||
* ALOAD abyte
|
||||
* //Y:
|
||||
* ALOAD <something else>
|
||||
* GETFIELD classname.fieldname : [Lnet/minecraft/world/biome/BiomeGenBase;
|
||||
* //Join X | Y
|
||||
* //state 10
|
||||
* ARRAYLENGTH
|
||||
* //state 11
|
||||
@@ -116,7 +149,7 @@ import java.util.function.Supplier;
|
||||
* L6
|
||||
* </pre>
|
||||
*/
|
||||
public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
public class ChunkProviderSuperPatcher implements TurboClassTransformer {
|
||||
public static final String[] CLASS_BiomeGenBase;
|
||||
public static final String[] CLASS_IChunkProvider;
|
||||
public static final String[] CLASS_ChunkProviderGenerate;
|
||||
@@ -133,6 +166,7 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
private static State<AbstractInsnNode> STATE7 = null;
|
||||
private static State<AbstractInsnNode> STATE8 = null;
|
||||
private static State<AbstractInsnNode> STATE9 = null;
|
||||
private static State<AbstractInsnNode> STATE9_Y = null;
|
||||
private static State<AbstractInsnNode> STATE10 = null;
|
||||
private static State<AbstractInsnNode> STATE11 = null;
|
||||
private static State<AbstractInsnNode> STATE12 = null;
|
||||
@@ -148,31 +182,38 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
private static State<AbstractInsnNode> STATE17 = null;
|
||||
private static State<AbstractInsnNode> STATE_FINAL = null;
|
||||
|
||||
private static final BytePatternMatcher chunkClassMatcher;
|
||||
private static final BytePatternMatcher getBiomeArrayMethodMatcher;
|
||||
|
||||
static {
|
||||
if (IETransformer.isObfuscated) {
|
||||
CLASS_BiomeGenBase = new String[]{"ahu", "net/minecraft/world/biome/BiomeGenBase"};
|
||||
CLASS_IChunkProvider = new String[]{"apu", "net/minecraft/world/chunk/IChunkProvider"};
|
||||
CLASS_ChunkProviderGenerate = new String[]{"aqz", "net/minecraft/world/gen/ChunkProviderGenerate"};
|
||||
CLASS_Chunk = new String[]{"apx", "net/minecraft/world/chunk/Chunk"};
|
||||
FIELD_biomeID = new String[]{"ay", "field_76756_M"};
|
||||
METHOD_getBiomeArray = new String[]{"m", "func_76605_m"};
|
||||
} else {
|
||||
if (EndlessIDsCore.deobfuscated) {
|
||||
CLASS_BiomeGenBase = new String[]{"net/minecraft/world/biome/BiomeGenBase"};
|
||||
CLASS_IChunkProvider = new String[]{"net/minecraft/world/chunk/IChunkProvider"};
|
||||
CLASS_ChunkProviderGenerate = new String[]{"net/minecraft/world/gen/ChunkProviderGenerate"};
|
||||
CLASS_Chunk = new String[]{"net/minecraft/world/chunk/Chunk"};
|
||||
FIELD_biomeID = new String[]{"biomeID"};
|
||||
METHOD_getBiomeArray = new String[]{"getBiomeArray"};
|
||||
} else {
|
||||
CLASS_BiomeGenBase = new String[]{"ahu", "net/minecraft/world/biome/BiomeGenBase"};
|
||||
CLASS_IChunkProvider = new String[]{"apu", "net/minecraft/world/chunk/IChunkProvider"};
|
||||
CLASS_ChunkProviderGenerate = new String[]{"aqz", "net/minecraft/world/gen/ChunkProviderGenerate"};
|
||||
CLASS_Chunk = new String[]{"apx", "net/minecraft/world/chunk/Chunk"};
|
||||
FIELD_biomeID = new String[]{"ay", "field_76756_M"};
|
||||
METHOD_getBiomeArray = new String[]{"m", "func_76605_m"};
|
||||
}
|
||||
|
||||
chunkClassMatcher = new BytePatternMatcher(CLASS_Chunk, BytePatternMatcher.Mode.Equals);
|
||||
getBiomeArrayMethodMatcher = new BytePatternMatcher(METHOD_getBiomeArray, BytePatternMatcher.Mode.Equals);
|
||||
}
|
||||
|
||||
static {
|
||||
STATE_FINAL = (insn, memory) -> STATE_FINAL;
|
||||
|
||||
STATE0 = casting(VarInsnNode.class, (insn, memory) -> {
|
||||
memory.reset();
|
||||
if (insn.getOpcode() == Opcodes.ALOAD) {
|
||||
memory.chunkIndex = insn.var;
|
||||
memory.startingInsn = memory.currentInsn;
|
||||
memory.startingInsn = insn;
|
||||
return STATE1;
|
||||
}
|
||||
return STATE0;
|
||||
@@ -183,7 +224,7 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
anyMatch(insn.owner, CLASS_Chunk) &&
|
||||
anyMatch(insn.name, METHOD_getBiomeArray) &&
|
||||
insn.desc.equals("()[B")) {
|
||||
memory.getBiomeArrayInsn = memory.currentInsn;
|
||||
memory.getBiomeArrayInsn = insn;
|
||||
return STATE2;
|
||||
}
|
||||
return STATE0;
|
||||
@@ -192,6 +233,7 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
STATE2 = casting(VarInsnNode.class, (insn, memory) -> {
|
||||
if (insn.getOpcode() == Opcodes.ASTORE) {
|
||||
memory.biomeArrayIndex = insn.var;
|
||||
memory.startPatchingFrames();
|
||||
return STATE3;
|
||||
}
|
||||
return STATE0;
|
||||
@@ -227,7 +269,10 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
STATE9 = casting(VarInsnNode.class, (insn, memory) ->
|
||||
insn.getOpcode() == Opcodes.ALOAD
|
||||
&& insn.var == memory.biomeArrayIndex
|
||||
? STATE10 : STATE0);
|
||||
? STATE10 : STATE9_Y);
|
||||
|
||||
STATE9_Y = casting(FieldInsnNode.class, insn ->
|
||||
insn.getOpcode() == Opcodes.GETFIELD && anyMatch(insn.desc, CLASS_BiomeGenBase, "[L", ";") ? STATE10: STATE0);
|
||||
|
||||
STATE10 = casting(InsnNode.class, (insn) -> insn.getOpcode() == Opcodes.ARRAYLENGTH ? STATE11 : STATE0);
|
||||
|
||||
@@ -294,7 +339,7 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
|
||||
STATE16 = casting(InsnNode.class, (insn, memory) -> {
|
||||
if (insn.getOpcode() == Opcodes.I2B) {
|
||||
memory.castInsn = memory.currentInsn;
|
||||
memory.castInsn = insn;
|
||||
return STATE17;
|
||||
}
|
||||
return STATE0;
|
||||
@@ -302,54 +347,13 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
|
||||
STATE17 = casting(InsnNode.class, (insn, memory) -> {
|
||||
if (insn.getOpcode() == Opcodes.BASTORE) {
|
||||
memory.arrayStoreInsn = memory.currentInsn;
|
||||
memory.arrayStoreInsn = insn;
|
||||
return STATE_FINAL;
|
||||
}
|
||||
return STATE0;
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean shouldPatch(final ClassNode cn) {
|
||||
if (!GeneralConfig.extendBiome) {
|
||||
return false;
|
||||
}
|
||||
for (MethodNode method : cn.methods) {
|
||||
if (scanForBrokenCall(method)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean scanForBrokenCall(MethodNode method) {
|
||||
val instructions = method.instructions;
|
||||
val insnCount = instructions.size();
|
||||
for (int i = 0; i < insnCount; i++) {
|
||||
val insn = instructions.get(i);
|
||||
if (insn.getOpcode() != Opcodes.INVOKEVIRTUAL) {
|
||||
continue;
|
||||
}
|
||||
val invoke = (MethodInsnNode) insn;
|
||||
|
||||
if (anyMatch(invoke.owner, CLASS_Chunk) && anyMatch(invoke.name, METHOD_getBiomeArray) &&
|
||||
invoke.desc.equals("()[B")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean anyMatch(List<String> str, String[] candidates) {
|
||||
for (val s : str) {
|
||||
for (val candidate : candidates) {
|
||||
if (s.equals(candidate)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static boolean anyMatch(String str, String[] candidates) {
|
||||
for (val candidate : candidates) {
|
||||
if (str.equals(candidate)) {
|
||||
@@ -388,23 +392,28 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
};
|
||||
}
|
||||
|
||||
private static Memory findTheTarget(MethodNode method) {
|
||||
private static Memory findTheTarget(MethodNode method, ClassNode cn) {
|
||||
val insnList = method.instructions;
|
||||
var currentState = STATE0;
|
||||
val memory = new Memory();
|
||||
for (int insnIndex = 0; insnIndex < insnList.size(); insnIndex++) {
|
||||
memory.currentInsn = insnIndex;
|
||||
val insn = insnList.get(insnIndex);
|
||||
memory.initLocals(method, cn);
|
||||
val iter = insnList.iterator();
|
||||
while (iter.hasNext()) {
|
||||
val insn = iter.next();
|
||||
if (insn instanceof FrameNode) {
|
||||
val frame = (FrameNode) insn;
|
||||
if (frame.type == Opcodes.F_NEW) {
|
||||
memory.locals.clear();
|
||||
memory.locals.addAll(frame.local);
|
||||
}
|
||||
memory.recordFrame(frame);
|
||||
memory.updateLocalsState(frame);
|
||||
}
|
||||
val newState = currentState.apply(insn, memory);
|
||||
if (newState != null) {
|
||||
if (newState == STATE_FINAL) {
|
||||
while (iter.hasNext()) {
|
||||
val insn2 = iter.next();
|
||||
if (insn2 instanceof FrameNode) {
|
||||
memory.recordFrame((FrameNode) insn2);
|
||||
}
|
||||
}
|
||||
return memory;
|
||||
}
|
||||
currentState = newState;
|
||||
@@ -414,30 +423,92 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
public String owner() {
|
||||
return Tags.MODNAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "ChunkProviderSuperPatcher";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTransformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
if ("net.minecraft.world.chunk.storage.AnvilChunkLoader".equals(className)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
val metadata = classNode.getOriginalMetadata();
|
||||
if (metadata == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return metadata.matchesBytes(chunkClassMatcher) && metadata.matchesBytes(getBiomeArrayMethodMatcher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
val cn = classNode.getNode();
|
||||
if (cn == null)
|
||||
return false;
|
||||
boolean patched = false;
|
||||
for (val method : cn.methods) {
|
||||
val memory = findTheTarget(method);
|
||||
val memory = findTheTarget(method, cn);
|
||||
if (memory != null) {
|
||||
patched = true;
|
||||
IETransformer.logger.debug("[ChunkProvider patcher]: Match found in method " + method.name);
|
||||
EndlessIDsTransformer.logger.debug("[ChunkProvider patcher]: Match found in method " + method.name);
|
||||
val insnList = method.instructions;
|
||||
for (val node : method.localVariables) {
|
||||
if (node.desc.equals("[B") && node.index == memory.biomeArrayIndex) {
|
||||
node.desc = "[S";
|
||||
}
|
||||
}
|
||||
val getBiomeArray = (MethodInsnNode) insnList.get(memory.getBiomeArrayInsn);
|
||||
val getBiomeArray = memory.getBiomeArrayInsn;
|
||||
insnList.set(getBiomeArray,
|
||||
new MethodInsnNode(Opcodes.INVOKEVIRTUAL, getBiomeArray.owner, "getBiomeShortArray",
|
||||
"()[S", false));
|
||||
insnList.set(insnList.get(memory.castInsn), new InsnNode(Opcodes.I2S));
|
||||
insnList.set(insnList.get(memory.arrayStoreInsn), new InsnNode(Opcodes.SASTORE));
|
||||
insnList.set(memory.castInsn, new InsnNode(Opcodes.I2S));
|
||||
insnList.set(memory.arrayStoreInsn, new InsnNode(Opcodes.SASTORE));
|
||||
patchStackFrames(memory, method, cn);
|
||||
}
|
||||
}
|
||||
if (!patched) {
|
||||
IETransformer.logger.debug("[ChunkProvider patcher]: No matches found in class! This is not explicitly " +
|
||||
"an error, because the patch might be applied by a mixin instead!");
|
||||
EndlessIDsTransformer.logger.debug("[ChunkProvider patcher]: No matches found in class! This is not explicitly " +
|
||||
"an error, because the patch might be applied by a mixin instead!");
|
||||
}
|
||||
return patched;
|
||||
}
|
||||
|
||||
|
||||
private static void patchStackFrames(Memory memory, MethodNode method, ClassNode owner) {
|
||||
memory.locals.clear();
|
||||
memory.initLocals(method, owner);
|
||||
for (val frame: memory.framesLeaveUnpatched)
|
||||
memory.updateLocalsState(frame);
|
||||
|
||||
int localToPatch = memory.biomeArrayIndex;
|
||||
for (val frame: memory.framesToPatch) {
|
||||
int currentLocalIndex = memory.locals.size() - 1;
|
||||
if (frame.local != null) {
|
||||
switch (frame.type) {
|
||||
case Opcodes.F_NEW:
|
||||
case Opcodes.F_FULL:
|
||||
if (frame.local.size() > localToPatch &&
|
||||
"[B".equals(frame.local.get(localToPatch))) {
|
||||
frame.local.set(localToPatch, "[S");
|
||||
}
|
||||
break;
|
||||
case Opcodes.F_APPEND:
|
||||
if (currentLocalIndex < localToPatch &&
|
||||
(currentLocalIndex + frame.local.size()) >= localToPatch) {
|
||||
int indexInFrame = localToPatch - currentLocalIndex - 1;
|
||||
if ("[B".equals(frame.local.get(indexInFrame))) {
|
||||
frame.local.set(indexInFrame, "[S");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
memory.updateLocalsState(frame);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,13 +520,125 @@ public class ChunkProviderSuperPatcher implements IClassNodeTransformer {
|
||||
private static class Memory {
|
||||
|
||||
final List<Object> locals = new ArrayList<>();
|
||||
int currentInsn;
|
||||
int startingInsn;
|
||||
int getBiomeArrayInsn;
|
||||
int castInsn;
|
||||
int arrayStoreInsn;
|
||||
List<Object> localsAtPatchStart;
|
||||
List<FrameNode> framesLeaveUnpatched = new ArrayList<>();
|
||||
List<FrameNode> framesToPatch = new ArrayList<>();
|
||||
boolean patchingFrames;
|
||||
VarInsnNode startingInsn;
|
||||
MethodInsnNode getBiomeArrayInsn;
|
||||
InsnNode castInsn;
|
||||
InsnNode arrayStoreInsn;
|
||||
int chunkIndex;
|
||||
int biomeArrayIndex;
|
||||
int iteratorIndex;
|
||||
|
||||
public void startPatchingFrames() {
|
||||
localsAtPatchStart = new ArrayList<>(locals);
|
||||
patchingFrames = true;
|
||||
}
|
||||
|
||||
public void recordFrame(FrameNode frame) {
|
||||
if (patchingFrames)
|
||||
framesToPatch.add(frame);
|
||||
else
|
||||
framesLeaveUnpatched.add(frame);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
localsAtPatchStart = null;
|
||||
framesLeaveUnpatched.addAll(framesToPatch);
|
||||
framesToPatch.clear();
|
||||
patchingFrames = false;
|
||||
startingInsn = null;
|
||||
getBiomeArrayInsn = null;
|
||||
castInsn = null;
|
||||
arrayStoreInsn = null;
|
||||
chunkIndex = 0;
|
||||
biomeArrayIndex = 0;
|
||||
iteratorIndex = 0;
|
||||
}
|
||||
|
||||
private static int getDescriptorNameEnd(String desc, int index) {
|
||||
val c = desc.charAt(index);
|
||||
switch (c) {
|
||||
case '[':
|
||||
return getDescriptorNameEnd(desc, index + 1);
|
||||
case 'L':
|
||||
do {
|
||||
index++;
|
||||
} while (desc.charAt(index) != ';');
|
||||
default:
|
||||
return index + 1;
|
||||
}
|
||||
}
|
||||
|
||||
private static List<Object> parseDesc(String desc) {
|
||||
val result = new ArrayList<Object>();
|
||||
desc = desc.substring(1, desc.indexOf(')'));
|
||||
for (int i = 0; i < desc.length(); i++) {
|
||||
val end = getDescriptorNameEnd(desc, i);
|
||||
val name = desc.substring(i, end);
|
||||
switch (name) {
|
||||
case "I":
|
||||
case "S":
|
||||
case "B":
|
||||
case "Z":
|
||||
result.add(Opcodes.INTEGER);
|
||||
break;
|
||||
case "F":
|
||||
result.add(Opcodes.FLOAT);
|
||||
break;
|
||||
case "D":
|
||||
result.add(Opcodes.DOUBLE);
|
||||
result.add(Opcodes.DOUBLE);
|
||||
break;
|
||||
case "J":
|
||||
result.add(Opcodes.LONG);
|
||||
result.add(Opcodes.LONG);
|
||||
break;
|
||||
default:
|
||||
result.add(name);
|
||||
}
|
||||
i = end - 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void initLocals(MethodNode method, ClassNode owner) {
|
||||
locals.clear();
|
||||
if ((method.access & Opcodes.ACC_STATIC) == 0) {
|
||||
locals.add("L" + owner.name + ";");
|
||||
}
|
||||
locals.addAll(parseDesc(method.desc));
|
||||
}
|
||||
|
||||
public void updateLocalsState(FrameNode frame) {
|
||||
switch (frame.type) {
|
||||
case Opcodes.F_NEW:
|
||||
case Opcodes.F_FULL:
|
||||
locals.clear();
|
||||
case Opcodes.F_APPEND:
|
||||
if (frame.local != null) {
|
||||
for (val local : frame.local) {
|
||||
if (Objects.equals(local, Opcodes.DOUBLE) || Objects.equals(local, Opcodes.LONG))
|
||||
locals.add(local);
|
||||
locals.add(local);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Opcodes.F_CHOP: {
|
||||
int removeCount = frame.local.size();
|
||||
for (int i = removeCount - 1; i >= 0 && !locals.isEmpty(); i--) {
|
||||
val removed = locals.remove(locals.size() - 1);
|
||||
if (Objects.equals(removed, Opcodes.DOUBLE) || Objects.equals(removed, Opcodes.LONG))
|
||||
locals.remove(locals.size() - 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Opcodes.F_SAME:
|
||||
case Opcodes.F_SAME1:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.asm.transformer.chunk;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.lib.turboasm.ClassNodeHandle;
|
||||
import com.falsepattern.lib.turboasm.TurboClassTransformer;
|
||||
import lombok.val;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.objectweb.asm.Opcodes;
|
||||
|
||||
public class LOTRFieldExposer implements TurboClassTransformer {
|
||||
@Override
|
||||
public String owner() {
|
||||
return Tags.MODNAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
return "LOTRFieldExposer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTransformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
return "lotr.common.network.LOTRPacketBiomeVariantsWatch".equals(className);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean transformClass(@NotNull String className, @NotNull ClassNodeHandle classNode) {
|
||||
val cn = classNode.getNode();
|
||||
if (cn == null)
|
||||
return false;
|
||||
for (val field: cn.fields) {
|
||||
if ("chunkX".equals(field.name) ||
|
||||
"chunkZ".equals(field.name) ||
|
||||
"variants".equals(field.name)) {
|
||||
field.access &= ~Opcodes.ACC_PRIVATE;
|
||||
field.access |= Opcodes.ACC_PUBLIC;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.config;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.config;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.config;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
@@ -5,62 +27,101 @@ import com.falsepattern.lib.config.Config;
|
||||
import com.falsepattern.lib.config.ConfigurationManager;
|
||||
|
||||
@Config(modid = Tags.MODID)
|
||||
@Config.Comment({"WARNING: THIS CONFIG IS EXTREMELY SENSITIVE TO CHANGES, DISABLING STUFF ONCE THEY HAVE BEEN ENABLED",
|
||||
"CAN CORRUPT YOUR WORLD! ONLY TOUCH THIS FILE IF YOU KNOW WHAT YOU'RE DOING!",
|
||||
"This file should only be edited by modpack developers to fine-tune it for the modpack. Once an option",
|
||||
"has been enabled, it modifies the chunk save data format, which is (partially) compatible with",
|
||||
"vanilla, but removing the mod might cause block/item corruption for higher IDs.",
|
||||
"Additional note: Every client and server must have the exact same config, this also affects netcode."})
|
||||
public class GeneralConfig {
|
||||
@Config.Comment(
|
||||
"WARNING: THIS CONFIG IS EXTREMELY SENSITIVE TO CHANGES, DISABLING STUFF ONCE THEY HAVE BEEN ENABLED\n" +
|
||||
"CAN CORRUPT YOUR WORLD! ONLY TOUCH THIS FILE IF YOU KNOW WHAT YOU'RE DOING!\n" +
|
||||
"This file should only be edited by modpack developers to finetune it for the modpack. Once an option\n" +
|
||||
"has been enabled, it modifies the chunk save data format, which is (partially) compatible with\n" +
|
||||
"vanilla, but removing the mod might cause block/item corruption for higher IDs.\n" +
|
||||
"Additional note: Every client and server must have the exact same config, this also affects netcode.")
|
||||
@Config.DefaultString("")
|
||||
public static String __NOTICE__;
|
||||
|
||||
@Config.Comment("Throw an exception when an invalid block is registered. FOR DEBUGGING PURPOSES")
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean catchUnregisteredBlocks;
|
||||
|
||||
@Config.Comment("Remove invalid (corrupted) blocks from the game. FOR DEBUGGING PURPOSES")
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean removeInvalidBlocks;
|
||||
|
||||
@Config.Comment("Extend Biome IDs. Vanilla limit is 256, new limit is 65536.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendBiome;
|
||||
@Config.Comment("Extend Block and Item IDs. Vanilla limit is 4096/32000, new limit is 16777216 for both.\n" +
|
||||
"See also: countCorrectionBits")
|
||||
|
||||
@Config.Comment({"Extend Block and Item IDs. Vanilla limit is 4096/32000, new limit is 16777216 for both.",
|
||||
"See also: extraBlockIDBits/extraItemIDBits"})
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendBlockItem;
|
||||
@Config.Comment("Extend DataWatcher IDs. Vanilla limit is 31, new limit is 127.\n" +
|
||||
"Disabled by default because of uncertain/weak implementation (taken from NotEnoughIDs)")
|
||||
@Config.DefaultBoolean(false)
|
||||
|
||||
@Config.Comment("Extend DataWatcher IDs. Vanilla limit is 32, new limit is 65536.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendDataWatcher;
|
||||
|
||||
@Config.Comment("Extend Enchantment IDs. Vanilla limit is 256, new limit is 32768.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendEnchantment;
|
||||
|
||||
@Config.Comment("Extend Potion IDs. Vanilla limit is 32, new limit is 65536.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendPotion;
|
||||
@Config.Comment(
|
||||
"Extends the maximum redstone signal strength.\n" + "Only has effect with extendBlockItem enabled.\n" +
|
||||
"WARNING: THIS IS HERE ONLY FOR FUN, IT WILL DEFINITELY CORRUPT YOUR WORLD!")
|
||||
|
||||
@Config.Comment("Extend Entity IDs. Vanilla limit is 256, new limit is 32768.")
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean extendEntity;
|
||||
|
||||
@Config.Comment({"Improves the speed of the block registry by multiple orders of magnitudes.",
|
||||
"It's highly recommended to leave this enabled, especially when using a lot of IDs.",
|
||||
"With this disabled, registering 1 million blocks on a test system took 80 minutes",
|
||||
"With this enabled, registering 1 million blocks on the same system took 7 seconds"})
|
||||
@Config.DefaultBoolean(true)
|
||||
public static boolean enableRegistryPerformanceTweak;
|
||||
|
||||
@Config.Comment({"Extends the maximum redstone signal strength.",
|
||||
"Only has effect with extendBlockItem enabled.",
|
||||
"WARNING: THIS IS HERE ONLY FOR FUN, IT **WILL** CORRUPT YOUR SAVE IF ENABLED! YOU HAVE BEEN WARNED."})
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean extendRedstone;
|
||||
@Config.Comment("Increases the max signal strength of redstone.\n" +
|
||||
"Only has effect with both extendBlockItem and extendRedstone enabled.\n" + "Vanilla value is 15.")
|
||||
|
||||
@Config.Comment({"Increases the max signal strength of redstone.",
|
||||
"Only has effect with both extendBlockItem and extendRedstone enabled.",
|
||||
"Vanilla value is 15."})
|
||||
@Config.RangeInt(min = 15,
|
||||
max = 127)
|
||||
@Config.DefaultInt(15)
|
||||
public static int maxRedstone;
|
||||
@Config.Comment("Use this to tune the amount of available block IDs.\n" +
|
||||
"Minecraft contains some internal code that uses a HUGE amount of RAM with too many block IDs available.\n" +
|
||||
"Notice: This does not affect ITEM IDs.\n" +
|
||||
"The vanilla default is 4k block IDs, while the maximum is 16 million.\n" +
|
||||
"The default setting sets it to 4k (vanilla).\n" +
|
||||
"increase if necessary (when running out of BLOCK IDs in your modpack)\n" +
|
||||
"Only effective if extendBlockItem is enabled.\n" +
|
||||
"(0: 16M, 1: 8M, 2: 4M, 3: 2M, 4: 1M, 5: 512K, 6: 256K, 7: 128K, 8: 64K, 9: 32K, 10: 16K, 11: 8K, 12: 4K)\n")
|
||||
|
||||
@Config.Comment({"Use this to tune the amount of available block IDs.",
|
||||
"Minecraft contains some internal code that uses a HUGE amount of RAM with too many block IDs available.",
|
||||
"Notice: This does not affect ITEM IDs.",
|
||||
"The vanilla default is 4k block IDs, while the maximum is 16 million.",
|
||||
"The default setting sets it to 32k (8x vanilla).",
|
||||
"increase if necessary (when running out of BLOCK IDs in your modpack)",
|
||||
"Only effective if extendBlockItem is enabled.",
|
||||
"Effective values: (0: 4k, 1: 8k, 2: 16k, 3: 32k, 4: 64k, 5: 128k, 6: 256k, 7: 512k, 8: 1M, 9: 2M, 10: 4M, 11: 8M, 12: 16M)",
|
||||
"The effective value of this variable must always be smaller or equal to the effective value of extraItemIDBits"})
|
||||
@Config.RangeInt(min = 0,
|
||||
max = 12)
|
||||
@Config.DefaultInt(12)
|
||||
public static int countCorrectionBits;
|
||||
@Config.DefaultInt(3)
|
||||
public static int extraBlockIDBits;
|
||||
|
||||
@Config.Comment({"Use this to tune the amount of available item IDs.",
|
||||
"Minecraft contains some internal code that uses a HUGE amount of RAM with too many block IDs available.",
|
||||
"The vanilla default is 32k item IDs, while the maximum is 16 million.",
|
||||
"The default setting sets it to 64k (2x vanilla).",
|
||||
"increase if necessary (when running out of ITEM IDs in your modpack)",
|
||||
"Only effective if extendBlockItem is enabled.",
|
||||
"Effective values: (0: 32k, 1: 64k, 2: 128k, 3: 256k, 4: 512k, 5: 1M, 6: 2M, 7: 4M, 8: 8M, 9: 16M)",
|
||||
"The effective value of this variable must always be equal or larger than the effective value of extraBlockIDBits"})
|
||||
@Config.RangeInt(min = 0,
|
||||
max = 9)
|
||||
@Config.DefaultInt(1)
|
||||
public static int extraItemIDBits;
|
||||
|
||||
@Config.Comment({"Older versions of EndlessIDs used to have a \"biome conflict avoidance\" system for automatic biome",
|
||||
"registration logic in some mods conflicting with biome mutations due to the way those get registered.",
|
||||
"It has been disabled in newer releases because it caused more issues than it solved.",
|
||||
"You should use AntiIDConflict to fix those, however, the option is still available here in case you need it."})
|
||||
@Config.DefaultBoolean(false)
|
||||
public static boolean biomeConflictAvoidancePlaceholders;
|
||||
|
||||
static {
|
||||
ConfigurationManager.selfInit();
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.constants;
|
||||
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
@@ -7,14 +29,22 @@ public class ExtendedConstants {
|
||||
//Tunables
|
||||
public static final int bitsPerID = 24;
|
||||
public static final int bitsPerMetadata = 16;
|
||||
public static final int countCorrectionBits = GeneralConfig.countCorrectionBits;
|
||||
public static final int countCorrectionItemBits = 9 - GeneralConfig.extraItemIDBits;
|
||||
public static final int countCorrectionBlockBits = 12 - GeneralConfig.extraBlockIDBits;
|
||||
|
||||
public static final int watchableBits = 7;
|
||||
public static final int watchableBits = 16;
|
||||
public static final int bitsPerBiome = 16;
|
||||
|
||||
public static final int maximumPotionIDs = 65536;
|
||||
public static final int potionIDMask = 0xFFFF;
|
||||
public static final int maximumEnchantmentIDs = 32768;
|
||||
|
||||
public static final int blocksPerSubChunk = 16 * 16 * 16;
|
||||
public static final int subChunkNibbleArraySize = 16 * 16 * 16;
|
||||
|
||||
//Align with max item metadata for spawn eggs. Will be treated as short in netcode
|
||||
public static final int bitsPerEntity = 15;
|
||||
|
||||
//BlockItemIDs
|
||||
public static final int nibblesPerID = bitsPerID / 4;
|
||||
public static final int bytesPerID = (nibblesPerID + 1) / 2;
|
||||
@@ -22,16 +52,16 @@ public class ExtendedConstants {
|
||||
public static final int bytesPerIDPlusMetadata = (nibblesPerID + nibblesPerMetadata + 1) / 2;
|
||||
|
||||
public static final int blockIDMask = (1 << bitsPerID) - 1;
|
||||
public static final int blockIDCount = 1 << (bitsPerID - countCorrectionBits);
|
||||
public static final int blockIDCount = 1 << (bitsPerID - countCorrectionBlockBits);
|
||||
public static final int maxBlockID = blockIDCount - 1;
|
||||
|
||||
public static final int itemIDCount = 1 << (bitsPerID);
|
||||
public static final int itemIDCount = 1 << (bitsPerID - countCorrectionItemBits);
|
||||
public static final int maxItemID = itemIDCount - 1;
|
||||
|
||||
public static final int bitsPerBlock = 8 + bitsPerID + bitsPerMetadata;
|
||||
public static final int nibblesPerBlock = bitsPerBlock / 4;
|
||||
public static final int nibblesPerEBS = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerEBS = (nibblesPerEBS + 1) / 2;
|
||||
public static final int nibblesPerSubChunk = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerSubChunk = (nibblesPerSubChunk + 1) / 2;
|
||||
|
||||
//BiomeIDs
|
||||
public static final int biomeIDCount = 1 << bitsPerBiome;
|
||||
@@ -42,5 +72,9 @@ public class ExtendedConstants {
|
||||
//DataWatcher
|
||||
public static final int watchableCount = 1 << watchableBits;
|
||||
public static final int maxWatchableID = watchableCount - 1;
|
||||
public static final int watchableMask = (0x7 << watchableBits) | maxWatchableID;
|
||||
|
||||
//EntityIDs
|
||||
public static final int entityIDCount = 1 << bitsPerEntity;
|
||||
public static final int entityIDMask = entityIDCount - 1;
|
||||
public static final int maxEntityID = entityIDMask;
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.constants;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@@ -10,6 +32,8 @@ public class VanillaConstants {
|
||||
public static final int watchableBits = 5;
|
||||
public static final int bitsPerBiome = 8;
|
||||
|
||||
public static final int bitsPerEntity = 8;
|
||||
|
||||
//BlockItemIDs
|
||||
public static final int nibblesPerID = bitsPerID / 4;
|
||||
public static final int bytesPerID = (nibblesPerID + 1) / 2;
|
||||
@@ -25,8 +49,8 @@ public class VanillaConstants {
|
||||
|
||||
public static final int bitsPerBlock = 8 + bitsPerID + bitsPerMetadata;
|
||||
public static final int nibblesPerBlock = bitsPerBlock / 4;
|
||||
public static final int nibblesPerEBS = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerEBS = (nibblesPerEBS + 1) / 2;
|
||||
public static final int nibblesPerSubChunk = nibblesPerBlock * 16 * 16 * 16;
|
||||
public static final int bytesPerSubChunk = (nibblesPerSubChunk + 1) / 2;
|
||||
|
||||
//BiomeIDs
|
||||
public static final int biomeIDCount = 1 << bitsPerBiome;
|
||||
@@ -38,4 +62,8 @@ public class VanillaConstants {
|
||||
public static final int watchableCount = 1 << watchableBits;
|
||||
public static final int maxWatchableID = watchableCount - 1;
|
||||
public static final int watchableMask = (0x7 << watchableBits) | maxWatchableID;
|
||||
|
||||
//EntityIDs
|
||||
public static final int entityIDCount = 1 << bitsPerEntity;
|
||||
public static final int maxEntityID = entityIDCount - 1;
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.containers;
|
||||
|
||||
public class BiomeContainer extends _Dummy {
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.containers;
|
||||
|
||||
public class BlockItemContainer extends _Dummy {
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.containers;
|
||||
|
||||
public class DataWatcherContainer extends _Dummy {
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.containers;
|
||||
|
||||
public class EnchantmentContainer extends _Dummy {
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.containers;
|
||||
|
||||
public class PotionContainer extends _Dummy {
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.containers;
|
||||
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
|
||||
@@ -1,17 +1,44 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.managers;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
import com.falsepattern.chunk.api.DataManager;
|
||||
import com.falsepattern.endlessids.Hooks;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDataManager, ChunkDataManager.ChunkNBTDataManager {
|
||||
//NOTE: Also change the save logic in MapWriter mod if changing this
|
||||
public class BiomeManager implements DataManager.PacketDataManager, DataManager.ChunkDataManager {
|
||||
|
||||
@Override
|
||||
public String domain() {
|
||||
@@ -29,17 +56,17 @@ public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer data) {
|
||||
data.asShortBuffer().put(((IChunkMixin)chunk).getBiomeShortArray());
|
||||
public void writeToBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer data) {
|
||||
data.asShortBuffer().put(((ChunkBiomeHook)chunk).getBiomeShortArray());
|
||||
data.position(data.position() + maxPacketSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
var arr = ((IChunkMixin)chunk).getBiomeShortArray();
|
||||
public void readFromBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
var arr = ((ChunkBiomeHook)chunk).getBiomeShortArray();
|
||||
if (arr == null) {
|
||||
arr = new short[16 * 16];
|
||||
((IChunkMixin)chunk).setBiomeShortArray(arr);
|
||||
((ChunkBiomeHook)chunk).setBiomeShortArray(arr);
|
||||
}
|
||||
buffer.asShortBuffer().get(arr);
|
||||
buffer.position(buffer.position() + maxPacketSize());
|
||||
@@ -52,16 +79,16 @@ public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDa
|
||||
|
||||
@Override
|
||||
public void writeChunkToNBT(Chunk chunk, NBTTagCompound nbt) {
|
||||
byte[] arr = Hooks.shortToByteArray(((IChunkMixin)chunk).getBiomeShortArray());
|
||||
byte[] arr = Hooks.shortToByteArray(((ChunkBiomeHook)chunk).getBiomeShortArray());
|
||||
nbt.setByteArray("Biomes16v2", arr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readChunkFromNBT(Chunk chunk, NBTTagCompound nbt) {
|
||||
var data = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
var data = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
if (data == null) {
|
||||
data = new short[16 * 16];
|
||||
((IChunkMixin)chunk).setBiomeShortArray(data);
|
||||
((ChunkBiomeHook)chunk).setBiomeShortArray(data);
|
||||
}
|
||||
if (nbt.hasKey("Biomes16v2", 7)) {
|
||||
Hooks.byteToShortArray(nbt.getByteArray("Biomes16v2"), 0, data, 0, data.length * 2);
|
||||
@@ -72,4 +99,33 @@ public class BiomeManager implements ChunkDataManager, ChunkDataManager.PacketDa
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneChunk(Chunk fromVanilla, Chunk toVanilla) {
|
||||
val from = (ChunkBiomeHook) fromVanilla;
|
||||
val to = (ChunkBiomeHook) toVanilla;
|
||||
|
||||
to.setBiomeShortArray(ArrayUtil.copyArray(from.getBiomeShortArray(), to.getBiomeShortArray()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String version() {
|
||||
return Tags.MODID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String newInstallDescription() {
|
||||
return "EndlessIDs extended biome data. Vanilla biome data is limited to 256 biomes. This allows for 65536 biomes.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String uninstallMessage() {
|
||||
return "EndlessIDs extended biome data has been uninstalled. Biomes are limited to 256,\n" +
|
||||
"and any biomes with IDs above 255 in the save will be corrupted.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String versionChangeMessage(String priorVersion) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,51 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.managers;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
import com.falsepattern.chunk.api.DataManager;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IExtendedBlockStorageMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.NibbleArray;
|
||||
import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BlockIDManager implements ChunkDataManager, ChunkDataManager.PacketDataManager, ChunkDataManager.SectionNBTDataManager {
|
||||
import static com.falsepattern.endlessids.constants.ExtendedConstants.blocksPerSubChunk;
|
||||
import static com.falsepattern.endlessids.util.DataUtil.*;
|
||||
|
||||
//NOTE: Also change the save logic in MapWriter mod if changing this
|
||||
public class BlockIDManager implements DataManager.PacketDataManager, DataManager.CubicPacketDataManager, DataManager.SubChunkDataManager, DataManager.BlockPacketDataManager {
|
||||
|
||||
@Override
|
||||
public String domain() {
|
||||
@@ -31,35 +63,35 @@ public class BlockIDManager implements ChunkDataManager, ChunkDataManager.Packet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void writeToBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
int storageFlags = 0;
|
||||
val start = data.position() + 4;
|
||||
data.position(start);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
|
||||
storageFlags |= ebs.getEBSMSBMask() << (i * 2);
|
||||
storageFlags |= subChunk.eid$getBlockMask() << (i * 2);
|
||||
|
||||
val b1 = ebs.getB1();
|
||||
val b1 = subChunk.eid$getB1();
|
||||
data.put(b1);
|
||||
|
||||
val b2Low = ebs.getB2Low();
|
||||
val b2Low = subChunk.eid$getB2Low();
|
||||
if (b2Low == null) {
|
||||
continue;
|
||||
}
|
||||
data.put(b2Low.data);
|
||||
|
||||
val b2High = ebs.getB2High();
|
||||
val b2High = subChunk.eid$getB2High();
|
||||
if (b2High == null) {
|
||||
continue;
|
||||
}
|
||||
data.put(b2High.data);
|
||||
|
||||
val b3 = ebs.getB3();
|
||||
val b3 = subChunk.eid$getB3();
|
||||
if (b3 != null) {
|
||||
data.put(b3);
|
||||
}
|
||||
@@ -68,119 +100,236 @@ public class BlockIDManager implements ChunkDataManager, ChunkDataManager.Packet
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void readFromBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
val storageFlags = buffer.getInt();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
val storageFlag = (storageFlags >>> (i * 2)) & 3;
|
||||
val b1 = ebs.getB1();
|
||||
val b1 = subChunk.eid$getB1();
|
||||
buffer.get(b1);
|
||||
if (storageFlag == 0b00) {
|
||||
ebs.clearB2Low();
|
||||
ebs.clearB2High();
|
||||
ebs.clearB3();
|
||||
subChunk.eid$setB2Low(null);
|
||||
subChunk.eid$setB2High(null);
|
||||
subChunk.eid$setB3(null);
|
||||
continue;
|
||||
}
|
||||
var b2Low = ebs.getB2Low();
|
||||
var b2Low = subChunk.eid$getB2Low();
|
||||
if (b2Low == null) {
|
||||
b2Low = ebs.createB2Low();
|
||||
b2Low = subChunk.eid$createB2Low();
|
||||
}
|
||||
buffer.get(b2Low.data);
|
||||
if (storageFlag == 0b01) {
|
||||
ebs.clearB2High();
|
||||
ebs.clearB3();
|
||||
subChunk.eid$setB2High(null);
|
||||
subChunk.eid$setB3(null);
|
||||
continue;
|
||||
}
|
||||
var b2High = ebs.getB2High();
|
||||
var b2High = subChunk.eid$getB2High();
|
||||
if (b2High == null) {
|
||||
b2High = ebs.createB2High();
|
||||
b2High = subChunk.eid$createB2High();
|
||||
}
|
||||
buffer.get(b2High.data);
|
||||
if (storageFlag == 0b10) {
|
||||
ebs.clearB3();
|
||||
subChunk.eid$setB3(null);
|
||||
continue;
|
||||
}
|
||||
var b3 = ebs.getB3();
|
||||
var b3 = subChunk.eid$getB3();
|
||||
if (b3 == null) {
|
||||
b3 = ebs.createB3();
|
||||
b3 = subChunk.eid$createB3();
|
||||
}
|
||||
buffer.get(b3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sectionPrivilegedAccess() {
|
||||
public boolean subChunkPrivilegedAccess() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeSectionToNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
val b1 = ebs.getB1();
|
||||
val b2Low = ebs.getB2Low();
|
||||
val b2High = ebs.getB2High();
|
||||
val b3 = ebs.getB3();
|
||||
section.setByteArray("Blocks", b1);
|
||||
public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
val b1 = subChunk.eid$getB1();
|
||||
val b2Low = subChunk.eid$getB2Low();
|
||||
val b2High = subChunk.eid$getB2High();
|
||||
val b3 = subChunk.eid$getB3();
|
||||
nbt.setByteArray("Blocks", b1);
|
||||
if (b2Low != null) {
|
||||
section.setByteArray("Add", b2Low.data);
|
||||
nbt.setByteArray("Add", b2Low.data);
|
||||
}
|
||||
if (b2High != null) {
|
||||
section.setByteArray("BlocksB2Hi", b2High.data);
|
||||
nbt.setByteArray("BlocksB2Hi", b2High.data);
|
||||
}
|
||||
if (b3 != null) {
|
||||
section.setByteArray("BlocksB3", b3);
|
||||
nbt.setByteArray("BlocksB3", b3);
|
||||
}
|
||||
}
|
||||
|
||||
//NotEnoughIDs world compatibility
|
||||
public static void readSectionFromNBTNotEnoughIDsDFU(IExtendedBlockStorageMixin ebs, NBTTagCompound section) {
|
||||
val data = section.getByteArray("Blocks16");
|
||||
public static void readSubChunkFromNBTNotEnoughIDsDFU(SubChunkBlockHook subChunk, NBTTagCompound nbt) {
|
||||
val data = nbt.getByteArray("Blocks16");
|
||||
val dataShort = new short[data.length >>> 1];
|
||||
ByteBuffer.wrap(data).asShortBuffer().get(dataShort);
|
||||
val b1 = new byte[dataShort.length];
|
||||
val b2L = new byte[dataShort.length >>> 1];
|
||||
val b2H = new byte[dataShort.length >>> 1];
|
||||
val b1 = new byte[blocksPerSubChunk];
|
||||
val b2L = new byte[blocksPerSubChunk >>> 1];
|
||||
val b2H = new byte[blocksPerSubChunk >>> 1];
|
||||
for (int i = 0; i < dataShort.length; i++) {
|
||||
val s = dataShort[i];
|
||||
val nI = i >>> 1;
|
||||
val mI = (i & 1) * 4;
|
||||
b1[i] = (byte) (s & 0x00FF);
|
||||
b2L[nI] |= ((s & 0x0F00) >>> 8) << mI;
|
||||
b2H[nI] |= ((s & 0xF000) >>> 12) << mI;
|
||||
b2L[nI] |= (byte) (((s & 0x0F00) >>> 8) << mI);
|
||||
b2H[nI] |= (byte) (((s & 0xF000) >>> 12) << mI);
|
||||
}
|
||||
ebs.setB1(b1);
|
||||
ebs.setB2Low(new NibbleArray(b2L, 4));
|
||||
ebs.setB2High(new NibbleArray(b2H, 4));
|
||||
subChunk.eid$setB1(b1);
|
||||
subChunk.eid$setB2Low(new NibbleArray(b2L, 4));
|
||||
subChunk.eid$setB2High(new NibbleArray(b2H, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSectionFromNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
if (section.hasKey("Blocks16")) {
|
||||
readSectionFromNBTNotEnoughIDsDFU(ebs, section);
|
||||
public void readSubChunkFromNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
if (nbt.hasKey("Blocks16")) {
|
||||
readSubChunkFromNBTNotEnoughIDsDFU(subChunk, nbt);
|
||||
return;
|
||||
}
|
||||
assert section.hasKey("Blocks");
|
||||
val b1 = section.getByteArray("Blocks");
|
||||
final byte[] b2Low = section.hasKey("Add") ? section.getByteArray("Add") : null;
|
||||
final byte[] b2High = section.hasKey("BlocksB2Hi") ? section.getByteArray("BlocksB2Hi") : null;
|
||||
final byte[] b3 = section.hasKey("BlocksB3") ? section.getByteArray("BlocksB3") : null;
|
||||
assert nbt.hasKey("Blocks");
|
||||
val b1 = nbt.getByteArray("Blocks");
|
||||
final byte[] b2Low = nbt.hasKey("Add") ? nbt.getByteArray("Add") : null;
|
||||
final byte[] b2High = nbt.hasKey("BlocksB2Hi") ? nbt.getByteArray("BlocksB2Hi") : null;
|
||||
final byte[] b3 = nbt.hasKey("BlocksB3") ? nbt.getByteArray("BlocksB3") : null;
|
||||
|
||||
ebs.setB1(b1);
|
||||
subChunk.eid$setB1(ensureSubChunkByteArray(b1));
|
||||
subChunk.eid$setB2Low(ensureSubChunkNibbleArray(b2Low));
|
||||
subChunk.eid$setB2High(ensureSubChunkNibbleArray(b2High));
|
||||
subChunk.eid$setB3(ensureSubChunkByteArray(b3));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneSubChunk(Chunk fromChunk, ExtendedBlockStorage fromVanilla, ExtendedBlockStorage toVanilla) {
|
||||
val from = (SubChunkBlockHook) fromVanilla;
|
||||
val to = (SubChunkBlockHook) toVanilla;
|
||||
|
||||
to.eid$setB1(ArrayUtil.copyArray(from.eid$getB1(), to.eid$getB1()));
|
||||
to.eid$setB2Low(ArrayUtil.copyArray(from.eid$getB2Low(), to.eid$getB2Low()));
|
||||
to.eid$setB2High(ArrayUtil.copyArray(from.eid$getB2High(), to.eid$getB2High()));
|
||||
to.eid$setB3(ArrayUtil.copyArray(from.eid$getB3(), to.eid$getB3()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String version() {
|
||||
return Tags.VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String newInstallDescription() {
|
||||
return "EndlessIDs extended block IDs. Vanilla worlds can be converted to EndlessIDs worlds safely.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String uninstallMessage() {
|
||||
return "EndlessIDs extended block IDs removed. Any blocks with IDs above 4095 will get corrupted.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String versionChangeMessage(String priorVersion) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBlockToPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readBlockFromPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBlockPacketToBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
|
||||
buffer.writeInt(Block.getIdFromBlock(packet.field_148883_d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readBlockPacketFromBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
|
||||
packet.field_148883_d = Block.getBlockById(buffer.readInt());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxPacketSizeCubic() {
|
||||
return 3 * 16 * 16 * 16 + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, ExtendedBlockStorage extendedBlockStorage, ByteBuffer data) {
|
||||
val subChunk = (SubChunkBlockHook) extendedBlockStorage;
|
||||
|
||||
data.put((byte) subChunk.eid$getBlockMask());
|
||||
|
||||
val b1 = subChunk.eid$getB1();
|
||||
data.put(b1);
|
||||
|
||||
val b2Low = subChunk.eid$getB2Low();
|
||||
if (b2Low == null) return;
|
||||
data.put(b2Low.data);
|
||||
|
||||
val b2High = subChunk.eid$getB2High();
|
||||
if (b2High == null) return;
|
||||
data.put(b2High.data);
|
||||
|
||||
val b3 = subChunk.eid$getB3();
|
||||
if (b3 != null) {
|
||||
data.put(b3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, ExtendedBlockStorage extendedBlockStorage, ByteBuffer data) {
|
||||
val subChunk = (SubChunkBlockHook) extendedBlockStorage;
|
||||
val storageFlag = data.get();
|
||||
|
||||
val b1 = subChunk.eid$getB1();
|
||||
data.get(b1);
|
||||
|
||||
if (storageFlag == 0b00) {
|
||||
subChunk.eid$setB2Low(null);
|
||||
subChunk.eid$setB2High(null);
|
||||
subChunk.eid$setB3(null);
|
||||
return;
|
||||
}
|
||||
|
||||
var b2Low = subChunk.eid$getB2Low();
|
||||
if (b2Low == null) {
|
||||
ebs.clearB2Low();
|
||||
} else {
|
||||
ebs.setB2Low(new NibbleArray(b2Low, 4));
|
||||
b2Low = subChunk.eid$createB2Low();
|
||||
}
|
||||
data.get(b2Low.data);
|
||||
|
||||
if (storageFlag == 0b01) {
|
||||
subChunk.eid$setB2High(null);
|
||||
subChunk.eid$setB3(null);
|
||||
return;
|
||||
}
|
||||
|
||||
var b2High = subChunk.eid$getB2High();
|
||||
if (b2High == null) {
|
||||
ebs.clearB2High();
|
||||
} else {
|
||||
ebs.setB2High(new NibbleArray(b2High, 4));
|
||||
b2High = subChunk.eid$createB2High();
|
||||
}
|
||||
ebs.setB3(b3);
|
||||
data.get(b2High.data);
|
||||
|
||||
if (storageFlag == 0b10) {
|
||||
subChunk.eid$setB3(null);
|
||||
return;
|
||||
}
|
||||
|
||||
var b3 = subChunk.eid$getB3();
|
||||
if (b3 == null) {
|
||||
b3 = subChunk.eid$createB3();
|
||||
}
|
||||
data.get(b3);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,50 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.managers;
|
||||
|
||||
import com.falsepattern.chunk.api.ChunkDataManager;
|
||||
import com.falsepattern.chunk.api.ArrayUtil;
|
||||
import com.falsepattern.chunk.api.DataManager;
|
||||
import com.falsepattern.endlessids.Tags;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IExtendedBlockStorageMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook;
|
||||
import com.falsepattern.endlessids.util.DataUtil;
|
||||
import lombok.val;
|
||||
import lombok.var;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.NibbleArray;
|
||||
import net.minecraft.world.chunk.storage.ExtendedBlockStorage;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
public class BlockMetaManager implements ChunkDataManager, ChunkDataManager.PacketDataManager, ChunkDataManager.SectionNBTDataManager {
|
||||
import static com.falsepattern.endlessids.constants.ExtendedConstants.blocksPerSubChunk;
|
||||
|
||||
//NOTE: Also change the save logic in MapWriter mod if changing this
|
||||
public class BlockMetaManager implements DataManager.PacketDataManager, DataManager.CubicPacketDataManager, DataManager.SubChunkDataManager, DataManager.BlockPacketDataManager {
|
||||
|
||||
@Override
|
||||
public String domain() {
|
||||
@@ -31,29 +62,29 @@ public class BlockMetaManager implements ChunkDataManager, ChunkDataManager.Pack
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void writeToBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer data) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
int storageFlags = 0;
|
||||
val start = data.position() + 4;
|
||||
data.position(start);
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
|
||||
storageFlags |= ebs.getEBSMask() << (i * 2);
|
||||
storageFlags |= subChunk.eid$getMetadataMask() << (i * 2);
|
||||
|
||||
val m1Low = ebs.getM1Low();
|
||||
val m1Low = subChunk.eid$getM1Low();
|
||||
data.put(m1Low.data);
|
||||
|
||||
val m1High = ebs.getM1High();
|
||||
val m1High = subChunk.eid$getM1High();
|
||||
if (m1High == null) {
|
||||
continue;
|
||||
}
|
||||
data.put(m1High.data);
|
||||
|
||||
val m2 = ebs.getM2();
|
||||
val m2 = subChunk.eid$getM2();
|
||||
if (m2 != null) {
|
||||
data.put(m2);
|
||||
}
|
||||
@@ -62,73 +93,200 @@ public class BlockMetaManager implements ChunkDataManager, ChunkDataManager.Pack
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromBuffer(Chunk chunk, int ebsMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val ebsList = chunk.getBlockStorageArray();
|
||||
public void readFromBuffer(Chunk chunk, int subChunkMask, boolean forceUpdate, ByteBuffer buffer) {
|
||||
val subChunkList = chunk.getBlockStorageArray();
|
||||
val storageFlags = buffer.getInt();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if ((ebsMask & (1 << i)) == 0 || ebsList[i] == null) {
|
||||
if ((subChunkMask & (1 << i)) == 0 || subChunkList[i] == null) {
|
||||
continue;
|
||||
}
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsList[i];
|
||||
val subChunk = (SubChunkBlockHook) subChunkList[i];
|
||||
val storageFlag = (storageFlags >>> (i * 2)) & 3;
|
||||
val m1Low = ebs.getM1Low();
|
||||
val m1Low = subChunk.eid$getM1Low();
|
||||
buffer.get(m1Low.data);
|
||||
if (storageFlag == 0b01) {
|
||||
ebs.clearM1High();
|
||||
ebs.clearM2();
|
||||
subChunk.eid$setM1High(null);
|
||||
subChunk.eid$setM2(null);
|
||||
continue;
|
||||
}
|
||||
var m1High = ebs.getM1High();
|
||||
var m1High = subChunk.eid$getM1High();
|
||||
if (m1High == null) {
|
||||
m1High = ebs.createM1High();
|
||||
m1High = subChunk.eid$createM1High();
|
||||
}
|
||||
buffer.get(m1High.data);
|
||||
if (storageFlag == 0b10) {
|
||||
ebs.clearM2();
|
||||
subChunk.eid$setM2(null);
|
||||
continue;
|
||||
}
|
||||
var m2 = ebs.getM2();
|
||||
var m2 = subChunk.eid$getM2();
|
||||
if (m2 == null) {
|
||||
m2 = ebs.createM2();
|
||||
m2 = subChunk.eid$createM2();
|
||||
}
|
||||
buffer.get(m2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sectionPrivilegedAccess() {
|
||||
public boolean subChunkPrivilegedAccess() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSectionToNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
val m1Low = ebs.getM1Low();
|
||||
val m1High = ebs.getM1High();
|
||||
val m2 = ebs.getM2();
|
||||
section.setByteArray("Data", m1Low.data);
|
||||
public void writeSubChunkToNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
val m1Low = subChunk.eid$getM1Low();
|
||||
val m1High = subChunk.eid$getM1High();
|
||||
val m2 = subChunk.eid$getM2();
|
||||
nbt.setByteArray("Data", m1Low.data);
|
||||
if (m1High != null) {
|
||||
section.setByteArray("Data1High", m1High.data);
|
||||
nbt.setByteArray("Data1High", m1High.data);
|
||||
}
|
||||
if (m2 != null) {
|
||||
section.setByteArray("Data2", m2);
|
||||
nbt.setByteArray("Data2", m2);
|
||||
}
|
||||
}
|
||||
|
||||
//NotEnoughIDs world compatibility
|
||||
private void readSubChunkFromNBTNotEnoughIDsDFU(SubChunkBlockHook subChunk, NBTTagCompound nbt) {
|
||||
val data = nbt.getByteArray("Data16");
|
||||
val dataShort = new short[data.length >>> 1];
|
||||
ByteBuffer.wrap(data).asShortBuffer().get(dataShort);
|
||||
val m1Low = new byte[blocksPerSubChunk >>> 1];
|
||||
val m1High = new byte[blocksPerSubChunk >>> 1];
|
||||
val m2 = new byte[blocksPerSubChunk];
|
||||
for (int i = 0; i < dataShort.length; i++) {
|
||||
val s = dataShort[i];
|
||||
val nI = i >>> 1;
|
||||
val mI = (i & 1) * 4;
|
||||
m1Low[nI] |= (byte) ((s & 0x000F) << mI);
|
||||
m1High[nI] |= (byte) (((s & 0x00F0) >>> 4) << mI);
|
||||
m2[i] = (byte) ((s & 0xFF00) >>> 8);
|
||||
}
|
||||
subChunk.eid$setM1Low(new NibbleArray(m1Low, 4));
|
||||
subChunk.eid$setM1High(new NibbleArray(m1High, 4));
|
||||
subChunk.eid$setM2(m2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSubChunkFromNBT(Chunk chunk, ExtendedBlockStorage subChunkVanilla, NBTTagCompound nbt) {
|
||||
val subChunk = (SubChunkBlockHook) subChunkVanilla;
|
||||
if (nbt.hasKey("Data16")) {
|
||||
readSubChunkFromNBTNotEnoughIDsDFU(subChunk, nbt);
|
||||
return;
|
||||
}
|
||||
assert nbt.hasKey("Data");
|
||||
val m1Low = nbt.getByteArray("Data");
|
||||
final byte[] m1High = nbt.hasKey("Data1High") ? nbt.getByteArray("Data1High") : null;
|
||||
final byte[] m2 = nbt.hasKey("Data2") ? nbt.getByteArray("Data2") : null;
|
||||
|
||||
subChunk.eid$setM1Low(DataUtil.ensureSubChunkNibbleArray(m1Low));
|
||||
subChunk.eid$setM1High(DataUtil.ensureSubChunkNibbleArray(m1High));
|
||||
subChunk.eid$setM2(DataUtil.ensureSubChunkByteArray(m2));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cloneSubChunk(Chunk fromChunk, ExtendedBlockStorage fromVanilla, ExtendedBlockStorage toVanilla) {
|
||||
val from = (SubChunkBlockHook) fromVanilla;
|
||||
val to = (SubChunkBlockHook) toVanilla;
|
||||
|
||||
to.eid$setM1Low(ArrayUtil.copyArray(from.eid$getM1Low(), to.eid$getM1Low()));
|
||||
to.eid$setM1High(ArrayUtil.copyArray(from.eid$getM1High(), to.eid$getM1High()));
|
||||
to.eid$setM2(ArrayUtil.copyArray(from.eid$getM2(), to.eid$getM2()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String version() {
|
||||
return Tags.VERSION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String newInstallDescription() {
|
||||
return "EndlessIDs extended block metadata. Vanilla worlds can be converted to EndlessIDs worlds safely.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String uninstallMessage() {
|
||||
return "EndlessIDs extended block metadata removed. Any blocks with metadata above 15 will get corrupted.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String versionChangeMessage(String priorVersion) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBlockToPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readBlockFromPacket(Chunk chunk, int x, int y, int z, S23PacketBlockChange packet) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBlockPacketToBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
|
||||
buffer.writeShort(packet.field_148884_e & 0xFFFF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readBlockPacketFromBuffer(S23PacketBlockChange packet, PacketBuffer buffer) {
|
||||
packet.field_148884_e = buffer.readUnsignedShort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxPacketSizeCubic() {
|
||||
return 2 * 16 * 16 * 16 + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBuffer(Chunk chunk, ExtendedBlockStorage extendedBlockStorage, ByteBuffer data) {
|
||||
val subChunk = (SubChunkBlockHook) extendedBlockStorage;
|
||||
|
||||
data.put((byte) subChunk.eid$getMetadataMask());
|
||||
|
||||
val m1Low = subChunk.eid$getM1Low();
|
||||
data.put(m1Low.data);
|
||||
|
||||
val m1High = subChunk.eid$getM1High();
|
||||
if (m1High == null) return;
|
||||
data.put(m1High.data);
|
||||
|
||||
val m2 = subChunk.eid$getM2();
|
||||
if (m2 != null) {
|
||||
data.put(m2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSectionFromNBT(Chunk chunk, ExtendedBlockStorage ebsVanilla, NBTTagCompound section) {
|
||||
val ebs = (IExtendedBlockStorageMixin) ebsVanilla;
|
||||
assert section.hasKey("Data");
|
||||
val m1Low = section.getByteArray("Data");
|
||||
final byte[] m1High = section.hasKey("Data1High") ? section.getByteArray("Data1High") : null;
|
||||
final byte[] m2 = section.hasKey("Data2") ? section.getByteArray("Data2") : null;
|
||||
public void readFromBuffer(Chunk chunk, ExtendedBlockStorage extendedBlockStorage, ByteBuffer data) {
|
||||
val subChunk = (SubChunkBlockHook) extendedBlockStorage;
|
||||
val storageFlag = data.get();
|
||||
|
||||
ebs.setM1Low(new NibbleArray(m1Low, 4));
|
||||
if (m1High == null) {
|
||||
ebs.clearM1High();
|
||||
} else {
|
||||
ebs.setM1High(new NibbleArray(m1High, 4));
|
||||
val m1Low = subChunk.eid$getM1Low();
|
||||
data.get(m1Low.data);
|
||||
|
||||
if (storageFlag == 0b01) {
|
||||
subChunk.eid$setM1High(null);
|
||||
subChunk.eid$setM2(null);
|
||||
return;
|
||||
}
|
||||
ebs.setM2(m2);
|
||||
|
||||
var m1High = subChunk.eid$getM1High();
|
||||
if (m1High == null) {
|
||||
m1High = subChunk.eid$createM1High();
|
||||
}
|
||||
data.get(m1High.data);
|
||||
|
||||
if (storageFlag == 0b10) {
|
||||
subChunk.eid$setM2(null);
|
||||
return;
|
||||
}
|
||||
|
||||
var m2 = subChunk.eid$getM2();
|
||||
if (m2 == null) {
|
||||
m2 = subChunk.eid$createM2();
|
||||
}
|
||||
data.get(m2);
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import lombok.val;
|
||||
@@ -7,20 +29,24 @@ import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import java.util.function.IntFunction;
|
||||
|
||||
import static com.falsepattern.endlessids.EndlessIDs.FAKE_BIOME_ARRAY_PLACEHOLDER;
|
||||
import static com.falsepattern.endlessids.EndlessIDs.ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
|
||||
|
||||
public class BiomePatchHelper {
|
||||
public static byte[] getBiomeArrayTweaked(Chunk chunk, IntFunction<BiomeGenBase> biomesForGeneration) {
|
||||
val chunkBiomes = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
return getBiomeArrayTweaked(chunk, false, biomesForGeneration);
|
||||
}
|
||||
public static byte[] getBiomeArrayTweaked(Chunk chunk, boolean fake, IntFunction<BiomeGenBase> biomesForGeneration) {
|
||||
val chunkBiomes = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
|
||||
for (int i = 0; i < chunkBiomes.length; ++i) {
|
||||
chunkBiomes[i] = (short) biomesForGeneration.apply(i).biomeID;
|
||||
}
|
||||
return ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
|
||||
return fake ? FAKE_BIOME_ARRAY_PLACEHOLDER : ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
|
||||
}
|
||||
|
||||
public static byte[] getBiomeArrayTweaked(Chunk chunk, BiomeGenBase[] biomesForGeneration) {
|
||||
val chunkBiomes = ((IChunkMixin) chunk).getBiomeShortArray();
|
||||
val chunkBiomes = ((ChunkBiomeHook) chunk).getBiomeShortArray();
|
||||
|
||||
for (int i = 0; i < chunkBiomes.length; ++i) {
|
||||
chunkBiomes[i] = (short) biomesForGeneration[i].biomeID;
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
public interface ChunkBiomeHook {
|
||||
short[] getBiomeShortArray();
|
||||
|
||||
void setBiomeShortArray(short[] data);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
public interface EntityRegistryAccessor {
|
||||
BitSet eids$availableIndicies();
|
||||
}
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import com.falsepattern.endlessids.EndlessIDs;
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
public interface IChunkMixin {
|
||||
short[] getBiomeShortArray();
|
||||
|
||||
void setBiomeShortArray(short[] data);
|
||||
}
|
||||
-59
@@ -1,59 +0,0 @@
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import net.minecraft.world.chunk.NibbleArray;
|
||||
|
||||
public interface IExtendedBlockStorageMixin {
|
||||
byte[] getB1();
|
||||
|
||||
void setB1(byte[] data);
|
||||
|
||||
NibbleArray getB2Low();
|
||||
|
||||
void setB2Low(NibbleArray data);
|
||||
|
||||
void clearB2Low();
|
||||
|
||||
NibbleArray createB2Low();
|
||||
|
||||
NibbleArray getB2High();
|
||||
|
||||
void setB2High(NibbleArray data);
|
||||
|
||||
void clearB2High();
|
||||
|
||||
NibbleArray createB2High();
|
||||
|
||||
byte[] getB3();
|
||||
|
||||
void setB3(byte[] data);
|
||||
|
||||
void clearB3();
|
||||
|
||||
byte[] createB3();
|
||||
|
||||
int getEBSMask();
|
||||
|
||||
int getEBSMSBMask();
|
||||
|
||||
int getID(int x, int y, int z);
|
||||
|
||||
NibbleArray getM1Low();
|
||||
|
||||
void setM1Low(NibbleArray m1Low);
|
||||
|
||||
NibbleArray getM1High();
|
||||
|
||||
void setM1High(NibbleArray m1High);
|
||||
|
||||
void clearM1High();
|
||||
|
||||
NibbleArray createM1High();
|
||||
|
||||
byte[] getM2();
|
||||
|
||||
void setM2(byte[] m2);
|
||||
|
||||
void clearM2();
|
||||
|
||||
byte[] createM2();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
public interface IHBMBiomeSyncPacket {
|
||||
void eid$setBiome(short biome);
|
||||
short eid$getBiome();
|
||||
|
||||
void eid$setBiomeArray(short[] biomeArray);
|
||||
short[] eid$getBiomeArray();
|
||||
}
|
||||
+23
-1
@@ -1,5 +1,27 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
public interface IS1DPacketEntityEffectMixin {
|
||||
int getIDExtended();
|
||||
int endlessids$getIDExtended();
|
||||
}
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import com.falsepattern.endlessids.Hooks;
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers;
|
||||
|
||||
import net.minecraft.world.chunk.NibbleArray;
|
||||
|
||||
public interface SubChunkBlockHook {
|
||||
byte[] eid$getB1();
|
||||
|
||||
void eid$setB1(byte[] data);
|
||||
|
||||
NibbleArray eid$getB2Low();
|
||||
|
||||
void eid$setB2Low(NibbleArray data);
|
||||
|
||||
NibbleArray eid$createB2Low();
|
||||
|
||||
NibbleArray eid$getB2High();
|
||||
|
||||
void eid$setB2High(NibbleArray data);
|
||||
|
||||
NibbleArray eid$createB2High();
|
||||
|
||||
byte[] eid$getB3();
|
||||
|
||||
void eid$setB3(byte[] data);
|
||||
|
||||
byte[] eid$createB3();
|
||||
|
||||
int eid$getBlockMask();
|
||||
|
||||
int eid$getID(int x, int y, int z);
|
||||
|
||||
void eid$setID(int x, int y, int z, int id);
|
||||
|
||||
NibbleArray eid$getM1Low();
|
||||
|
||||
void eid$setM1Low(NibbleArray m1Low);
|
||||
|
||||
NibbleArray eid$getM1High();
|
||||
|
||||
void eid$setM1High(NibbleArray m1High);
|
||||
|
||||
NibbleArray eid$createM1High();
|
||||
|
||||
byte[] eid$getM2();
|
||||
|
||||
void eid$setM2(byte[] m2);
|
||||
|
||||
byte[] eid$createM2();
|
||||
|
||||
int eid$getMetadataMask();
|
||||
|
||||
int eid$getMetadata(int x, int y, int z);
|
||||
|
||||
void eid$setMetadata(int x, int y, int z, int id);
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers.stubpackage.com.emoniph.witchery.brewing.action.effect;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
public class BrewActionBiomeChange$ChunkCoord {
|
||||
public BrewActionBiomeChange$ChunkCoord(int x, int z) {
|
||||
|
||||
}
|
||||
|
||||
public Chunk getChunk(World world) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.helpers.stubpackage.lotr.common.network;
|
||||
|
||||
public class LOTRPacketBiomeVariantsWatch {
|
||||
|
||||
+25
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.biome.biomewand;
|
||||
|
||||
import com.spacechase0.minecraft.biomewand.item.BiomeWandItem;
|
||||
@@ -8,6 +30,8 @@ import org.spongepowered.asm.mixin.Overwrite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Mixin(value = BiomeWandItem.class,
|
||||
remap = false)
|
||||
@@ -16,6 +40,7 @@ public abstract class BiomeWandItemMixin {
|
||||
* @author FalsePattern
|
||||
* @reason Biome ID extension
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Overwrite
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.blockitem.fastcraft;
|
||||
|
||||
import org.spongepowered.asm.mixin.Dynamic;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.RenderGlobal;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
||||
@Mixin(EntityRenderer.class)
|
||||
public class EntityRendererMixin {
|
||||
@Dynamic
|
||||
@Redirect(method = "renderWorld",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lfastcraft/HC;t(Lnet/minecraft/client/renderer/RenderGlobal;Lnet/minecraft/entity/EntityLivingBase;Z)Z",
|
||||
remap = false))
|
||||
private boolean killHook2(RenderGlobal rg, EntityLivingBase entity, boolean doUpdates) {
|
||||
return rg.updateRenderers(entity, doUpdates);
|
||||
}
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.blockitem.vanilla;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import net.minecraft.network.play.server.S22PacketMultiBlockChange;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Mixin(NetHandlerPlayClient.class)
|
||||
public abstract class NetHandlerPlayClientMixin {
|
||||
@Shadow
|
||||
private WorldClient clientWorldController;
|
||||
|
||||
/**
|
||||
* @author FalsePattern
|
||||
* @reason Ported code, TODO figure out a proper mixin for this (difficult)
|
||||
*/
|
||||
@Overwrite
|
||||
public void handleMultiBlockChange(S22PacketMultiBlockChange packetIn) {
|
||||
int chunkX = packetIn.func_148920_c().chunkXPos * 16;
|
||||
int chunkZ = packetIn.func_148920_c().chunkZPos * 16;
|
||||
if (packetIn.func_148921_d() != null) {
|
||||
DataInputStream dataInput = new DataInputStream(new ByteArrayInputStream(packetIn.func_148921_d()));
|
||||
|
||||
try {
|
||||
for (int var5 = 0; var5 < packetIn.func_148922_e(); ++var5) {
|
||||
short pos = dataInput.readShort();
|
||||
short idLSB = dataInput.readShort();
|
||||
byte idMSB = dataInput.readByte();
|
||||
int id = (idLSB & 0xFFFF) | ((idMSB & 0xFF) << 16);
|
||||
int meta = dataInput.readShort() & 0xFFFF;
|
||||
int x = pos >> 12 & 15;
|
||||
int z = pos >> 8 & 15;
|
||||
int y = pos & 255;
|
||||
this.clientWorldController.func_147492_c(x + chunkX, y, z + chunkZ, Block.getBlockById(id), meta);
|
||||
}
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.blockitem.vanilla;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.blockitem.vanilla;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
|
||||
+23
-1
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.potion.vanilla;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IS1DPacketEntityEffectMixin;
|
||||
@@ -24,7 +46,7 @@ public abstract class NetHandlerPlayClientMixin {
|
||||
at = @At("HEAD"),
|
||||
require = 1)
|
||||
private void grabID(S1DPacketEntityEffect packetIn, CallbackInfo ci) {
|
||||
theID = ((IS1DPacketEntityEffectMixin) packetIn).getIDExtended();
|
||||
theID = ((IS1DPacketEntityEffectMixin) packetIn).endlessids$getIDExtended();
|
||||
}
|
||||
|
||||
@Redirect(method = "handleEntityEffect",
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.redstone;
|
||||
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.client.redstone;
|
||||
|
||||
import com.falsepattern.endlessids.config.GeneralConfig;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.AntiIdConflictBase;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.core.AsmHooks;
|
||||
|
||||
+30
-3
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.AntiIdConflictBase;
|
||||
@@ -55,9 +77,14 @@ public abstract class BiomesManagerMixin {
|
||||
return ExtendedConstants.biomeIDCount;
|
||||
}
|
||||
|
||||
@ModifyConstant(method = {"preinit", "setUpBiomesFolder"},
|
||||
constant = {@Constant(stringValue = "\\biomes"), @Constant(stringValue = "\\main.cfg")})
|
||||
private static String fixPaths(String original) {
|
||||
@ModifyConstant(method = "preinit",
|
||||
constant = @Constant(stringValue = "\\biomes"))
|
||||
private static String fixPaths1(String original) {
|
||||
return AIDCStringFixer.fixString(original);
|
||||
}
|
||||
@ModifyConstant(method = "setUpBiomesFolder",
|
||||
constant = @Constant(stringValue = "\\main.cfg"))
|
||||
private static String fixPaths2(String original) {
|
||||
return AIDCStringFixer.fixString(original);
|
||||
}
|
||||
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.managers.DimensionsManager;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.managers.EnchantementsManager;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.managers.EntitiesManager;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.antiidconflict;
|
||||
|
||||
import code.elix_x.coremods.antiidconflict.managers.PotionsManager;
|
||||
|
||||
+22
@@ -1,3 +1,25 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.abyssalcraft;
|
||||
|
||||
import com.falsepattern.endlessids.PlaceholderBiome;
|
||||
|
||||
+24
-2
@@ -1,8 +1,30 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.antiqueatlas;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import com.falsepattern.endlessids.constants.VanillaConstants;
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ShortUtil;
|
||||
import hunternif.mc.atlas.core.BiomeDetectorBase;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -41,7 +63,7 @@ public abstract class BiomeDetectorBaseMixin {
|
||||
require = 1)
|
||||
private int[] biomeIDs(byte[] i) {
|
||||
try {
|
||||
return ShortUtil.unsignedShortToIntArray(((IChunkMixin) chunk).getBiomeShortArray());
|
||||
return ShortUtil.unsignedShortToIntArray(((ChunkBiomeHook) chunk).getBiomeShortArray());
|
||||
} finally {
|
||||
chunk = null;
|
||||
}
|
||||
|
||||
+24
-2
@@ -1,6 +1,28 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.antiqueatlas;
|
||||
|
||||
import com.falsepattern.endlessids.mixin.helpers.IChunkMixin;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ChunkBiomeHook;
|
||||
import com.falsepattern.endlessids.mixin.helpers.ShortUtil;
|
||||
import hunternif.mc.atlas.core.BiomeDetectorNether;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
@@ -30,7 +52,7 @@ public abstract class BiomeDetectorNetherMixin {
|
||||
require = 1)
|
||||
private int[] biomeIDs(byte[] i) {
|
||||
try {
|
||||
return ShortUtil.unsignedShortToIntArray(((IChunkMixin) chunk).getBiomeShortArray());
|
||||
return ShortUtil.unsignedShortToIntArray(((ChunkBiomeHook) chunk).getBiomeShortArray());
|
||||
} finally {
|
||||
chunk = null;
|
||||
}
|
||||
|
||||
+37
-15
@@ -1,33 +1,55 @@
|
||||
/*
|
||||
* EndlessIDs
|
||||
*
|
||||
* Copyright (C) 2022-2026 FalsePattern, The MEGA Team
|
||||
* All Rights Reserved
|
||||
*
|
||||
* The above copyright notice, this permission notice and the word "MEGA"
|
||||
* shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, only version 3 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.biome.arocketry;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
|
||||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
import zmaster587.advancedRocketry.AdvancedRocketry;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
@Mixin(value = AdvancedRocketry.class,
|
||||
remap = false)
|
||||
public abstract class AdvancedRocketryMixin {
|
||||
@ModifyConstant(method = "load",
|
||||
constant = {@Constant(intValue = 110, ordinal = 0),
|
||||
@Constant(intValue = 111, ordinal = 0),
|
||||
@Constant(intValue = 112, ordinal = 0),
|
||||
@Constant(intValue = 113, ordinal = 0),
|
||||
@Constant(intValue = 114, ordinal = 0),
|
||||
@Constant(intValue = 115, ordinal = 0),
|
||||
@Constant(intValue = 116, ordinal = 0),
|
||||
@Constant(intValue = 117, ordinal = 0),
|
||||
@Constant(intValue = 118, ordinal = 0),
|
||||
@Constant(intValue = 119, ordinal = 0)},
|
||||
require = 10)
|
||||
private static int shiftBiomeIDsUp(int constant) {
|
||||
return constant + 9000;
|
||||
@WrapOperation(method = "load",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraftforge/common/config/Configuration;get(Ljava/lang/String;Ljava/lang/String;I)Lnet/minecraftforge/common/config/Property;"))
|
||||
private Property shiftBiomeIDsUp(Configuration instance, String category, String key, int defaultValue, Operation<Property> original) {
|
||||
if ("Biomes".equals(category)) {
|
||||
defaultValue += 9000;
|
||||
}
|
||||
return original.call(instance, category, key, defaultValue);
|
||||
}
|
||||
|
||||
@ModifyConstant(method = "preInit",
|
||||
constant = @Constant(intValue = -2),
|
||||
require = 1)
|
||||
private static int changeDefaultDimID(int constant) {
|
||||
private int changeDefaultDimID(int constant) {
|
||||
return -5613;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 266 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user