Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #40

Open
wants to merge 120 commits into
base: master
Choose a base branch
from
Open

Dev #40

Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
52e9218
Refreshable & directional canInput
Vliro Dec 30, 2020
0b98a2f
E-net recalculation should not break on external errors
repo-alt Dec 30, 2020
63332f1
bugfixes i think
Vliro Jan 7, 2021
e21c253
converted Tesseract ticking to forge event
repo-alt Jan 8, 2021
5858211
Merge pull request #41 from repo-alt/dev
repo-alt Jan 8, 2021
c658cf3
Fix build system
Vliro Feb 9, 2021
2f87cd0
Merge remote-tracking branch 'origin/dev' into dev
Vliro Feb 9, 2021
ebaf4a4
rework
Vliro Feb 10, 2021
c1a58b6
Made overpressure explosion optional, disabled by default
repo-alt Mar 1, 2021
1653594
Merge pull request #42 from repo-alt/dev
repo-alt Mar 1, 2021
6679f14
1.16 build. Optimize imports. ForgeGradle 4.
Vliro Mar 6, 2021
eabffb8
Merge remote-tracking branch 'repo-alt/dev' into forge-1.16
Vliro Mar 6, 2021
59ebeba
Fix compilation after merge.
Vliro Mar 6, 2021
75aeb7d
Remove old repo stuff.
Vliro Mar 12, 2021
9c0ac6a
Fix broken Tesseract
Vliro Mar 13, 2021
950a470
Merge remote-tracking branch 'origin/dev' into dev
Vliro Mar 13, 2021
6f2ebba
Remove deobfjar
Vliro Mar 13, 2021
6c881ff
Gradle work, again. 0.1!
Vliro Mar 14, 2021
1a43d40
Update forge.
Vliro Mar 17, 2021
9ec2a46
ticking only once
repo-alt Mar 19, 2021
440988c
Merge pull request #43 from repo-alt/dev
repo-alt Mar 19, 2021
f38b2a8
Update ForgeGradle.
Vliro Mar 22, 2021
77cd5df
Merge remote-tracking branch 'origin/dev' into dev
Vliro Mar 22, 2021
438c592
check connects() on onCheck
Vliro Mar 24, 2021
6c7e5ab
wip
Vliro Mar 25, 2021
2684d33
Should almost work now, Lazy init.
Vliro Mar 26, 2021
9e9446b
Still WIP but it works better now.
Vliro Mar 27, 2021
6e3dbb9
Minor state bugfix.
Vliro Mar 27, 2021
f77ce7b
Minor item bugfixes
Vliro Mar 27, 2021
9db7793
fix minor bug
Vliro Mar 27, 2021
c27d52a
Merge branch 'dev-tesseract' into dev
Vliro Mar 28, 2021
6790ef4
Stabilize tesseract item/gt/fluid.
Vliro Mar 29, 2021
4024522
Bugfix.
Vliro Mar 29, 2021
77913b8
fix overvoltage
Vliro Mar 29, 2021
36977de
Gt bugfix
Vliro Mar 31, 2021
5bb76fe
Use SemVar versioning
Rongmario Apr 1, 2021
09d137b
Enable refcounting in tesseract.
Vliro Apr 6, 2021
5e37f92
Remove node connectivity, add NodeCache, positional getInfo
Vliro Apr 7, 2021
6dcf7ca
Merge pull request #44 from GregTech-Intergalactical/dev-refcount
Vliro Apr 7, 2021
64a7cb0
update tesseract gradle
Vliro Apr 17, 2021
f5b8a91
small fixes
Vliro Apr 28, 2021
97e12f2
fix item counter
Vliro Apr 28, 2021
db7265c
fix build.gradle shadowing
Vliro Apr 28, 2021
2c5412a
shameless plug
Vliro Apr 28, 2021
97c5ffb
No more RegistryKey<>!
Vliro Apr 29, 2021
1b347da
bugfix - fixes loading of pipe systems
Vliro Apr 29, 2021
065fc63
version upgrade
Vliro Apr 29, 2021
781f48f
Remove Dir, refer to Direction instead.
Vliro Apr 30, 2021
9d7ed18
Fluid rework kinda
Vliro May 4, 2021
e9ab494
fix tesseract traversing nodes as well
Vliro May 4, 2021
4259fac
Bugfix in ASFinder, improve item & fluid controller.
Vliro May 7, 2021
75918fc
minor GT controller fixes for FE compat
Vliro May 8, 2021
2747800
fix blow up without hardcore pipes
Vliro May 9, 2021
0a296b8
Improved fluid controller behaviour
Vliro May 10, 2021
2960128
fix capacity
Vliro May 10, 2021
4211944
update mappings
Vliro May 10, 2021
638c370
fix bug in GT state
Vliro May 10, 2021
14df772
fix event registration
Vliro May 11, 2021
fa13175
change item controller behaviour
Vliro May 12, 2021
f49f0c0
Fix PENDING_BLOCKS issue w.r.t disk load.
Vliro Jul 10, 2021
982673f
fix too many amperages being sent
Vliro Jul 11, 2021
0e46d09
bump version
Vliro Aug 11, 2021
157dfba
add info methods
Vliro Aug 16, 2021
0827831
update Gt controller info
Vliro Aug 16, 2021
2c378ba
added java 8 compile enforcement
Trinsdar Aug 29, 2021
0e6caa1
Updated forge
Trinsdar Sep 10, 2021
702ea69
Add support for registering pipes as nodes(for covers)
Vliro Oct 13, 2021
44b0756
fix GT controller issues
Vliro Oct 13, 2021
5574558
fix fluid controller issues
Vliro Oct 13, 2021
94dca93
Add support for covers as well as new bitmap system for nodes.
Vliro Oct 17, 2021
2e9133d
GTController had wrong return value.
Vliro Oct 17, 2021
ca90b93
update to 0.0.5
Vliro Oct 19, 2021
bed9d69
fix grid having no node after split
Vliro Oct 20, 2021
5b8f781
actually fix Tesseract?
Vliro Oct 20, 2021
35a1568
Fix grid connectivity issue.
Vliro Oct 20, 2021
c73f093
Remove unnecessary world references, add test support and reformat code.
Vliro Oct 22, 2021
9377766
Make fluid controller act per frame for holders, fix test error.
Vliro Oct 24, 2021
e0529c3
Send back dir to the node caller.
Vliro Oct 30, 2021
f0ad1fe
make tesseract compile
Vliro Oct 30, 2021
50c87fe
add more info in controllers
Vliro Nov 4, 2021
4421ff6
Fix issues in Tesseract
Vliro Nov 8, 2021
fa03af8
Add ability to get fluids from tesseract fluid controller
Vliro Nov 8, 2021
bf0cb43
Hopefully fix last bug in Tesseract
Vliro Nov 9, 2021
85453e0
Fix connector.cross
Vliro Nov 11, 2021
033b3bc
move to official mappings
Vliro Nov 18, 2021
61222f3
Move to transaction system, bugfixes.
Vliro Nov 20, 2021
065eb2a
add toString to GTTransaction
Vliro Nov 20, 2021
3708e50
fix Fluidholder
Vliro Nov 20, 2021
469e7d1
fix publish
Vliro Nov 24, 2021
97ea742
enable ParchmentMC
Vliro Nov 24, 2021
c63e758
fix build issues
Vliro Nov 26, 2021
2d73f42
fix pipes exploding with hardcore pipes false
Vliro Nov 30, 2021
d3cc92c
move temp holder calculation below modifiers
Vliro Nov 30, 2021
29d3db2
start reworking tesseract
Vliro Dec 2, 2021
c96dd00
fix capabilities and controllers
Vliro Dec 3, 2021
181d09d
small fixes to avoid NPEs
Vliro Dec 3, 2021
b35c923
Last commit - tesseract rework done.
Vliro Dec 3, 2021
8489d57
fix last stuff of rework - should work now
Dec 3, 2021
a53bb0c
fix capability in Tesseract pipes
Dec 5, 2021
985f853
first 1.18 commit
Dec 5, 2021
b947909
continue rework
Dec 9, 2021
814937c
fix build
Dec 9, 2021
d084d95
hopefully fix jitpack?
Dec 9, 2021
25acc4d
work on removing getter
Dec 9, 2021
67911fa
fix tesseract
Dec 10, 2021
e506519
bump forge version
Dec 11, 2021
43c2501
bump version
Dec 12, 2021
c88ee73
Enable GitHub actions
Dec 15, 2021
38c4beb
trigger github action
Dec 15, 2021
0ee942d
copy workflow changes from antimatter
Vliro Dec 16, 2021
0d147d8
update modid
Jan 4, 2022
3153b1e
update mod name
Jan 5, 2022
17a2217
workable drains
Jan 18, 2022
d35aac6
move all logic to GraphWrapper instead of Graph, far better
Jan 18, 2022
9d33741
fix cables hurting, some fluid info
Jan 18, 2022
c4695b0
update modid to fix crashes (to tesseractAPI)
Jan 21, 2022
34aac9f
merged relevant stuff from dev-1.18, hopefully got everything
Trinsdar Jan 21, 2022
b0a2306
fixed possible crash with a null old field
Trinsdar Jan 23, 2022
15a4d5d
fixed isSending being true when it shouldn't be
Trinsdar Jan 23, 2022
bc52443
updated forge
Trinsdar Mar 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: TesseractAPI Nightly
on:
push:
branches:
- dev
pull_request:
branches:
- dev
jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v2
with:
path: ~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle','**/gradle/wrapper/gradle-wrapper.properties','**/*.properties') }}
- name: Build with Gradle
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
with:
arguments: build
# The USERNAME and TOKEN need to correspond to the credential environment variables used in
# the publishing section of your build.gradle
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: TesseractAPI JAR
path: build/libs
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -24,3 +24,6 @@ run

# Files from Forge MDK
forge*changelog.txt

.vscode
mcmodsrepo/
230 changes: 169 additions & 61 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,100 +1,208 @@
buildscript {
repositories {
maven { url 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
gradlePluginPortal()
maven {
url "https://plugins.gradle.org/m2/"
name = 'parchment'
url = 'https://maven.parchmentmc.org'
}
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:5.2.0"
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1+', changing: true
classpath 'org.parchmentmc:librarian:1.+'
}
}


plugins {
id 'maven-publish'
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.0'
}

def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
def gitHash() {
String hash = System.getenv("GITHUB_SHA")
if (hash != null) return hash.substring(0,8)
return ""
}

apply plugin: 'net.minecraftforge.gradle'
apply plugin: "eclipse"
apply plugin: "com.github.johnrengelman.shadow"
//evaluationDependsOn(':version')
apply plugin: 'java'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
archivesBaseName = 'TesseractAPI'
version = "${minecraft_version}-${mod_version}"
group = "com.github.gregtech-intergalactical"

if (isCI) {
version = version + "-" + gitHash()
}

group = 'com.github.gregtech-intergalactical' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'tesseract'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
configurations {
shadow
}
minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'parchment', version: '2021.10.17-1.16.5'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

mods {
tesseractapi {
source sourceSets.main
}
}
}

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
server {
workingDirectory project.file('run')

assemble.dependsOn shadowJar
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

configurations {
embed
deobf
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

embed.extendsFrom(implementation)
testCompile.extendsFrom(shadow)
}
mods {
tesseractapi {
source sourceSets.main
}
}
}

shadowJar {
configurations = [project.configurations.embed]
data {
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'

args '--mod', 'tesseract', '--all', '--output', '"' + rootProject.file('src/generated/resources/') + '"',
'--existing', '"' + sourceSets.main.resources.srcDirs[0] + '"'

mods {
tesseractapi {
source sourceSets.main
}
}
}
}
}



// Deobfuscated jar; development purposes.
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
task deobfJar(type: ShadowJar) {
from sourceSets.main.output
configurations = [project.configurations.deobf]
classifier "dev"
}
//import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

repositories {
jcenter()
maven { url = 'https://files.minecraftforge.net/maven' }
}
afterEvaluate { project ->
project.tasks.publishToMavenLocal {
onlyIf {
return rootProject.name == "${modid}"
}
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveBaseName.set(project.archivesBaseName)
archiveVersion.set("${project.version}")
archiveClassifier.set('sources')
}

/*task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
archiveClassifier.set('javadoc')
}*/
shadowJar {
configurations = [project.configurations.shadow]
archiveClassifier.set('')
}
reobf {
shadowJar {}
}
dependencies {
// Main dependencies:
// Declare here your dependencies here with:
// 'shadow' if the jar shouldn't be included in the fat jar,
// 'implementation' if the jar should be included in the jar
shadow 'org.apache.commons:commons-collections4:4.4'
shadow 'it.unimi.dsi:fastutil:8.2.1'

// Test dependencies:
testImplementation 'junit:junit:4.11'

// Embedded dependencies:
// Those will be included in the fat jar.
// You will likely not edit those dependencies.
if (rootProject.name == "tesseract") {
embed project(path: ':forge', configuration: 'archives')
deobf project(path: ':forge', configuration: 'deobf')
} else {
embed project(path: ':tesseract:forge', configuration: 'archives')
deobf project(path: ':tesseract:forge', configuration: 'deobf')
}

//embed project(path: ':fabric', configuration: 'archives') TODO coming soon(tm).
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
testImplementation('junit:junit:4.11')
}

