-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add client gametest for tank rendering verification #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f37dfd3
5a77564
6770438
dedd25b
bef55ff
c31dd3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,10 @@ bin/ | |
|
|
||
| run/ | ||
|
|
||
| # loom decompiled sources | ||
|
|
||
| /net/ | ||
|
|
||
| # datagen | ||
|
|
||
| src/main/generated/.cache/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,163 @@ | ||||||
| package net.turtton.connectedtank.test | ||||||
|
|
||||||
| import net.fabricmc.fabric.api.client.gametest.v1.FabricClientGameTest | ||||||
| import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext | ||||||
| import net.fabricmc.fabric.api.client.gametest.v1.context.TestServerContext | ||||||
| import net.fabricmc.fabric.api.transfer.v1.fluid.FluidConstants | ||||||
| import net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant | ||||||
| import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction | ||||||
| import net.minecraft.fluid.Fluids | ||||||
| import net.minecraft.server.MinecraftServer | ||||||
| import net.minecraft.util.math.BlockPos | ||||||
| import net.minecraft.world.World | ||||||
| import net.turtton.connectedtank.block.CTBlocks | ||||||
| import net.turtton.connectedtank.block.TankFluidStorage | ||||||
| import net.turtton.connectedtank.config.CTServerConfig | ||||||
| import net.turtton.connectedtank.world.FluidStoragePersistentState | ||||||
| import org.apache.commons.lang3.function.FailableConsumer | ||||||
| import org.lwjgl.glfw.GLFW | ||||||
|
|
||||||
| object ConnectedTankClientGameTest : FabricClientGameTest { | ||||||
| private val TANK_CAPACITY = CTServerConfig.DEFAULT_BUCKET_CAPACITY.toLong() | ||||||
|
||||||
| private val TANK_CAPACITY = CTServerConfig.DEFAULT_BUCKET_CAPACITY.toLong() | |
| private val tankCapacity = CTServerConfig.DEFAULT_BUCKET_CAPACITY.toLong() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "schemaVersion": 1, | ||
| "id": "connectedtank-client-test", | ||
| "version": "1.0.0", | ||
| "name": "ConnectedTank Client Test", | ||
| "environment": "client", | ||
| "entrypoints": { | ||
| "fabric-client-gametest": [ | ||
| { | ||
| "value": "net.turtton.connectedtank.test.ConnectedTankClientGameTest", | ||
| "adapter": "kotlin" | ||
| } | ||
| ] | ||
| }, | ||
| "depends": { | ||
| "connectedtank": "*" | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow runs a Minecraft client task on
ubuntu-24.04without setting up an X/GL context (e.g., viaxvfb-run). On GitHub-hosted Linux runners, GUI/OpenGL apps typically fail with missing DISPLAY/GL errors unless wrapped in Xvfb (and sometimes mesa libs). Consider running the Gradle command underxvfb-run -a(and installing any required packages) to make the CI job reliable.