aaaaaaaaa

This commit is contained in:
gamma-delta 2022-05-15 16:48:18 -05:00
parent 6ad894849a
commit 38036669e3
11 changed files with 52 additions and 58 deletions

View file

@ -1,8 +1,8 @@
plugins {
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT'
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
}
archivesBaseName = getArtifactID("common")
minecraft {
@ -29,6 +29,10 @@ dependencies {
compileOnly "vazkii.patchouli:Patchouli-xplat:$minecraftVersion-$patchouliVersion"
}
sourceSets {
main.kotlin.srcDirs += 'src/main/java'
}
processResources {
def buildProps = project.properties.clone()
@ -73,13 +77,3 @@ repositories {
url = "https://modmaven.dev"
}
}
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}

View file

@ -1,4 +1,4 @@
package at.petrak.hexcasting.api.utils;
package at.petrak.hexcasting.api.misc;
import at.petrak.hexcasting.common.misc.DamageSourceOvercast;
import net.minecraft.world.damagesource.DamageSource;

View file

@ -4,6 +4,7 @@ import at.petrak.hexcasting.api.PatternRegistry
import at.petrak.hexcasting.api.advancements.HexAdvancementTriggers
import at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetus
import at.petrak.hexcasting.api.misc.FrozenColorizer
import at.petrak.hexcasting.api.misc.HexDamageSources
import at.petrak.hexcasting.api.mod.HexConfig
import at.petrak.hexcasting.api.mod.HexItemTags
import at.petrak.hexcasting.api.mod.HexStatistics
@ -15,7 +16,6 @@ import at.petrak.hexcasting.api.spell.math.HexPattern
import at.petrak.hexcasting.api.spell.mishaps.Mishap
import at.petrak.hexcasting.api.spell.mishaps.MishapDisallowedSpell
import at.petrak.hexcasting.api.spell.mishaps.MishapTooManyCloseParens
import at.petrak.hexcasting.api.utils.HexDamageSources
import at.petrak.hexcasting.api.utils.ManaHelper
import at.petrak.hexcasting.xplat.IXplatAbstractions
import net.minecraft.nbt.CompoundTag

View file

@ -1,10 +1,10 @@
package at.petrak.hexcasting.api.spell.mishaps
import at.petrak.hexcasting.api.misc.FrozenColorizer
import at.petrak.hexcasting.api.misc.HexDamageSources
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.SpellDatum
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.utils.HexDamageSources
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.npc.Villager
import net.minecraft.world.item.DyeColor

View file

@ -1,10 +1,10 @@
package at.petrak.hexcasting.api.spell.mishaps
import at.petrak.hexcasting.api.misc.FrozenColorizer
import at.petrak.hexcasting.api.misc.HexDamageSources
import at.petrak.hexcasting.api.spell.ParticleSpray
import at.petrak.hexcasting.api.spell.SpellDatum
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.misc.FrozenColorizer
import at.petrak.hexcasting.api.utils.HexDamageSources
import net.minecraft.core.BlockPos
import net.minecraft.network.chat.Component
import net.minecraft.world.entity.npc.Villager

View file

