Skip to content

Commit

Permalink
Merged changes from 1.18.x/main, updated VS2 to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
StewStrong committed Dec 30, 2023
2 parents a19337e + af8279f commit bf461bd
Show file tree
Hide file tree
Showing 73 changed files with 1,002 additions and 412 deletions.
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
// Needed for Forge+Fabric
id "architectury-plugin" version "3.4.143"
id "dev.architectury.loom" version "1.0.306" apply false
id "architectury-plugin" version "3.4.146"
id "dev.architectury.loom" version "1.3.355" apply false
// Kotlin
id "org.jetbrains.kotlin.jvm" version "1.7.21" apply false
id "org.jetbrains.kotlin.jvm" version "1.9.10" apply false
// Kotlin linter
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
// Java linter
Expand Down Expand Up @@ -49,6 +49,9 @@ subprojects {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
// The following line declares the mojmap mappings, you may use other mappings as well
mappings loom.officialMojangMappings()

implementation("org.joml:joml:1.10.4") { transitive = false }
implementation("org.joml:joml-primitives:1.10.0") { transitive = false }
}

checkstyle {
Expand All @@ -65,9 +68,9 @@ subprojects {
tasks.withType(Checkstyle) {
reports {
// Do not output html reports
html.enabled = false
html.required = false
// Output xml reports
xml.enabled = true
xml.required = true
}
}

Expand Down
31 changes: 31 additions & 0 deletions changelogs/1.1.0-beta.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Blacklist changes
* added `minecraft:tall_seagrass`
* added `minecraft:oak_sapling`
* added `minecraft:spruce_sapling`
* added `minecraft:birch_sapling`
* added `minecraft:jungle_sapling`
* added `minecraft:acacia_sapling`
* added `minecraft:dark_oak_sapling`
* added `minecraft:oak_leaves`
* added `minecraft:spruce_leaves`
* added `minecraft:birch_leaves`
* added `minecraft:jungle_leaves`
* added `minecraft:acacia_leaves`
* added `minecraft:dark_oak_leaves`
# Config Changes
* `engineTurnPower`
* `engineHeatChangeExponent`
* `engineFuelSaving`
* `engineMinCapacity`
# Changes
* Updated balloon crafting recipes
* Having extra balloons now increases elevation speed
* Updated mass info for engine and anchor
* Added a more intense animation for when the engine is fully heated
* Made engines affect turn speed
* Redstone will now stop fuel consumption on engines instead of pausing it
# bugfixes
* Fixed bug that caused engine heat to not work properly
* Fixed engine not dropping inventory when broken
* Fixed issues where the player became soft-locked when the helm was destroyed
* Fixed engine not returning bucket
9 changes: 9 additions & 0 deletions changelogs/1.1.1-beta.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Blacklist changes
* added `minecraft:snow_block`
# Config Changes
* added `engineRedstoneBehaviorPause`
* added `enginePowerAngularMin`
* renamed `enginePower` to `enginePowerLinear`
* renamed `minEnginePower` to `enginePowerLinearMin`
* renamed `engineTurnPower` to `enginePowerAngular`
* Updated Kotlin and VS2.
11 changes: 11 additions & 0 deletions changelogs/1.4.0-beta.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Blacklist changes
* added `minecraft:deepslate`
* added `minecraft:tuff`
# Recipe Changes
* Grouped balloon color recipes.
* Grouped helm recipes.
* Grouped balloon recipes.
* Added recipe unlock conditions.
* Updated some recipes to use tags instead of specific items
# Changes
* Increased break time for balloons.
14 changes: 10 additions & 4 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ loom {
}

dependencies {
implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:$mixin_extras_version"))

// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
// Remove the next line if you don't want to depend on the API
// modApi "me.shedaniel:architectury:${rootProject.architectury_version}"
modApi("org.valkyrienskies:valkyrienskies-1192-common:${rootProject.vs2_version}")
implementation("org.valkyrienskies.core:api:1.1.0+ead972f384") { transitive = false }
modApi("org.valkyrienskies:valkyrienskies-119-common:${rootProject.vs2_version}")

compileOnly("org.valkyrienskies.core:api:${rootProject.vs_core_version}")
compileOnly("org.valkyrienskies.core:api-game:${rootProject.vs_core_version}")
compileOnly("org.valkyrienskies.core:util:${rootProject.vs_core_version}")
compileOnly("org.valkyrienskies.core:impl:${rootProject.vs_core_version}")

api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21"
api "org.jetbrains.kotlin:kotlin-reflect:1.7.21"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10"
api "org.jetbrains.kotlin:kotlin-reflect:1.9.10"
}

publishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
@Mixin(PlayerModel.class)
public abstract class PlayerEntityModelMixin<T extends LivingEntity> extends HumanoidModel<T> {

public PlayerEntityModelMixin(ModelPart $$0) {
super($$0);
public PlayerEntityModelMixin(final ModelPart model) {
super(model);
}

@SuppressWarnings("unchecked")
Expand Down
35 changes: 17 additions & 18 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaBlocks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,87 +77,87 @@ object EurekaBlocks {
// region Balloons
val BALLOON = BLOCKS.register("balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.WOOL).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.WOOL).strength(0.8F).sound(SoundType.WOOL)
)
}
val WHITE_BALLOON = BLOCKS.register("white_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.SNOW).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.SNOW).strength(0.8F).sound(SoundType.WOOL)
)
}
val LIGHT_GRAY_BALLOON = BLOCKS.register("light_gray_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_LIGHT_GRAY).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_LIGHT_GRAY).strength(0.8F).sound(SoundType.WOOL)
)
}
val GRAY_BALLOON = BLOCKS.register("gray_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_GRAY).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_GRAY).strength(0.8F).sound(SoundType.WOOL)
)
}
val BLACK_BALLOON = BLOCKS.register("black_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_BLACK).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_BLACK).strength(0.8F).sound(SoundType.WOOL)
)
}
val RED_BALLOON = BLOCKS.register("red_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_RED).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_RED).strength(0.8F).sound(SoundType.WOOL)
)
}
val ORANGE_BALLOON = BLOCKS.register("orange_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_ORANGE).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_ORANGE).strength(0.8F).sound(SoundType.WOOL)
)
}
val YELLOW_BALLOON = BLOCKS.register("yellow_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_YELLOW).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_YELLOW).strength(0.8F).sound(SoundType.WOOL)
)
}
val LIME_BALLOON = BLOCKS.register("lime_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_LIGHT_GREEN).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_LIGHT_GREEN).strength(0.8F).sound(SoundType.WOOL)
)
}
val GREEN_BALLOON = BLOCKS.register("green_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_GREEN).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_GREEN).strength(0.8F).sound(SoundType.WOOL)
)
}
val LIGHT_BLUE_BALLOON = BLOCKS.register("light_blue_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_LIGHT_BLUE).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_LIGHT_BLUE).strength(0.8F).sound(SoundType.WOOL)
)
}
val CYAN_BALLOON = BLOCKS.register("cyan_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_CYAN).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_CYAN).strength(0.8F).sound(SoundType.WOOL)
)
}
val BLUE_BALLOON = BLOCKS.register("blue_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_BLUE).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_BLUE).strength(0.8F).sound(SoundType.WOOL)
)
}
val PURPLE_BALLOON = BLOCKS.register("purple_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_PURPLE).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_PURPLE).strength(0.8F).sound(SoundType.WOOL)
)
}
val MAGENTA_BALLOON = BLOCKS.register("magenta_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_MAGENTA).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_MAGENTA).strength(0.8F).sound(SoundType.WOOL)
)
}
val PINK_BALLOON = BLOCKS.register("pink_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_PINK).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_PINK).strength(0.8F).sound(SoundType.WOOL)
)
}
val BROWN_BALLOON = BLOCKS.register("brown_balloon") {
BalloonBlock(
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_BROWN).sound(SoundType.WOOL)
BlockBehaviour.Properties.of(Material.WOOL, MaterialColor.COLOR_BROWN).strength(0.8F).sound(SoundType.WOOL)
)
}
// endregion
Expand Down Expand Up @@ -212,5 +212,4 @@ object EurekaBlocks {
items.register(it.name) { BlockItem(it.get(), Item.Properties().tab(EurekaItems.TAB)) }
}
}

}
40 changes: 19 additions & 21 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ object EurekaConfig {
class Server {

@JsonSchema(description = "Movement power per engine when heated fully")
val enginePower: Float = 2000000f
val enginePowerLinear: Float = 2000000f

@JsonSchema(description = "Movement power per engine with minimal heat")
val minEnginePower: Float = 10000f
val enginePowerLinearMin: Float = 10000f

@JsonSchema(description = "Turning power per engine when heated fully")
val engineTurnPower = 1f
val enginePowerAngular = 1.0f

@JsonSchema(description = "Turning power per engine when minimal heat")
val enginePowerAngularMin = 0.0f

@JsonSchema(description = "The amount of heat a engine loses per tick")
val engineHeatLoss = 0.01f
Expand All @@ -31,6 +34,9 @@ object EurekaConfig {
@JsonSchema(description = "Increases heat gained at low heat level, and increased heat decreases when at high heat and not consuming fuel")
val engineHeatChangeExponent = 0.1f

@JsonSchema(description = "Pause fuel consumption and power when block is powered")
val engineRedstoneBehaviorPause = false

@JsonSchema(description = "Avoids consuming fuel when heat is 100%")
val engineFuelSaving = false

Expand Down Expand Up @@ -72,7 +78,7 @@ object EurekaConfig {
@JsonSchema(description = "Allow Eureka controlled ships to be affected by fluid drag")
var doFluidDrag = false

// Do I need to explain? the mass 1 balloon gets to float
// Do i need to explain? the mass 1 baloon gets to float
@JsonSchema(description = "Amount of mass in kg a balloon can lift")
var massPerBalloon = 5000.0

Expand All @@ -83,10 +89,12 @@ object EurekaConfig {
@JsonSchema(description = "The maximum linear acceleration at any point on the ship caused by helm torque")
var turnAcceleration = 10.0

@JsonSchema(description = "The maximum distance from center of mass to one end of the ship considered by " +
@JsonSchema(
description = "The maximum distance from center of mass to one end of the ship considered by " +
"the turn speed. At it's default of 16, it ensures that really large ships will turn at the same " +
"speed as a ship with a center of mass only 16 blocks away from the farthest point in the ship. " +
"That way, large ships do not turn painfully slowly")
"That way, large ships do not turn painfully slowly"
)
var maxSizeForTurnSpeedPenalty = 16.0

// The strength used when trying to level the ship
Expand Down Expand Up @@ -127,6 +135,8 @@ object EurekaConfig {
"minecraft:granite",
"minecraft:diorite",
"minecraft:andesite",
"minecraft:deepslate",
"minecraft:tuff",
"minecraft:crimson_nylium",
"minecraft:warped_nylium",
"minecraft:red_sand",
Expand Down Expand Up @@ -169,6 +179,7 @@ object EurekaConfig {
"minecraft:chorus_plant",
"minecraft:chorus_flower",
"minecraft:snow",
"minecraft:snow_block",
"minecraft:cactus",
"minecraft:vine",
"minecraft:sunflower",
Expand All @@ -193,25 +204,12 @@ object EurekaConfig {
"minecraft:jungle_sapling",
"minecraft:acacia_sapling",
"minecraft:dark_oak_sapling",
"minecraft:mangrove_propagule",
"minecraft:cherry_sapling",
"minecraft:oak_leaves",
"minecraft:spruce_leaves",
"minecraft:birch_leaves",
"minecraft:jungle_leaves",
"minecraft:acacia_leaves",
"minecraft:dark_oak_leaves",
"minecraft:mangrove_leaves",
"minecraft:cherry_leaves",
"minecraft:azalea_leaves",
"minecraft:flowering_azalea_leaves",
"minecraft:frog_spawn",
"minecraft:mangrove_roots",
"minecraft:mud",
"minecraft:muddy_mangrove_roots",
"minecraft:reinforced_deepslate",
"minecraft:sculk",
"minecraft:sculk_vein"
"minecraft:dark_oak_leaves"
)

@JsonSchema(description = "Whether the ship helm assembles diagonally connected blocks or not")
Expand All @@ -227,6 +225,6 @@ object EurekaConfig {
val allowDisassembly = true

@JsonSchema(description = "Maximum number of blocks allowed in a ship. Set to 0 for no limit")
val maxShipBlocks = 32*32*32
val maxShipBlocks = 32 * 32 * 32
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.valkyrienskies.eureka

import org.valkyrienskies.core.impl.config.VSConfigClass


object EurekaMod {
const val MOD_ID = "vs_eureka"

Expand Down
23 changes: 17 additions & 6 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaWeights.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,31 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties
import org.valkyrienskies.core.apigame.world.chunks.BlockType
import org.valkyrienskies.mod.common.BlockStateInfo
import org.valkyrienskies.mod.common.BlockStateInfoProvider
import org.valkyrienskies.physics_api.Lod1BlockStateId
import org.valkyrienskies.physics_api.Lod1LiquidBlockStateId
import org.valkyrienskies.physics_api.Lod1SolidBlockStateId
import org.valkyrienskies.physics_api.voxel.Lod1LiquidBlockState
import org.valkyrienskies.physics_api.voxel.Lod1SolidBlockState

object EurekaWeights : BlockStateInfoProvider {
override val blockStateData: List<Triple<Lod1SolidBlockStateId, Lod1LiquidBlockStateId, Lod1BlockStateId>>
get() = emptyList()
override val liquidBlockStates: List<Lod1LiquidBlockState>
get() = emptyList()
override val priority: Int
get() = 200
override val solidBlockStates: List<Lod1SolidBlockState>
get() = emptyList()

override fun getBlockStateMass(blockState: BlockState): Double? {
if (blockState.block == EurekaBlocks.BALLAST.get()) {
return EurekaConfig.SERVER.ballastWeight + (EurekaConfig.SERVER.ballastNoWeight - EurekaConfig.SERVER.ballastWeight) * (
(
blockState.getValue(
BlockStateProperties.POWER
) + 1
) / 16.0
)
(
blockState.getValue(
BlockStateProperties.POWER
) + 1
) / 16.0
)
}

return null
Expand Down
Loading

0 comments on commit bf461bd

Please sign in to comment.