mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 808bd9198 Add fast alternative constructor for Vector3f (#5339) e849c51da fix #5336 0b25bacfc fix patch 'Remove streams from SensorNearest' (fixes #5330) 4d287e31c Use Adventure for `/version` command feedback, add copy to clipboard click event (#5333) Tuinity Changes: 5b6d8beec: Update Upstream (Paper) 81d5fc1dd: Fix NPE in pickup logic for arrow 19ac6608f: Move region chunk unload & poi unload hook up 38ad5a1bd: Do not run close logic for inventories on chunk load fb75a6f83: Do not allow the server to unload chunks at request of plugins f87cb795f: Make entity tracker use highest range of passengers 71b089f18: Do not run raytrace logic for AIR 09e1a1036: Fix NPE in light exception handler 0ae7c2c23: Dump even more info for ticking entities 2e4a930c4: Store changed positions inside field on light engine 7734ef0a9: Detail player ticking in watchdog dumps
80 lines
4.1 KiB
Diff
80 lines
4.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: jmp <jasonpenilla2@me.com>
|
|
Date: Sat, 20 Feb 2021 14:47:08 -0800
|
|
Subject: [PATCH] Configs for if Wither/Ender Dragon can ride vehicles
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 49a1447bae91294a23ccab27c2809bea0c4c90a3..94af972e115491d0f4394dd290ec2d9d426b8d32 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -2274,7 +2274,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
}
|
|
}
|
|
|
|
- protected boolean n(Entity entity) {
|
|
+ protected boolean n(Entity entity) { // Purpur - canRide
|
|
return !this.isSneaking() && this.j <= 0;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
index fd019a7d8940150ba776e211fe5f7ecb4ffbc89c..9e27d3ccfd6a5ee00cac72c3137189b1be1f81fb 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
@@ -1023,6 +1023,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
|
|
|
@Override
|
|
protected boolean n(Entity entity) {
|
|
+ if (this.world.purpurConfig.enderDragonCanRideVehicles) return this.getRideCooldown() <= 0; // Purpur
|
|
return false;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
|
index 0b6cb7c3c55f4b0951fde643a898bd67a08e08af..b6663cd71e2e0ec0c4dd27095160298f081c4ec5 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
|
@@ -673,6 +673,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
|
|
|
@Override
|
|
protected boolean n(Entity entity) {
|
|
+ if (this.world.purpurConfig.witherCanRideVehicles) return this.getRideCooldown() <= 0; // Purpur
|
|
return false;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 64657c3c9250d8767702a54bb0ee3a23f43da04a..958b0ee8af21e4176e9d35af88294919c509a2c1 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -773,6 +773,7 @@ public class PurpurWorldConfig {
|
|
public boolean enderDragonAlwaysDropsFullExp = false;
|
|
public boolean enderDragonBypassMobGriefing = false;
|
|
public double enderDragonMaxHealth = 200.0D;
|
|
+ public boolean enderDragonCanRideVehicles = false;
|
|
private void enderDragonSettings() {
|
|
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
|
|
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
|
|
@@ -789,6 +790,7 @@ public class PurpurWorldConfig {
|
|
set("mobs.ender_dragon.attributes.max_health", oldValue);
|
|
}
|
|
enderDragonMaxHealth = getDouble("mobs.ender_dragon.attributes.max_health", enderDragonMaxHealth);
|
|
+ enderDragonCanRideVehicles = getBoolean("mobs.ender_dragon.can-ride-vehicles", enderDragonCanRideVehicles);
|
|
}
|
|
|
|
public boolean endermanRidable = false;
|
|
@@ -1731,6 +1733,7 @@ public class PurpurWorldConfig {
|
|
public float witherHealthRegenAmount = 1.0f;
|
|
public int witherHealthRegenDelay = 20;
|
|
public double witherMaxHealth = 300.0D;
|
|
+ public boolean witherCanRideVehicles = false;
|
|
private void witherSettings() {
|
|
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
|
|
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
|
|
@@ -1748,6 +1751,7 @@ public class PurpurWorldConfig {
|
|
set("mobs.wither.attributes.max_health", oldValue);
|
|
}
|
|
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
|
|
+ witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles);
|
|
}
|
|
|
|
public boolean witherSkeletonRidable = false;
|