mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
Fix creative no clip with projectile (#683)
* Fix creative no clip with projectile * Don't check again * fix comment --------- Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Creative fly no clip
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||||
index 8ec6f52f58bcc985fdc758a692798a35d6c86378..0d046133ea2b6d47e089cb792cf3bc3abace70ba 100644
|
index 8ec6f52f58bcc985fdc758a692798a35d6c86378..9e6929e84a4422daa3cd4c92ae64187193b6044a 100644
|
||||||
--- a/net/minecraft/world/entity/player/Player.java
|
--- a/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/net/minecraft/world/entity/player/Player.java
|
+++ b/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -287,8 +287,8 @@ public abstract class Player extends LivingEntity {
|
@@ -287,8 +287,8 @@ public abstract class Player extends LivingEntity {
|
||||||
@@ -37,7 +37,7 @@ index 8ec6f52f58bcc985fdc758a692798a35d6c86378..0d046133ea2b6d47e089cb792cf3bc3a
|
|||||||
AABB aabb;
|
AABB aabb;
|
||||||
if (this.isPassenger() && !this.getVehicle().isRemoved()) {
|
if (this.isPassenger() && !this.getVehicle().isRemoved()) {
|
||||||
aabb = this.getBoundingBox().minmax(this.getVehicle().getBoundingBox()).inflate(1.0, 0.0, 1.0);
|
aabb = this.getBoundingBox().minmax(this.getVehicle().getBoundingBox()).inflate(1.0, 0.0, 1.0);
|
||||||
@@ -1949,6 +1949,26 @@ public abstract class Player extends LivingEntity {
|
@@ -1949,9 +1949,29 @@ public abstract class Player extends LivingEntity {
|
||||||
return this.gameMode() == GameType.SPECTATOR;
|
return this.gameMode() == GameType.SPECTATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,11 @@ index 8ec6f52f58bcc985fdc758a692798a35d6c86378..0d046133ea2b6d47e089cb792cf3bc3a
|
|||||||
+
|
+
|
||||||
@Override
|
@Override
|
||||||
public boolean canBeHitByProjectile() {
|
public boolean canBeHitByProjectile() {
|
||||||
return !this.isSpectator() && super.canBeHitByProjectile();
|
- return !this.isSpectator() && super.canBeHitByProjectile();
|
||||||
|
+ return !this.isCreativeFlyOrSpectator() && super.canBeHitByProjectile(); // Leaves - creative no clip
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java
|
diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java
|
||||||
index a46a50d1385897cc7fcf0d6976f0de7e8078d260..593e65ef3a768d4039047e42e666c8382a5d38eb 100644
|
index a46a50d1385897cc7fcf0d6976f0de7e8078d260..593e65ef3a768d4039047e42e666c8382a5d38eb 100644
|
||||||
--- a/net/minecraft/world/item/BlockItem.java
|
--- a/net/minecraft/world/item/BlockItem.java
|
||||||
|
|||||||
Reference in New Issue
Block a user