Skip to content

Commit

Permalink
Update to 24w03b
Browse files Browse the repository at this point in the history
  • Loading branch information
DrexHD committed Jan 23, 2024
1 parent f21493c commit ce89dc7
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 37 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
org.gradle.jvmargs=-Xmx2G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.2
minecraft_version=24w03b
yarn_mappings=24w03b+build.6
loader_version=0.15.6
# Mod Properties
mod_version=0.4.0
maven_group=mctester
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private void handleTick(long tick) {
gameTestHelperReferenceLongConsumer.accept(this, tick);
}
}
if (!this.gameTest.isCompleted() && this.gameTest.getTestFunction().getTickLimit() <= tick) {
if (!this.gameTest.isCompleted() && this.gameTest.getTestFunction().tickLimit() <= tick) {
this.handleTimeout();
}
}
Expand Down Expand Up @@ -244,7 +244,7 @@ public void pressButton(int x, int y, int z) {
BlockState blockState = this.getBlockState(x, y, z);
if (blockState.getBlock() instanceof ButtonBlock) {
BlockPos blockPos = GameTestUtil.transformRelativeToAbsolutePos(this.gameTest, x, y, z);
blockState.onUse(this.gameTest.getWorld(), null, null, new BlockHitResult(new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()), Direction.DOWN, blockPos, false));
blockState.onUse(this.gameTest.getWorld(), null, new BlockHitResult(new Vec3d(blockPos.getX(), blockPos.getY(), blockPos.getZ()), Direction.DOWN, blockPos, false));
} else {
throw new PositionedException("No pushable button found.", GameTestUtil.transformRelativeToAbsolutePos(this.gameTest, new BlockPos(x, y, z)), new BlockPos(x, y, z), this.currTick);
}
Expand Down
21 changes: 10 additions & 11 deletions src/main/java/mctester/common/test/creation/TestConfig.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package mctester.common.test.creation;

import mctester.mixin.accessor.TestContextAccessor;
import mctester.mixin.accessor.TestFunctionAccessor;
import mctester.common.util.TestFunctionWithVariant;
import net.minecraft.test.TestContext;
import net.minecraft.test.TestFunction;
Expand Down Expand Up @@ -35,16 +34,16 @@ private TestConfig() {}

public static TestConfig from(TestFunction testFunction) {
TestConfig testConfig = new TestConfig();
testConfig.batchId = testFunction.getBatchId();
testConfig.structurePath = testFunction.getTemplatePath();
testConfig.structureName = testFunction.getTemplateName();
testConfig.cooldown = testFunction.getDuration();
testConfig.timeout = testFunction.getTickLimit();
testConfig.required = testFunction.isRequired();
testConfig.rotation = testFunction.getRotation();
testConfig.repetitions = testFunction.getMaxAttempts();
testConfig.requiredSuccessCount = testFunction.getRequiredSuccesses();
testConfig.starter = ((TestFunctionAccessor) testFunction).getStarter();
testConfig.batchId = testFunction.batchId();
testConfig.structurePath = testFunction.templatePath();
testConfig.structureName = testFunction.templateName();
testConfig.cooldown = testFunction.setupTicks();
testConfig.timeout = testFunction.tickLimit();
testConfig.required = testFunction.required();
testConfig.rotation = testFunction.rotation();
testConfig.repetitions = testFunction.maxAttempts();
testConfig.requiredSuccessCount = testFunction.requiredSuccesses();
testConfig.starter = testFunction.starter();
return testConfig;
}

Expand Down
16 changes: 0 additions & 16 deletions src/main/java/mctester/mixin/accessor/TestFunctionAccessor.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class TestCommandMixin {

@Redirect(
method = "run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/test/TestSet;Z)V",
method = "find",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/entity/StructureBlockBlockEntity;getMetadata()Ljava/lang/String;"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},

"icon": "assets/mctester/icon.png",

"accessWidener" : "mctester.accesswidener",
"environment": "*",
"entrypoints": {
"main": [
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/mctester.accesswidener
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
accessWidener v1 named

extendable class net/minecraft/test/TestFunction
1 change: 0 additions & 1 deletion src/main/resources/mctester.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"accessor.GoalSelectorAccessor",
"accessor.MobEntityAccessor",
"accessor.TestContextAccessor",
"accessor.TestFunctionAccessor",
"after_test.TestCommandMixin",
"after_test.crash_exit_code_fix.MinecraftServerMixin",
"enable_testing.ArgumentTypesMixin",
Expand Down

0 comments on commit ce89dc7

Please sign in to comment.