mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-14 01:04:02 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efd49701e1 | ||
|
|
a7f0d6be72 | ||
|
|
0ff38c2da9 | ||
|
|
307bb1714c | ||
|
|
7d8e6a0ea5 | ||
|
|
b6d2af2170 | ||
|
|
8309567076 | ||
|
|
23312198a6 |
No files matched your search
@@ -7,6 +7,7 @@ on:
|
|||||||
- feature/doc
|
- feature/doc
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
delete:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -14,7 +15,38 @@ permissions:
|
|||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
prune:
|
||||||
|
if: github.event_name == 'delete'
|
||||||
|
concurrency: javadoc-publish
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
result_hash: ${{ steps.deploy.outputs.hash }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: gh-pages
|
||||||
|
|
||||||
|
- name: Deploy 🚀
|
||||||
|
id: deploy
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if git rm -r $TARGET_FOLDER ; then
|
||||||
|
echo Nothing to clean up
|
||||||
|
fi
|
||||||
|
|
||||||
|
find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' | sort --version-sort --reverse > index.txt
|
||||||
|
git add index.txt
|
||||||
|
git config user.name "${GITHUB_ACTOR}"
|
||||||
|
git config user.email "${GITHUB_ACTOR_ID}-${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
|
git commit -m "Clean up javadoc after ref $TARGET_FOLDER is deleted"
|
||||||
|
git push
|
||||||
|
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
TARGET_FOLDER: ${{ github.ref_name }}
|
||||||
|
|
||||||
javadoc:
|
javadoc:
|
||||||
|
if: github.event_name == 'push'
|
||||||
concurrency: javadoc-publish
|
concurrency: javadoc-publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -57,11 +89,9 @@ jobs:
|
|||||||
find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' | sort --version-sort --reverse > index.txt
|
find . -name javadoc -type d -print | sed 's#^\./\(.*\)/javadoc$#\1#' | sort --version-sort --reverse > index.txt
|
||||||
git add index.txt
|
git add index.txt
|
||||||
git config user.name "${GITHUB_ACTOR}"
|
git config user.name "${GITHUB_ACTOR}"
|
||||||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
git config user.email "${GITHUB_ACTOR_ID}-${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
git commit -m "Deploy javadoc from ref $TARGET_FOLDER"
|
git commit -m "Deploy javadoc from ref $TARGET_FOLDER"
|
||||||
git push
|
git push
|
||||||
echo "::set-output name=hash::$(git rev-parse HEAD)"
|
echo "hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
env:
|
env:
|
||||||
TARGET_FOLDER: ${{ github.ref_name }}
|
TARGET_FOLDER: ${{ github.ref_name }}
|
||||||
COMMIT_AUTHOR: ${{ github.pusher.name }}
|
|
||||||
COMMIT_EMAIL: ${{ github.pusher.email }}
|
|
||||||
+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.
|
||||||
@@ -32,3 +32,5 @@ The project is developed using IDEA. Please manually configure the build to not
|
|||||||
Due to me adding in ItemStackMap, which was derived from code from CodeChicken's LGPL mod NEI. This mod is effectively considered
|
Due to me adding in ItemStackMap, which was derived from code from CodeChicken's LGPL mod NEI. This mod is effectively considered
|
||||||
licensed under LGPL in its entirety since commit ebef584b8c518f8202cfe0984fb28a6d23e52b3d or any squash commit containing it, e.g.
|
licensed under LGPL in its entirety since commit ebef584b8c518f8202cfe0984fb28a6d23e52b3d or any squash commit containing it, e.g.
|
||||||
609e50428ee4e293f65f67f554a70b9fcfae97c4.
|
609e50428ee4e293f65f67f554a70b9fcfae97c4.
|
||||||
|
|
||||||
|
Note while the LICENSE.txt is added by a much later commit, all code on previous commits are covered by this as well.
|
||||||
+2
-1259
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:GTNHLib:0.0.10:dev")
|
api("com.github.GTNewHorizons:GTNHLib:0.0.13:dev")
|
||||||
runtimeOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.25-GTNH:dev")
|
runtimeOnly("com.github.GTNewHorizons:NotEnoughItems:2.5.3-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')
|
||||||
|
|||||||
+158
-27
@@ -1,60 +1,191 @@
|
|||||||
|
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
|
||||||
|
# LOCAL to test local config updates.
|
||||||
|
gtnh.settings.blowdryerTag = 0.2.0
|
||||||
|
|
||||||
|
# Human-readable mod name, available for mcmod.info population.
|
||||||
modName = StructureLib
|
modName = StructureLib
|
||||||
|
|
||||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||||
|
# Conventionally lowercase.
|
||||||
modId = structurelib
|
modId = structurelib
|
||||||
|
|
||||||
|
# Root package of the mod, used to find various classes in other properties,
|
||||||
|
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||||
modGroup = com.gtnewhorizon.structurelib
|
modGroup = com.gtnewhorizon.structurelib
|
||||||
|
|
||||||
# WHY is there no version field?
|
# Whether to use modGroup as the maven publishing group.
|
||||||
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
|
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||||
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
|
useModGroupForPublishing = false
|
||||||
|
|
||||||
# Will update your build.gradle automatically whenever an update is available
|
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||||
autoUpdateBuildScript = false
|
autoUpdateBuildScript = false
|
||||||
|
|
||||||
|
# Version of Minecraft to target
|
||||||
minecraftVersion = 1.7.10
|
minecraftVersion = 1.7.10
|
||||||
|
|
||||||
|
# Version of Minecraft Forge to target
|
||||||
forgeVersion = 10.13.4.1614
|
forgeVersion = 10.13.4.1614
|
||||||
|
|
||||||
# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you
|
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
|
||||||
# restart Minecraft in development. Choose this dependent on your mod:
|
channel = stable
|
||||||
# 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
|
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
|
||||||
|
mappingsVersion = 12
|
||||||
|
|
||||||
|
# Defines other MCP mappings for dependency deobfuscation.
|
||||||
|
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||||
|
|
||||||
|
# Select a default username for testing your mod. You can always override this per-run by running
|
||||||
|
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||||
developmentEnvironmentUserName = "Developer"
|
developmentEnvironmentUserName = "Developer"
|
||||||
|
|
||||||
# Define a source file of your project with:
|
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
# See https://github.com/bsideup/jabel for details on how this works.
|
||||||
# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's
|
enableModernJavaSyntax = false
|
||||||
# version in @Mod([...], version = VERSION, [...])
|
|
||||||
# Leave these properties empty to skip individual token replacements
|
|
||||||
replaceGradleTokenInFile = StructureLib.java
|
|
||||||
gradleTokenModId =
|
|
||||||
gradleTokenModName =
|
|
||||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
|
||||||
gradleTokenGroupName =
|
|
||||||
|
|
||||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can
|
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||||
|
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||||
|
enableGenericInjection = false
|
||||||
|
|
||||||
|
# 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 gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||||
|
generateGradleTokenClass =
|
||||||
|
|
||||||
|
# Name of the token containing the project's current version to generate/replace.
|
||||||
|
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||||
|
|
||||||
|
# [DEPRECATED] Mod ID replacement token.
|
||||||
|
gradleTokenModId =
|
||||||
|
|
||||||
|
# [DEPRECATED] Mod name replacement token.
|
||||||
|
gradleTokenModName =
|
||||||
|
|
||||||
|
# [DEPRECATED]
|
||||||
|
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||||
|
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||||
|
# 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, [...]).
|
||||||
|
# Leave these properties empty to skip individual token replacements.
|
||||||
|
replaceGradleTokenInFile = StructureLib.java
|
||||||
|
|
||||||
|
# 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.
|
||||||
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
|
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
|
||||||
apiPackage =
|
apiPackage =
|
||||||
|
|
||||||
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
|
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||||
# Example value: mymodid_at.cfg
|
# There can be multiple files in a space-separated list.
|
||||||
|
# Example value: mymodid_at.cfg nei_at.cfg
|
||||||
accessTransformersFile =
|
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 = false
|
usesMixins = false
|
||||||
|
|
||||||
|
# Adds some debug arguments like verbose output and class export.
|
||||||
|
usesMixinDebug = false
|
||||||
|
|
||||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||||
mixinPlugin =
|
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 =
|
mixinsPackage =
|
||||||
|
|
||||||
# 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 compatability 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
|
||||||
coreModClass =
|
coreModClass =
|
||||||
|
|
||||||
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
# 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!
|
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||||
containsMixinsAndOrCoreModOnly = false
|
containsMixinsAndOrCoreModOnly = false
|
||||||
|
|
||||||
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
|
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
|
||||||
# responsibility check the licence and request permission for distribution, if required.
|
forceEnableMixins = false
|
||||||
|
|
||||||
|
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
|
||||||
|
# responsibility to check the license and request permission for distribution if required.
|
||||||
usesShadowedDependencies = false
|
usesShadowedDependencies = false
|
||||||
|
|
||||||
|
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
|
||||||
|
# their own classes, making the minimization unreliable.
|
||||||
|
minimizeShadowedDependencies = true
|
||||||
|
|
||||||
|
# If disabled, won't rename the shadowed classes.
|
||||||
|
relocateShadowedDependencies = true
|
||||||
|
|
||||||
|
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
|
||||||
|
includeWellKnownRepositories = true
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||||
|
usesMavenPublishing = true
|
||||||
|
|
||||||
|
# Maven repository to publish the mod to.
|
||||||
|
# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/
|
||||||
|
|
||||||
|
# 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 to Modrinth.
|
||||||
|
modrinthProjectId =
|
||||||
|
|
||||||
|
# The project's relations 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:gasstation;incompatible-project:gregtech
|
||||||
|
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||||
|
modrinthRelations =
|
||||||
|
|
||||||
|
# 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 =
|
||||||
|
|
||||||
|
# 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 slug of the other mod.
|
||||||
|
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||||
|
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||||
|
curseForgeRelations =
|
||||||
|
|
||||||
|
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
|
||||||
|
# projects. New projects should not use this parameter.
|
||||||
|
# customArchiveBaseName =
|
||||||
|
|
||||||
|
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||||
|
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||||
|
# The check is ONLY performed if the version is a git tag.
|
||||||
|
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
|
||||||
|
# versionPattern =
|
||||||
|
|
||||||
|
# Uncomment to prevent the source code from being published.
|
||||||
|
# noPublishedSources = true
|
||||||
|
|
||||||
|
# Uncomment this to disable Spotless checks.
|
||||||
|
# This should only be uncommented to keep it easier to sync with upstream/other forks.
|
||||||
|
# That is, if there is no other active fork/upstream, NEVER change this.
|
||||||
|
# disableSpotless = true
|
||||||
|
|
||||||
|
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
|
||||||
|
disableCheckstyle = true
|
||||||
|
|
||||||
|
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
|
||||||
|
# (force use delegated build).
|
||||||
|
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||||
|
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
|
||||||
|
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
|
||||||
|
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
|
||||||
|
# ideaOverrideBuildType = idea
|
||||||
|
|
||||||
|
# Whether IDEA should run spotless checks when pressing the Build button.
|
||||||
|
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||||
|
# ideaCheckSpotlessOnBuild = true
|
||||||
|
|
||||||
|
# Non-GTNH properties
|
||||||
|
gradleTokenGroupName =
|
||||||
Vendored
BIN
Binary file not shown.
+2
-1
@@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
@@ -83,10 +83,8 @@ done
|
|||||||
# This is normally unused
|
# This is normally unused
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -133,10 +131,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
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.
|
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
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
case $MAX_FD in #(
|
case $MAX_FD in #(
|
||||||
max*)
|
max*)
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
warn "Could not query maximum file descriptor limit"
|
warn "Could not query maximum file descriptor limit"
|
||||||
esac
|
esac
|
||||||
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
|||||||
'' | soft) :;; #(
|
'' | soft) :;; #(
|
||||||
*)
|
*)
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
# shellcheck disable=SC3045
|
# shellcheck disable=SC2039,SC3045
|
||||||
ulimit -n "$MAX_FD" ||
|
ulimit -n "$MAX_FD" ||
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
esac
|
esac
|
||||||
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
# double quotes to make sure that they get re-expanded; and
|
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
|||||||
Vendored
+10
-10
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
|
|||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
// Add any additional repositiroes for your dependencies here
|
// Add any additional repositiroes for your dependencies here
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
|
||||||
name = "GTNH"
|
|
||||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+5
-10
@@ -4,10 +4,10 @@ pluginManagement {
|
|||||||
maven {
|
maven {
|
||||||
// RetroFuturaGradle
|
// RetroFuturaGradle
|
||||||
name "GTNH Maven"
|
name "GTNH Maven"
|
||||||
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||||
allowInsecureProtocol = true
|
|
||||||
mavenContent {
|
mavenContent {
|
||||||
includeGroup("com.gtnewhorizons.retrofuturagradle")
|
includeGroup("com.gtnewhorizons")
|
||||||
|
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
@@ -17,12 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.diffplug.blowdryerSetup' version '1.6.0'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8'
|
||||||
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
|
|
||||||
}
|
}
|
||||||
|
|
||||||
blowdryerSetup {
|
|
||||||
repoSubfolder 'gtnhShared'
|
|
||||||
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.0')
|
|
||||||
//devLocal '.' // Use this when testing config updates locally
|
|
||||||
}
|
|
||||||
@@ -46,7 +46,6 @@ public class ClientProxy extends CommonProxy {
|
|||||||
*/
|
*/
|
||||||
private static final List<HintGroup> allGroups = new ArrayList<>();
|
private static final List<HintGroup> allGroups = new ArrayList<>();
|
||||||
|
|
||||||
public static int HOLOGRAM_LIFETIME = 200;
|
|
||||||
/**
|
/**
|
||||||
* Current batch of hints. Belongs to the same logical multiblock.
|
* Current batch of hints. Belongs to the same logical multiblock.
|
||||||
*/
|
*/
|
||||||
@@ -335,26 +334,32 @@ public class ClientProxy extends CommonProxy {
|
|||||||
double X = (x - eyeXint) + 0.25;
|
double X = (x - eyeXint) + 0.25;
|
||||||
double Y = (y - eyeYint) + 0.25;
|
double Y = (y - eyeYint) + 0.25;
|
||||||
double Z = (z - eyeZint) + 0.25;
|
double Z = (z - eyeZint) + 0.25;
|
||||||
|
double worldX = x + 0.25;
|
||||||
|
double worldY = y + 0.25;
|
||||||
|
double worldZ = z + 0.25;
|
||||||
|
|
||||||
for (int i = 0; i < 6; i++) {
|
// this rendering code is independently written by glee8e on July 10th, 2023
|
||||||
if (icons[i] == null) continue;
|
// and is released as part of StructureLib under LGPL terms, just like everything else in this project
|
||||||
|
// cube is a very special model. its facings can be rendered correctly by viewer distance without using
|
||||||
|
// surface normals and view vector
|
||||||
|
// here we do a 2 pass render.
|
||||||
|
// first pass we draw obstructed faces (i.e. faces that are further away from player)
|
||||||
|
// second pass we draw unobstructed faces
|
||||||
|
for (int j = 0; j < 2; j++) {
|
||||||
|
boolean unobstructedPass = j == 1;
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
if (icons[i] == null) continue;
|
||||||
|
|
||||||
markTextureUsed(icons[i]);
|
markTextureUsed(icons[i]);
|
||||||
|
|
||||||
double u = icons[i].getMinU();
|
double u = icons[i].getMinU();
|
||||||
double U = icons[i].getMaxU();
|
double U = icons[i].getMaxU();
|
||||||
double v = icons[i].getMinV();
|
double v = icons[i].getMinV();
|
||||||
double V = icons[i].getMaxV();
|
double V = icons[i].getMaxV();
|
||||||
|
|
||||||
// cube is a very special model. its facings can be rendered correctly by viewer distance without using
|
|
||||||
// surface normals and view vector
|
|
||||||
// here we do a 2 pass render.
|
|
||||||
// first pass we draw obstructed faces (i.e. faces that are further away from player)
|
|
||||||
// second pass we draw unobstructed faces
|
|
||||||
for (int j = 0; j < 2; j++) {
|
|
||||||
switch (i) { // {DOWN, UP, NORTH, SOUTH, WEST, EAST}
|
switch (i) { // {DOWN, UP, NORTH, SOUTH, WEST, EAST}
|
||||||
case 0:
|
case 0:
|
||||||
if ((Y >= eyeY) != (j == 1)) continue;
|
// all these ifs is in form if ((is face unobstructed) != (is in unobstructred pass))
|
||||||
|
if ((worldY >= eyeY) != unobstructedPass) continue;
|
||||||
tes.setNormal(0, -1, 0);
|
tes.setNormal(0, -1, 0);
|
||||||
tes.addVertexWithUV(X, Y, Z + size, u, V);
|
tes.addVertexWithUV(X, Y, Z + size, u, V);
|
||||||
tes.addVertexWithUV(X, Y, Z, u, v);
|
tes.addVertexWithUV(X, Y, Z, u, v);
|
||||||
@@ -364,7 +369,7 @@ public class ClientProxy extends CommonProxy {
|
|||||||
tes.addVertexWithUV(X, Y, Z + size, u, V);
|
tes.addVertexWithUV(X, Y, Z + size, u, V);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if ((Y + size <= eyeY) != (j == 1)) continue;
|
if ((worldY + size <= eyeY) != unobstructedPass) continue;
|
||||||
tes.setNormal(0, 1, 0);
|
tes.setNormal(0, 1, 0);
|
||||||
tes.addVertexWithUV(X, Y + size, Z, u, v);
|
tes.addVertexWithUV(X, Y + size, Z, u, v);
|
||||||
tes.addVertexWithUV(X, Y + size, Z + size, u, V);
|
tes.addVertexWithUV(X, Y + size, Z + size, u, V);
|
||||||
@@ -374,7 +379,7 @@ public class ClientProxy extends CommonProxy {
|
|||||||
tes.addVertexWithUV(X, Y + size, Z, u, v);
|
tes.addVertexWithUV(X, Y + size, Z, u, v);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if ((Z >= eyeZ) != (j == 1)) continue;
|
if ((worldZ >= eyeZ) != unobstructedPass) continue;
|
||||||
tes.setNormal(0, 0, -1);
|
tes.setNormal(0, 0, -1);
|
||||||
tes.addVertexWithUV(X, Y, Z, U, V);
|
tes.addVertexWithUV(X, Y, Z, U, V);
|
||||||
tes.addVertexWithUV(X, Y + size, Z, U, v);
|
tes.addVertexWithUV(X, Y + size, Z, U, v);
|
||||||
@@ -384,7 +389,7 @@ public class ClientProxy extends CommonProxy {
|
|||||||
tes.addVertexWithUV(X, Y, Z, U, V);
|
tes.addVertexWithUV(X, Y, Z, U, V);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if ((Z <= eyeZ) != (j == 1)) continue;
|
if ((worldZ + size <= eyeZ) != unobstructedPass) continue;
|
||||||
tes.setNormal(0, 0, 1);
|
tes.setNormal(0, 0, 1);
|
||||||
tes.addVertexWithUV(X + size, Y, Z + size, U, V);
|
tes.addVertexWithUV(X + size, Y, Z + size, U, V);
|
||||||
tes.addVertexWithUV(X + size, Y + size, Z + size, U, v);
|
tes.addVertexWithUV(X + size, Y + size, Z + size, U, v);
|
||||||
@@ -394,7 +399,7 @@ public class ClientProxy extends CommonProxy {
|
|||||||
tes.addVertexWithUV(X + size, Y, Z + size, U, V);
|
tes.addVertexWithUV(X + size, Y, Z + size, U, V);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if ((X >= eyeX) != (j == 1)) continue;
|
if ((worldX >= eyeX) != unobstructedPass) continue;
|
||||||
tes.setNormal(-1, 0, 0);
|
tes.setNormal(-1, 0, 0);
|
||||||
tes.addVertexWithUV(X, Y, Z + size, U, V);
|
tes.addVertexWithUV(X, Y, Z + size, U, V);
|
||||||
tes.addVertexWithUV(X, Y + size, Z + size, U, v);
|
tes.addVertexWithUV(X, Y + size, Z + size, U, v);
|
||||||
@@ -404,7 +409,7 @@ public class ClientProxy extends CommonProxy {
|
|||||||
tes.addVertexWithUV(X, Y, Z + size, U, V);
|
tes.addVertexWithUV(X, Y, Z + size, U, V);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if ((X + size <= eyeX) != (j == 1)) continue;
|
if ((worldX + size <= eyeX) != unobstructedPass) continue;
|
||||||
tes.setNormal(1, 0, 0);
|
tes.setNormal(1, 0, 0);
|
||||||
tes.addVertexWithUV(X + size, Y, Z, U, V);
|
tes.addVertexWithUV(X + size, Y, Z, U, V);
|
||||||
tes.addVertexWithUV(X + size, Y + size, Z, U, v);
|
tes.addVertexWithUV(X + size, Y + size, Z, U, v);
|
||||||
@@ -550,7 +555,6 @@ public class ClientProxy extends CommonProxy {
|
|||||||
tes.draw();
|
tes.draw();
|
||||||
tes.startDrawing(GL11.GL_TRIANGLES);
|
tes.startDrawing(GL11.GL_TRIANGLES);
|
||||||
}
|
}
|
||||||
// TODO verify if we need to add eyeHeight
|
|
||||||
hint.draw(tes, d0, d1, d2, i0, i1, i2);
|
hint.draw(tes, d0, d1, d2, i0, i1, i2);
|
||||||
}
|
}
|
||||||
p.endStartSection("Draw");
|
p.endStartSection("Draw");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
import com.gtnewhorizon.structurelib.net.ErrorHintParticleMessage;
|
import com.gtnewhorizon.structurelib.net.ErrorHintParticleMessage;
|
||||||
import com.gtnewhorizon.structurelib.net.UpdateHintParticleMessage;
|
import com.gtnewhorizon.structurelib.net.UpdateHintParticleMessage;
|
||||||
|
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
|
||||||
public class CommonProxy {
|
public class CommonProxy {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.gtnewhorizon.structurelib.gui.GuiScreenConfigureChannels;
|
import com.gtnewhorizon.structurelib.gui.GuiScreenConfigureChannels;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.IGuiHandler;
|
import cpw.mods.fml.common.network.IGuiHandler;
|
||||||
|
|
||||||
public class GuiHandler implements IGuiHandler {
|
public class GuiHandler implements IGuiHandler {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
import com.gtnewhorizon.structurelib.structure.IStructureElement;
|
import com.gtnewhorizon.structurelib.structure.IStructureElement;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.Event;
|
import cpw.mods.fml.common.eventhandler.Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
|
|||||||
import com.gtnewhorizon.structurelib.net.AlignmentMessage;
|
import com.gtnewhorizon.structurelib.net.AlignmentMessage;
|
||||||
import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
|
import com.gtnewhorizon.structurelib.structure.AutoPlaceEnvironment;
|
||||||
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -190,4 +190,28 @@ public interface IAlignment extends IAlignmentLimits, IAlignmentProvider {
|
|||||||
return getAlignmentLimits()
|
return getAlignmentLimits()
|
||||||
.isNewExtendedFacingValid(alignment.getDirection(), alignment.getRotation(), alignment.getFlip());
|
.isNewExtendedFacingValid(alignment.getDirection(), alignment.getRotation(), alignment.getFlip());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this object support a flip change, assuming both direction and rotation is not changed.
|
||||||
|
*/
|
||||||
|
default boolean isFlipChangeAllowed() {
|
||||||
|
ExtendedFacing facing = getExtendedFacing();
|
||||||
|
for (Flip flip : Flip.VALUES) {
|
||||||
|
if (flip == getFlip()) continue;
|
||||||
|
if (isNewExtendedFacingValid(facing.with(flip))) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this object support a rotation change, assuming both direction and flip is not changed.
|
||||||
|
*/
|
||||||
|
default boolean isRotationChangeAllowed() {
|
||||||
|
ExtendedFacing facing = getExtendedFacing();
|
||||||
|
for (Rotation rotation : Rotation.VALUES) {
|
||||||
|
if (rotation == getRotation()) continue;
|
||||||
|
if (isNewExtendedFacingValid(facing.with(rotation))) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -38,6 +38,7 @@ import com.gtnewhorizon.structurelib.structure.adders.ITileAdder;
|
|||||||
import com.gtnewhorizon.structurelib.util.ItemStackPredicate;
|
import com.gtnewhorizon.structurelib.util.ItemStackPredicate;
|
||||||
import com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode;
|
import com.gtnewhorizon.structurelib.util.ItemStackPredicate.NBTMode;
|
||||||
import com.gtnewhorizon.structurelib.util.Vec3Impl;
|
import com.gtnewhorizon.structurelib.util.Vec3Impl;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2591,7 +2592,7 @@ public class StructureUtility {
|
|||||||
// we will bypass the chatter filter here, as this is a warning that player definitively want to see
|
// we will bypass the chatter filter here, as this is a warning that player definitively want to see
|
||||||
// instead of some false positive error messages like item not find
|
// instead of some false positive error messages like item not find
|
||||||
warnNoExplicitSubChannel(env.getActor());
|
warnNoExplicitSubChannel(env.getActor());
|
||||||
return backing.survivalPlaceBlock(t, world, x, y, z, trigger, env);
|
return backing.survivalPlaceBlock(t, world, x, y, z, newTrigger, env);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,6 +253,8 @@ public class InventoryUtility {
|
|||||||
}
|
}
|
||||||
if (!recursive) continue;
|
if (!recursive) continue;
|
||||||
for (ItemStackExtractor f : stackExtractors) {
|
for (ItemStackExtractor f : stackExtractors) {
|
||||||
|
boolean end = f.isAPIImplemented(APIType.IS_VALID_SOURCE);
|
||||||
|
if (!f.isValidSource(stack, player)) continue;
|
||||||
if (filter != null && f.isAPIImplemented(APIType.EXTRACT_ONE_STACK)) {
|
if (filter != null && f.isAPIImplemented(APIType.EXTRACT_ONE_STACK)) {
|
||||||
copiedFilter.stackSize = count - found;
|
copiedFilter.stackSize = count - found;
|
||||||
found += f.getItem(stack, copiedFilter, simulate, player);
|
found += f.getItem(stack, copiedFilter, simulate, player);
|
||||||
@@ -260,6 +262,7 @@ public class InventoryUtility {
|
|||||||
found += f.takeFromStack(predicate, simulate, count - found, store, stack, filter, player);
|
found += f.takeFromStack(predicate, simulate, count - found, store, stack, filter, player);
|
||||||
}
|
}
|
||||||
if (found >= count) return found;
|
if (found >= count) return found;
|
||||||
|
if (end) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
@@ -294,10 +297,15 @@ public class InventoryUtility {
|
|||||||
enum APIType {
|
enum APIType {
|
||||||
MAIN,
|
MAIN,
|
||||||
EXTRACT_ONE_STACK,
|
EXTRACT_ONE_STACK,
|
||||||
|
IS_VALID_SOURCE,
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isAPIImplemented(APIType type);
|
boolean isAPIImplemented(APIType type);
|
||||||
|
|
||||||
|
default boolean isValidSource(ItemStack is, EntityPlayerMP player) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract a particular type of item. The extractor can choose to not return all items contained within this
|
* Extract a particular type of item. The extractor can choose to not return all items contained within this
|
||||||
* item as long as it makes sense, but the author should inform the player of this.
|
* item as long as it makes sense, but the author should inform the player of this.
|
||||||
|
|||||||
Reference in new issue
Block a user