Skip to content

Commit

Permalink
Fix Silk-touch-spawners ExpDrop
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantera07 authored Aug 17, 2024
1 parent bba87bf commit c0a6296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0021-Silk-touch-spawners.patch
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ index 07315232192f6e09910a028c4643d7f0544c62e3..4eef61323ba54f513e6f251ef7c804b2
public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE);
public static final Item FARMLAND = registerBlock(Blocks.FARMLAND);
diff --git a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
index 4f190a40b8474aa06a92c8afcc06d0044120ff7b..66c17bdfecdfbcfb2d853e561432dd51a8f7ed46 100644
index 4f190a40b8474aa06a92c8afcc06d0044120ff7b..80ee7a6f010cc838625674007a3ea908f2f9dadd 100644
--- a/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpawnerBlock.java
@@ -42,6 +42,57 @@ public class SpawnerBlock extends BaseEntityBlock {
Expand Down Expand Up @@ -95,7 +95,7 @@ index 4f190a40b8474aa06a92c8afcc06d0044120ff7b..66c17bdfecdfbcfb2d853e561432dd51

@Override
public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
+ if (isSilkTouch(worldserver, itemstack)) return 0; // Purpur
+ if (worldserver.purpurConfig.silkTouchEnabled && isSilkTouch(worldserver, itemstack)) return 0; // Purpur
if (flag) {
int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);

Expand Down

0 comments on commit c0a6296

Please sign in to comment.