Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ValkyrienSkies/Eureka
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: release/1.5.1-beta.1
Choose a base ref
...
head repository: ValkyrienSkies/Eureka
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.18.x/main
Choose a head ref
  • 20 commits
  • 27 files changed
  • 4 contributors

Commits on May 24, 2024

  1. Copy the full SHA
    19dd06e View commit details
  2. Copy the full SHA
    66b2cab View commit details

Commits on Jun 23, 2024

  1. Copy the full SHA
    a3b9171 View commit details

Commits on Jul 2, 2024

  1. Merge pull request #371 from ValkyrienSkies/speed-dependent-stable

    Speed and mass dependent stabilization
    millennIumAMbiguity authored Jul 2, 2024
    Copy the full SHA
    87b2fac View commit details

Commits on Jul 6, 2024

  1. Merge pull request #381 from rmnvgr/add-french-translation

    Fix and update French Translation
    millennIumAMbiguity authored Jul 6, 2024
    Copy the full SHA
    d423a6e View commit details

Commits on Jul 14, 2024

  1. Copy the full SHA
    2e32f65 View commit details

Commits on Sep 16, 2024

  1. Copy the full SHA
    46228ef View commit details

Commits on Sep 22, 2024

  1. Copy the full SHA
    ee597f3 View commit details
  2. Merge pull request #406 from ValkyrienSkies/1.18.x/fuel-compat

    resolved fuel compatibility issue
    millennIumAMbiguity authored Sep 22, 2024
    Copy the full SHA
    96ca8d0 View commit details
  3. Copy the full SHA
    998d17d View commit details

