Skip to content
Open
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
5 changes: 5 additions & 0 deletions PATCHED.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@
| Basic | [MC-121903](https://bugs.mojang.com/browse/MC-121903) | Command block minecarts do not save execution cooldown to NBT |
| Basic | [MC-123450](https://bugs.mojang.com/browse/MC-123450) | Item frames play sounds when the item within them is read from NBT |
| Basic | [MC-123605](https://bugs.mojang.com/browse/MC-123605) | Debug world still sets clear weather time instead of deactivating gamerule doWeatherCycle |
| Basic | [MC-123848](https://bugs.mojang.com/browse/MC-123848) | Item frames (and items within) when removed from a ceiling, drop atop, not under, the block |
| Basic | [MC-129909](https://bugs.mojang.com/browse/MC-129909) | Players in spectator mode continue to consume foods and liquids shortly after switching game modes |
| Basic | [MC-132878](https://bugs.mojang.com/browse/MC-132878) | Armor stands destroyed by explosions/lava/fire don't produce particles |
| Basic | [MC-134110](https://bugs.mojang.com/browse/MC-134110) | Structure mirroring breaking apart double chests |
| Basic | [MC-136249](https://bugs.mojang.com/browse/MC-136249) | Wearing boots enchanted with depth strider decreases the strength of the riptide enchantment |
| Basic | [MC-139041](https://bugs.mojang.com/browse/MC-139041) | The sounds of fishing bobbers aren't controlled by the "Players" sound slider |
| 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-153086](https://bugs.mojang.com/browse/MC-153086) | Beacons always play deactivating sound when broken, even when not powered |
| Basic | [MC-155509](https://bugs.mojang.com/browse/MC-155509) | Puffed pufferfish can hurt the player while dying |
| 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 |
Expand All @@ -96,6 +98,7 @@
| Basic | [MC-202637](https://bugs.mojang.com/browse/MC-202637) | Last sound clip of eating will still play when Players volume is set to 0% |
| Basic | [MC-206705](https://bugs.mojang.com/browse/MC-206705) | Spyglasses stay in use in spectator mode |
| Basic | [MC-206922](https://bugs.mojang.com/browse/MC-206922) | Items dropped by entities that are killed by lightning instantly disappear |
| Basic | [MC-210802](https://bugs.mojang.com/browse/MC-210802) | Inactive sheep eat grass |
| Basic | [MC-214147](https://bugs.mojang.com/browse/MC-214147) | Skeletons wearing leather armor still convert to strays in powder snow |
| Basic | [MC-215530](https://bugs.mojang.com/browse/MC-215530) | The freezing effect isn't immediately removed when switching into spectator mode |
| Basic | [MC-219981](https://bugs.mojang.com/browse/MC-219981) | If zombies spawned with max health over 20 (leader zombie bonus), they will have 20 health instead of their max health |
Expand All @@ -107,7 +110,9 @@
| Basic | [MC-227337](https://bugs.mojang.com/browse/MC-227337) | When a shulker bullet hits an entity, the explodes sound is not played and particles are not produced |
| Basic | [MC-231743](https://bugs.mojang.com/browse/MC-231743) | minecraft.used:minecraft.POTTABLE_PLANT doesn't increase when placing plants into flower pots |
| Basic | [MC-232869](https://bugs.mojang.com/browse/MC-232869) | Adult striders can spawn with saddles in peaceful mode |
| Basic | [MC-243057](https://bugs.mojang.com/browse/MC-243057) | Furnace recipes don't consider alternatives when first option of recipe is used for fuel |
| Basic | [MC-245394](https://bugs.mojang.com/browse/MC-245394) | The sounds of raid horns blaring aren't controlled by the correct sound slider |
| Basic | [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 |
| Basic | [MC-251068](https://bugs.mojang.com/browse/MC-251068) | If you delete your only world, then you are no longer automatically thrown into the menu of creating a new world |
| Basic | [MC-267125](https://bugs.mojang.com/browse/MC-267125) | Command suggestions for reloadable content are not affected by /reload |
| Basic | [MC-268617](https://bugs.mojang.com/browse/MC-268617) | Structures can't be saved if the game directory is named in a certain way |
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ modstitch {
FlashyReese's Sodium Extra - Code used licensed under LGPLv3
Ampflower's 2x2 Surrounded Saplings Fix - Code used licensed under Zlib
NoahvdAa's Thorium - Code used licensed under LGPLv3
Moulberry's MoulberryTweaks - Code used licensed under MIT
Moulberry's MoulberrysTweaks - Code used licensed under MIT
PaperMC's Paper - Code used under MIT
""".trimIndent()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package dev.isxander.debugify.mixins.basic.mc123848;

import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.decoration.HangingEntity;
import net.minecraft.world.entity.decoration.ItemFrame;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import org.spongepowered.asm.mixin.Mixin;

/**
* Taken from a Paper patch attributed to BillyGalbreath
* <a href="https://github.com/PaperMC/Paper/blob/4f79e9eeca8549c72794f53e88c075c1eba46c58/paper-server/patches/sources/net/minecraft/world/entity/decoration/ItemFrame.java.patch#L59">patch</a>
* <p>
* Licensed under MIT
* <a href="https://github.com/PaperMC/Paper/blob/main/LICENSE.md">license</a>
*/
@BugFix(id = "MC-123848", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Item frames (and items within) when removed from a ceiling, drop atop, not under, the block")
@Mixin(ItemFrame.class)
public abstract class ItemFrameMixin extends HangingEntity {
protected ItemFrameMixin(EntityType<? extends HangingEntity> entityType, Level level) {
super(entityType, level);
}

@Override
public ItemEntity spawnAtLocation(ServerLevel level, ItemStack stack) {
return this.spawnAtLocation(level, stack, this.getDirection() == Direction.DOWN ? -0.6F: 0.0F);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package dev.isxander.debugify.mixins.basic.mc153086;

import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.core.BlockPos;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BeaconBeamOwner;
import net.minecraft.world.level.block.entity.BeaconBlockEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;

import java.util.List;

/**
* Taken from a Paper patch attributed to Machine_Maker & BillyGalbreath
* <a href="https://github.com/PaperMC/Paper/blob/4f79e9eeca8549c72794f53e88c075c1eba46c58/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/EatBlockGoal.java.patch#L7">patch</a>
* <p>
* Licensed under MIT
* <a href="https://github.com/PaperMC/Paper/blob/main/LICENSE.md">license</a>
*/
@BugFix(id = "MC-153086", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Beacons always play deactivating sound when broken, even when not powered")
@Mixin(BeaconBlockEntity.class)
public class BeaconBlockEntityMixin {
@Shadow
int levels;

@Shadow
List<BeaconBeamOwner.Section> beamSections;

@WrapWithCondition(method = "setRemoved", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/entity/BeaconBlockEntity;playSound(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/sounds/SoundEvent;)V"))
private boolean checkIfActive(Level level, BlockPos pos, SoundEvent sound) {
return (this.levels > 0 && !this.beamSections.isEmpty());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package dev.isxander.debugify.mixins.basic.mc210802;

import net.minecraft.server.level.ChunkMap;
import net.minecraft.world.level.ChunkPos;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;

@Mixin(ChunkMap.class)
public interface ChunkMapAccessor {
@Invoker("anyPlayerCloseEnoughForSpawning")
boolean getAnyPlayerCloseEnoughForSpawning(ChunkPos chunkPos);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package dev.isxander.debugify.mixins.basic.mc210802;

import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.EatBlockGoal;
import net.minecraft.world.level.Level;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;

/**
* Taken from a Paper patch attributed to BillyGalbreath
* <a href="https://github.com/PaperMC/Paper/blob/4f79e9eeca8549c72794f53e88c075c1eba46c58/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/EatBlockGoal.java.patch#L7">patch</a>
* <p>
* Licensed under MIT
* <a href="https://github.com/PaperMC/Paper/blob/main/LICENSE.md">license</a>
*/
@BugFix(id = "MC-210802", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Inactive sheep eat grass")
@Mixin(EatBlockGoal.class)
public class EatBlockGoalMixin {
@Shadow
@Final
private Level level;

@Shadow
@Final
private Mob mob;

@WrapMethod(method = "canUse")
private boolean checkDistance(Operation<Boolean> original) {
if (!((ChunkMapAccessor) ((ServerLevel) this.level).getChunkSource().chunkMap).getAnyPlayerCloseEnoughForSpawning(this.mob.chunkPosition())) {
return false;
}
return original.call();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package dev.isxander.debugify.mixins.basic.mc243057;

import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.core.NonNullList;
import net.minecraft.world.entity.player.StackedItemContents;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
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;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

/**
* Taken from a Paper patch attributed to Machine_Maker
* <a href="https://github.com/PaperMC/Paper/blob/4f79e9eeca8549c72794f53e88c075c1eba46c58/paper-server/patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch#L276">patch</a>
* <p>
* Licensed under MIT
* <a href="https://github.com/PaperMC/Paper/blob/main/LICENSE.md">license</a>
*/
@BugFix(id = "MC-243057", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "Furnace recipes don't consider alternatives when first option of recipe is used for fuel")
@Mixin(AbstractFurnaceBlockEntity.class)
public class AbstractFurnaceBlockEntityMixin {
@Shadow
protected NonNullList<ItemStack> items;

@Shadow
@Final
protected static int SLOT_INPUT;

@Shadow
@Final
protected static int SLOT_RESULT;

@Inject(method = "fillStackedContents", at = @At("HEAD"))
private void fixFuelStacks(StackedItemContents stackedItemContents, CallbackInfo ci) {
stackedItemContents.accountStack(this.items.get(SLOT_INPUT));
stackedItemContents.accountStack(this.items.get(SLOT_RESULT));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package dev.isxander.debugify.mixins.basic.mc248588;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.GameRules;
import net.minecraft.world.level.block.LayeredCauldronBlock;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

/**
* Taken from a Paper patch attributed to Machine_Maker
* <a href="https://github.com/PaperMC/Paper/blob/4f79e9eeca8549c72794f53e88c075c1eba46c58/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch#L13">patch</a>
* <p>
* Licensed under MIT
* <a href="https://github.com/PaperMC/Paper/blob/main/LICENSE.md">license</a>
*/
@BugFix(id = "MC-248588", category = FixCategory.BASIC, env = BugFix.Env.SERVER, description = "The \"mobGriefing\" gamerule doesn't prevent burning entities from being able to decrease the levels of water or powder snow cauldrons")
@Mixin(LayeredCauldronBlock.class)
public class LayeredCauldronBlockMixin {
@WrapOperation(method = "method_71627", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;mayInteract(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;)Z"))
private boolean checkMobGriefing(Entity instance, ServerLevel level, BlockPos pos, Operation<Boolean> original) {
return (instance instanceof Player || level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && original.call(instance, level, pos);
}
}
6 changes: 6 additions & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
"basic.mc121903.MinecraftCommandBlockMixin",
"basic.mc123450.ItemFrameMixin",
"basic.mc123605.MinecraftServerMixin",
"basic.mc123848.ItemFrameMixin",
"basic.mc129909.ServerPlayerMixin",
"basic.mc132878.ArmorStandMixin",
"basic.mc134110.ChestBlockMixin",
"basic.mc136249.LivingEntityMixin",
"basic.mc139041.FishingRodItemMixin",
"basic.mc147659.CatSpawnerMixin",
"basic.mc147784.FletchingTableBlockMixin",
"basic.mc153086.BeaconBlockEntityMixin",
"basic.mc155509.PufferfishMixin",
"basic.mc159283.DensityFunctionsMixin",
"basic.mc160095.CactusBlockMixin",
Expand All @@ -43,6 +45,8 @@
"basic.mc202637.FoodPropertiesMixin",
"basic.mc206922.EntityMixin",
"basic.mc206922.ItemEntityMixin",
"basic.mc210802.ChunkMapAccessor",
"basic.mc210802.EatBlockGoalMixin",
"basic.mc215530.ServerPlayerMixin",
"basic.mc219981.ZombieMixin",
"basic.mc221257.ShulkerBulletMixin",
Expand All @@ -53,7 +57,9 @@
"basic.mc227337.ShulkerBulletMixin",
"basic.mc231743.FlowerPotBlockMixin",
"basic.mc232869.StriderMixin",
"basic.mc243057.AbstractFurnaceBlockEntityMixin",
"basic.mc245394.RaidMixin",
"basic.mc248588.LayeredCauldronBlockMixin",
"basic.mc267125.MinecraftServerMixin",
"basic.mc268617.FileUtilMixin",
"basic.mc271899.StructureTemplateMixin",
Expand Down