mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
100 patches \o/
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Mon, 17 Aug 2020 19:32:05 -0500
|
||||
Subject: [PATCH] Entities can use portals configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b3fe632b18e5dfa18d37ef23a5a62f3a0f9ccf42..e29f56c83e8ce237e9135fabcf2381130a1a790d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3225,7 +3225,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public void handleInsidePortal(BlockPos pos) {
|
||||
if (this.isOnPortalCooldown()) {
|
||||
this.setPortalCooldown();
|
||||
- } else {
|
||||
+ } else if (level().purpurConfig.entitiesCanUsePortals || this instanceof ServerPlayer) { // Purpur
|
||||
if (!this.level().isClientSide && !pos.equals(this.portalEntrancePos)) {
|
||||
this.portalEntrancePos = pos.immutable();
|
||||
}
|
||||
@@ -3919,7 +3919,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
- return !this.isPassenger() && !this.isVehicle() && isAlive() && valid; // Paper - Fix item duplication and teleport issues
|
||||
+ return !this.isPassenger() && !this.isVehicle() && isAlive() && valid && (level().purpurConfig.entitiesCanUsePortals || this instanceof ServerPlayer); // Paper - Fix item duplication and teleport issues // Purpur
|
||||
}
|
||||
|
||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 56f34c0a0f7bc94a90bb1db32f8e30a590a3b38c..1f25407aafba71762a482f0b1982302fed14387f 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -98,6 +98,7 @@ public class PurpurWorldConfig {
|
||||
public boolean useBetterMending = false;
|
||||
public boolean boatEjectPlayersOnLand = false;
|
||||
public boolean disableDropsOnCrammingDeath = false;
|
||||
+ public boolean entitiesCanUsePortals = true;
|
||||
public boolean milkCuresBadOmen = true;
|
||||
public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
||||
public double voidDamageHeight = -64.0D;
|
||||
@@ -106,6 +107,7 @@ public class PurpurWorldConfig {
|
||||
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
|
||||
boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
|
||||
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
||||
+ entitiesCanUsePortals = getBoolean("gameplay-mechanics.entities-can-use-portals", entitiesCanUsePortals);
|
||||
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
||||
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
||||
voidDamageHeight = getDouble("gameplay-mechanics.void-damage-height", voidDamageHeight);
|
||||
@@ -0,0 +1,39 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 13 Oct 2020 20:04:33 -0500
|
||||
Subject: [PATCH] Allow infinite and mending enchantments together
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
||||
index 81cc05c929d612898609965d82454b89cd18f9f5..fa73c3d4b58ad8379963a9866d8f09e1d6abd663 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java
|
||||
@@ -7,6 +7,6 @@ public class ArrowInfiniteEnchantment extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean checkCompatibility(Enchantment other) {
|
||||
- return !(other instanceof MendingEnchantment) && super.checkCompatibility(other);
|
||||
+ return !(other instanceof MendingEnchantment) && super.checkCompatibility(other) || other instanceof MendingEnchantment && org.purpurmc.purpur.PurpurConfig.allowInfinityMending; // Purpur
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 2f68cf2fc064a38ca059504a39d563d95d01643e..6d621a93aaf94927fa6c73e649dcdb8bbbaadd2a 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -246,6 +246,16 @@ public class PurpurConfig {
|
||||
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
|
||||
}
|
||||
|
||||
+ public static boolean allowInfinityMending = false;
|
||||
+ private static void enchantmentSettings() {
|
||||
+ if (version < 5) {
|
||||
+ boolean oldValue = getBoolean("settings.enchantment.allow-infinite-and-mending-together", false);
|
||||
+ set("settings.enchantment.allow-infinity-and-mending-together", oldValue);
|
||||
+ set("settings.enchantment.allow-infinite-and-mending-together", null);
|
||||
+ }
|
||||
+ allowInfinityMending = getBoolean("settings.enchantment.allow-infinity-and-mending-together", allowInfinityMending);
|
||||
+ }
|
||||
+
|
||||
public static boolean endermanShortHeight = false;
|
||||
private static void entitySettings() {
|
||||
endermanShortHeight = getBoolean("settings.entity.enderman.short-height", endermanShortHeight);
|
||||
Reference in New Issue
Block a user