mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-23 00:39:20 +00:00
Drop useless reduce movement allocations patch
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samsuik <kfian294ma4@gmail.com>
|
||||
Date: Thu, 6 Jun 2024 20:34:29 +0100
|
||||
Subject: [PATCH] Add option for fishing hooks pulling entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 43a3ac5858ffb2007e6f63ec0f3bc5a9971dce14..bf8f903bb03b58c53c8307323f3f94779300b7e0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -616,7 +616,7 @@ public class FishingHook extends Projectile {
|
||||
public void pullEntity(Entity entity) {
|
||||
Entity entity1 = this.getOwner();
|
||||
|
||||
- if (entity1 != null) {
|
||||
+ if (entity1 != null && (this.level().sakuraConfig().players.fishingHooksPullEntities || entity instanceof ItemEntity)) { // Sakura - Add option for fishing hooks pulling entities
|
||||
Vec3 vec3d = (new Vec3(entity1.getX() - this.getX(), entity1.getY() - this.getY(), entity1.getZ() - this.getZ())).scale(0.1D);
|
||||
|
||||
entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d));
|
||||
Reference in New Issue
Block a user