1.19.1-pre2

This commit is contained in:
modmuss50 2022-06-30 18:19:22 +01:00
parent bdca8858a1
commit d5533c01e6
7 changed files with 24 additions and 35 deletions
build.gradle
fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/mixin/biome
fabric-command-api-v2/src/client/java/net/fabricmc/fabric/mixin/command/client
fabric-message-api-v1/src/main/java/net/fabricmc/fabric
gradle.properties
src/main/resources

View file

@ -498,7 +498,7 @@ curseforge {
id = "306612"
changelog = ENV.CHANGELOG ?: "No changelog provided"
releaseType = project.prerelease == "true" ? "beta" : "release"
addGameVersion "1.19"
addGameVersion "1.19-Snapshot"
addGameVersion "Fabric"
mainArtifact(signingEnabled ? signRemapJar.output : remapJar) {

View file

@ -43,7 +43,7 @@ public class MixinChunkNoiseSampler {
private long seed;
@Inject(method = "<init>", at = @At("TAIL"))
private void init(int horizontalSize, NoiseConfig noiseConfig, int i, int j, GenerationShapeConfig generationShapeConfig, DensityFunctionTypes.class_7050 arg, ChunkGeneratorSettings chunkGeneratorSettings, AquiferSampler.FluidLevelSampler fluidLevelSampler, Blender blender, CallbackInfo ci) {
private void init(int horizontalSize, NoiseConfig noiseConfig, int i, int j, GenerationShapeConfig generationShapeConfig, DensityFunctionTypes.Beardifying arg, ChunkGeneratorSettings chunkGeneratorSettings, AquiferSampler.FluidLevelSampler fluidLevelSampler, Blender blender, CallbackInfo ci) {
seed = noiseConfig.getLegacyWorldSeed();
}

View file

@ -19,18 +19,13 @@ package net.fabricmc.fabric.mixin.command.client;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.ClientCommandSource;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.network.message.MessageSender;
import net.minecraft.network.message.MessageType;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import net.minecraft.util.Util;
import net.minecraft.util.registry.Registry;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
@ -42,18 +37,12 @@ abstract class ClientCommandSourceMixin implements FabricClientCommandSource {
@Override
public void sendFeedback(Text message) {
client.inGameHud.onChatMessage(getSystemMessageType(), message, new MessageSender(Util.NIL_UUID, message));
this.client.method_44714().method_44736(message, false);
}
@Override
public void sendError(Text message) {
client.inGameHud.onChatMessage(getSystemMessageType(), Text.literal("").append(message).formatted(Formatting.RED), new MessageSender(Util.NIL_UUID, message));
}
@Unique
private MessageType getSystemMessageType() {
Registry<MessageType> registry = client.world.getRegistryManager().get(Registry.MESSAGE_TYPE_KEY);
return registry.get(MessageType.SYSTEM);
sendFeedback(Text.literal("").append(message).formatted(Formatting.RED));
}
@Override

View file

@ -159,10 +159,10 @@ public final class ServerMessageEvents {
* from triggering.
*
* @param message the broadcast message; use {@code message.raw().getContent()} to get the text
* @param typeKey the message type
* @param overlay true when the message is an overlay
* @return {@code true} if the message should be broadcast, otherwise {@code false}
*/
boolean allowGameMessage(Text message, RegistryKey<MessageType> typeKey);
boolean allowGameMessage(Text message, boolean overlay);
}
@FunctionalInterface
@ -211,9 +211,9 @@ public final class ServerMessageEvents {
* when {@linkplain #ALLOW_GAME_MESSAGE game messages are blocked}.
*
* @param message the broadcast message; use {@code message.raw().getContent()} to get the text
* @param typeKey the message type
* @param overlay true when the message is an overlay
*/
void onGameMessage(Text message, RegistryKey<MessageType> typeKey);
void onGameMessage(Text message, boolean overlay);
}
@FunctionalInterface

View file

@ -46,14 +46,14 @@ public class PlayerManagerMixin {
ServerMessageEvents.CHAT_MESSAGE.invoker().onChatMessage(message, sender, typeKey);
}
@Inject(method = "broadcast(Lnet/minecraft/text/Text;Ljava/util/function/Function;Lnet/minecraft/util/registry/RegistryKey;)V", at = @At("HEAD"), cancellable = true)
private void onSendGameMessage(Text message, Function<ServerPlayerEntity, Text> playerMessageFactory, RegistryKey<MessageType> typeKey, CallbackInfo ci) {
if (!ServerMessageEvents.ALLOW_GAME_MESSAGE.invoker().allowGameMessage(message, typeKey)) {
@Inject(method = "broadcast(Lnet/minecraft/text/Text;Ljava/util/function/Function;Z)V", at = @At("HEAD"), cancellable = true)
private void onSendGameMessage(Text message, Function<ServerPlayerEntity, Text> playerMessageFactory, boolean overlay, CallbackInfo ci) {
if (!ServerMessageEvents.ALLOW_GAME_MESSAGE.invoker().allowGameMessage(message, overlay)) {
ci.cancel();
return;
}
ServerMessageEvents.GAME_MESSAGE.invoker().onGameMessage(message, typeKey);
ServerMessageEvents.GAME_MESSAGE.invoker().onGameMessage(message, overlay);
}
@Inject(method = "broadcast(Lnet/minecraft/server/filter/FilteredMessage;Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/util/registry/RegistryKey;)V", at = @At("HEAD"), cancellable = true)

View file

@ -1,20 +1,20 @@
org.gradle.jvmargs=-Xmx2560M
version=0.57.0
minecraft_version=1.19
yarn_version=+build.1
loader_version=0.14.6
version=0.57.1
minecraft_version=1.19.1-pre2
yarn_version=+build.2
loader_version=0.14.8
prerelease=false
prerelease=true
# Do not manually update, use the bumpversions task:
fabric-api-base-version=0.4.9
fabric-api-lookup-api-v1-version=1.6.7
fabric-biome-api-v1-version=9.0.14
fabric-biome-api-v1-version=9.0.15
fabric-blockrenderlayer-v1-version=1.1.18
fabric-command-api-v1-version=1.2.6
fabric-command-api-v2-version=2.1.2
fabric-commands-v0-version=0.2.23
fabric-command-api-v1-version=1.2.7
fabric-command-api-v2-version=2.1.3
fabric-commands-v0-version=0.2.24
fabric-containers-v0-version=0.1.27
fabric-content-registries-v0-version=3.2.0
fabric-crash-report-info-v1-version=0.2.3
@ -32,7 +32,7 @@ fabric-keybindings-v0-version=0.2.16
fabric-lifecycle-events-v1-version=2.1.0
fabric-loot-api-v2-version=1.1.0
fabric-loot-tables-v1-version=1.1.3
fabric-message-api-v1-version=1.0.1
fabric-message-api-v1-version=2.0.0
fabric-mining-level-api-v1-version=2.1.10
fabric-models-v0-version=0.3.15
fabric-networking-api-v1-version=1.0.27

View file

@ -16,9 +16,9 @@
"FabricMC"
],
"depends": {
"fabricloader": ">=0.14.6",
"fabricloader": ">=0.14.8",
"java": ">=17",
"minecraft": "~1.19-alpha.22.18.a"
"minecraft": "~1.19.1-beta.2"
},
"description": "Core API module providing key hooks and intercompatibility features."
}