mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Add an option to fix MC-3304 (projectile looting)
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -74,6 +_,7 @@
|
||||
public ItemStack pickupItemStack = this.getDefaultPickupItem(); // Paper - private -> public
|
||||
@Nullable
|
||||
public ItemStack firedFromWeapon = null; // Paper - private -> public
|
||||
+ public net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments = net.minecraft.world.item.enchantment.ItemEnchantments.EMPTY; // Purpur - Add an option to fix MC-3304 projectile looting
|
||||
|
||||
protected AbstractArrow(EntityType<? extends AbstractArrow> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -347,7 +_,7 @@
|
||||
this.setInGround(false);
|
||||
Vec3 deltaMovement = this.getDeltaMovement();
|
||||
@@ -9,3 +17,16 @@
|
||||
}
|
||||
|
||||
public boolean isInGround() { // Paper - protected -> public
|
||||
@@ -559,6 +_,12 @@
|
||||
public ItemStack getWeaponItem() {
|
||||
return this.firedFromWeapon;
|
||||
}
|
||||
+
|
||||
+ // Purpur start - Add an option to fix MC-3304 projectile looting
|
||||
+ public void setActualEnchantments(net.minecraft.world.item.enchantment.ItemEnchantments actualEnchantments) {
|
||||
+ this.actualEnchantments = actualEnchantments;
|
||||
+ }
|
||||
+ // Purpur end - Add an option to fix MC-3304 projectile looting
|
||||
|
||||
protected SoundEvent getDefaultHitGroundSoundEvent() {
|
||||
return SoundEvents.ARROW_HIT;
|
||||
|
||||
Reference in New Issue
Block a user