mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-21 12:32:09 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ff5e9a726 | ||
|
|
2d923d32e7 | ||
|
|
d87191339a | ||
|
|
3050dd086f | ||
|
|
5a767add80 | ||
|
|
0f3a2677bf | ||
|
|
c06c687eb4 | ||
|
|
092a12136d | ||
|
|
01c1a0c50b | ||
|
|
c5562f532e | ||
|
|
7582c5e11a | ||
|
|
2ebc05bcc1 | ||
|
|
69c4be6419 | ||
|
|
d1dec41c11 | ||
|
|
fa1dca35b9 | ||
|
|
e5f3ad873e |
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:GTNHLib:0.5.19:dev")
|
api("com.github.GTNewHorizons:GTNHLib:0.3.2:dev")
|
||||||
runtimeOnly("com.github.GTNewHorizons:NotEnoughItems:2.6.44-GTNH:dev")
|
runtimeOnly("com.github.GTNewHorizons:NotEnoughItems:2.6.14-GTNH:dev")
|
||||||
|
|
||||||
testImplementation(platform('org.junit:junit-bom:5.9.2'))
|
testImplementation(platform('org.junit:junit-bom:5.9.2'))
|
||||||
testImplementation('org.junit.jupiter:junit-jupiter')
|
testImplementation('org.junit.jupiter:junit-jupiter')
|
||||||
|
|||||||
+4
-15
@@ -50,10 +50,10 @@ enableGenericInjection = true
|
|||||||
# Generate a class with a String field for the mod version named as defined below.
|
# Generate a class with a String field for the mod version named as defined below.
|
||||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||||
generateGradleTokenClass = com.gtnewhorizon.structurelib.Tags
|
generateGradleTokenClass =
|
||||||
|
|
||||||
# Name of the token containing the project's current version to generate/replace.
|
# Name of the token containing the project's current version to generate/replace.
|
||||||
gradleTokenVersion = VERSION
|
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||||
|
|
||||||
# [DEPRECATED] Mod ID replacement token.
|
# [DEPRECATED] Mod ID replacement token.
|
||||||
gradleTokenModId =
|
gradleTokenModId =
|
||||||
@@ -70,7 +70,7 @@ gradleTokenGroupName =
|
|||||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||||
# version in @Mod([...], version = VERSION, [...]).
|
# version in @Mod([...], version = VERSION, [...]).
|
||||||
# Leave these properties empty to skip individual token replacements.
|
# Leave these properties empty to skip individual token replacements.
|
||||||
replaceGradleTokenInFile =
|
replaceGradleTokenInFile = StructureLib.java
|
||||||
|
|
||||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
# 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.
|
# leave this property empty.
|
||||||
@@ -85,11 +85,6 @@ accessTransformersFile =
|
|||||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||||
usesMixins = true
|
usesMixins = true
|
||||||
|
|
||||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
|
||||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
|
||||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
|
||||||
separateMixinSourceSet =
|
|
||||||
|
|
||||||
# Adds some debug arguments like verbose output and class export.
|
# Adds some debug arguments like verbose output and class export.
|
||||||
usesMixinDebug = false
|
usesMixinDebug = false
|
||||||
|
|
||||||
@@ -122,15 +117,9 @@ minimizeShadowedDependencies = true
|
|||||||
# If disabled, won't rename the shadowed classes.
|
# If disabled, won't rename the shadowed classes.
|
||||||
relocateShadowedDependencies = true
|
relocateShadowedDependencies = true
|
||||||
|
|
||||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||||
includeWellKnownRepositories = true
|
includeWellKnownRepositories = true
|
||||||
|
|
||||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
|
||||||
# list of strings, with the acceptable keys being(case does not matter):
|
|
||||||
# cursemaven
|
|
||||||
# modrinth
|
|
||||||
excludeWellKnownRepositories =
|
|
||||||
|
|
||||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@@ -86,8 +84,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# 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
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
' "$PWD" ) || exit
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|||||||
Vendored
-2
@@ -13,8 +13,6 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
@rem SPDX-License-Identifier: Apache-2.0
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.29'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.23'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
@Mod(
|
@Mod(
|
||||||
modid = StructureLibAPI.MOD_ID,
|
modid = StructureLibAPI.MOD_ID,
|
||||||
name = "StructureLib",
|
name = "StructureLib",
|
||||||
version = Tags.VERSION,
|
version = "GRADLETOKEN_VERSION",
|
||||||
acceptableRemoteVersions = "*",
|
acceptableRemoteVersions = "*",
|
||||||
guiFactory = "com.gtnewhorizon.structurelib.GuiFactory")
|
guiFactory = "com.gtnewhorizon.structurelib.GuiFactory")
|
||||||
public class StructureLib {
|
public class StructureLib {
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ public interface IStructureElementChain<T> extends IStructureElement<T> {
|
|||||||
if (e == null) continue;
|
if (e == null) continue;
|
||||||
if (predicate == null) predicate = e.getPredicate();
|
if (predicate == null) predicate = e.getPredicate();
|
||||||
else predicate = predicate.or(e.getPredicate());
|
else predicate = predicate.or(e.getPredicate());
|
||||||
Iterable<ItemStack> stacks = e.getStacks();
|
is.add(e.getStacks());
|
||||||
if (stacks != null) is.add(stacks);
|
|
||||||
}
|
}
|
||||||
if (predicate == null) return null;
|
if (predicate == null) return null;
|
||||||
return new BlocksToPlace(predicate, Iterables.concat(is));
|
return new BlocksToPlace(predicate, Iterables.concat(is));
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
package com.gtnewhorizon.structurelib.util;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.NavigableMap;
|
|
||||||
import java.util.Spliterator;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
|
|
||||||
public class SortedRegistry<V> implements Iterable<V> {
|
|
||||||
|
|
||||||
private final NavigableMap<String, V> store = new TreeMap<>();
|
|
||||||
/**
|
|
||||||
* Store stuff in an array for faster iteration access than a red black tree
|
|
||||||
*/
|
|
||||||
private List<V> baked = Collections.emptyList();
|
|
||||||
|
|
||||||
public void register(String key, V val) {
|
|
||||||
if (key == null || val == null) throw new NullPointerException();
|
|
||||||
V old = store.putIfAbsent(key, val);
|
|
||||||
if (old != null) {
|
|
||||||
throw new IllegalArgumentException("Duplicate key: " + key);
|
|
||||||
}
|
|
||||||
// TODO allow a user to edit the order with a configuration file
|
|
||||||
baked = new ArrayList<>(store.values());
|
|
||||||
}
|
|
||||||
|
|
||||||
public int size() {
|
|
||||||
return store.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return store.isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean containsKey(String key) {
|
|
||||||
return store.containsKey(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean containsValue(V value) {
|
|
||||||
return store.containsValue(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public V get(String key) {
|
|
||||||
return store.get(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Iterator<V> iterator() {
|
|
||||||
return baked.iterator();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void forEach(Consumer<? super V> action) {
|
|
||||||
baked.forEach(action);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Spliterator<V> spliterator() {
|
|
||||||
return baked.spliterator();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user