2019-07-11 09:03:08 +02:00
buildscript {
repositories {
2021-06-18 07:04:21 +02:00
maven { url = 'https://maven.minecraftforge.net' }
2019-07-11 09:03:08 +02:00
mavenCentral ( )
2021-06-18 07:04:21 +02:00
jcenter ( )
2021-11-03 03:30:02 +01:00
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
2021-11-07 04:59:58 +01:00
maven { url = 'https://maven.parchmentmc.org' }
2019-07-11 09:03:08 +02:00
}
dependencies {
2023-06-30 23:12:48 +02:00
classpath "net.minecraftforge.gradle:ForgeGradle:${forgegradle_version}"
2021-11-03 03:30:02 +01:00
classpath "org.spongepowered:mixingradle:${mixingradle_version}"
classpath "org.parchmentmc:librarian:${librarian_version}"
2019-07-11 09:03:08 +02:00
}
}
2022-07-15 00:02:24 +02:00
2020-04-13 08:58:57 +02:00
plugins {
2021-06-18 07:04:21 +02:00
id 'com.matthewprenger.cursegradle' version "${cursegradle_version}"
2020-04-13 08:58:57 +02:00
}
2019-07-11 09:03:08 +02:00
apply plugin: 'net.minecraftforge.gradle'
2021-12-25 10:01:48 +01:00
apply plugin: 'org.parchmentmc.librarian.forgegradle'
2019-07-11 09:03:08 +02:00
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
2021-06-18 07:04:21 +02:00
apply plugin: 'org.spongepowered.mixin'
2019-07-11 09:03:08 +02:00
2022-07-15 00:02:24 +02:00
jarJar . enable ( )
2020-06-08 02:18:34 +02:00
boolean dev = System . getenv ( 'RELEASE' ) = = null | | System . getenv ( 'RELEASE' ) . equals ( 'false' ) ;
2021-12-02 23:02:00 +01:00
// jozu: I use a gradle workspace with both projects.
// The project is named Flywheel-Forge, but sub-projects are named by folder.
boolean inWorkspace = findProject ( ':Flywheel' ) ! = null
2020-06-08 02:18:34 +02:00
2022-02-06 21:22:43 +01:00
ext . buildNumber = System . getenv ( 'BUILD_NUMBER' )
2020-06-08 02:18:34 +02:00
2019-08-06 19:00:51 +02:00
group = 'com.simibubi.create'
2022-07-15 00:02:24 +02:00
archivesBaseName = "create-${artifact_minecraft_version}"
version = mod_version + ( dev & & buildNumber ! = null ? "-${buildNumber}" : '' )
2019-07-11 09:03:08 +02:00
2021-12-07 18:24:57 +01:00
java . toolchain . languageVersion = JavaLanguageVersion . of ( 17 )
2019-07-11 09:03:08 +02:00
2023-06-30 23:12:48 +02:00
println ( 'Java: ' + System . getProperty ( 'java.version' ) + ' JVM: ' + System . getProperty ( 'java.vm.version' ) + ' (' + System . getProperty ( 'java.vendor' ) + ') Arch: ' + System . getProperty ( 'os.arch' ) )
2019-07-11 09:03:08 +02:00
minecraft {
2023-06-30 23:12:48 +02:00
if ( Boolean . parseBoolean ( project . use_parchment ) ) {
mappings channel: 'parchment' , version: "${parchment_version}-${minecraft_version}"
} else {
mappings channel: 'official' , version: "${minecraft_version}"
}
2021-06-18 07:04:21 +02:00
accessTransformer = file ( 'src/main/resources/META-INF/accesstransformer.cfg' )
2021-04-10 01:23:49 +02:00
runs {
2021-06-18 07:04:21 +02:00
client {
2019-07-11 09:03:08 +02:00
workingDirectory project . file ( 'run' )
2021-01-13 06:58:40 +01:00
arg '-mixin.config=create.mixins.json'
2021-11-18 04:42:34 +01:00
arg '-mixin.config=flywheel.mixins.json'
2021-04-10 01:23:49 +02:00
//jvmArgs '-XX:+UnlockCommercialFeatures' // uncomment for profiling
2019-08-06 19:00:51 +02:00
property 'forge.logging.console.level' , 'info'
2019-07-11 09:03:08 +02:00
mods {
create {
source sourceSets . main
}
2021-12-02 23:02:00 +01:00
if ( inWorkspace ) {
flywheel {
source project ( ":Flywheel" ) . sourceSets . main
}
}
2019-07-11 09:03:08 +02:00
}
}
2019-08-06 21:51:02 +02:00
server {
2019-09-18 11:16:57 +02:00
workingDirectory project . file ( 'run/server' )
2021-01-13 06:58:40 +01:00
arg '-mixin.config=create.mixins.json'
2019-08-06 19:00:51 +02:00
property 'forge.logging.console.level' , 'info'
mods {
create {
source sourceSets . main
}
}
}
2019-07-11 09:03:08 +02:00
2019-08-06 21:51:02 +02:00
data {
2019-08-06 19:00:51 +02:00
workingDirectory project . file ( 'run' )
2020-03-28 02:27:43 +01:00
property 'forge.logging.markers' , 'REGISTRIES,REGISTRYDUMP'
2019-07-11 09:03:08 +02:00
property 'forge.logging.console.level' , 'debug'
2020-05-15 01:23:27 +02:00
args '--mod' , 'create' , '--all' , '--output' , file ( 'src/generated/resources/' ) , '--existing' , file ( 'src/main/resources' )
2019-07-11 09:03:08 +02:00
mods {
create {
source sourceSets . main
}
2021-12-02 23:02:00 +01:00
if ( inWorkspace ) {
flywheel {
source project ( ":Flywheel" ) . sourceSets . main
}
}
2019-07-11 09:03:08 +02:00
}
}
2023-05-11 15:00:32 +02:00
gameTestServer {
workingDirectory project . file ( 'run/gametest' )
arg '-mixin.config=create.mixins.json'
property 'forge.logging.console.level' , 'info'
mods {
create {
source sourceSets . main
}
}
setForceExit false
}
2019-07-11 09:03:08 +02:00
}
}
2019-09-16 12:27:28 +02:00
repositories {
2020-03-22 14:41:41 +01:00
maven {
2023-05-20 17:37:56 +02:00
// location of the maven for Registrate and Flywheel
name = 'tterrag maven'
url = 'https://maven.tterrag.com'
}
maven {
// location of the maven that hosts JEI files since January 2023
// location of the maven for Vazkii's mods
name = "Jared's maven"
url = "https://maven.blamejared.com/"
2020-03-22 14:41:41 +01:00
}
2021-06-23 21:30:10 +02:00
/ * maven {
2023-05-20 17:37:56 +02:00
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.dev"
2020-10-11 15:43:04 +02:00
} * /
2020-03-22 14:41:41 +01:00
maven {
2023-05-20 17:37:56 +02:00
// location of the maven for Dynamic Trees
url = 'https://harleyoconnor.com/maven'
2020-03-22 14:41:41 +01:00
}
2020-03-23 04:09:28 +01:00
maven {
2023-05-20 17:37:56 +02:00
// location of the maven for Curios API
url = "https://maven.theillusivec4.top/"
2020-03-23 04:09:28 +01:00
}
2021-01-20 22:36:04 +01:00
maven {
2023-05-20 17:37:56 +02:00
// location of maven for CC: Tweaked
name = "squiddev"
url = "https://squiddev.cc/maven/"
2021-06-19 09:29:18 +02:00
content {
2023-05-20 17:37:56 +02:00
includeGroup "org.squiddev"
2021-06-19 09:29:18 +02:00
}
2021-01-20 22:36:04 +01:00
}
2023-05-20 17:37:56 +02:00
2021-06-26 19:13:44 +02:00
maven {
2023-05-20 17:37:56 +02:00
url = 'https://www.cursemaven.com'
content {
includeGroup "curse.maven"
}
2022-05-10 14:51:38 +02:00
}
2022-08-07 04:37:19 +02:00
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
2023-05-20 17:37:56 +02:00
2023-07-03 22:53:51 +02:00
mavenLocal ( )
2023-05-09 18:23:47 +02:00
flatDir {
dirs 'libs'
}
2019-09-16 12:27:28 +02:00
}
2019-07-11 09:03:08 +02:00
dependencies {
2020-06-08 02:18:34 +02:00
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
2021-04-10 01:23:49 +02:00
2023-03-07 23:10:44 +01:00
jarJar ( "com.tterrag.registrate:Registrate:${registrate_version}" ) {
jarJar . ranged ( it , '[MC1.18.2-1.1.3,)' )
2022-07-15 00:02:24 +02:00
}
2023-05-20 22:14:06 +02:00
jarJar ( "com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}" ) {
2023-08-24 00:36:19 +02:00
jarJar . ranged ( it , '[0.6.10,0.6.11)' )
2023-05-20 22:14:06 +02:00
}
2022-07-15 00:02:24 +02:00
implementation fg . deobf ( "com.tterrag.registrate:Registrate:${registrate_version}" )
2020-10-11 15:43:04 +02:00
2021-12-02 23:02:00 +01:00
if ( inWorkspace ) {
implementation project ( ':Flywheel' )
2021-06-23 06:09:32 +02:00
} else {
2022-07-16 10:58:43 +02:00
implementation fg . deobf ( "com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}" )
2021-06-23 06:09:32 +02:00
}
2020-03-22 14:41:41 +01:00
2021-12-11 01:58:05 +01:00
compileOnly fg . deobf ( "mezz.jei:jei-${jei_minecraft_version}:${jei_version}:api" )
runtimeOnly fg . deobf ( "mezz.jei:jei-${jei_minecraft_version}:${jei_version}" )
2021-06-23 21:30:10 +02:00
2022-05-10 14:51:38 +02:00
compileOnly fg . deobf ( "top.theillusivec4.curios:curios-forge:${curios_minecraft_version}-${curios_version}:api" )
runtimeOnly fg . deobf ( "top.theillusivec4.curios:curios-forge:${curios_minecraft_version}-${curios_version}" )
Squashed commit of the following:
commit a162e18c9c4d91c4020e86cf718d59d3a33b2817
Merge: 374848f97 beb61708a
Author: simibubi <31564874+simibubi@users.noreply.github.com>
Date: Fri May 12 13:40:58 2023 +0200
Merge branch 'mc1.18/dev' into mc1.18/computercraft
commit 374848f978cf0cc1d91ff0b98a8bd506f1b81130
Author: simibubi <31564874+simibubi@users.noreply.github.com>
Date: Fri May 12 13:22:29 2023 +0200
Compilation dependency toggle
commit b2cd60b6195bcbdacaa47c8b8a05929cb160fe5b
Merge: 8e1e4e8bd ee3a079ba
Author: simibubi <31564874+simibubi@users.noreply.github.com>
Date: Wed May 10 14:37:32 2023 +0200
Merge pull request #4650 from ChristianLW/mc1.18/computercraft
Small tweaks to the wiki pages for ComputerCraft integration
commit ee3a079bacbee6fccdf14a356846e12d67edece6
Author: Christian L.W <bebeu@bebeu.dk>
Date: Thu Apr 13 00:55:20 2023 +0200
Small tweaks to the wiki pages
commit 8e1e4e8bd3beb310e4e114e7d36134caf1c7eb79
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Mar 13 18:31:56 2023 -0700
Added computer to display source ponder tag
- Added advanced computer to display source ponder tag
- Added missing lang entry for computer display source
commit 952941e5fc86036bf2c3555ead662cdb9ea9a29d
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Mar 13 16:31:16 2023 -0700
Added documentation for train station peripherals and train schedules
- Added in depth documentation for working with train stations and train schedules in Lua
- Fixed small formatting issues in Lua-Rotation-Speed-Controller.md and Lua-Sequenced-Gearshift.md
commit 7f3ca1cfa06b227211a41503c4ae31c3cf854ba5
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Mar 13 16:29:05 2023 -0700
Added isTrainEnroute to station peripheral API
- isTrainEnroute checks if a train is currently navigating to the station
- Reworded null station exception to "station is not connected to a track"
- Refactored StationPeripheral#inAssemblyMode to StationPeripheral#isInAssemblyMode
- Added a check to StationPeripheral#disassemble to make sure the station isn't in assembly mode
commit fac1ebcd3f1d1d570735fa6b2d57641b20c4ad8d
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 16:12:58 2023 -0800
Added documentation for most peripherals
- Lua documentation has been added for all peripherals except the train station (not looking forward to writing that one)
- This documentation will be added to the GitHub wiki pages
commit 3e21996984febc8b256ac8abbb11df9dbe150630
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 15:54:36 2023 -0800
Updated DisplayLinkPeripheral#write to move cursor to the end of the text
- This change was made to be more inline with ComputerCraft's builtin display API
commit 7141c10025c948ce5a78f1d484964f4324ffb463
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 11:45:43 2023 -0800
Added isTrainImminent and hasSchedule to train station API
- Added isTrainImminent to check if a train is incoming to the station and hasSchedule to check if the currently present train has a schedule
- Added StationPeripheral#getTrainOrThrow to consolidate repetitive null checks
commit 909484ed5b80ac1c397e04a1ad41acab6cc8e13a
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 11:15:58 2023 -0800
Added getSchedule to train station lua API
- Added getSchedule which serializes the currently present train's schedule into a lua table
- Refactored StationPeripheral#setSchedule to use a more generic method of serializing NBT tags to lua tables
- Moved schedule entry special data from root tag to "Data"
- Added StringHelper#camelCaseToSnakeCase
- Added variety of put methods to CreateLuaTable
commit 31ad3aa671339e7642f1c89118a218ff7c7eec15
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Mar 8 18:22:23 2023 -0800
Extended train station peripheral API
- Train station peripherals can now assemble and disassemble trains, check if the station is in assembly mode, set the assembly mode of the station, get and change the station name, check if a train is present at the station and get and change the currently present train name.
- Refactored StationEditPacket. Moved most of the logic that was previously in StationEditPacket to StationTileEntity. This allows us to call this logic without having to send a packet.
- Made Train#owner nullable. This is needed so that computers can assemble trains. All Train#owner is currently used for is to display the train status to the correct play.
commit 574cd93a89d49d8ac50b865b9b7f83955fa16ffc
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Nov 30 00:37:47 2022 -0800
Serialize hasAttachedComputer in ComputerBehaviour
- This eliminates some edge cases were peripherals don't realize they're being controlled by a computer on a world save and load
commit 94e3ed44ad1deaa383c8da61928f67697dc13273
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 26 16:57:12 2022 -0700
Added ComputerScreen
- ComputerScreen shows that tile entity currently has computers attached and therefore cannot be controlled manually
commit 9afdcaded7006c1c2671cd3070185d500c3a3dca
Author: caelwarner <caelawarner@gmail.com>
Date: Thu Oct 20 10:18:37 2022 -0700
Refactored PeripheralBase to SyncedPeripheral
commit 7d47fdcd061ca8efaab5688ac2724fec3e0bf1b7
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 22:45:47 2022 -0700
Made LuaFunction's final
commit 56a1210fff386fd538733a0a0998dd1bc0bd060f
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 22:39:38 2022 -0700
Created ComputerBehaviour behaviour
- ComputerBehaviour replaces ComputerControllable and SyncedComputerControllable
commit 19d283b92376da793e7c88c443adbb3cd70b2c43
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 16:05:48 2022 -0700
Moved all peripheral classes to computercraft.peripherals package
commit ab18034b985fe9cecf4de5add48557371789d756
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 15:58:56 2022 -0700
Added Train Station as peripheral
- Train station can set a new auto-schedule for the train currently at the station
- Added CreateLuaTable to add helper functions for working with lua tables
- Added StringHelper util class to convert snake case to camel case
commit 1091f3227c806f09fb443320900f7563ed264655
Author: caelwarner <caelawarner@gmail.com>
Date: Thu Oct 6 21:11:24 2022 -0700
Changed Display Link Peripheral API
- Changed the Display Link Peripheral API to be more in line with the Monitor API
- Added write, setCursorPos, getCursorPos, getSize, isColor, isColour, clearLine
- Removed void writeLine, setLine, writeLines, setLines
commit 18bfb216b1bd5c1b6fab99370318536ccf27b069
Author: caelwarner <caelawarner@gmail.com>
Date: Thu Oct 6 02:50:41 2022 -0700
Changed method of checking if a computer attached
- After talking with SquidDev from CC: Tweaked I've changed to monitoring IPeripheral#attach and IPeripheral#detach for changes in the number of computers connected to the network, then updating the client using AttachedComputerPacket
- This works with wired full modems, wired cabled modems and directly connected computers
- Added SyncedPeripheralBase and SyncedComputerControllable for TE's and peripherals that want to be aware of attached computers
commit 96dc4db6dc6cbf6519725109dbaa69851dcb0dbb
Author: caelwarner <caelawarner@gmail.com>
Date: Tue Oct 4 21:11:38 2022 -0700
Sequenced Gearshift screen "greys out" when being controlled by a computer
- This is to stop players from trying to using both the builtin sequencing and a computer to control the Sequenced Gearshift at the same time, leading to undefined behaviour
- The "greyed out" screen should have a message added explaining why it's greyed out.
- Added ComputerControllable#isComputerControlled to check if a tile entity is connected to a modem
commit 9a807814013e54f59230d7f57f4c212164311e64
Author: caelwarner <caelawarner@gmail.com>
Date: Tue Oct 4 19:36:08 2022 -0700
Added PeripheralBase
commit d404f073196f43eff9c0c66485693b5aed68051a
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 20:46:16 2022 -0700
Added invalidateCaps
- Changed setRemoved to invalidateCaps. I don't know why I wasn't just using invalidateCaps from the beginning
commit 654476d9f33b78eb05d620ed8dd318cc9244b670
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 20:05:25 2022 -0700
Added Rotation Speed Controller and Sequenced Gearshift as peripherals
- Rotation Speed Controller can get and set targetSpeed
- Sequenced Gearshift can rotate by a certain angle and move a certain distance
commit 1420406ab72204a8e34043c64404a16990104d23
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 16:38:12 2022 -0700
Added Speedometer and Stressometer as peripherals
- Speedometer can get current speed
- Stressometer can get current stress level as well as network stress capacity
- Made GaugeTileEntity abstract
commit 47b8619d07c9f58e6c3a34a9db97aea53071b9bd
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 16:17:05 2022 -0700
Refactored peripheralHandler to peripheral
- peripheralHandler was the wrong name. It's just a peripheral.
- Changed peripheral type from "cdl" to "Create_DisplayLink"
- Added equals function to DisplayLinkPeripheral
commit 6591c2d46efc74d91f9a0c3d3c2aa1679fe68790
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 14:29:04 2022 -0700
ComputerCraft integration for Display Links
- CC computers can now control display links through a variety of functions
- Added ComputerControllable interface to define a tile entity as controllable by CC computers
- Added CC: Tweaked soft dependency
2023-05-12 13:41:28 +02:00
if ( cc_tweaked_enable . toBoolean ( ) ) {
compileOnly fg . deobf ( "org.squiddev:cc-tweaked-${cc_tweaked_minecraft_version}:${cc_tweaked_version}:api" )
runtimeOnly fg . deobf ( "org.squiddev:cc-tweaked-${cc_tweaked_minecraft_version}:${cc_tweaked_version}" )
}
2021-01-20 22:36:04 +01:00
// implementation fg.deobf("curse.maven:druidcraft-340991:3101903")
2021-11-02 06:18:30 +01:00
// implementation fg.deobf("com.ferreusveritas.dynamictrees:DynamicTrees-1.16.5:0.10.0-Beta25")
2021-11-02 00:08:20 +01:00
// runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
// runtimeOnly fg.deobf("vazkii.quark:Quark:r2.0-212.984")
// runtimeOnly fg.deobf("slimeknights.mantle:Mantle:1.16.5-1.6.115")
// runtimeOnly fg.deobf("slimeknights.tconstruct:TConstruct:1.16.5-3.1.1.252")
2022-08-07 04:37:19 +02:00
// runtimeOnly fg.deobf("maven.modrinth:rubidium:0.5.3")
2023-05-09 18:23:47 +02:00
// implementation fg.deobf("com.railwayteam.railways:railways-1.18.2-1.1.1:all") { transitive = false }
2021-01-13 09:50:00 +01:00
2021-12-02 23:02:00 +01:00
// https://discord.com/channels/313125603924639766/725850371834118214/910619168821354497
// Prevent Mixin annotation processor from getting into IntelliJ's annotation processor settings
// This allows 'Settings > Build, Execution, and Deployment > Build Tools > Gradle > Build and run using' set to IntelliJ to work correctly
2023-06-30 23:12:48 +02:00
if ( ! Boolean . getBoolean ( 'idea.sync.active' ) ) {
2021-12-02 23:02:00 +01:00
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
}
2019-07-11 09:03:08 +02:00
}
Squashed commit of the following:
commit a162e18c9c4d91c4020e86cf718d59d3a33b2817
Merge: 374848f97 beb61708a
Author: simibubi <31564874+simibubi@users.noreply.github.com>
Date: Fri May 12 13:40:58 2023 +0200
Merge branch 'mc1.18/dev' into mc1.18/computercraft
commit 374848f978cf0cc1d91ff0b98a8bd506f1b81130
Author: simibubi <31564874+simibubi@users.noreply.github.com>
Date: Fri May 12 13:22:29 2023 +0200
Compilation dependency toggle
commit b2cd60b6195bcbdacaa47c8b8a05929cb160fe5b
Merge: 8e1e4e8bd ee3a079ba
Author: simibubi <31564874+simibubi@users.noreply.github.com>
Date: Wed May 10 14:37:32 2023 +0200
Merge pull request #4650 from ChristianLW/mc1.18/computercraft
Small tweaks to the wiki pages for ComputerCraft integration
commit ee3a079bacbee6fccdf14a356846e12d67edece6
Author: Christian L.W <bebeu@bebeu.dk>
Date: Thu Apr 13 00:55:20 2023 +0200
Small tweaks to the wiki pages
commit 8e1e4e8bd3beb310e4e114e7d36134caf1c7eb79
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Mar 13 18:31:56 2023 -0700
Added computer to display source ponder tag
- Added advanced computer to display source ponder tag
- Added missing lang entry for computer display source
commit 952941e5fc86036bf2c3555ead662cdb9ea9a29d
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Mar 13 16:31:16 2023 -0700
Added documentation for train station peripherals and train schedules
- Added in depth documentation for working with train stations and train schedules in Lua
- Fixed small formatting issues in Lua-Rotation-Speed-Controller.md and Lua-Sequenced-Gearshift.md
commit 7f3ca1cfa06b227211a41503c4ae31c3cf854ba5
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Mar 13 16:29:05 2023 -0700
Added isTrainEnroute to station peripheral API
- isTrainEnroute checks if a train is currently navigating to the station
- Reworded null station exception to "station is not connected to a track"
- Refactored StationPeripheral#inAssemblyMode to StationPeripheral#isInAssemblyMode
- Added a check to StationPeripheral#disassemble to make sure the station isn't in assembly mode
commit fac1ebcd3f1d1d570735fa6b2d57641b20c4ad8d
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 16:12:58 2023 -0800
Added documentation for most peripherals
- Lua documentation has been added for all peripherals except the train station (not looking forward to writing that one)
- This documentation will be added to the GitHub wiki pages
commit 3e21996984febc8b256ac8abbb11df9dbe150630
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 15:54:36 2023 -0800
Updated DisplayLinkPeripheral#write to move cursor to the end of the text
- This change was made to be more inline with ComputerCraft's builtin display API
commit 7141c10025c948ce5a78f1d484964f4324ffb463
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 11:45:43 2023 -0800
Added isTrainImminent and hasSchedule to train station API
- Added isTrainImminent to check if a train is incoming to the station and hasSchedule to check if the currently present train has a schedule
- Added StationPeripheral#getTrainOrThrow to consolidate repetitive null checks
commit 909484ed5b80ac1c397e04a1ad41acab6cc8e13a
Author: caelwarner <caelawarner@gmail.com>
Date: Sat Mar 11 11:15:58 2023 -0800
Added getSchedule to train station lua API
- Added getSchedule which serializes the currently present train's schedule into a lua table
- Refactored StationPeripheral#setSchedule to use a more generic method of serializing NBT tags to lua tables
- Moved schedule entry special data from root tag to "Data"
- Added StringHelper#camelCaseToSnakeCase
- Added variety of put methods to CreateLuaTable
commit 31ad3aa671339e7642f1c89118a218ff7c7eec15
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Mar 8 18:22:23 2023 -0800
Extended train station peripheral API
- Train station peripherals can now assemble and disassemble trains, check if the station is in assembly mode, set the assembly mode of the station, get and change the station name, check if a train is present at the station and get and change the currently present train name.
- Refactored StationEditPacket. Moved most of the logic that was previously in StationEditPacket to StationTileEntity. This allows us to call this logic without having to send a packet.
- Made Train#owner nullable. This is needed so that computers can assemble trains. All Train#owner is currently used for is to display the train status to the correct play.
commit 574cd93a89d49d8ac50b865b9b7f83955fa16ffc
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Nov 30 00:37:47 2022 -0800
Serialize hasAttachedComputer in ComputerBehaviour
- This eliminates some edge cases were peripherals don't realize they're being controlled by a computer on a world save and load
commit 94e3ed44ad1deaa383c8da61928f67697dc13273
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 26 16:57:12 2022 -0700
Added ComputerScreen
- ComputerScreen shows that tile entity currently has computers attached and therefore cannot be controlled manually
commit 9afdcaded7006c1c2671cd3070185d500c3a3dca
Author: caelwarner <caelawarner@gmail.com>
Date: Thu Oct 20 10:18:37 2022 -0700
Refactored PeripheralBase to SyncedPeripheral
commit 7d47fdcd061ca8efaab5688ac2724fec3e0bf1b7
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 22:45:47 2022 -0700
Made LuaFunction's final
commit 56a1210fff386fd538733a0a0998dd1bc0bd060f
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 22:39:38 2022 -0700
Created ComputerBehaviour behaviour
- ComputerBehaviour replaces ComputerControllable and SyncedComputerControllable
commit 19d283b92376da793e7c88c443adbb3cd70b2c43
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 16:05:48 2022 -0700
Moved all peripheral classes to computercraft.peripherals package
commit ab18034b985fe9cecf4de5add48557371789d756
Author: caelwarner <caelawarner@gmail.com>
Date: Wed Oct 19 15:58:56 2022 -0700
Added Train Station as peripheral
- Train station can set a new auto-schedule for the train currently at the station
- Added CreateLuaTable to add helper functions for working with lua tables
- Added StringHelper util class to convert snake case to camel case
commit 1091f3227c806f09fb443320900f7563ed264655
Author: caelwarner <caelawarner@gmail.com>
Date: Thu Oct 6 21:11:24 2022 -0700
Changed Display Link Peripheral API
- Changed the Display Link Peripheral API to be more in line with the Monitor API
- Added write, setCursorPos, getCursorPos, getSize, isColor, isColour, clearLine
- Removed void writeLine, setLine, writeLines, setLines
commit 18bfb216b1bd5c1b6fab99370318536ccf27b069
Author: caelwarner <caelawarner@gmail.com>
Date: Thu Oct 6 02:50:41 2022 -0700
Changed method of checking if a computer attached
- After talking with SquidDev from CC: Tweaked I've changed to monitoring IPeripheral#attach and IPeripheral#detach for changes in the number of computers connected to the network, then updating the client using AttachedComputerPacket
- This works with wired full modems, wired cabled modems and directly connected computers
- Added SyncedPeripheralBase and SyncedComputerControllable for TE's and peripherals that want to be aware of attached computers
commit 96dc4db6dc6cbf6519725109dbaa69851dcb0dbb
Author: caelwarner <caelawarner@gmail.com>
Date: Tue Oct 4 21:11:38 2022 -0700
Sequenced Gearshift screen "greys out" when being controlled by a computer
- This is to stop players from trying to using both the builtin sequencing and a computer to control the Sequenced Gearshift at the same time, leading to undefined behaviour
- The "greyed out" screen should have a message added explaining why it's greyed out.
- Added ComputerControllable#isComputerControlled to check if a tile entity is connected to a modem
commit 9a807814013e54f59230d7f57f4c212164311e64
Author: caelwarner <caelawarner@gmail.com>
Date: Tue Oct 4 19:36:08 2022 -0700
Added PeripheralBase
commit d404f073196f43eff9c0c66485693b5aed68051a
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 20:46:16 2022 -0700
Added invalidateCaps
- Changed setRemoved to invalidateCaps. I don't know why I wasn't just using invalidateCaps from the beginning
commit 654476d9f33b78eb05d620ed8dd318cc9244b670
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 20:05:25 2022 -0700
Added Rotation Speed Controller and Sequenced Gearshift as peripherals
- Rotation Speed Controller can get and set targetSpeed
- Sequenced Gearshift can rotate by a certain angle and move a certain distance
commit 1420406ab72204a8e34043c64404a16990104d23
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 16:38:12 2022 -0700
Added Speedometer and Stressometer as peripherals
- Speedometer can get current speed
- Stressometer can get current stress level as well as network stress capacity
- Made GaugeTileEntity abstract
commit 47b8619d07c9f58e6c3a34a9db97aea53071b9bd
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 16:17:05 2022 -0700
Refactored peripheralHandler to peripheral
- peripheralHandler was the wrong name. It's just a peripheral.
- Changed peripheral type from "cdl" to "Create_DisplayLink"
- Added equals function to DisplayLinkPeripheral
commit 6591c2d46efc74d91f9a0c3d3c2aa1679fe68790
Author: caelwarner <caelawarner@gmail.com>
Date: Mon Oct 3 14:29:04 2022 -0700
ComputerCraft integration for Display Links
- CC computers can now control display links through a variety of functions
- Added ComputerControllable interface to define a tile entity as controllable by CC computers
- Added CC: Tweaked soft dependency
2023-05-12 13:41:28 +02:00
sourceSets . main . java {
if ( ! cc_tweaked_enable . toBoolean ( ) ) {
exclude 'com/simibubi/create/compat/computercraft/implementation/**'
}
}
2022-07-15 00:02:24 +02:00
sourceSets . main . resources {
srcDir 'src/generated/resources'
exclude '.cache/'
}
mixin {
add sourceSets . main , 'create.refmap.json'
}
2022-07-16 10:58:43 +02:00
// Workaround for SpongePowered/MixinGradle#38
afterEvaluate {
tasks . configureReobfTaskForReobfJar . mustRunAfter ( tasks . compileJava )
tasks . configureReobfTaskForReobfJarJar . mustRunAfter ( tasks . compileJava )
}
2022-07-15 00:02:24 +02:00
tasks . withType ( JavaCompile ) . configureEach {
options . encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
compileJava {
options . compilerArgs = [ '-Xdiags:verbose' ]
}
2019-07-11 09:03:08 +02:00
jar {
2020-06-10 01:34:57 +02:00
classifier = 'slim'
2019-07-11 09:03:08 +02:00
manifest {
attributes ( [
2021-11-02 06:18:30 +01:00
'Specification-Title' : 'create' ,
'Specification-Vendor' : 'simibubi' ,
'Specification-Version' : '1' ,
2022-07-16 10:58:43 +02:00
'Implementation-Title' : project . jar . baseName ,
2022-07-15 00:02:24 +02:00
'Implementation-Version' : project . jar . archiveVersion ,
2021-11-02 06:18:30 +01:00
'Implementation-Vendor' : 'simibubi' ,
'Implementation-Timestamp' : new Date ( ) . format ( "yyyy-MM-dd'T'HH:mm:ssZ" ) ,
'MixinConfigs' : 'create.mixins.json'
2019-07-11 09:03:08 +02:00
] )
}
}
2022-08-01 10:03:03 +02:00
task jarJarRelease {
2023-03-07 23:10:44 +01:00
group = 'jarjar'
2022-08-01 10:03:03 +02:00
doLast {
tasks . jarJar {
classifier = ''
}
}
finalizedBy tasks . jarJar
}
2022-07-15 00:02:24 +02:00
java {
withSourcesJar ( )
withJavadocJar ( )
2020-04-13 08:58:57 +02:00
}
2022-07-15 00:02:24 +02:00
void addLicense ( jarTask ) {
jarTask . from ( 'LICENSE' ) {
rename { "${it}_${project.archivesBaseName}" }
}
2021-08-05 23:57:55 +02:00
}
2022-07-15 00:02:24 +02:00
jar . finalizedBy ( 'reobfJar' )
tasks . jarJar . finalizedBy ( 'reobfJarJar' )
2021-08-05 23:57:55 +02:00
2022-07-15 00:02:24 +02:00
addLicense ( jar )
addLicense ( tasks . jarJar )
2021-08-05 23:57:55 +02:00
publishing {
publications {
mavenJava ( MavenPublication ) {
2022-07-15 00:02:24 +02:00
artifactId = archivesBaseName
from components . java
2022-07-16 10:58:43 +02:00
fg . component ( it )
2022-07-15 00:02:24 +02:00
jarJar . component ( it )
2021-08-05 23:57:55 +02:00
}
}
repositories {
if ( project . hasProperty ( 'mavendir' ) ) {
maven { url mavendir }
}
}
}
2020-06-08 02:18:34 +02:00
String getChangelogText ( ) {
def changelogFile = file ( 'changelog.txt' )
String str = ''
int lineCount = 0
boolean done = false
changelogFile . eachLine {
if ( done | | it = = null ) {
return
}
if ( it . size ( ) > 1 ) {
def temp = it
if ( lineCount = = 0 ) {
temp = "Create ${version}"
2020-06-10 01:42:57 +02:00
temp = "<span style=\"font-size: 18px; color: #333399;\">Create v${mod_version}</span> <em>for Minecraft ${minecraft_version}</em><br/>"
2020-06-08 02:18:34 +02:00
} else if ( it . startsWith ( '-' ) ) {
temp = " $temp<br/>"
temp = temp . replaceAll ( "(\\S+\\/\\S+)#([0-9]+)\\b" , "<a href=\"https://github.com/\$1/issues/\$2\">\$0</a>" ) ;
temp = temp . replaceAll ( "#([0-9]+)\\b(?!<\\/a>)" , "<a href=\"https://github.com/$github_project/issues/\$1\">\$0</a>" ) ;
} else {
temp = "<h4>$temp</h4>"
}
str + = temp
lineCount + +
} else {
2020-06-10 01:42:57 +02:00
str + = "<p>Please submit any Issues you come across on the <a href=\"https://github.com/${github_project}/issues\" rel=\"nofollow\">Issue Tracker</a>.</p>"
2020-06-08 02:18:34 +02:00
done = true
2019-07-11 09:03:08 +02:00
}
}
2020-06-08 02:18:34 +02:00
return str
}
2021-11-02 00:08:20 +01:00
// changelog debugging
// new File("changelog.html").write getChangelogText()
// tasks.curseforge.enabled = !dev && project.hasProperty('simi_curseforge_key')
// curseforge {
// if (project.hasProperty('simi_curseforge_key')) {
// apiKey = project.simi_curseforge_key
// }
2021-11-27 21:46:01 +01:00
//
2021-11-02 00:08:20 +01:00
// project {
// id = project.projectId
// changelog = System.getenv('CHANGELOG') == null || System.getenv('CHANGELOG').equals('none') ? getChangelogText() : System.getenv('CHANGELOG')
// changelogType = 'html'
// releaseType = project.curse_type
// mainArtifact(shadowJar) {
// displayName = "Create - ${version}"
// }
// relations {
// optionalDependency 'jei'
// }
// }
// }