Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PATCHED.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
| Basic | [MC-147659](https://bugs.mojang.com/browse/MC-147659) | Some witch huts spawn the incorrect cat |
| Basic | [MC-147784](https://bugs.mojang.com/browse/MC-147784) | Fletching table flashes crafting table's GUI for about a second upon right-clicking it in spectator mode |
| Basic | [MC-155509](https://bugs.mojang.com/browse/MC-155509) | Puffed pufferfish can hurt the player while dying |
| Basic | [MC-158900](https://bugs.mojang.com/browse/MC-158900) | "bad packet id 26" upon connecting after tempban expire |
| Basic | [MC-159283](https://bugs.mojang.com/browse/MC-159283) | The End terrain does not generate in multiple rings centered around the world center |
| Basic | [MC-160095](https://bugs.mojang.com/browse/MC-160095) | End Rods only break Cactus when moved by pistons |
| Basic | [MC-170462](https://bugs.mojang.com/browse/MC-170462) | Bad Omen is considered a positive effect in potion item tooltips |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package dev.isxander.debugify.mixins.basic.mc158900;

import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.authlib.GameProfile;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.server.players.PlayerList;
import net.minecraft.server.players.UserBanList;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;

@BugFix(id = "MC-158900", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "\"bad packet id 26\" upon connecting after tempban expire")
@Mixin(PlayerList.class)
public class PlayerListMixin {
@Shadow
@Final
private UserBanList bans;

@ModifyExpressionValue(method = "canPlayerLogin", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/players/UserBanList;isBanned(Lcom/mojang/authlib/GameProfile;)Z"))
private boolean npeCheck(boolean original, @Local(argsOnly = true) GameProfile gameProfile) {
return this.bans.get(gameProfile) != null && original;
}
}
1 change: 1 addition & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"basic.mc147659.CatSpawnerMixin",
"basic.mc147784.FletchingTableBlockMixin",
"basic.mc155509.PufferfishMixin",
"basic.mc158900.PlayerListMixin",
"basic.mc159283.DensityFunctionsMixin",
"basic.mc160095.CactusBlockMixin",
"basic.mc168573.BlocksAttacksMixin",
Expand Down