Skip to content

Commit

Permalink
Update to 1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Mar 26, 2023
1 parent 5a64373 commit e03275f
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 40 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ chenille {
withDependencyConfiguration()
}

javaVersion = 17
javaVersion = project.java_version.toInteger()
license = 'MIT'
}

Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
------------------------------------------------------
Version 0.10.0
------------------------------------------------------
Updated to 1.19.4

------------------------------------------------------
Version 0.9.1
------------------------------------------------------
Expand Down
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.19.3
yarn_mappings=1.19.3+build.5
loader_version=0.14.14
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.1
loader_version=0.14.17
java_version=17

# Mod Properties
mod_version = 0.9.1
mod_version = 0.10.0
maven_group = io.github.ladysnake
archives_base_name = elmendorf

Expand All @@ -17,5 +18,5 @@ org.gradle.jvmargs=-Xmx1G
owners = Ladysnake

# Dependencies
fabric_version=0.73.2+1.19.3
fabric_version=0.76.0+1.19.4
cca_version=5.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import dev.onyxstudios.cca.api.v3.component.ComponentKey;
import net.minecraft.entity.Entity;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Nullable;

Expand Down
29 changes: 0 additions & 29 deletions src/main/java/io/github/ladysnake/elmendorf/GameTestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,11 @@
*/
package io.github.ladysnake.elmendorf;

import io.github.ladysnake.elmendorf.impl.MockClientConnection;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.test.GameTestException;
import net.minecraft.test.TestContext;
import org.jetbrains.annotations.Nullable;
import org.junit.Assert;
import org.junit.function.ThrowingRunnable;

import java.util.function.Consumer;

public final class GameTestUtil {
public static void assertTrue(String errorMessage, boolean b) {
if (!b) throw new GameTestException(errorMessage);
Expand All @@ -52,28 +47,4 @@ public static void assertThrows(@Nullable String errorMessage, Class<? extends T
throw (GameTestException) new GameTestException(e.getMessage()).initCause(e.getCause());
}
}

/**
* @deprecated use {@link ElmendorfTestContext#spawnServerPlayer(double, double, double)}
*/
@Deprecated(forRemoval = true)
public static ServerPlayerEntity spawnPlayer(TestContext ctx, double x, double y, double z) {
return ctx.spawnServerPlayer(x, y, z);
}

/**
* @deprecated use {@link ElmendorfTestContext#configureConnection(ServerPlayerEntity, Consumer)}
*/
@Deprecated(forRemoval = true)
public static ConnectionTestConfiguration configureConnection(ServerPlayerEntity player) {
return ((MockClientConnection) player.networkHandler.connection);
}

/**
* @deprecated use {@link ElmendorfTestContext#verifyConnection(ServerPlayerEntity, Consumer)}
*/
@Deprecated(forRemoval = true)
public static CheckedConnection verifyConnection(ServerPlayerEntity player) {
return ((MockClientConnection) player.networkHandler.connection);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import dev.onyxstudios.cca.api.v3.component.ComponentKey;
import net.minecraft.entity.Entity;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import net.minecraft.entity.Entity;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.NetworkSide;
import net.minecraft.network.Packet;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.PacketCallbacks;
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
import net.minecraft.test.GameTestException;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Elmendorf
* Copyright (C) 2021-2023 Ladysnake
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
* OR OTHER DEALINGS IN THE SOFTWARE.
*/
package io.github.ladysnake.elmendorf.impl.mixin;

import net.minecraft.network.ClientConnection;
import net.minecraft.server.network.ServerPlayNetworkHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(ServerPlayNetworkHandler.class)
public interface ServerPlayNetworkHandlerAccessor {
@Accessor("connection")
ClientConnection elmendorf$getConnection();
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public ServerPlayerEntity spawnServerPlayer(double x, double y, double z) {

@Override
public void configureConnection(ServerPlayerEntity player, Consumer<ConnectionTestConfiguration> configurator) {
configurator.accept(((MockClientConnection) player.networkHandler.connection));
configurator.accept(((MockClientConnection) ((ServerPlayNetworkHandlerAccessor) player.networkHandler).elmendorf$getConnection()));
}

@Override
public void verifyConnection(ServerPlayerEntity player, Consumer<CheckedConnection> verifier) {
verifier.accept(((MockClientConnection) player.networkHandler.connection));
verifier.accept(((MockClientConnection) ((ServerPlayNetworkHandlerAccessor) player.networkHandler).elmendorf$getConnection()));
}
}
1 change: 1 addition & 0 deletions src/main/resources/elmendorf.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"compatibilityLevel": "JAVA_17",
"mixins": [
"ClientConnectionAccessor",
"ServerPlayNetworkHandlerAccessor",
"TestContextMixin",
"XmlReportingTestCompletionListenerMixin",
"flakyfix.GameTestStateMixin",
Expand Down

0 comments on commit e03275f

Please sign in to comment.