-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9f3b32
commit 8be3796
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: violetc <[email protected]> | ||
Date: Tue, 5 Sep 2023 08:49:01 +0800 | ||
Subject: [PATCH] Spider jockeys drop gapples | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java | ||
index 05432184077752b1d0cb764a5e39ed875748b2d6..e8c576313cabb1bfb6fc157ce46e8db7f0683d25 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java | ||
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java | ||
@@ -152,6 +152,18 @@ public class Spider extends Monster { | ||
this.entityData.set(Spider.DATA_FLAGS_ID, b0); | ||
} | ||
|
||
+ // Leaves start - spider jockeys drop gapples | ||
+ @Override | ||
+ protected void dropFromLootTable(DamageSource damageSource, boolean causedByPlayer) { | ||
+ super.dropFromLootTable(damageSource, causedByPlayer); | ||
+ if (top.leavesmc.leaves.LeavesConfig.spiderJockeysDropGapples > 0.0D) { | ||
+ if (this.random.nextDouble() < top.leavesmc.leaves.LeavesConfig.spiderJockeysDropGapples) { | ||
+ this.spawnAtLocation(new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ENCHANTED_GOLDEN_APPLE)); | ||
+ } | ||
+ } | ||
+ } | ||
+ // Leaves end - spider jockeys drop gapples | ||
+ | ||
@Nullable | ||
@Override | ||
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData, @Nullable CompoundTag entityNbt) { |