Class ClientPlayerNetworkEvent.Clone
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent
net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent.Clone
- Enclosing class:
ClientPlayerNetworkEvent
Fired when the client player respawns, creating a new player instance to replace the old player instance.
This event is not
, and does not
invalid reference
cancellable
.invalid reference
have a result
This event is fired on the main Forge event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent
ClientPlayerNetworkEvent.Clone, ClientPlayerNetworkEvent.LoggingIn, ClientPlayerNetworkEvent.LoggingOut
-
Field Summary
-
Constructor Summary
ConstructorDescriptionClone
(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager) -
Method Summary
Modifier and TypeMethodDescriptionReturns the newly created player instance.Returns the previous player instance.Returns the newly created player instance.Methods inherited from class net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent
getConnection, getMultiPlayerGameMode
-
Field Details
-
oldPlayer
-
-
Constructor Details
-
Clone
@Internal public Clone(MultiPlayerGameMode pc, LocalPlayer oldPlayer, LocalPlayer newPlayer, Connection networkManager)
-
-
Method Details
-
getOldPlayer
Returns the previous player instance.- Returns:
- the previous player instance
-
getNewPlayer
Returns the newly created player instance.- Returns:
- the newly created player instance
-
getPlayer
Returns the newly created player instance.- Overrides:
getPlayer
in classClientPlayerNetworkEvent
- Returns:
- the newly created player instance
- See Also:
-