Skip to content

Commit

Permalink
Fix MC-252817
Browse files Browse the repository at this point in the history
  • Loading branch information
Rektroth committed Apr 25, 2024
1 parent 034c539 commit 043e505
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ Whiteout is an attempt to implement the gameplay and mechanic consistency patche

### Present

| Bug | Lazy? | Mojang Prioritization | Name |
|-------------------------------------------------------|-------|-----------------------|-------------------------------------------------------------------------------------|
| [MC-4](https://bugs.mojang.com/browse/MC-4) | Yes | Low | Item drops sometimes appear at the wrong location |
| [MC-27056](https://bugs.mojang.com/browse/MC-27056) | Yes | Low | You can blow the extension off a piston |
| [MC-84789](https://bugs.mojang.com/browse/MC-84789) | No | Low | Tamed wolves beg for bones while wild wolves don't |
| [MC-157464](https://bugs.mojang.com/browse/MC-157464) | No | Normal | Villagers move around in bed or even leave the bed when food is thrown at them |
| [MC-158900](https://bugs.mojang.com/browse/MC-158900) | No | *None* | "bad packet id 26" upon connecting after tempban expire |
| [MC-167279](https://bugs.mojang.com/browse/MC-167279) | No | Normal | Bees get stuck in the void |
| [MC-224454](https://bugs.mojang.com/browse/MC-224454) | No | Normal | Entities don't recognize azaleas or flowering azaleas as obstacles when pathfinding |
| [MC-253721](https://bugs.mojang.com/browse/MC-253721) | No | Important | Wrong logs when running /op @a |
| [MC-257487](https://bugs.mojang.com/browse/MC-257487) | No | Low | The ender dragon's name is not reset when it is respawned in the end |
| Bug | Lazy? | Mojang Prioritization | Name |
|-------------------------------------------------------|-------|-----------------------|------------------------------------------------------------------------------------------|
| [MC-4](https://bugs.mojang.com/browse/MC-4) | Yes | Low | Item drops sometimes appear at the wrong location |
| [MC-27056](https://bugs.mojang.com/browse/MC-27056) | Yes | Low | You can blow the extension off a piston |
| [MC-84789](https://bugs.mojang.com/browse/MC-84789) | No | Low | Tamed wolves beg for bones while wild wolves don't |
| [MC-157464](https://bugs.mojang.com/browse/MC-157464) | No | Normal | Villagers move around in bed or even leave the bed when food is thrown at them |
| [MC-158900](https://bugs.mojang.com/browse/MC-158900) | No | *None* | "bad packet id 26" upon connecting after tempban expire |
| [MC-167279](https://bugs.mojang.com/browse/MC-167279) | No | Normal | Bees get stuck in the void |
| [MC-224454](https://bugs.mojang.com/browse/MC-224454) | No | Normal | Entities don't recognize azaleas or flowering azaleas as obstacles when pathfinding |
| [MC-252817](https://bugs.mojang.com/browse/MC-252817) | No | Normal | Placing a map into an item frame and removing it does not remove the green player marker |
| [MC-253721](https://bugs.mojang.com/browse/MC-253721) | No | Important | Wrong logs when running /op @a |
| [MC-257487](https://bugs.mojang.com/browse/MC-257487) | No | Low | The ender dragon's name is not reset when it is respawned in the end |

Patches that are marked as "lazy" generally meet at least one of the following criteria:

Expand Down Expand Up @@ -53,7 +54,6 @@ Any patches that are considered "lazy" or are for a bug ticket which does not ha
| [MC-243057](https://bugs.mojang.com/browse/MC-243057) | Furnace recipes don't consider alternatives when first option of recipe is used for fuel |
| [MC-244739](https://bugs.mojang.com/browse/MC-244739) | Goat eating sounds aren't played when feeding them the last item of wheat within a stack |
| [MC-248588](https://bugs.mojang.com/browse/MC-248588) | The "mobGriefing" gamerule doesn't prevent burning entities from being able to decrease the levels of water or powder snow cauldrons |
| [MC-252817](https://bugs.mojang.com/browse/MC-252817) | Placing a map into an item frame and removing it does not remove the green player marker |
| [MC-253884](https://bugs.mojang.com/browse/MC-253884) | Particles produced from the bad omen effect being consumed cannot be seen by other player |
| [MC-253721](https://bugs.mojang.com/browse/MC-253721) | Wrong logs when running /op @a |
| [MC-259571](https://bugs.mojang.com/browse/MC-259571) | Last player game mode not saved after player dies or the game is reloaded |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Patch for MC-252817
*
* Authored for CraftBukkit/Spigot by braindead <[email protected]> on November 5, 2022.
* Ported to Fabric by Rektroth <[email protected]> on April 25, 2024.
*/

package io.github.rektroth.whiteout.mixin.entity.decoration;

import com.llamalad7.mixinextras.sugar.Local;
import com.llamalad7.mixinextras.sugar.ref.LocalRef;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.MapIdComponent;
import net.minecraft.entity.decoration.ItemFrameEntity;
import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ItemFrameEntity.class)
public abstract class ItemFrameEntityMixin {
@Inject(
at = @At(
target = "Lnet/minecraft/entity/decoration/ItemFrameEntity;getMapId()Lnet/minecraft/component/type/MapIdComponent;",
value = "INVOKE_ASSIGN"),
method = "removeFromFrame(Lnet/minecraft/item/ItemStack;)V"
)
private void getMapIdFromItem(ItemStack stack, CallbackInfo ci, @Local LocalRef<MapIdComponent> mapIdComponent) {
mapIdComponent.set(stack.get(DataComponentTypes.MAP_ID));
}
}
1 change: 1 addition & 0 deletions src/main/resources/whiteout.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"entity.ai.goal.WolfBegGoalMixin",
"entity.boss.dragon.EnderDragonFightAccessor",
"entity.boss.dragon.EnderDragonFightMixin",
"entity.decoration.ItemFrameEntityMixin",
"entity.passive.BeeEntityMixin",
"server.PlayerManagerAccessor",
"server.PlayerManagerMixin",
Expand Down

0 comments on commit 043e505

Please sign in to comment.