Commits on Oct 8, 2024

  1. Copy the full SHA
    043c0c2 View commit details
  2. Use block tag for assemble blacklist (#413)

    * Use block tag for assemble blacklist
    
    resolves #369
    
    * removed duplicate bedrock
    
    * re-added blockBlacklist config
    
    * Update ShipHelmBlockEntity.kt
    millennIumAMbiguity authored Oct 8, 2024
    Copy the full SHA
    d34bfe6 View commit details
  3. Copy the full SHA
    29a1889 View commit details

Commits on Oct 28, 2024

  1. New VS Core (#414)

    * It compiles, but it doesnt work
    
    * Replaced Enum.values with Enum.entries
    
    * Update VS2 to latest
    
    * Update VS2 to latest
    
    * Fixed helm not working and weak stabilization
    
    * Fixed ship assembly being weird
    StewStrong authored Oct 28, 2024
    Copy the full SHA
    f71f5c3 View commit details
  2. Restored feature broken in #414

    Restored feature broken from 64ea85d
    millennIumAMbiguity committed Oct 28, 2024
    Copy the full SHA
    77964ff View commit details
  3. Copy the full SHA
    ceea3f1 View commit details
  4. blacklist cleenup

    removed blocks that is already in lush_ground_replaceable
    millennIumAMbiguity committed Oct 28, 2024
    Copy the full SHA
    7caa63d View commit details

Commits on Oct 29, 2024

  1. WoodType compat (#410)

    * WoodType compat
    
    * moved StringRepresentable into IWoodType and more
    millennIumAMbiguity authored Oct 29, 2024
    Copy the full SHA
    42c5a56 View commit details
  2. Copy the full SHA
    5da6c81 View commit details

Commits on Feb 19, 2025

  1. Update README.md

    Imported text from the mod pages and buttons similar to vs2
    millennIumAMbiguity authored Feb 19, 2025
    Copy the full SHA
    9ba1e3a View commit details
Showing with 289 additions and 197 deletions.
  1. +7 −1 .github/ISSUE_TEMPLATE/bug_report.yml
  2. +7 −0 .github/ISSUE_TEMPLATE/compatibility_issue.yml
  3. +28 −3 README.md
  4. +9 −0 changelogs/1.5.2-beta.1.md
  5. +9 −0 common/src/main/java/org/valkyrienskies/eureka/registry/FuelRegistry.java
  6. +13 −98 common/src/main/kotlin/org/valkyrienskies/eureka/EurekaConfig.kt
  7. +2 −2 common/src/main/kotlin/org/valkyrienskies/eureka/EurekaMod.kt
  8. +0 −11 common/src/main/kotlin/org/valkyrienskies/eureka/EurekaWeights.kt
  9. +1 −2 common/src/main/kotlin/org/valkyrienskies/eureka/block/BalloonBlock.kt
  10. +11 −0 common/src/main/kotlin/org/valkyrienskies/eureka/block/IWoodType.kt
  11. +1 −1 common/src/main/kotlin/org/valkyrienskies/eureka/block/ShipHelmBlock.kt
  12. +14 −15 common/src/main/kotlin/org/valkyrienskies/eureka/block/WoodType.kt
  13. +5 −5 common/src/main/kotlin/org/valkyrienskies/eureka/blockentity/EngineBlockEntity.kt
  14. +21 −2 common/src/main/kotlin/org/valkyrienskies/eureka/blockentity/ShipHelmBlockEntity.kt
  15. +3 −2 common/src/main/kotlin/org/valkyrienskies/eureka/blockentity/renderer/WheelModel.kt
  16. +2 −2 common/src/main/kotlin/org/valkyrienskies/eureka/gui/engine/EngineScreenMenu.kt
  17. +2 −2 common/src/main/kotlin/org/valkyrienskies/eureka/gui/engine/FuelSlot.kt
  18. +20 −23 common/src/main/kotlin/org/valkyrienskies/eureka/ship/EurekaShipControl.kt
  19. +11 −9 common/src/main/kotlin/org/valkyrienskies/eureka/ship/Stabilize.kt
  20. +8 −4 common/src/main/kotlin/org/valkyrienskies/eureka/util/ShipAssembler.kt
  21. +3 −1 common/src/main/resources/assets/vs_eureka/lang/{fr-fr.json → fr_fr.json}
  22. +61 −0 common/src/main/resources/data/vs_eureka/tags/blocks/assemble_blacklist.json
  23. +8 −5 fabric/src/main/java/org/valkyrienskies/eureka/fabric/EurekaModFabric.java
  24. +16 −0 fabric/src/main/java/org/valkyrienskies/eureka/fabric/registry/FuelRegistryImpl.java
  25. +16 −0 forge/src/main/java/org/valkyrienskies/eureka/forge/registry/FuelRegistryImpl.java
  26. +8 −6 forge/src/main/kotlin/org/valkyrienskies/eureka/forge/EurekaModForge.kt
  27. +3 −3 gradle.properties
8 changes: 7 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,13 @@ body:
- type: input
attributes:
label: Eureka version
description: The version of Eureka ships
description: What version of Eureka ships does this issue occur on?
validations:
required: true
- type: input
attributes:
label: VS2 version
description: What version of Valkyrien Skies 2 does this issue occur on?
validations:
required: true
- type: dropdown
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibility_issue.yml
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ body:
- 1.16
- 1.18
- 1.19
- 1.20
validations:
required: true
- type: dropdown
@@ -41,6 +42,12 @@ body:
- Quilt
validations:
required: true
- type: input
attributes:
label: Eureka version
description: What version of Eureka ships does this issue occur on?
validations:
required: true
- type: textarea
attributes:
label: Issue description
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
![Logo-Recovered](vs_eureka_logo.png)
<p align="center">
<img src="vs_eureka_logo.png" alt="Eureka">
</p>

# Eureka
---
<p align="center">
<a href="https://www.valkyrienskies.org/"><img src="https://img.shields.io/badge/Website-white?style=for-the-badge&logo=html5&logoColor=black" alt="Website"></a>
<a href="https://www.curseforge.com/minecraft/mc-mods/eureka-ships"><img src="https://img.shields.io/badge/CurseForge-white?style=for-the-badge&logo=curseforge" alt="CurseForge"></a>
<a href="https://modrinth.com/mod/eureka"><img src="https://img.shields.io/badge/Modrinth-white?style=for-the-badge&logo=modrinth" alt="Modrinth"></a>
<a href="https://wiki.valkyrienskies.org/wiki/Eureka"><img src="https://img.shields.io/badge/Wiki-white?style=for-the-badge&logo=wikipedia&logoColor=black" alt="Wiki"></a>
<a href="https://discord.gg/dWwM8G3"><img src="https://img.shields.io/badge/Discord-white?style=for-the-badge&logo=discord" alt="Discord"></a>
</p>

Basically Archimedes Ships, but with VS2 as the backend!
Eureka is a simple add-on for Valkyrien Skies that fits with vanilla aesthetic and is easy and fun to use.

Build and design your own ship out of ordinary (or modded!) Minecraft blocks, place a Ship Helm, shift + right-click, assemble, and watch your creation suddenly infuse with physics. No longer are your Minecraft builds bound to remain forever static, sitting in the same place for all eternity.

![](https://i.imgur.com/DaxvXa9.png)

## Dependencies
> [!NOTE]
> Eureka comes with an integrated dependency downloader that will do all the hard work for you! Just download the Eureka JAR file and launch the game.
- [Valkyrien Skies](https://github.com/ValkyrienSkies/Valkyrien-Skies-2)
- [Architectury API](https://www.curseforge.com/minecraft/mc-mods/architectury-api)
- [Cloth Config API](https://www.curseforge.com/minecraft/mc-mods/cloth-config)
- [Kotlin For Forge](https://www.curseforge.com/minecraft/mc-mods/kotlin-for-forge) (Forge users only)
- [Fabric API](https://www.curseforge.com/minecraft/mc-mods/fabric-api) (Fabric users only)
- [Fabric Language Kotlin](https://www.curseforge.com/minecraft/mc-mods/fabric-language-kotlin) (Fabric users only)
- [Mod Menu](https://www.curseforge.com/minecraft/mc-mods/modmenu) (Fabric users only)
9 changes: 9 additions & 0 deletions changelogs/1.5.2-beta.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Additions
* Added french translation [#381](https://github.com/ValkyrienSkies/Eureka/pull/381)
* Added block tags for assembly blacklist [#413](https://github.com/ValkyrienSkies/Eureka/pull/413) *(tag available here `data/vs_eureka/tags/blocks/assemble_blacklist.json`)*
# Changes
* Stability decreases with high speed on low mass [#371](https://github.com/ValkyrienSkies/Eureka/pull/371)
* Cleansed the blacklist config [#413](https://github.com/ValkyrienSkies/Eureka/pull/413) *(for now the blacklist config is still supported, use blacklist block tag instead)*
* Added IWoodType interface for improved compatibility
# Fixes
* Improved fuel compatibility [#406](https://github.com/ValkyrienSkies/Eureka/pull/406)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.valkyrienskies.eureka.registry;

import net.minecraft.world.item.ItemStack;

public abstract class FuelRegistry {
public static FuelRegistry INSTANCE = null;

public abstract int get(ItemStack stack);
}
111 changes: 13 additions & 98 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaConfig.kt
Original file line number Diff line number Diff line change
@@ -120,6 +120,14 @@ object EurekaConfig {
@JsonSchema(description = "How fast a ship will stop. 1 = fast stop, 0 = slow stop")
var linearStabilizeMaxAntiVelocity = 1.0

// Instability scaled with mass and squared speed
@JsonSchema(description = "Stronger stabilization with higher mass, less at higher speeds.")
var scaledInstability = 70.0

// Unscaled linear instability cased by speed
@JsonSchema(description = "Less stabilization at higher speed.")
var unscaledInstability = 0.1

@JsonSchema(description = "How fast a ship will stop and accelerate.")
var linearMassScaling = 0.0002

@@ -143,104 +151,6 @@ object EurekaConfig {
@JsonSchema(description = "Chance for popped balloons to pop adjacent balloons, per side")
var popSideBalloonChance = 0.3

// Blacklist of blocks that don't get added for ship building
@JsonSchema(description = "Blacklist of blocks that don't get assembled")
var blockBlacklist = setOf(
"vs_eureka:ship_helm",
"minecraft:dirt",
"minecraft:grass_block",
"minecraft:grass_path",
"minecraft:stone",
"minecraft:bedrock",
"minecraft:sand",
"minecraft:gravel",
"minecraft:water",
"minecraft:flowing_water",
"minecraft:lava",
"minecraft:flowing_lava",
"minecraft:lily_pad",
"minecraft:coarse_dirt",
"minecraft:podzol",
"minecraft:granite",
"minecraft:diorite",
"minecraft:andesite",
"minecraft:deepslate",
"minecraft:tuff",
"minecraft:crimson_nylium",
"minecraft:warped_nylium",
"minecraft:red_sand",
"minecraft:sandstone",
"minecraft:end_stone",
"minecraft:red_sandstone",
"minecraft:blackstone",
"minecraft:netherrack",
"minecraft:soul_sand",
"minecraft:soul_soil",
"minecraft:grass",
"minecraft:fern",
"minecraft:dead_bush",
"minecraft:seagrass",
"minecraft:tall_seagrass",
"minecraft:sea_pickle",
"minecraft:kelp",
"minecraft:bamboo",
"minecraft:dandelion",
"minecraft:poppy",
"minecraft:blue_orchid",
"minecraft:allium",
"minecraft:azure_bluet",
"minecraft:red_tulip",
"minecraft:orange_tulip",
"minecraft:white_tulip",
"minecraft:pink_tulip",
"minecraft:oxeye_daisy",
"minecraft:cornflower",
"minecraft:lily_of_the_valley",
"minecraft:brown_mushroom",
"minecraft:red_mushroom",
"minecraft:crimson_fungus",
"minecraft:warped_fungus",
"minecraft:crimson_roots",
"minecraft:warped_roots",
"minecraft:nether_sprouts",
"minecraft:weeping_vines",
"minecraft:twisting_vines",
"minecraft:chorus_plant",
"minecraft:chorus_flower",
"minecraft:snow",
"minecraft:snow_block",
"minecraft:cactus",
"minecraft:vine",
"minecraft:sunflower",
"minecraft:lilac",
"minecraft:rose_bush",
"minecraft:peony",
"minecraft:tall_grass",
"minecraft:large_fern",
"minecraft:air",
"minecraft:ice",
"minecraft:packed_ice",
"minecraft:blue_ice",
"minecraft:portal",
"minecraft:bedrock",
"minecraft:end_portal_frame",
"minecraft:end_portal",
"minecraft:end_gateway",
"minecraft:portal",
"minecraft:oak_sapling",
"minecraft:spruce_sapling",
"minecraft:birch_sapling",
"minecraft:jungle_sapling",
"minecraft:acacia_sapling",
"minecraft:dark_oak_sapling",
"minecraft:oak_leaves",
"minecraft:spruce_leaves",
"minecraft:birch_leaves",
"minecraft:jungle_leaves",
"minecraft:acacia_leaves",
"minecraft:dark_oak_leaves"
)

@JsonSchema(description = "Whether the ship helm assembles diagonally connected blocks or not")
val diagonals = true

@@ -255,5 +165,10 @@ object EurekaConfig {

@JsonSchema(description = "Maximum number of blocks allowed in a ship. Set to 0 for no limit")
val maxShipBlocks = 32 * 32 * 32

// TODO: Remove blockBlacklist
// Blacklist of blocks that don't get added for ship building
@JsonSchema(description = "Blacklist of blocks that don't get assembled (Use Block Tag instead)")
var blockBlacklist : Set<String> = emptySet()
}
}
4 changes: 2 additions & 2 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaMod.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.valkyrienskies.eureka

import org.valkyrienskies.core.impl.config.VSConfigClass
import org.valkyrienskies.mod.common.ValkyrienSkiesMod

object EurekaMod {
const val MOD_ID = "vs_eureka"
@@ -13,7 +13,7 @@ object EurekaMod {
EurekaScreens.register()
EurekaEntities.register()
EurekaWeights.register()
VSConfigClass.registerConfig("vs_eureka", EurekaConfig::class.java)
ValkyrienSkiesMod.vsCore.registerConfigLegacy("vs_eureka", EurekaConfig::class.java)
}

@JvmStatic
11 changes: 0 additions & 11 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaWeights.kt
Original file line number Diff line number Diff line change
@@ -7,21 +7,10 @@ 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()) {
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import net.minecraft.world.damagesource.DamageSource
import net.minecraft.world.entity.Entity
import net.minecraft.world.entity.projectile.Projectile
import net.minecraft.world.level.Level
import net.minecraft.world.level.LevelAccessor
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.state.BlockState
import net.minecraft.world.phys.BlockHitResult
@@ -48,7 +47,7 @@ class BalloonBlock(properties: Properties) : Block(properties) {
if (level.isClientSide) return

level.destroyBlock(hit.blockPos, false)
Direction.values().forEach {
Direction.entries.forEach {
val neighbor = hit.blockPos.relative(it)
if (level.getBlockState(neighbor).block == this &&
level.random.nextFloat() < EurekaConfig.SERVER.popSideBalloonChance
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.valkyrienskies.eureka.block

import net.minecraft.util.StringRepresentable
import net.minecraft.world.level.block.Block

public interface IWoodType : StringRepresentable {

fun getWood(): Block

fun getPlanks(): Block
}
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ import org.valkyrienskies.mod.common.ValkyrienSkiesMod
import org.valkyrienskies.mod.common.getShipManagingPos
import org.valkyrienskies.mod.common.getShipObjectManagingPos

class ShipHelmBlock(properties: Properties, val woodType: WoodType) : BaseEntityBlock(properties) {
class ShipHelmBlock(properties: Properties, val woodType: IWoodType) : BaseEntityBlock(properties) {
val HELM_BASE = RotShapes.box(2.0, 0.0, 2.0, 14.0, 2.0, 14.0)
val HELM_POLE = RotShapes.box(4.0, 2.0, 5.0, 12.0, 13.0, 13.0)

29 changes: 14 additions & 15 deletions common/src/main/kotlin/org/valkyrienskies/eureka/block/WoodType.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package org.valkyrienskies.eureka.block

import net.minecraft.resources.ResourceLocation
import net.minecraft.util.StringRepresentable
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.Blocks

// TODO mod compat
public enum class WoodType(final val logBlock: Block, final val plankBlock: Block) : IWoodType {
ACACIA(Blocks.ACACIA_LOG, Blocks.ACACIA_PLANKS),
BIRCH(Blocks.BIRCH_LOG, Blocks.BIRCH_PLANKS),
CRIMSON(Blocks.CRIMSON_STEM, Blocks.CRIMSON_PLANKS),
DARK_OAK(Blocks.DARK_OAK_LOG, Blocks.DARK_OAK_PLANKS),
JUNGLE(Blocks.JUNGLE_LOG, Blocks.JUNGLE_PLANKS),
OAK(Blocks.OAK_LOG, Blocks.OAK_PLANKS),
SPRUCE(Blocks.SPRUCE_LOG, Blocks.SPRUCE_PLANKS),
WARPED(Blocks.WARPED_STEM, Blocks.WARPED_PLANKS);

enum class WoodType(val resourceName: String) : StringRepresentable {
OAK("oak"),
SPRUCE("spruce"),
BIRCH("birch"),
JUNGLE("jungle"),
ACACIA("acacia"),
DARK_OAK("dark_oak"),
WARPED("warped"),
CRIMSON("crimson");
override fun getSerializedName(): String = name.lowercase()

val textureLocationPlanks get() = ResourceLocation("minecraft:block/${resourceName}_planks")
val textureLocationLog get() = ResourceLocation("minecraft:block/${resourceName}_log")
override fun getWood(): Block = logBlock

override fun getSerializedName(): String = resourceName
override fun getPlanks(): Block = plankBlock
}
Original file line number Diff line number Diff line change
@@ -14,9 +14,7 @@ import net.minecraft.world.entity.player.StackedContents
import net.minecraft.world.inventory.AbstractContainerMenu
import net.minecraft.world.inventory.StackedContentsCompatible
import net.minecraft.world.item.ItemStack
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity
import net.minecraft.world.level.block.entity.BaseContainerBlockEntity
import net.minecraft.world.level.block.entity.FurnaceBlockEntity
import net.minecraft.world.level.block.state.BlockState
import org.joml.Math.lerp
import org.joml.Math.min
@@ -25,6 +23,7 @@ import org.valkyrienskies.eureka.EurekaBlockEntities
import org.valkyrienskies.eureka.EurekaConfig
import org.valkyrienskies.eureka.EurekaProperties.HEAT
import org.valkyrienskies.eureka.gui.engine.EngineScreenMenu
import org.valkyrienskies.eureka.registry.FuelRegistry
import org.valkyrienskies.eureka.ship.EurekaShipControl
import org.valkyrienskies.eureka.util.KtContainerData
import org.valkyrienskies.mod.common.getShipManagingPos
@@ -125,7 +124,8 @@ class EngineBlockEntity(pos: BlockPos, state: BlockState) :
* @return scaled fuel ticks.
*/
private fun getScaledFuel(): Int =
((FurnaceBlockEntity.getFuel()[fuel.item] ?: 0) * EurekaConfig.SERVER.engineFuelMultiplier).toInt()
(FuelRegistry.INSTANCE.get(fuel) * EurekaConfig.SERVER.engineFuelMultiplier).toInt()


/**
* Absorb one fuel item into the engine.
@@ -223,10 +223,10 @@ class EngineBlockEntity(pos: BlockPos, state: BlockState) :

override fun canTakeItemThroughFace(index: Int, stack: ItemStack, direction: Direction): Boolean =
// Allow extraction from slot 0 (fuel slot) when the hopper is below the block entity
index == 0 && direction == Direction.DOWN && !fuel.isEmpty && !AbstractFurnaceBlockEntity.isFuel(fuel)
index == 0 && direction == Direction.DOWN && !fuel.isEmpty && FuelRegistry.INSTANCE.get(fuel) <= 0

override fun canPlaceItem(index: Int, stack: ItemStack): Boolean =
index == 0 && AbstractFurnaceBlockEntity.isFuel(stack)
index == 0 && FuelRegistry.INSTANCE.get(stack) > 0

override fun fillStackedContents(helper: StackedContents) = helper.accountStack(fuel)
// endregion Container Stuff
Loading