Skip to content

Commit

Permalink
Merge branch '1.19.2/main' into 1.20.1/main
Browse files Browse the repository at this point in the history
  • Loading branch information
millennIumAMbiguity committed May 6, 2024
2 parents 57543b2 + 3eaba73 commit 0044230
Show file tree
Hide file tree
Showing 42 changed files with 4,554 additions and 26,101 deletions.
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ body:
- 1.20​
validations:
required: true
- type: input
attributes:
label: Eureka version
description: The version of Eureka ships
validations:
required: true
- type: dropdown
attributes:
label: Mod Loader
Expand Down
16 changes: 16 additions & 0 deletions changelogs/1.5.1-beta.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Additions
* Added Engine boost. (Having multiple engines will increase efficiency)
* Added config `engineBoost`
* Added config `engineBoostOffset`
* Added config `engineBoostExponentialPower`
* Added config `speedMassScale` for changing how mass affects max speed.
* Added Korean Localization.
# Changes
* Updated helm model.
* Updated `en_pt.json`
* Updated helm hitbox.
* Changed anchor blast resistance from 1200 to 6.
* Halev the mass effect on max speed.
# Fixes
* Updated dependencies.
* Fixed an issue where the helm GUI lost data.
12 changes: 12 additions & 0 deletions common/src/main/kotlin/org/valkyrienskies/eureka/EurekaConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ object EurekaConfig {
@JsonSchema(description = "Fuel burn time multiplier")
val engineFuelMultiplier = 2f

@JsonSchema(description = "Extra engine power for when having multiple engines per engine")
val engineBoost = 0.2

@JsonSchema(description = "At what amount of engines the boost will start taking effect")
val engineBoostOffset = 2.5

@JsonSchema(description = "The final linear boost will be raised to the power of 2, and the result of the delta is multiple by this value")
val engineBoostExponentialPower = 0.000001

@JsonSchema(description = "Max speed of a ship without boosting")
val maxCasualSpeed = 15.0

Expand All @@ -58,6 +67,9 @@ object EurekaConfig {
@JsonSchema(description = "The maximum amount extra each floater will multiply the buoyant force by, irrespective of mass")
var maxFloaterBuoyantFactor = 1.0

@JsonSchema(description = "how much the mass decreases the speed.")
var speedMassScale = 5.0

// The velocity any ship at least can move at.
@JsonSchema(description = "The speed a ship with no engines can move at")
var baseSpeed = 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.valkyrienskies.mod.common.getShipManagingPos
import org.valkyrienskies.mod.common.getShipObjectManagingPos

class AnchorBlock :
HorizontalDirectionalBlock(Properties.of().mapColor(MapColor.METAL).strength(5.0f, 1200.0f).sound(SoundType.ANVIL)) {
HorizontalDirectionalBlock(Properties.of().mapColor(MapColor.METAL).strength(5.0f, 6.0f).sound(SoundType.ANVIL)) {

val ANCHOR_BOTTOM = RotShapes.box(2.0, 2.0, 14.0, 14.0, 4.0, 16.0)
val ANCHOR_ROD = RotShapes.box(7.0, 2.0, 14.0, 9.0, 24.0, 16.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import org.valkyrienskies.mod.common.getShipObjectManagingPos
import java.awt.TextComponent

class ShipHelmBlock(properties: Properties, val woodType: WoodType) : BaseEntityBlock(properties) {
val HELM_BASE = RotShapes.box(1.0, 0.0, 1.0, 15.0, 1.0, 15.0)
val HELM_POLE = RotShapes.box(4.0, 1.0, 7.0, 12.0, 12.0, 13.0)
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)

val HELM_SHAPE = DirectionalShape(RotShapes.or(HELM_BASE, HELM_POLE))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ class ShipHelmScreen(handler: ShipHelmScreenMenu, playerInventory: Inventory, te
}

private fun updateButtons() {
pos = (Minecraft.getInstance().hitResult as? BlockHitResult)?.blockPos
ship = pos?.let { Minecraft.getInstance().level?.getShipManagingPos(it) }
val newPos = (Minecraft.getInstance().hitResult as? BlockHitResult)?.blockPos
if (newPos != null){
pos = newPos
}
val newShip = pos?.let { Minecraft.getInstance().level?.getShipManagingPos(it) }
if (newShip != null){
ship = newShip
}

val isLookingAtShip = ship != null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,15 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
val controllingPlayer = ship.getAttachment(SeatedControllingPlayer::class.java)
val validPlayer = controllingPlayer != null && !anchored

if (isCruising && anchored) {
isCruising = false
showCruiseStatus()

if (anchored) {
if (isCruising) {
isCruising = false
showCruiseStatus()
}

physShip.isStatic = true
return
}

stabilize(
Expand Down Expand Up @@ -289,7 +295,7 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
// Player controlled forward and backward thrust
private fun getPlayerForwardVel(control: ControlData, physShip: PhysShipImpl): Vector3d {

val mass10 = physShip.inertia.shipMass * 10
val scaledMass = physShip.inertia.shipMass * EurekaConfig.SERVER.speedMassScale
val vel: Vector3dc = physShip.poseVel.vel

// region Player controlled forward and backward thrust
Expand All @@ -311,12 +317,16 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {

// This is the speed that the ship is always allowed to go out, without engines
val baseForwardVel = Vector3d(forwardVector).mul(EurekaConfig.SERVER.baseSpeed)
val forwardForce = Vector3d(baseForwardVel).sub(velOrthogonalToPlayerUp).mul(mass10)
val forwardForce = Vector3d(baseForwardVel).sub(velOrthogonalToPlayerUp).mul(scaledMass)

if (extraForceLinear != 0.0) {
// engine boost
val boost = max((extraForceLinear - EurekaConfig.SERVER.enginePowerLinear * EurekaConfig.SERVER.engineBoostOffset) * EurekaConfig.SERVER.engineBoost, 0.0);
extraForceLinear += boost + boost * boost * EurekaConfig.SERVER.engineBoostExponentialPower;

// This is the maximum speed we want to go in any scenario (when not sprinting)
val idealForwardVel = Vector3d(forwardVector).mul(EurekaConfig.SERVER.maxCasualSpeed)
val idealForwardForce = Vector3d(idealForwardVel).sub(velOrthogonalToPlayerUp).mul(mass10)
val idealForwardForce = Vector3d(idealForwardVel).sub(velOrthogonalToPlayerUp).mul(scaledMass)

val extraForceNeeded = Vector3d(idealForwardForce).sub(forwardForce)
forwardForce.fma(min(extraForceLinear / extraForceNeeded.length(), 1.0), extraForceNeeded)
Expand Down
24 changes: 13 additions & 11 deletions common/src/main/resources/assets/vs_eureka/lang/en_pt.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"itemGroup.vs_eureka.eureka_tab": "VS Eureka",
"block.vs_eureka.oak_ship_helm": "Oak Ship Helm",
"block.vs_eureka.spruce_ship_helm": "Spruce Ship Helm",
"block.vs_eureka.birch_ship_helm": "Birch Ship Helm",
"block.vs_eureka.jungle_ship_helm": "Jungle Ship Helm",
"block.vs_eureka.acacia_ship_helm": "Acacia Ship Helm",
"block.vs_eureka.dark_oak_ship_helm": "Dusky Oak Ship Helm",
"block.vs_eureka.crimson_ship_helm": "Ichor Ship Helm",
"block.vs_eureka.warped_ship_helm": "Twist'd Ship Helm",
"block.vs_eureka.oak_ship_helm": "Oak Ship's Wheel",
"block.vs_eureka.spruce_ship_helm": "Spruce Ship's Wheel",
"block.vs_eureka.birch_ship_helm": "Birch Ship's Wheel",
"block.vs_eureka.jungle_ship_helm": "Jungle Ship's Wheel",
"block.vs_eureka.acacia_ship_helm": "Acacia Ship's Wheel",
"block.vs_eureka.dark_oak_ship_helm": "Dusky Oak Ship's Wheel",
"block.vs_eureka.crimson_ship_helm": "Ichor Ship's Wheel",
"block.vs_eureka.warped_ship_helm": "Twist'd Ship's Wheel",
"block.vs_eureka.anchor": "Anchor",
"block.vs_eureka.engine": "Oven Sail",
"block.vs_eureka.balloon": "Dutchman's Sail",
Expand All @@ -29,11 +29,13 @@
"block.vs_eureka.brown_balloon": "Brown Balloon",
"block.vs_eureka.floater": "Float'r",
"block.vs_eureka.ballast": "Ballast",
"gui.vs_eureka.ship_helm": "Ship Helm",
"gui.vs_eureka.ship_helm": "Ship's Wheel",
"gui.vs_eureka.engine": "Oven Sail",
"gui.vs_eureka.assemble": "Cast Off",
"gui.vs_eureka.disassemble": "Dock",
"gui.vs_eureka.align": "Come About",
"gui.vs_eureka.aligning": "Comin' About...",
"gui.vs_eureka.todo": "Ye lamb be wretched n' wee"
}
"gui.vs_eureka.todo": "Ye lamb be wretched n' wee",
"hud.vs_eureka.start_cruising": "Cruisin' be enabled",
"hud.vs_eureka.stop_cruising": "Cruisin' be disabled"
}
41 changes: 41 additions & 0 deletions common/src/main/resources/assets/vs_eureka/lang/ko_kr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"itemGroup.vs_eureka.eureka_tab": "VS Eureka",
"block.vs_eureka.oak_ship_helm": "참나무 선박 조향타",
"block.vs_eureka.spruce_ship_helm": "가문비나무 선박 조향타",
"block.vs_eureka.birch_ship_helm": "자작나무 선박 조향타",
"block.vs_eureka.jungle_ship_helm": "정글나무 선박 조향타",
"block.vs_eureka.acacia_ship_helm": "아카시아나무 선박 조향타",
"block.vs_eureka.dark_oak_ship_helm": "짙은 참나무 선박 조향타",
"block.vs_eureka.crimson_ship_helm": "진홍빛 선박 조향타",
"block.vs_eureka.warped_ship_helm": "뒤틀린 선박 조향타",
"block.vs_eureka.anchor": "",
"block.vs_eureka.engine": "선박 엔진",
"block.vs_eureka.balloon": "풍선",
"block.vs_eureka.white_balloon": "하얀색 풍선",
"block.vs_eureka.light_gray_balloon": "회백색 풍선",
"block.vs_eureka.gray_balloon": "회색 풍선",
"block.vs_eureka.black_balloon": "검은색 풍선",
"block.vs_eureka.red_balloon": "빨간색 풍선",
"block.vs_eureka.orange_balloon": "주황색 풍선",
"block.vs_eureka.yellow_balloon": "노란색 풍선",
"block.vs_eureka.lime_balloon": "연두색 풍선",
"block.vs_eureka.green_balloon": "초록색 풍선",
"block.vs_eureka.light_blue_balloon": "하늘색 풍선",
"block.vs_eureka.cyan_balloon": "청록색 풍선",
"block.vs_eureka.blue_balloon": "파란색 풍선",
"block.vs_eureka.purple_balloon": "보라색 풍선",
"block.vs_eureka.magenta_balloon": "자홍색 풍선",
"block.vs_eureka.pink_balloon": "분홍색 풍선",
"block.vs_eureka.brown_balloon": "갈색 풍선",
"block.vs_eureka.floater": "부력체",
"block.vs_eureka.ballast": "중량",
"gui.vs_eureka.ship_helm": "선박 조향타",
"gui.vs_eureka.engine": "엔진",
"gui.vs_eureka.assemble": "조립",
"gui.vs_eureka.disassemble": "해체",
"gui.vs_eureka.align": "정렬",
"gui.vs_eureka.aligning": "정렬 중...",
"gui.vs_eureka.todo": "해체",
"hud.vs_eureka.start_cruising": "크루즈 제어 활성화됨",
"hud.vs_eureka.stop_cruising": "크루즈 제어 비활성화됨"
}
Loading

0 comments on commit 0044230

Please sign in to comment.