mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
072ca7bcf8 | ||
|
|
164ec7b923 | ||
|
|
b92ae7985f | ||
|
|
f15acb23ba | ||
|
|
18d1e77e56 | ||
|
|
2efcbe2e16 | ||
|
|
d4b2e9f5da | ||
|
|
e8212e3224 | ||
|
|
066ae631c1 | ||
|
|
1d32553b2d | ||
|
|
2b8bc1c1c1 | ||
|
|
345ec097d7 | ||
|
|
72bfd43b9f | ||
|
|
4f1e4a22cc |
No files matched your search
@@ -0,0 +1,55 @@
|
|||||||
|
name: Crash
|
||||||
|
description: The game has a problem when EndlessIDs is present
|
||||||
|
title: "[Bug]: "
|
||||||
|
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.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
# Essential
|
||||||
|
- type: textarea
|
||||||
|
id: logs
|
||||||
|
attributes:
|
||||||
|
label: Game log
|
||||||
|
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
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
name: Compatibility Request
|
||||||
|
description: If you tested EndlessIDs with another mod and it crashes or has weird bugs, you can ask for a compatibility patch through this.
|
||||||
|
title: "[Compatibility Request]: "
|
||||||
|
labels: ["compat-request"]
|
||||||
|
assignees:
|
||||||
|
- falsepattern
|
||||||
|
body:
|
||||||
|
# Essential
|
||||||
|
- type: input
|
||||||
|
id: modname
|
||||||
|
attributes:
|
||||||
|
label: Other mod's name
|
||||||
|
description: The name of the other mod
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
# Essential
|
||||||
|
- type: input
|
||||||
|
id: modurl
|
||||||
|
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.
|
||||||
|
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:
|
||||||
|
label: Game log
|
||||||
|
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.
|
||||||
|
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
|
||||||
@@ -11,6 +11,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
MAVEN_DEPLOY_USER: ${{ secrets.MAVEN_DEPLOY_USER }}
|
||||||
|
MAVEN_DEPLOY_PASSWORD: ${{ secrets.MAVEN_DEPLOY_PASSWORD }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -43,3 +46,6 @@ jobs:
|
|||||||
prerelease: false
|
prerelease: false
|
||||||
title: "${{ env.RELEASE_VERSION }}"
|
title: "${{ env.RELEASE_VERSION }}"
|
||||||
files: build/libs/*.jar
|
files: build/libs/*.jar
|
||||||
|
|
||||||
|
- name: Publish to maven
|
||||||
|
run: ./gradlew publish
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Code of Merit
|
||||||
|
|
||||||
|
1. The project creators, lead developers, core team, constitute
|
||||||
|
the managing members of the project and have final say in every decision
|
||||||
|
of the project, technical or otherwise, including overruling previous decisions.
|
||||||
|
There are no limitations to this decisional power.
|
||||||
|
|
||||||
|
2. Contributions are an expected result of your membership on the project.
|
||||||
|
Don't expect others to do your work or help you with your work forever.
|
||||||
|
|
||||||
|
3. All members have the same opportunities to seek any challenge they want
|
||||||
|
within the project.
|
||||||
|
|
||||||
|
4. Authority or position in the project will be proportional
|
||||||
|
to the accrued contribution. Seniority must be earned.
|
||||||
|
|
||||||
|
5. Software is evolutive: the better implementations must supersede lesser
|
||||||
|
implementations. Technical advantage is the primary evaluation metric.
|
||||||
|
|
||||||
|
6. This is a space for technical prowess; topics outside of the project
|
||||||
|
will not be tolerated.
|
||||||
|
|
||||||
|
7. Non technical conflicts will be discussed in a separate space. Disruption
|
||||||
|
of the project will not be allowed.
|
||||||
|
|
||||||
|
8. Individual characteristics, including but not limited to,
|
||||||
|
body, sex, sexual preference, race, language, religion, nationality,
|
||||||
|
or political preferences are irrelevant in the scope of the project and
|
||||||
|
will not be taken into account concerning your value or that of your contribution
|
||||||
|
to the project.
|
||||||
|
|
||||||
|
9. Discuss or debate the idea, not the person.
|
||||||
|
|
||||||
|
10. There is no room for ambiguity: Ambiguity will be met with questioning;
|
||||||
|
further ambiguity will be met with silence. It is the responsibility
|
||||||
|
of the originator to provide requested context.
|
||||||
|
|
||||||
|
11. If something is illegal outside the scope of the project, it is illegal
|
||||||
|
in the scope of the project. This Code of Merit does not take precedence over
|
||||||
|
governing law.
|
||||||
|
|
||||||
|
12. This Code of Merit governs the technical procedures of the project not the
|
||||||
|
activities outside of it.
|
||||||
|
|
||||||
|
13. Participation on the project equates to agreement of this Code of Merit.
|
||||||
|
|
||||||
|
14. No objectives beyond the stated objectives of this project are relevant
|
||||||
|
to the project. Any intent to deviate the project from its original purpose
|
||||||
|
of existence will constitute grounds for remedial action which may include
|
||||||
|
expulsion from the project.
|
||||||
|
|
||||||
|
This document is adapted from the Code of Merit, version 1.0.
|
||||||
|
See: https://codeofmerit.org/.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# How to contribute
|
||||||
|
|
||||||
|
## Describe everything properly
|
||||||
|
* Make sure to properly fill out the pull request and issue templates
|
||||||
|
* Ambiguous changes with no explanation will be rejected.
|
||||||
|
|
||||||
|
## Make sure to follow existing coding conventions
|
||||||
|
|
||||||
|
The most important conventions to upkeep if you don't want your PR rejected:
|
||||||
|
* 4 spaces per indent level for code, 2 spaces per indent level for json, yaml, etc.
|
||||||
|
* Parentheses/Brackes/Braces open on the same line, not on a new line
|
||||||
|
* Method arguments are lists, not paragraphs. Either ALL arguments go on the same line, or every argument goes a SEPARATE line.
|
||||||
|
* Not everyone has an ultrawide monitor. Try to keep lines below 120 characters in length.
|
||||||
|
* Do not reformat existing code. Reformatting is done exclusively by the maintainers.
|
||||||
|
* Annotations have one parameter per line, no exceptions
|
||||||
|
* Do not pollute the repo with IDE-specific configuration files.
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Johann Bernhardt
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
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.
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
## Describe your changes
|
||||||
|
|
||||||
|
## The issue this PR is connected to (if applicable)
|
||||||
|
|
||||||
|
## What kind of PR is this?
|
||||||
|
|
||||||
|
Delete the ones that do not apply.
|
||||||
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||||
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
|
|
||||||
|
## Checklist before requesting a review
|
||||||
|
- [ ] I have tested the code locally and it works
|
||||||
|
- [ ] I followed the requirements set in the contribution document
|
||||||
@@ -7,11 +7,11 @@ EndlessIDs is a modern rewrite of NotEnoughIDs which increases the limit even mo
|
|||||||
|
|
||||||
This mod also contains patches for the following mods:
|
This mod also contains patches for the following mods:
|
||||||
|
|
||||||
- [UndergroundBiomesConstructs](https://www.curseforge.com/minecraft/mc-mods/undergroundbiomesconstructs)
|
- UndergroundBiomesConstructs
|
||||||
- [More Fun Quicksand Mod](https://www.curseforge.com/minecraft/mc-mods/more-fun-quicksand-mod)
|
- More Fun Quicksand Mod
|
||||||
- [WorldEdit](https://www.curseforge.com/minecraft/mc-mods/worldedit)
|
- WorldEdit
|
||||||
- [CoFH Lib](https://www.curseforge.com/minecraft/mc-mods/cofh-lib)
|
- CoFH Lib
|
||||||
- [DragonAPI](https://www.curseforge.com/minecraft/mc-mods/dragonapi)
|
- DragonAPI
|
||||||
|
|
||||||
Mods not listed here may or may not work. A good rule of thumb is that the more invasive a mod is, the higher the chance
|
Mods not listed here may or may not work. A good rule of thumb is that the more invasive a mod is, the higher the chance
|
||||||
it's broken without a patch once the IDs exceed 4096 and 32000.
|
it's broken without a patch once the IDs exceed 4096 and 32000.
|
||||||
@@ -19,5 +19,7 @@ it's broken without a patch once the IDs exceed 4096 and 32000.
|
|||||||
If you find any crashes or incompatibilities, don't hesitate to open an issue.
|
If you find any crashes or incompatibilities, don't hesitate to open an issue.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
- [FalsePatternLib](https://www.curseforge.com/minecraft/mc-mods/falsepatternlib)
|
- [FalsePatternLib](https://github.com/FalsePattern/FalsePatternLib)
|
||||||
- Either [SpongeMixins](https://www.curseforge.com/minecraft/mc-mods/spongemixins) or [Grimoire](https://www.curseforge.com/minecraft/mc-mods/grimoire-api)
|
- [SpongeMixins](https://github.com/TimeConqueror/SpongeMixins)
|
||||||
|
|
||||||
|
[](https://gist.github.com/poop-person/991e80f390384bbeef09d208bff208f4)
|
||||||
+23
-12
@@ -1,4 +1,4 @@
|
|||||||
//version: 1641429628falsepattern12
|
//version: 1641429628falsepattern18
|
||||||
/*
|
/*
|
||||||
DO NOT CHANGE THIS FILE!
|
DO NOT CHANGE THIS FILE!
|
||||||
|
|
||||||
@@ -95,6 +95,7 @@ checkPropertyExists("repositoryName")
|
|||||||
checkPropertyExists("mavenGroupId")
|
checkPropertyExists("mavenGroupId")
|
||||||
checkPropertyExists("mavenArtifactId")
|
checkPropertyExists("mavenArtifactId")
|
||||||
checkPropertyExists("hasMixinDeps")
|
checkPropertyExists("hasMixinDeps")
|
||||||
|
checkPropertyExists("mixinPreinitConfig")
|
||||||
|
|
||||||
|
|
||||||
String javaSourceDir = "src/main/java/"
|
String javaSourceDir = "src/main/java/"
|
||||||
@@ -441,7 +442,7 @@ def getManifestAttributes() {
|
|||||||
if(usesMixins.toBoolean()) {
|
if(usesMixins.toBoolean()) {
|
||||||
manifestAttributes += [
|
manifestAttributes += [
|
||||||
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
||||||
"MixinConfigs" : "mixins." + modId + ".json",
|
"MixinConfigs" : "mixins." + modId + ".json" + (mixinPreinitConfig ? "," + mixinPreinitConfig : ""),
|
||||||
"ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false
|
"ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -545,8 +546,16 @@ def getCredentials = {
|
|||||||
return [username: entry.username.text(), password: entry.password.text()]
|
return [username: entry.username.text(), password: entry.password.text()]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
throw new Exception();
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
return [username: "none", password: "none"]
|
//Try from environment variables if file does not exist
|
||||||
|
String username = System.getenv("MAVEN_DEPLOY_USER")
|
||||||
|
String password = System.getenv("MAVEN_DEPLOY_PASSWORD")
|
||||||
|
if (username == null || password == null) {
|
||||||
|
return [username: null, password: null]
|
||||||
|
} else {
|
||||||
|
return [username: username, password: password]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,9 +563,9 @@ def getCredentials = {
|
|||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
maven(MavenPublication) {
|
maven(MavenPublication) {
|
||||||
artifact source: jar
|
artifact source: (jar.enabled ? jar : shadowJar)
|
||||||
artifact source: sourcesJar, classifier: "src"
|
artifact source: sourcesJar, classifier: "src"
|
||||||
artifact source: devJar, classifier: "dev"
|
artifact source: (devJar.enabled ? devJar : shadowDevJar), classifier: "dev"
|
||||||
if (apiPackage) {
|
if (apiPackage) {
|
||||||
artifact source: apiJar, classifier: "api"
|
artifact source: apiJar, classifier: "api"
|
||||||
}
|
}
|
||||||
@@ -568,13 +577,15 @@ publishing {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
if (repositoryURL.trim() != "") {
|
||||||
name = repositoryName
|
maven {
|
||||||
url = repositoryURL
|
name = repositoryName
|
||||||
def creds = getCredentials()
|
url = repositoryURL
|
||||||
credentials {
|
def creds = getCredentials()
|
||||||
username = creds == null ? "none" : creds.username
|
credentials {
|
||||||
password = creds == null ? "none" : creds.password
|
username = creds == null ? "none" : creds.username
|
||||||
|
password = creds == null ? "none" : creds.password
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ dependencies {
|
|||||||
}
|
}
|
||||||
annotationProcessor("org.projectlombok:lombok:1.18.22")
|
annotationProcessor("org.projectlombok:lombok:1.18.22")
|
||||||
|
|
||||||
compile("com.falsepattern:falsepatternlib-mc1.7.10:0.5.0:dev")
|
compile("com.falsepattern:falsepatternlib-mc1.7.10:0.8.2:dev")
|
||||||
|
|
||||||
compileOnly("curse.maven:undergroundbiomesconstructs-72744:2304497") {
|
compileOnly("curse.maven:undergroundbiomesconstructs-72744:2304497") {
|
||||||
transitive = false
|
transitive = false
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ hasMixinDeps = false
|
|||||||
mixinPlugin = mixin.plugin.MixinPlugin
|
mixinPlugin = mixin.plugin.MixinPlugin
|
||||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
# 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
|
mixinsPackage = mixin.mixins
|
||||||
|
# Specify a preinit mixin here. Preinit mixins should be used very rarely, if at all, so this mixin config will not be managed by the buildscript, only included.
|
||||||
|
mixinPreinitConfig =
|
||||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||||
# This parameter is for legacy compatibility only
|
# This parameter is for legacy compatibility only
|
||||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ import cpw.mods.fml.common.Mod;
|
|||||||
version = Tags.VERSION,
|
version = Tags.VERSION,
|
||||||
name = Tags.MODNAME,
|
name = Tags.MODNAME,
|
||||||
acceptedMinecraftVersions = "[1.7.10]",
|
acceptedMinecraftVersions = "[1.7.10]",
|
||||||
dependencies = "required-after:falsepatternlib@[0.5.0,);")
|
dependencies = "required-after:falsepatternlib@[0.8.2,);")
|
||||||
public class EndlessIDs {}
|
public class EndlessIDs {}
|
||||||
@@ -124,7 +124,7 @@ public class Hooks {
|
|||||||
public static int getIdFromBlockWithCheck(final Block block, final Block oldBlock) {
|
public static int getIdFromBlockWithCheck(final Block block, final Block oldBlock) {
|
||||||
final int id = Block.getIdFromBlock(block);
|
final int id = Block.getIdFromBlock(block);
|
||||||
if (IEConfig.catchUnregisteredBlocks && id == -1) {
|
if (IEConfig.catchUnregisteredBlocks && id == -1) {
|
||||||
throw new IllegalArgumentException("Block " + block + " is not registered. <-- Say about this to the author of this mod, or you can try to enable \"RemoveInvalidBlocks\" option in NEID config.");
|
throw new IllegalArgumentException("Block " + block + " is not registered. <-- Say about this to the author of this mod, or you can try to enable \"RemoveInvalidBlocks\" option in EID config.");
|
||||||
}
|
}
|
||||||
if (id >= 0 && id <= ExtendedConstants.maxBlockID) {
|
if (id >= 0 && id <= ExtendedConstants.maxBlockID) {
|
||||||
return id;
|
return id;
|
||||||
|
|||||||
@@ -1,32 +1,22 @@
|
|||||||
package com.falsepattern.endlessids;
|
package com.falsepattern.endlessids;
|
||||||
|
|
||||||
import java.io.File;
|
import com.falsepattern.lib.config.Config;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
|
|
||||||
|
@Config(modid = Tags.MODID)
|
||||||
public class IEConfig {
|
public class IEConfig {
|
||||||
static Configuration config;
|
public static boolean catchUnregisteredBlocks = false;
|
||||||
public static boolean catchUnregisteredBlocks;
|
|
||||||
public static boolean removeInvalidBlocks;
|
@Config.Comment("Remove invalid (corrupted) blocks from the game.")
|
||||||
public static boolean extendDataWatcher;
|
public static boolean removeInvalidBlocks = false;
|
||||||
|
|
||||||
public static void init(final File file) {
|
@Config.Comment("Extend DataWatcher IDs. Vanilla limit is 31, new limit is 127.")
|
||||||
File newFile;
|
public static boolean extendDataWatcher = false;
|
||||||
if (file.getPath().contains("bin")) {
|
|
||||||
newFile = new File(file.getParent() + "/eclipse/config", Tags.MODID + ".cfg");
|
@Config.Comment("Setting this value greater than 0 will reduce RAM usage, at the cost of less available Block IDs.\n" +
|
||||||
}
|
"Notice: This does not affect ITEM IDs.\n" +
|
||||||
else {
|
"By default, block IDs can also go up to 16 Million, and each additional bit in this setting halves\n" +
|
||||||
newFile = new File(file.getParentFile().getParent() + "/config", Tags.MODID + ".cfg");
|
"this value.\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")
|
||||||
IEConfig.config = new Configuration(newFile);
|
@Config.RangeInt(min = 0, max = 12)
|
||||||
IEConfig.catchUnregisteredBlocks = IEConfig.config.getBoolean("CatchUnregisteredBlocks", Tags.MODNAME, false, "");
|
public static int countCorrectionBits = 0;
|
||||||
IEConfig.removeInvalidBlocks = IEConfig.config.getBoolean("RemoveInvalidBlocks", Tags.MODNAME, false, "Remove invalid (corrupted) blocks from the game.");
|
|
||||||
IEConfig.extendDataWatcher = IEConfig.config.getBoolean("ExtendDataWatcher", Tags.MODNAME, false, "Extend DataWatcher IDs. Vanilla limit is 31, new limit is 127.");
|
|
||||||
IEConfig.config.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
|
||||||
IEConfig.catchUnregisteredBlocks = false;
|
|
||||||
IEConfig.removeInvalidBlocks = false;
|
|
||||||
IEConfig.extendDataWatcher = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,27 @@
|
|||||||
package com.falsepattern.endlessids;
|
package com.falsepattern.endlessids;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.falsepattern.endlessids.asm.IETransformer;
|
import com.falsepattern.endlessids.asm.IETransformer;
|
||||||
|
import com.falsepattern.lib.config.ConfigException;
|
||||||
|
import com.falsepattern.lib.config.ConfigurationManager;
|
||||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
|
||||||
|
|
||||||
@IFMLLoadingPlugin.MCVersion("1.7.10")
|
import static cpw.mods.fml.relauncher.IFMLLoadingPlugin.*;
|
||||||
@IFMLLoadingPlugin.TransformerExclusions({ "com.falsepattern.endlessids.asm" })
|
|
||||||
|
@MCVersion("1.7.10")
|
||||||
|
@Name(Tags.MODID)
|
||||||
|
@TransformerExclusions({ "com.falsepattern.endlessids.asm" })
|
||||||
|
@DependsOn("falsepatternlib")
|
||||||
public class IEPlugin implements IFMLLoadingPlugin
|
public class IEPlugin implements IFMLLoadingPlugin
|
||||||
{
|
{
|
||||||
|
static {
|
||||||
|
try {
|
||||||
|
ConfigurationManager.registerConfig(IEConfig.class);
|
||||||
|
} catch (ConfigException e) {
|
||||||
|
System.err.println("Failed to load EndlessIDs config. Using defaults.");
|
||||||
|
}
|
||||||
|
}
|
||||||
public IEPlugin() {
|
public IEPlugin() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
@@ -27,7 +39,6 @@ public class IEPlugin implements IFMLLoadingPlugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void injectData(final Map<String, Object> data) {
|
public void injectData(final Map<String, Object> data) {
|
||||||
IEConfig.init((File) data.get("coremodLocation"));
|
|
||||||
IETransformer.isObfuscated = (Boolean) data.get("runtimeDeobfuscationEnabled");
|
IETransformer.isObfuscated = (Boolean) data.get("runtimeDeobfuscationEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package com.falsepattern.endlessids.constants;
|
package com.falsepattern.endlessids.constants;
|
||||||
|
|
||||||
|
import com.falsepattern.endlessids.IEConfig;
|
||||||
|
|
||||||
public class ExtendedConstants {
|
public class ExtendedConstants {
|
||||||
//Tunables
|
//Tunables
|
||||||
public static final int bitsPerID = 24;
|
public static final int bitsPerID = 24;
|
||||||
public static final int bitsPerMetadata = 4;
|
public static final int bitsPerMetadata = 4;
|
||||||
public static final int countCorrectionBits = 0;
|
public static final int countCorrectionBits = IEConfig.countCorrectionBits;
|
||||||
|
|
||||||
public static final int watchableBits = 7;
|
public static final int watchableBits = 7;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user