@ -1,10 +1,10 @@
package at.petrak.hexcasting.api.spell.mishaps
import at.petrak.hexcasting.api.spell.SpellDatum
import at.petrak.hexcasting.api.spell.casting.CastingContext
import at.petrak.hexcasting.api.spell.Widget
import at.petrak.hexcasting.api.misc.FrozenColorizer
import at.petrak.hexcasting.api.utils.HexDamageSources
import at.petrak.hexcasting.api.misc.HexDamageSources
import at.petrak.hexcasting.api.spell.SpellDatum
import at.petrak.hexcasting.api.spell.Widget
import at.petrak.hexcasting.api.spell.casting.CastingContext
import net.minecraft.network.chat.Component
import net.minecraft.network.chat.TranslatableComponent
import net.minecraft.world.item.DyeColor
@ -37,15 +37,23 @@ class MishapDivideByZero(val operand1: Component, val operand2: Component, val s
@JvmStatic
fun tan(angle: Double): MishapDivideByZero {
val translatedAngle = translate(angle)
return MishapDivideByZero(TranslatableComponent("$PREFIX.sin", translatedAngle), TranslatableComponent("$PREFIX.cos", translatedAngle))
return MishapDivideByZero(
TranslatableComponent("$PREFIX.sin", translatedAngle),
TranslatableComponent("$PREFIX.cos", translatedAngle)
)
}
@JvmStatic
val zero get() = TranslatableComponent("$PREFIX.zero")
val zero
get() = TranslatableComponent("$PREFIX.zero")
@JvmStatic
val zerothPower get() = TranslatableComponent("$PREFIX.zero.power")
val zerothPower
get() = TranslatableComponent("$PREFIX.zero.power")
@JvmStatic
val zeroVector get() = TranslatableComponent("$PREFIX.zero.vec")
val zeroVector
get() = TranslatableComponent("$PREFIX.zero.vec")
@JvmStatic
fun powerOf(power: Component) = TranslatableComponent("$PREFIX.power", power)

View file

@ -1,8 +1,8 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'fabric-loom' version "$loomVersion"
}
archivesBaseName = getArtifactID("fabric")
loom {
@ -70,9 +70,9 @@ sourcesJar {
from project(":Common").sourceSets.main.allJava
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
srcDir '../Common/src/generated/resources'
sourceSets {
main.resources.srcDirs += ['src/generated/resources', '../Common/src/generated/resources']
main.kotlin.srcDirs += 'src/main/java'
}
processResources {

View file

@ -9,32 +9,16 @@ buildscript {
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
// OPTIONAL Kotlin Serialization plugin
classpath 'org.jetbrains.kotlin:kotlin-serialization:1.6.10'
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
archivesBaseName = getArtifactID("forge")
// Adds the Kotlin Gradle plugin
buildscript {
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
// OPTIONAL Kotlin Serialization plugin
classpath 'org.jetbrains.kotlin:kotlin-serialization:1.6.10'
}
}
apply plugin: 'kotlin'
// OPTIONAL Kotlin Serialization plugin
apply plugin: 'kotlinx-serialization'
// Adds KFF as dependency and Kotlin libs to the runtime classpath
// If you already know how to add the Kotlin plugin to Gradle, this is the only line you need for KFF
@ -115,8 +99,6 @@ minecraft {
}
}
sourceSets.main.resources.srcDir 'src/generated/resources'
repositories {
mavenCentral()
// Put repositories for dependencies here
@ -170,9 +152,9 @@ tasks.withType(JavaCompile) {
source(project(":Common").sourceSets.main.allSource)
}
sourceSets.main.resources {
srcDir 'src/generated/resources'
srcDir '../Common/src/generated/resources'
sourceSets {
main.resources.srcDirs += ['src/generated/resources', '../Common/src/generated/resources']
main.kotlin.srcDirs += 'src/main/java'
}
processResources {
@ -201,12 +183,3 @@ publishing {
}
}
}
compileKotlin {
kotlinOptions {
}
}
compileTestKotlin {
kotlinOptions {
}
}

View file

@ -10,6 +10,7 @@ buildscript {
plugins {
id 'java'
id "org.jetbrains.kotlin.jvm"
}
def isRelease() {
@ -44,6 +45,7 @@ String getArtifactID(String platform) {
subprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
group = "at.petra-k.$modID" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
@ -109,3 +111,14 @@ subprojects {
}
allprojects { gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xmaxerrs" << "1000" } } }
compileKotlin {
kotlinOptions {
jvmTarget = "17"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "17"
}
}

View file

@ -12,3 +12,5 @@ modVersion=0.9.0
paucalVersion=0.4.0-prerelease-23
patchouliVersion=67
jeiVersion=9.5.3.143
kotlinVersion=1.6.21

View file

@ -10,6 +10,10 @@ pluginManagement {
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version kotlinVersion
}
}
rootProject.name = 'Hex Casting'