mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-23 00:39:22 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@f9c7f2a Begin switching to JSpecify annotations (#11448) PaperMC/Paper@e3c8a8e Add PlayerInsertLecternBookEvent [1.20 port] (#7305) PaperMC/Paper@b410fe8 Configurable per-world void damage offset/damage(#11436) PaperMC/Paper@ea00be3 Do not NPE on uuid resolution in player profile (#11449)
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Tue, 29 Nov 2022 00:30:17 +0100
|
|
Subject: [PATCH] For collision check has physics before same vehicle
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
Gale - https://galemc.org
|
|
|
|
This patch is based on the following patch:
|
|
"Swaps the predicate order of collision"
|
|
By: ㄗㄠˋ ㄑㄧˊ <tsao-chi@the-lingo.org>
|
|
As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 5a278706582bac69a38129975351aef2f11f730d..95792ce4741178cc074470932ebeee920c0eac4e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -2190,8 +2190,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
public void playerTouch(Player player) {}
|
|
|
|
public void push(Entity entity) {
|
|
+ if (!entity.noPhysics && !this.noPhysics) { // Gale - Akarin - collision physics check before vehicle check
|
|
if (!this.isPassengerOfSameVehicle(entity)) {
|
|
- if (!entity.noPhysics && !this.noPhysics) {
|
|
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
|
|
double d0 = entity.getX() - this.getX();
|
|
double d1 = entity.getZ() - this.getZ();
|