afterEvaluate { project ->
project.tasks.publishToMavenLocal {
onlyIf {
return rootProject.name == "${modid}"
}
}
}
if (isCI) {
jar.finalizedBy('reobfJar')
println("In CI mode")
}
jar {
zip64 true
manifest {
attributes([
"Specification-Title": project.name,
"Specification-Vendor": "GregTech Intergalactical",
"Specification-Version": project.version,
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "GregTech Intergalactical",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

// Maven publishing:

static def configurePublishingRepositories(repositoryHandler) {
if (System.env.MAVEN_URL) {
repositoryHandler.maven {
url = System.env.MAVEN_URL

if (System.env.MAVEN_USERNAME && System.env.MAVEN_PASSWORD) {
authentication {
basic(BasicAuthentication)
}

artifacts {
archives jar, shadowJar, sourcesJar//, javadocJar
}
publishing {
tasks.publish.dependsOn 'build', 'reobfJar'
publications {
mavenJava(MavenPublication) {
//artifactId = archivesBaseName
artifact shadowJar
}
}
repositories {
if (isCI && isRELEASE) {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/GregTech-Intergalactical/TesseractAPI"
credentials {
username = System.env.USERNAME
password = System.env.PASSWORD
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
} else {
maven { url "file:///${project.projectDir}/mcmodsrepo"}
}
}
}
//repositories {
// rootProject.configurePublishingRepositories(delegate)
//}
}

Loading