Skin Improvements
This commit is contained in:
@@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
@Mixin(EntityView.class)
|
||||
public class EntityViewMixin {
|
||||
public interface EntityViewMixin {
|
||||
@ModifyArg(method = "getClosestPlayer(DDDDZ)Lnet/minecraft/entity/player/PlayerEntity;", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/EntityView;getClosestPlayer(DDDDLjava/util/function/Predicate;)Lnet/minecraft/entity/player/PlayerEntity;"))
|
||||
private @Nullable Predicate<Entity> addMinionPredicate(@Nullable Predicate<Entity> targetPredicate) {
|
||||
Predicate<Entity> predicate = EntityViewMixinHelper.ADDITIONAL_PREDICATE.get();
|
||||
|
||||
@@ -52,7 +52,7 @@ public class PlayerListMixin {
|
||||
@WrapOperation(method = "respawnPlayer", at = @At(value = "NEW", target = "(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/server/world/ServerWorld;Lcom/mojang/authlib/GameProfile;Lnet/minecraft/network/packet/c2s/common/SyncedClientOptions;)Lnet/minecraft/server/network/ServerPlayerEntity;"))
|
||||
public ServerPlayerEntity makePlayerForRespawn(MinecraftServer minecraftServer, ServerWorld serverLevel, GameProfile gameProfile, SyncedClientOptions clientInformation, Operation<ServerPlayerEntity> original, ServerPlayerEntity serverPlayer, boolean bl) {
|
||||
if (serverPlayer instanceof MinionFakePlayer minion) {
|
||||
return MinionFakePlayer.respawnFake(minecraftServer, serverLevel, gameProfile, clientInformation);
|
||||
return MinionFakePlayer.respawnFake(minecraftServer, serverLevel, gameProfile, clientInformation, minion.getData());
|
||||
}
|
||||
return original.call(minecraftServer, serverLevel, gameProfile, clientInformation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user