Forge 1.19

* Bump pack.mcmeta formats
* 1.19 biome modifiers
* Mark ClientPlayerNetworkEvent.LoggedOutEvent's getters as nullable
* Add docs and package-info to client extension interfaces package
* Move RenderBlockOverlayEvent hooks to ForgeHooksClient
* Add package-infos to client events package
* Rename SoundLoadEvent to SoundEngineLoadEvent

This reduces confusion from consumers which may think the
name SoundLoadEvent refers to an individual sound being loaded rather
than the sound engine.
* Document and change SoundLoadEvent to fire on mod bus

Previously, it fired on both the mod bus and the Forge bus, which is
confusing for consumers.
* Delete SoundSetupEvent

Looking at its original implementation shows that there isn't an
appropriate place in the new sound code to reinsert the event, and the
place of 'sound engine/manager initialization event' is taken already by SoundLoadEvent.
* Perform some cleanup on client events

 - Removed nullable annotations from ClientPlayerNetworkEvent
 - Renamed #getPartialTicks methods to #getPartialTick, to be consistent
  with vanilla's naming of the partial tick
 - Cleanup documentation to remove line breaks, use the
  spelling 'cancelled' over
  'canceled', and improve docs on existing and
   new methods.
* Remove EntityEvent.CanUpdate

Closes MinecraftForge/MinecraftForge#6394
* Switch to Jetbrains nullability annotations
* New PlayLevelSoundEvent; replaces old PlaySoundAtEntityEvent
* Remove ForgeWorldPresetScreens
* Remove IForgeRegistryEntry
* Remove use of List<Throwable> in FML's CompletableFutures
* Add docs to mod loading stages, stages, and phases
* Gradle 7.4.2
* Use SLF4J in FMLLoader and other subprojects
* Switch dynamic versions in subprojects to pinned ones
* Switch ForgeRoot and MDK to FG plugin markers
* Configure Forge javadoc task

The task now uses a custom stylesheet with MCForge elements, and
configured to combine the generation from the four FML subprojects
(fmlloader, fmlcore, javafmllanguage, mclanguage) and the Forge project
into the javadoc output.
* Update docs/md files, for 1.19 update and the move away from IRC to Discord.
* Make "Potentially dangerous alternative prefix" a debug warning, not info.

Co-authored-by: Curle <[email protected]>
Co-authored-by: sciwhiz12 <[email protected]>
Signed-off-by: SizableShrimp <[email protected]>
This commit is contained in:
committed 2022-06-07 15:31:26 -05:00
1 parent 270e778ac5
commit 4ed9117799
1485 files changed
+14960 -15446

No files matched your search

@@ -5,6 +5,7 @@
package net.minecraftforge.event;
import net.minecraft.network.chat.MessageSignature;
import net.minecraft.network.protocol.game.ServerboundChatPacket;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.network.chat.Component;
@@ -13,15 +14,17 @@ import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
import javax.annotation.Nullable;
/**
* ServerChatEvent is fired whenever a C01PacketChatMessage is processed. <br>
* This event is fired via {@link ForgeHooks#onServerChatEvent(ServerGamePacketListenerImpl, String, Component)},
* This event is fired via {@link ForgeHooks#onServerChatEvent(ServerPlayer, String, Component)},
* which is executed by the {@link ServerGamePacketListenerImpl#handleChat(ServerboundChatPacket)}<br>
* <br>
* {@link #username} contains the username of the player sending the chat message.<br>
* {@link #username} contains the username of the player sending the chat message, unless fired from the server, where it is null.<br>
* {@link #message} contains the message being sent.<br>
* {@link #player} the instance of EntityPlayerMP for the player sending the chat message.<br>
* {@link #component} contains the instance of ChatComponentTranslation for the sent message.<br>
* {@link #player} the instance of ServerPlayer for the player sending the chat message, or null when fired from the server.<br>
* {@link #component} contains the instance of Component for the sent message.<br>
* <br>
* This event is {@link Cancelable}. <br>
* If this event is canceled, the chat message is never distributed to all clients.<br>
@@ -33,15 +36,16 @@ import net.minecraftforge.eventbus.api.Cancelable;
@Cancelable
public class ServerChatEvent extends net.minecraftforge.eventbus.api.Event
{
private final String message, username;
private final ServerPlayer player;
private final String message;
private final @Nullable String username;
private final @Nullable ServerPlayer player;
private Component component;
public ServerChatEvent(ServerPlayer player, String message, Component component)
public ServerChatEvent(@Nullable ServerPlayer player, String message, Component component)
{
super();
this.message = message;
this.player = player;
this.username = player.getGameProfile().getName();
this.username = player != null ? player.getGameProfile().getName() : null;
this.component = component;
}
@@ -56,6 +60,6 @@ public class ServerChatEvent extends net.minecraftforge.eventbus.api.Event
}
public String getMessage() { return this.message; }
public String getUsername() { return this.username; }
public ServerPlayer getPlayer() { return this.player; }
public @Nullable String getUsername() { return this.username; }
public @Nullable ServerPlayer getPlayer() { return this.player; }
}