Skip to content

Commit 0044230

Browse files
Merge branch '1.19.2/main' into 1.20.1/main
2 parents 57543b2 + 3eaba73 commit 0044230

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+4554
-26101
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ body:
2121
- 1.20​
2222
validations:
2323
required: true
24+
- type: input
25+
attributes:
26+
label: Eureka version
27+
description: The version of Eureka ships
28+
validations:
29+
required: true
2430
- type: dropdown
2531
attributes:
2632
label: Mod Loader

changelogs/1.5.1-beta.1.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Additions
2+
* Added Engine boost. (Having multiple engines will increase efficiency)
3+
* Added config `engineBoost`
4+
* Added config `engineBoostOffset`
5+
* Added config `engineBoostExponentialPower`
6+
* Added config `speedMassScale` for changing how mass affects max speed.
7+
* Added Korean Localization.
8+
# Changes
9+
* Updated helm model.
10+
* Updated `en_pt.json`
11+
* Updated helm hitbox.
12+
* Changed anchor blast resistance from 1200 to 6.
13+
* Halev the mass effect on max speed.
14+
# Fixes
15+
* Updated dependencies.
16+
* Fixed an issue where the helm GUI lost data.

common/src/main/kotlin/org/valkyrienskies/eureka/EurekaConfig.kt

