mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
🎉🎉 1/4 OF THE PATCHES ARE DONE 🎉🎉
This commit is contained in:
@@ -1,19 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
||||||
Date: Sun, 21 Jul 2019 18:01:46 -0500
|
|
||||||
Subject: [PATCH] Players should not cram to death
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
||||||
index e209133b8ae35324c51ed7c8b2703bc1adfd5bf8..d33b8366617cddde687cadb18ed523f47c8608a8 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
||||||
@@ -1402,7 +1402,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isInvulnerable(DamageSource damagesource) {
|
|
||||||
- return super.isInvulnerable(damagesource) || this.H() || this.abilities.isInvulnerable && damagesource == DamageSource.WITHER;
|
|
||||||
+ return super.isInvulnerable(damagesource) || this.H() || damagesource == DamageSource.CRAMMING || this.abilities.isInvulnerable && damagesource == DamageSource.WITHER; // Purpur
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
||||||
Date: Wed, 10 Jul 2019 20:43:05 -0500
|
|
||||||
Subject: [PATCH] Option to toggle milk curing bad omen
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemMilkBucket.java b/src/main/java/net/minecraft/world/item/ItemMilkBucket.java
|
|
||||||
index 6085c5f75bd85cca3462613c18c2e2bf26205d1b..e20452f55c531f76ecaae9ba5d0ea3f8edf96127 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemMilkBucket.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemMilkBucket.java
|
|
||||||
@@ -5,6 +5,8 @@ import net.minecraft.server.level.EntityPlayer;
|
|
||||||
import net.minecraft.stats.StatisticList;
|
|
||||||
import net.minecraft.world.EnumHand;
|
|
||||||
import net.minecraft.world.InteractionResultWrapper;
|
|
||||||
+import net.minecraft.world.effect.MobEffect;
|
|
||||||
+import net.minecraft.world.effect.MobEffects;
|
|
||||||
import net.minecraft.world.entity.EntityLiving;
|
|
||||||
import net.minecraft.world.entity.player.EntityHuman;
|
|
||||||
import net.minecraft.world.level.World;
|
|
||||||
@@ -29,7 +31,9 @@ public class ItemMilkBucket extends Item {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!world.isClientSide) {
|
|
||||||
+ MobEffect badOmen = entityliving.getEffect(MobEffects.BAD_OMEN); // Purpur
|
|
||||||
entityliving.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.MILK); // CraftBukkit
|
|
||||||
+ if (!world.purpurConfig.milkCuresBadOmen && badOmen != null) entityliving.addEffect(badOmen); // Purpur
|
|
||||||
}
|
|
||||||
|
|
||||||
return itemstack.isEmpty() ? new ItemStack(Items.BUCKET) : itemstack;
|
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
||||||
index e2f49196642a325ac24f9245d5576547f20a044f..7274008b7ff43f82574c748bac3566564792d05b 100644
|
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
||||||
@@ -147,8 +147,10 @@ public class PurpurWorldConfig {
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean disableDropsOnCrammingDeath = false;
|
|
||||||
+ public boolean milkCuresBadOmen = true;
|
|
||||||
private void miscGameplayMechanicsSettings() {
|
|
||||||
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
||||||
+ milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int playerSpawnInvulnerableTicks = 60;
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
||||||
Date: Sat, 21 Mar 2020 18:33:05 -0500
|
|
||||||
Subject: [PATCH] End gateway should check if entity can use portal
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
|
||||||
index 855c49164277ca96ca08fb204d851a5ad6789990..d918194e45953764fa3fd286b715714330a60941 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
|
|
||||||
@@ -153,6 +153,7 @@ public class TileEntityEndGateway extends TileEntityEnderPortal implements ITick
|
|
||||||
|
|
||||||
public void b(Entity entity) {
|
|
||||||
if (this.world instanceof WorldServer && !this.f()) {
|
|
||||||
+ if (!entity.canPortal()) return; // Purpur
|
|
||||||
this.c = 100;
|
|
||||||
if (this.exitPortal == null && this.world.getTypeKey() == DimensionManager.THE_END) { // CraftBukkit - work in alternate worlds
|
|
||||||
this.a((WorldServer) this.world);
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
||||||
Date: Fri, 6 Mar 2020 13:37:26 -0600
|
|
||||||
Subject: [PATCH] Fix the dead lagging the server
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
||||||
index c628c27c44884b87f188d81a92ee2eeeefe257a8..5a235642c702e6a0c1971d060b5e5a41ad277b65 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
||||||
@@ -1415,6 +1415,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
|
||||||
this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F;
|
|
||||||
this.lastYaw = this.yaw;
|
|
||||||
this.lastPitch = this.pitch;
|
|
||||||
+ if (valid && !dead) world.getChunkAt((int) Math.floor(this.locX()) >> 4, (int) Math.floor(this.locZ()) >> 4); // CraftBukkit // Paper // Purpur
|
|
||||||
}
|
|
||||||
|
|
||||||
public void f(double d0, double d1, double d2) {
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
|
||||||
index a108c2fa6c4146eba0784f912c3cfa498b86a1e7..928ba00369d9f863e9de3294844faae282804df3 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
|
||||||
@@ -2594,7 +2594,7 @@ public abstract class EntityLiving extends Entity {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- this.movementTick();
|
|
||||||
+ if (!dead) this.movementTick(); // Purpur
|
|
||||||
double d0 = this.locX() - this.lastX;
|
|
||||||
double d1 = this.locZ() - this.lastZ;
|
|
||||||
float f = (float) (d0 * d0 + d1 * d1);
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
||||||
Date: Sat, 4 Apr 2020 03:07:59 -0500
|
|
||||||
Subject: [PATCH] Skip events if there's no listeners
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
|
||||||
index 7e30ec9a08d919d2ae9218ee0a11f77719129f07..b1bfc42b4153b225243ba65e7f937c0314cb39a5 100644
|
|
||||||
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
|
||||||
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
|
|
||||||
@@ -368,6 +368,7 @@ public class CommandDispatcher {
|
|
||||||
}
|
|
||||||
|
|
||||||
private void runSync(EntityPlayer entityplayer, Collection<String> bukkit, RootCommandNode<ICompletionProvider> rootcommandnode) {
|
|
||||||
+ if (PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Purpur - skip all this crap if there's nothing listening
|
|
||||||
// Paper end - Async command map building
|
|
||||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandListenerWrapper>(entityplayer.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
|
||||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
|
||||||
@@ -380,6 +381,7 @@ public class CommandDispatcher {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// CraftBukkit end
|
|
||||||
+ } // Purpur - skip event
|
|
||||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(rootcommandnode));
|
|
||||||
}
|
|
||||||
|
|
||||||
19
patches/server/0048-Players-should-not-cram-to-death.patch
Normal file
19
patches/server/0048-Players-should-not-cram-to-death.patch
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Sun, 21 Jul 2019 18:01:46 -0500
|
||||||
|
Subject: [PATCH] Players should not cram to death
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
index a8f1aa81ec02deb75efef820508ec4be79545be8..70f39fe5f9693762a0a765c58cb52bad354ec138 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
|
@@ -1402,7 +1402,7 @@ public class ServerPlayer extends Player {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isInvulnerableTo(DamageSource damageSource) {
|
||||||
|
- return super.isInvulnerableTo(damageSource) || this.isChangingDimension() || this.getAbilities().invulnerable && damageSource == DamageSource.WITHER;
|
||||||
|
+ return super.isInvulnerableTo(damageSource) || this.isChangingDimension() || damageSource == DamageSource.CRAMMING || this.getAbilities().invulnerable && damageSource == DamageSource.WITHER; // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Wed, 10 Jul 2019 20:43:05 -0500
|
||||||
|
Subject: [PATCH] Option to toggle milk curing bad omen
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/item/MilkBucketItem.java b/src/main/java/net/minecraft/world/item/MilkBucketItem.java
|
||||||
|
index f33977d95b6db473be4f95075ba99caf90ad0220..56dc04d8875971ee9a5d077a695509af74fe2473 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/item/MilkBucketItem.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/item/MilkBucketItem.java
|
||||||
|
@@ -5,6 +5,8 @@ import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.stats.Stats;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.InteractionResultHolder;
|
||||||
|
+import net.minecraft.world.effect.MobEffectInstance;
|
||||||
|
+import net.minecraft.world.effect.MobEffects;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
@@ -31,7 +33,9 @@ public class MilkBucketItem extends Item {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!world.isClientSide) {
|
||||||
|
+ MobEffectInstance badOmen = user.getEffect(MobEffects.BAD_OMEN);
|
||||||
|
user.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.MILK); // CraftBukkit
|
||||||
|
+ if (!world.purpurConfig.milkCuresBadOmen && badOmen != null) user.addEffect(badOmen); // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
return stack.isEmpty() ? new ItemStack(Items.BUCKET) : stack;
|
||||||
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
index ecca777f038f90f5f731777dde2e6cfd39af9bb7..d50fb2d82b1fc19d8d8249b72b80e0b11018e35f 100644
|
||||||
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
|
@@ -147,8 +147,10 @@ public class PurpurWorldConfig {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean disableDropsOnCrammingDeath = false;
|
||||||
|
+ public boolean milkCuresBadOmen = true;
|
||||||
|
private void miscGameplayMechanicsSettings() {
|
||||||
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
||||||
|
+ milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int playerSpawnInvulnerableTicks = 60;
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Sat, 21 Mar 2020 18:33:05 -0500
|
||||||
|
Subject: [PATCH] End gateway should check if entity can use portal
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
|
index 782becb96b6300f14deee360b653dc99c57fdc12..09cbce5aec6eabfa220f7de81b492a180cb8ca1e 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
|
@@ -178,6 +178,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||||
|
|
||||||
|
public static void teleportEntity(Level world, BlockPos pos, BlockState state, Entity entity, TheEndGatewayBlockEntity blockEntity) {
|
||||||
|
if (world instanceof ServerLevel && !blockEntity.isCoolingDown()) {
|
||||||
|
+ if (!entity.canChangeDimensions()) return; // Purpur
|
||||||
|
ServerLevel worldserver = (ServerLevel) world;
|
||||||
|
|
||||||
|
blockEntity.teleportCooldown = 100;
|
||||||
31
patches/server/0051-Fix-the-dead-lagging-the-server.patch
Normal file
31
patches/server/0051-Fix-the-dead-lagging-the-server.patch
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Fri, 6 Mar 2020 13:37:26 -0600
|
||||||
|
Subject: [PATCH] Fix the dead lagging the server
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
index 985d097326ce3df372283217ce24371396307e0e..0583989b98d9a674a4feba30fbbb93e20724d375 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
|
@@ -1549,6 +1549,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||||
|
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
|
||||||
|
this.yRotO = this.getYRot();
|
||||||
|
this.xRotO = this.getXRot();
|
||||||
|
+ if (valid && !this.isRemoved()) level.getChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4); // CraftBukkit // Paper // Purpur
|
||||||
|
}
|
||||||
|
|
||||||
|
public void absMoveTo(double x, double y, double z) {
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
index 3cf3a6ba7bec27ce2ae9b294b0676fdc6c9e38b6..05e66973f19dacdf0609703b8a7c7c302b90e50f 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
@@ -2876,7 +2876,7 @@ public abstract class LivingEntity extends Entity {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- this.aiStep();
|
||||||
|
+ if (!this.isRemoved()) this.aiStep(); // Purpur
|
||||||
|
double d0 = this.getX() - this.xo;
|
||||||
|
double d1 = this.getZ() - this.zo;
|
||||||
|
float f = (float) (d0 * d0 + d1 * d1);
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
|
Date: Sat, 4 Apr 2020 03:07:59 -0500
|
||||||
|
Subject: [PATCH] Skip events if there's no listeners
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
|
index ff4f48f6646060b398e8bf90a078e7fbf84beada..d478627dcd2b6e3d3d95b3fa224a25d44e6bbafb 100644
|
||||||
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||||
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
|
@@ -375,6 +375,7 @@ public class Commands {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void runSync(ServerPlayer entityplayer, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
||||||
|
+ if (PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Purpur - skip all this crap if there's nothing listening
|
||||||
|
// Paper end - Async command map building
|
||||||
|
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(entityplayer.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
||||||
|
PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||||
|
@@ -387,6 +388,7 @@ public class Commands {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
+ } // Purpur - skip event
|
||||||
|
entityplayer.connection.send(new ClientboundCommandsPacket(rootcommandnode));
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Sat, 28 Dec 2019 04:21:54 -0600
|
Date: Sat, 28 Dec 2019 04:21:54 -0600
|
||||||
Subject: [PATCH] Add permission for F3+N debug
|
Subject: [PATCH] Add permission for F3+N debug
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 6c95d8449c9931638c2550dd14eb5a08a980f327..1d7685f5373249a6cc950ebd8a75cda53e5680d6 100644
|
index 3c1e2c69b4661e3085b95f212737f0010711e888..0dfb808a2b47dcd2d2ae34df3f0caa874a6bbe62 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1173,6 +1173,7 @@ public abstract class PlayerList {
|
@@ -1146,6 +1146,7 @@ public abstract class PlayerList {
|
||||||
} else {
|
} else {
|
||||||
b0 = (byte) (24 + i);
|
b0 = (byte) (24 + i);
|
||||||
}
|
}
|
||||||
+ if (b0 < 28 && entityplayer.getBukkitEntity().hasPermission("purpur.debug.f3n")) b0 = 28; // Purpur
|
+ if (b0 < 28 && entityplayer.getBukkitEntity().hasPermission("purpur.debug.f3n")) b0 = 28; // Purpur
|
||||||
|
|
||||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, b0));
|
entityplayer.connection.send(new ClientboundEntityEventPacket(entityplayer, b0));
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,23 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Tue, 14 Jan 2020 19:43:40 -0600
|
Date: Tue, 14 Jan 2020 19:43:40 -0600
|
||||||
Subject: [PATCH] Add wither skeleton takes wither damage option
|
Subject: [PATCH] Add wither skeleton takes wither damage option
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
|
||||||
index 85ba95615963fd6b28c454b25992e7c5b7019ae5..a90ac635ef7aef5289d21f948db7b170b23160d3 100644
|
index 033d6389e4b7d986fc63abd67e325b68a6132824..f290c7b50c48b798697c49c73870045733a37362 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
|
||||||
@@ -122,6 +122,6 @@ public class EntitySkeletonWither extends EntitySkeletonAbstract {
|
@@ -122,6 +122,6 @@ public class WitherSkeleton extends AbstractSkeleton {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean d(MobEffect mobeffect) {
|
public boolean canBeAffected(MobEffectInstance effect) {
|
||||||
- return mobeffect.getMobEffect() == MobEffects.WITHER ? false : super.d(mobeffect);
|
- return effect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(effect);
|
||||||
+ return (world.purpurConfig.witherSkeletonTakesWitherDamage || mobeffect.getMobEffect() != MobEffects.WITHER) && super.d(mobeffect); // Purpur
|
+ return (level.purpurConfig.witherSkeletonTakesWitherDamage || effect.getEffect() != MobEffects.WITHER) && super.canBeAffected(effect); // Purpur
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
index 7274008b7ff43f82574c748bac3566564792d05b..6b65a81bc54cc7c795885cc860346d4a0ed64125 100644
|
index d50fb2d82b1fc19d8d8249b72b80e0b11018e35f..b22f020c24969cf66445570efc1984acb63f03ce 100644
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
@@ -313,6 +313,11 @@ public class PurpurWorldConfig {
|
@@ -313,6 +313,11 @@ public class PurpurWorldConfig {
|
||||||
@@ -1,33 +1,33 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Thu, 26 Mar 2020 19:06:22 -0500
|
Date: Thu, 26 Mar 2020 19:06:22 -0500
|
||||||
Subject: [PATCH] Configurable TPS Catchup
|
Subject: [PATCH] Configurable TPS Catchup
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index c4f0bcc55546e9e01e22d5f4c328165c31e87809..41de6d447226d9a26a49fd0303344adaf7465064 100644
|
index 33c0fad3f0a7283d193eb23afd210c0d912b5c2d..98b7ccbd1ee4d14fde0cdea2c08c432709fa6e56 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1132,7 +1132,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
@@ -1182,7 +1182,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.a(this::canSleepForTick);
|
this.tickServer(this::haveTime);
|
||||||
this.methodProfiler.exitEnter("nextTickWait");
|
this.profiler.popPush("nextTickWait");
|
||||||
this.X = true;
|
this.mayHaveDelayedTasks = true;
|
||||||
- this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
- this.delayedTasksMaxNextTickTime = Math.max(Util.getMillis() + 50L, this.nextTickTime);
|
||||||
+ // Purpur start - tps catchup
|
+ // Purpur start - tps catchup
|
||||||
+ if (net.pl3x.purpur.PurpurConfig.tpsCatchup) {
|
+ if (net.pl3x.purpur.PurpurConfig.tpsCatchup) {
|
||||||
+ this.W = Math.max(SystemUtils.getMonotonicMillis() + 50L, this.nextTick);
|
+ this.delayedTasksMaxNextTickTime = Math.max(Util.getMillis() + 50L, this.nextTickTime);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ this.W = this.nextTick = curTime / 1000000L + 50L;
|
+ this.delayedTasksMaxNextTickTime = this.nextTickTime = curTime / 1000000L + 50L;
|
||||||
+ }
|
+ }
|
||||||
+ // Purpur end - tps catchup
|
+ // Purpur end - tps catchup
|
||||||
this.sleepForTick();
|
this.waitUntilNextTick();
|
||||||
this.methodProfiler.exit();
|
this.profiler.pop();
|
||||||
this.methodProfiler.b();
|
this.endMetricsRecordingTick();
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
index 6d5c2f469e4a7a13a69ac3f7a1dadeac6aabb531..8d27fff773b74014351bfbfeed0197272234be4a 100644
|
index 561c27bc5c23e3761018b8475ad1512d880418fc..3e70e16c5d1e515295efe7cbe6b718e388c01903 100644
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
@@ -190,4 +190,9 @@ public class PurpurConfig {
|
@@ -188,4 +188,9 @@ public class PurpurConfig {
|
||||||
loggerSuppressInitLegacyMaterialError = getBoolean("settings.logger.suppress-init-legacy-material-errors", loggerSuppressInitLegacyMaterialError);
|
loggerSuppressInitLegacyMaterialError = getBoolean("settings.logger.suppress-init-legacy-material-errors", loggerSuppressInitLegacyMaterialError);
|
||||||
loggerSuppressIgnoredAdvancementWarnings = getBoolean("settings.logger.suppress-ignored-advancement-warnings", loggerSuppressIgnoredAdvancementWarnings);
|
loggerSuppressIgnoredAdvancementWarnings = getBoolean("settings.logger.suppress-ignored-advancement-warnings", loggerSuppressIgnoredAdvancementWarnings);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user