Skip to content

Commit

Permalink
Update FAPI and fix stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Jan 7, 2025
1 parent f839844 commit bdc694c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ loom {
ideConfigGenerated true
name 'Client Gametest'
property 'fabric.client.gametest'
property 'devauth.enabled', 'false'
programArgs '--username', 'GametestUser'
runDir 'runGametest'
source sourceSets.clientGametest
Expand Down Expand Up @@ -160,11 +161,13 @@ tasks.register('cleanGametestRunDir', Delete) {
// hack to make sure run directory is cleaned before the gametests are run
ideaSyncTask.doLast {
def gametestXml = file('.idea/runConfigurations/Client_Gametest.xml').readLines()
def index = gametestXml.findIndexOf { it.endsWith '<method v="2">' }
assert index >= 0
def endIndex = gametestXml.findIndexOf(index) { it.endsWith('</method>') }
gametestXml.add(endIndex, '<option enabled="true" externalProjectPath="$PROJECT_DIR$" name="Gradle.BeforeRunTask" scriptParameters="" tasks="cleanGametestRunDir" vmOptions=""/>')
file('.idea/runConfigurations/Client_Gametest.xml').write(gametestXml.join('\n'))
if (!gametestXml.any { it.contains('cleanGametestRunDir') }) {
def index = gametestXml.findIndexOf { it.endsWith '<method v="2">' }
assert index >= 0
def endIndex = gametestXml.findIndexOf(index) { it.endsWith('</method>') }
gametestXml.add(endIndex, '<option enabled="true" externalProjectPath="$PROJECT_DIR$" name="Gradle.BeforeRunTask" scriptParameters="" tasks="cleanGametestRunDir" vmOptions=""/>')
file('.idea/runConfigurations/Client_Gametest.xml').write(gametestXml.join('\n'))
}
}

runClientGametest.dependsOn cleanGametestRunDir
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ org.gradle.jvmargs=-Xmx2G

# Dependencies
# also check this on https://fabricmc.net/develop/
fabric_version=0.113.0+1.21.4
fabric_version=0.114.1+1.21.4
clientarguments_version=1.10.1
betterconfig_version=2.1.2
seedfinding_core_version=1.200.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ private static void testItemBreak(ClientGameTestContext context, TestSingleplaye
runClientCommand(context, "clook cardinal down");
context.waitTick();
context.getInput().pressKey(options -> options.keyUse);
context.waitTick();

if (Configs.playerCrackState.knowsSeed()) {
throw new AssertionError("Didn't trigger item break detection");
Expand Down

0 comments on commit bdc694c

Please sign in to comment.