+12
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ object EurekaConfig {
4646
@JsonSchema(description = "Fuel burn time multiplier")
4747
val engineFuelMultiplier = 2f
4848

49+
@JsonSchema(description = "Extra engine power for when having multiple engines per engine")
50+
val engineBoost = 0.2
51+
52+
@JsonSchema(description = "At what amount of engines the boost will start taking effect")
53+
val engineBoostOffset = 2.5
54+
55+
@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")
56+
val engineBoostExponentialPower = 0.000001
57+
4958
@JsonSchema(description = "Max speed of a ship without boosting")
5059
val maxCasualSpeed = 15.0
5160

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

70+
@JsonSchema(description = "how much the mass decreases the speed.")
71+
var speedMassScale = 5.0
72+
6173
// The velocity any ship at least can move at.
6274
@JsonSchema(description = "The speed a ship with no engines can move at")
6375
var baseSpeed = 3.0

common/src/main/kotlin/org/valkyrienskies/eureka/block/AnchorBlock.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import org.valkyrienskies.mod.common.getShipManagingPos
2424
import org.valkyrienskies.mod.common.getShipObjectManagingPos
2525

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

2929
val ANCHOR_BOTTOM = RotShapes.box(2.0, 2.0, 14.0, 14.0, 4.0, 16.0)
3030
val ANCHOR_ROD = RotShapes.box(7.0, 2.0, 14.0, 9.0, 24.0, 16.0)

common/src/main/kotlin/org/valkyrienskies/eureka/block/ShipHelmBlock.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import org.valkyrienskies.mod.common.getShipObjectManagingPos
3636
import java.awt.TextComponent
3737

3838
class ShipHelmBlock(properties: Properties, val woodType: WoodType) : BaseEntityBlock(properties) {
39-
val HELM_BASE = RotShapes.box(1.0, 0.0, 1.0, 15.0, 1.0, 15.0)
40-
val HELM_POLE = RotShapes.box(4.0, 1.0, 7.0, 12.0, 12.0, 13.0)
39+
val HELM_BASE = RotShapes.box(2.0, 0.0, 2.0, 14.0, 2.0, 14.0)
40+
val HELM_POLE = RotShapes.box(4.0, 2.0, 5.0, 12.0, 13.0, 13.0)
4141

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

common/src/main/kotlin/org/valkyrienskies/eureka/gui/shiphelm/ShipHelmScreen.kt

+8-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ class ShipHelmScreen(handler: ShipHelmScreenMenu, playerInventory: Inventory, te
5757
}
5858

5959
private fun updateButtons() {
60-
pos = (Minecraft.getInstance().hitResult as? BlockHitResult)?.blockPos
61-
ship = pos?.let { Minecraft.getInstance().level?.getShipManagingPos(it) }
60+
val newPos = (Minecraft.getInstance().hitResult as? BlockHitResult)?.blockPos
61+
if (newPos != null){
62+
pos = newPos
63+
}
64+
val newShip = pos?.let { Minecraft.getInstance().level?.getShipManagingPos(it) }
65+
if (newShip != null){
66+
ship = newShip
67+
}
6268

6369
val isLookingAtShip = ship != null
6470

common/src/main/kotlin/org/valkyrienskies/eureka/ship/EurekaShipControl.kt

+16-6
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,15 @@ class EurekaShipControl : ShipForcesInducer, ServerTickListener {
151151
val controllingPlayer = ship.getAttachment(SeatedControllingPlayer::class.java)
152152
val validPlayer = controllingPlayer != null && !anchored
153153

154-
if (isCruising && anchored) {
155-
isCruising = false
156-
showCruiseStatus()
154+
155+
if (anchored) {
156+
if (isCruising) {
157+
isCruising = false
158+
showCruiseStatus()
159+
}
160+
161+
physShip.isStatic = true
162+
return
157163
}
158164

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

292-
val mass10 = physShip.inertia.shipMass * 10
298+
val scaledMass = physShip.inertia.shipMass * EurekaConfig.SERVER.speedMassScale
293299
val vel: Vector3dc = physShip.poseVel.vel
294300

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

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

316322
if (extraForceLinear != 0.0) {
323+
// engine boost
324+
val boost = max((extraForceLinear - EurekaConfig.SERVER.enginePowerLinear * EurekaConfig.SERVER.engineBoostOffset) * EurekaConfig.SERVER.engineBoost, 0.0);
325+
extraForceLinear += boost + boost * boost * EurekaConfig.SERVER.engineBoostExponentialPower;
326+
317327
// This is the maximum speed we want to go in any scenario (when not sprinting)
318328
val idealForwardVel = Vector3d(forwardVector).mul(EurekaConfig.SERVER.maxCasualSpeed)
319-
val idealForwardForce = Vector3d(idealForwardVel).sub(velOrthogonalToPlayerUp).mul(mass10)
329+
val idealForwardForce = Vector3d(idealForwardVel).sub(velOrthogonalToPlayerUp).mul(scaledMass)
320330

321331
val extraForceNeeded = Vector3d(idealForwardForce).sub(forwardForce)
322332
forwardForce.fma(min(extraForceLinear / extraForceNeeded.length(), 1.0), extraForceNeeded)

common/src/main/resources/assets/vs_eureka/lang/en_pt.json

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"itemGroup.vs_eureka.eureka_tab": "VS Eureka",
3-
"block.vs_eureka.oak_ship_helm": "Oak Ship Helm",
4-
"block.vs_eureka.spruce_ship_helm": "Spruce Ship Helm",
5-
"block.vs_eureka.birch_ship_helm": "Birch Ship Helm",
6-
"block.vs_eureka.jungle_ship_helm": "Jungle Ship Helm",
7-
"block.vs_eureka.acacia_ship_helm": "Acacia Ship Helm",
8-
"block.vs_eureka.dark_oak_ship_helm": "Dusky Oak Ship Helm",
9-
"block.vs_eureka.crimson_ship_helm": "Ichor Ship Helm",
10-
"block.vs_eureka.warped_ship_helm": "Twist'd Ship Helm",
3+
"block.vs_eureka.oak_ship_helm": "Oak Ship's Wheel",
4+
"block.vs_eureka.spruce_ship_helm": "Spruce Ship's Wheel",
5+
"block.vs_eureka.birch_ship_helm": "Birch Ship's Wheel",
6+
"block.vs_eureka.jungle_ship_helm": "Jungle Ship's Wheel",
7+
"block.vs_eureka.acacia_ship_helm": "Acacia Ship's Wheel",
8+
"block.vs_eureka.dark_oak_ship_helm": "Dusky Oak Ship's Wheel",
9+
"block.vs_eureka.crimson_ship_helm": "Ichor Ship's Wheel",
10+
"block.vs_eureka.warped_ship_helm": "Twist'd Ship's Wheel",
1111
"block.vs_eureka.anchor": "Anchor",
1212
"block.vs_eureka.engine": "Oven Sail",
1313
"block.vs_eureka.balloon": "Dutchman's Sail",
@@ -29,11 +29,13 @@
2929
"block.vs_eureka.brown_balloon": "Brown Balloon",
3030
"block.vs_eureka.floater": "Float'r",
3131
"block.vs_eureka.ballast": "Ballast",
32-
"gui.vs_eureka.ship_helm": "Ship Helm",
32+
"gui.vs_eureka.ship_helm": "Ship's Wheel",
3333
"gui.vs_eureka.engine": "Oven Sail",
3434
"gui.vs_eureka.assemble": "Cast Off",
3535
"gui.vs_eureka.disassemble": "Dock",
3636
"gui.vs_eureka.align": "Come About",
3737
"gui.vs_eureka.aligning": "Comin' About...",
38-
"gui.vs_eureka.todo": "Ye lamb be wretched n' wee"
39-
}
38+
"gui.vs_eureka.todo": "Ye lamb be wretched n' wee",
39+
"hud.vs_eureka.start_cruising": "Cruisin' be enabled",
40+
"hud.vs_eureka.stop_cruising": "Cruisin' be disabled"
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"itemGroup.vs_eureka.eureka_tab": "VS Eureka",
3+
"block.vs_eureka.oak_ship_helm": "참나무 선박 조향타",
4+
"block.vs_eureka.spruce_ship_helm": "가문비나무 선박 조향타",
5+
"block.vs_eureka.birch_ship_helm": "자작나무 선박 조향타",
6+
"block.vs_eureka.jungle_ship_helm": "정글나무 선박 조향타",
7+
"block.vs_eureka.acacia_ship_helm": "아카시아나무 선박 조향타",
8+
"block.vs_eureka.dark_oak_ship_helm": "짙은 참나무 선박 조향타",
9+
"block.vs_eureka.crimson_ship_helm": "진홍빛 선박 조향타",
10+
"block.vs_eureka.warped_ship_helm": "뒤틀린 선박 조향타",
11+
"block.vs_eureka.anchor": "",
12+
"block.vs_eureka.engine": "선박 엔진",
13+
"block.vs_eureka.balloon": "풍선",
14+
"block.vs_eureka.white_balloon": "하얀색 풍선",
15+
"block.vs_eureka.light_gray_balloon": "회백색 풍선",
16+
"block.vs_eureka.gray_balloon": "회색 풍선",
17+
"block.vs_eureka.black_balloon": "검은색 풍선",
18+
"block.vs_eureka.red_balloon": "빨간색 풍선",
19+
"block.vs_eureka.orange_balloon": "주황색 풍선",
20+
"block.vs_eureka.yellow_balloon": "노란색 풍선",
21+
"block.vs_eureka.lime_balloon": "연두색 풍선",
22+
"block.vs_eureka.green_balloon": "초록색 풍선",
23+
"block.vs_eureka.light_blue_balloon": "하늘색 풍선",
24+
"block.vs_eureka.cyan_balloon": "청록색 풍선",
25+
"block.vs_eureka.blue_balloon": "파란색 풍선",
26+
"block.vs_eureka.purple_balloon": "보라색 풍선",
27+
"block.vs_eureka.magenta_balloon": "자홍색 풍선",
28+
"block.vs_eureka.pink_balloon": "분홍색 풍선",
29+
"block.vs_eureka.brown_balloon": "갈색 풍선",
30+
"block.vs_eureka.floater": "부력체",
31+
"block.vs_eureka.ballast": "중량",
32+
"gui.vs_eureka.ship_helm": "선박 조향타",
33+
"gui.vs_eureka.engine": "엔진",
34+
"gui.vs_eureka.assemble": "조립",
35+
"gui.vs_eureka.disassemble": "해체",
36+
"gui.vs_eureka.align": "정렬",
37+
"gui.vs_eureka.aligning": "정렬 중...",
38+
"gui.vs_eureka.todo": "해체",
39+
"hud.vs_eureka.start_cruising": "크루즈 제어 활성화됨",
40+
"hud.vs_eureka.stop_cruising": "크루즈 제어 비활성화됨"
41+
}

0 commit comments

Comments
 (0)