This commit is contained in:
Ben Kerllenevich
2022-06-08 11:09:32 -04:00
parent 93e0af2696
commit 3890a6c579
28 changed files with 149 additions and 166 deletions

View File

@@ -1,7 +1,7 @@
group = org.purpurmc.purpur group = org.purpurmc.purpur
version = 1.19-R0.1-SNAPSHOT version = 1.19-R0.1-SNAPSHOT
paperCommit = af4b5ee4f0aff27c38692c45617004d44d061383 paperCommit = a6bc17b8bb2e74d9e3bf91edbcd10ca0bbe76a47
org.gradle.caching = true org.gradle.caching = true
org.gradle.parallel = true org.gradle.parallel = true

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Implement respawn anchor explosion options
diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
index 491ad2098e982f3c947fcae6f258f0b1aa44a562..39b3d9ce9fbaa7854d81b304f22ee1935c62d3f3 100644 index c2f3d3a09327e7cb7d3167609eb3ce68eadf6443..12b25aec1167620ed7048c0c8631b0b502c20dad 100644
--- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java --- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
@@ -124,7 +124,7 @@ public class RespawnAnchorBlock extends Block { @@ -124,7 +124,7 @@ public class RespawnAnchorBlock extends Block {
@@ -18,7 +18,7 @@ index 491ad2098e982f3c947fcae6f258f0b1aa44a562..39b3d9ce9fbaa7854d81b304f22ee193
public static boolean canSetSpawn(Level world) { public static boolean canSetSpawn(Level world) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 300404c79b0f47219e3a641f75a935cbac9d194a..d6f6cf7e17d9cd5b1398aab8e2b9b6df75fea02e 100644 index 9f4a29c8ea537a4cc733b3658a169f8f5a5334d3..91cc596ef1f5b5ce16c16125520038e2d6a69eaa 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -324,6 +324,22 @@ public class PurpurWorldConfig { @@ -324,6 +324,22 @@ public class PurpurWorldConfig {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add allow water in end world option
diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java
index a3f04f66c66f40068792da3ef0e75e7df102b0e0..e4ee273568502f4cf4d85c5d50d5d63ca4beb12e 100644 index 73f1211470d9626c82c8345037da19aed9db3f23..40c7bf266eccc43faa081ade9402bee5ed886219 100644
--- a/src/main/java/net/minecraft/world/item/BucketItem.java --- a/src/main/java/net/minecraft/world/item/BucketItem.java
+++ b/src/main/java/net/minecraft/world/item/BucketItem.java +++ b/src/main/java/net/minecraft/world/item/BucketItem.java
@@ -166,7 +166,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { @@ -167,7 +167,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
// CraftBukkit end // CraftBukkit end
if (!flag1) { if (!flag1) {
return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper
@@ -17,7 +17,7 @@ index a3f04f66c66f40068792da3ef0e75e7df102b0e0..e4ee273568502f4cf4d85c5d50d5d63c
int i = blockposition.getX(); int i = blockposition.getX();
int j = blockposition.getY(); int j = blockposition.getY();
int k = blockposition.getZ(); int k = blockposition.getZ();
@@ -174,7 +174,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { @@ -175,7 +175,7 @@ public class BucketItem extends Item implements DispensibleContainerItem {
world.playSound(entityhuman, blockposition, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F); world.playSound(entityhuman, blockposition, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
for (int l = 0; l < 8; ++l) { for (int l = 0; l < 8; ++l) {
@@ -27,11 +27,11 @@ index a3f04f66c66f40068792da3ef0e75e7df102b0e0..e4ee273568502f4cf4d85c5d50d5d63c
return true; return true;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 46ed6eeee93c6dc45a43229294d1d161aac5ed24..a0b5ecc76144d3f8291e85ea9b76b9f8bf849f5d 100644 index 1671cb165df030bf5a5a8f8fb0aabeaf6e7ac487..0990d2f68e2fec89295f127fef48c7e6f7cd24c0 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1615,4 +1615,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1446,4 +1446,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return null; return ret;
} }
// Paper end // Paper end
+ +
@@ -46,7 +46,7 @@ index 46ed6eeee93c6dc45a43229294d1d161aac5ed24..a0b5ecc76144d3f8291e85ea9b76b9f8
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java
index 2676cddca511ea775766cec0001269407599df6e..1dacd2e3a9340420c9b4443cc2f8a3c6e889e18e 100644 index 0afadbc8515d448b0ef817f4f0f53b1bb0abde43..c9daa26ab987249f390c64c9e26cd9ce5ea60599 100644
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java --- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
@@ -26,7 +26,7 @@ public class IceBlock extends HalfTransparentBlock { @@ -26,7 +26,7 @@ public class IceBlock extends HalfTransparentBlock {

View File

@@ -5,59 +5,60 @@ Subject: [PATCH] Allow color codes in books
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1c380b6954edb6806a1b3bfc66e1b6a19c0fd219..bab75482e1be354f66ef34144d15e628fb118309 100644 index 7e290e96bdad4301fbc93b9c58b3a4dcb4ad83f6..19a98e6d3c3db6ac7f27adac766d6c8fbe3df491 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1241,13 +1241,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1271,13 +1271,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
itemstack1.setTag(nbttagcompound.copy()); itemstack1.setTag(nbttagcompound.copy());
} }
+ // Purpur start + // Purpur start
+ boolean hasPerm = getCraftPlayer().hasPermission("purpur.book.color.edit") || getCraftPlayer().hasPermission("purpur.book.color.sign"); // Purpur + boolean hasPerm = getCraftPlayer().hasPermission("purpur.book.color.edit") || getCraftPlayer().hasPermission("purpur.book.color.sign");
itemstack1.addTagElement("author", StringTag.valueOf(this.player.getName().getString())); itemstack1.addTagElement("author", StringTag.valueOf(this.player.getName().getString()));
if (this.player.isTextFilteringEnabled()) { if (this.player.isTextFilteringEnabled()) {
- itemstack1.addTagElement("title", StringTag.valueOf(title.getFiltered())); - itemstack1.addTagElement("title", StringTag.valueOf((String) title.filteredOrElse("")));
+ itemstack1.addTagElement("title", StringTag.valueOf(color(title.getFiltered(), hasPerm))); + itemstack1.addTagElement("title", StringTag.valueOf(color(title.filteredOrElse(""), hasPerm)));
} else { } else {
- itemstack1.addTagElement("filtered_title", StringTag.valueOf(title.getFiltered())); - itemstack1.addTagElement("filtered_title", StringTag.valueOf((String) title.filteredOrElse("")));
- itemstack1.addTagElement("title", StringTag.valueOf(title.getRaw())); - itemstack1.addTagElement("title", StringTag.valueOf((String) title.raw()));
+ itemstack1.addTagElement("filtered_title", StringTag.valueOf(color(title.getFiltered(), hasPerm))); + itemstack1.addTagElement("filtered_title", StringTag.valueOf(color(title.filteredOrElse(""), hasPerm)));
+ itemstack1.addTagElement("title", StringTag.valueOf(color(title.getRaw(), hasPerm))); + itemstack1.addTagElement("title", StringTag.valueOf(color(title.raw(), hasPerm)));
} }
+ // Purpur end + // Purpur end
this.updateBookPages(pages, (s) -> { this.updateBookPages(pages, (s) -> {
return Component.Serializer.toJson(new TextComponent(s)); return Component.Serializer.toJson(Component.literal(s));
@@ -1259,10 +1262,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1289,10 +1292,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
private void updateBookPages(List<TextFilter.FilteredText> list, UnaryOperator<String> unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit public void updateBookPages(List<FilteredText<String>> list, UnaryOperator<String> unaryoperator, ItemStack itemstack, int slot, ItemStack handItem) { // CraftBukkit
ListTag nbttaglist = new ListTag(); ListTag nbttaglist = new ListTag();
+ // Purpur start + // Purpur start
+ boolean hasPerm = getCraftPlayer().hasPermission("purpur.book.color.edit"); + boolean hasPerm = getCraftPlayer().hasPermission("purpur.book.color.edit");
if (this.player.isTextFilteringEnabled()) { if (this.player.isTextFilteringEnabled()) {
- Stream<StringTag> stream = list.stream().map((itextfilter_a) -> { // CraftBukkit - decompile error - Stream<StringTag> stream = list.stream().map((filteredtext) -> { // CraftBukkit - decompile error
- return StringTag.valueOf((String) unaryoperator.apply(itextfilter_a.getFiltered())); - return StringTag.valueOf((String) unaryoperator.apply((String) filteredtext.filteredOrElse("")));
+ Stream<StringTag> stream = list.stream().map(s -> color(s.getFiltered(), hasPerm, false)).map((s) -> { // CraftBukkit - decompile error + Stream<StringTag> stream = list.stream().map(s -> color(s.filteredOrElse(""), hasPerm, false)).map((s) -> { // CraftBukkit - decompile error
+ return StringTag.valueOf((String) unaryoperator.apply(s)); + return StringTag.valueOf((String) unaryoperator.apply((String) unaryoperator.apply(s)));
}); });
+ // Purpur end + // Purpur end
Objects.requireNonNull(nbttaglist); Objects.requireNonNull(nbttaglist);
stream.forEach(nbttaglist::add); stream.forEach(nbttaglist::add);
@@ -1272,10 +1278,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1302,11 +1308,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
for (int j = list.size(); i < j; ++i) { for (int j = list.size(); i < j; ++i) {
TextFilter.FilteredText itextfilter_a = (TextFilter.FilteredText) list.get(i); FilteredText<String> filteredtext = (FilteredText) list.get(i);
- String s = itextfilter_a.getRaw(); - String s = (String) filteredtext.raw();
+ String s = color(itextfilter_a.getRaw(), hasPerm, false); + String s = color(filteredtext.raw(), hasPerm, false); // Purpur
nbttaglist.add(StringTag.valueOf((String) unaryoperator.apply(s))); nbttaglist.add(StringTag.valueOf((String) unaryoperator.apply(s)));
- String s1 = itextfilter_a.getFiltered(); if (filteredtext.isFiltered()) {
+ String s1 = color(itextfilter_a.getFiltered(), hasPerm, false); - nbttagcompound.putString(String.valueOf(i), (String) unaryoperator.apply((String) filteredtext.filteredOrElse("")));
+ nbttagcompound.putString(String.valueOf(i), (String) unaryoperator.apply((String) color(filteredtext.filteredOrElse(""), hasPerm, false))); // Purpur
}
}
if (!s.equals(s1)) { @@ -1319,6 +1325,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
nbttagcompound.putString(String.valueOf(i), (String) unaryoperator.apply(s1));
@@ -1291,6 +1297,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent) this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
} }

View File

@@ -5,22 +5,22 @@ Subject: [PATCH] Entity lifespan
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index bab75482e1be354f66ef34144d15e628fb118309..0a7d748e0279a1fd7bb97051732ea1843510087b 100644 index 19a98e6d3c3db6ac7f27adac766d6c8fbe3df491..baa02e8a9ed29854253ec03779ef9e5734d22104 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2531,6 +2531,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2708,6 +2708,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
double d0 = 36.0D; }
if (this.player.distanceToSqr(entity) < 36.0D) { if (entity.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) {
+ if (entity instanceof Mob mob) mob.ticksSinceLastInteraction = 0; // Purpur + if (entity instanceof Mob mob) mob.ticksSinceLastInteraction = 0; // Purpur
packet.dispatch(new ServerboundInteractPacket.Handler() { packet.dispatch(new ServerboundInteractPacket.Handler() {
private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand).copy(); ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand).copy();
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a85924d12d00 100644 index 08d40550c898a63fb4ab37f5ed4807d19a4db13b..7dd8fdb921e8ad0a2d21f67241ed7c07614347a0 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -129,6 +129,7 @@ public abstract class Mob extends LivingEntity { @@ -134,6 +134,7 @@ public abstract class Mob extends LivingEntity {
private BlockPos restrictCenter; private BlockPos restrictCenter;
private float restrictRadius; private float restrictRadius;
@@ -28,7 +28,7 @@ index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a859
public boolean aware = true; // CraftBukkit public boolean aware = true; // CraftBukkit
protected Mob(EntityType<? extends Mob> type, Level world) { protected Mob(EntityType<? extends Mob> type, Level world) {
@@ -285,6 +286,7 @@ public abstract class Mob extends LivingEntity { @@ -288,6 +289,7 @@ public abstract class Mob extends LivingEntity {
entityliving = null; entityliving = null;
} }
} }
@@ -36,7 +36,7 @@ index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a859
this.target = entityliving; this.target = entityliving;
return true; return true;
// CraftBukkit end // CraftBukkit end
@@ -329,9 +331,29 @@ public abstract class Mob extends LivingEntity { @@ -334,9 +336,29 @@ public abstract class Mob extends LivingEntity {
this.playAmbientSound(); this.playAmbientSound();
} }
@@ -66,7 +66,7 @@ index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a859
@Override @Override
protected void playHurtSound(DamageSource source) { protected void playHurtSound(DamageSource source) {
this.resetAmbientSoundTime(); this.resetAmbientSoundTime();
@@ -515,6 +537,7 @@ public abstract class Mob extends LivingEntity { @@ -520,6 +542,7 @@ public abstract class Mob extends LivingEntity {
} }
nbt.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit nbt.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit
@@ -74,7 +74,7 @@ index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a859
} }
@Override @Override
@@ -585,6 +608,11 @@ public abstract class Mob extends LivingEntity { @@ -590,6 +613,11 @@ public abstract class Mob extends LivingEntity {
this.aware = nbt.getBoolean("Bukkit.Aware"); this.aware = nbt.getBoolean("Bukkit.Aware");
} }
// CraftBukkit end // CraftBukkit end
@@ -86,7 +86,7 @@ index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a859
} }
@Override @Override
@@ -1614,6 +1642,7 @@ public abstract class Mob extends LivingEntity { @@ -1628,6 +1656,7 @@ public abstract class Mob extends LivingEntity {
this.setLastHurtMob(target); this.setLastHurtMob(target);
} }
@@ -95,7 +95,7 @@ index e1a13fadcf83e84c89a1bfc6d4e4f13f2299ffa5..8f53dd70d815493148709fbdff29a859
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index d6f6cf7e17d9cd5b1398aab8e2b9b6df75fea02e..d25af1733601d26b6d2173837a0a5948ae01a6d4 100644 index 91cc596ef1f5b5ce16c16125520038e2d6a69eaa..a589ef8be5335bcb5fe8322e21ec407957d0ce63 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -124,6 +124,11 @@ public class PurpurWorldConfig { @@ -124,6 +124,11 @@ public class PurpurWorldConfig {

View File

@@ -5,13 +5,13 @@ Subject: [PATCH] Add option to teleport to spawn if outside world border
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5fa846764b2d253a68efd83ca3ef53ae5bac8d43..aa7cb900de2d3a1c3f420da9ce7c5dba314f653f 100644 index 317ce5fde32fd4869b41dfabfb5bdc7366f7d517..03faa935d23b53b4749469b0b9b8e8ea2fe83c82 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2545,4 +2545,26 @@ public class ServerPlayer extends Player { @@ -2582,4 +2582,26 @@ public class ServerPlayer extends Player {
// CraftBukkit end // CraftBukkit end
public final int getViewDistance() { throw new UnsupportedOperationException("Use PlayerChunkLoader"); } // Paper - placeholder public final int getViewDistance() { return this.getLevel().getChunkSource().chunkMap.viewDistance - 1; } // Paper - placeholder
+ +
+ // Purpur start + // Purpur start
+ public void teleport(Location to) { + public void teleport(Location to) {
@@ -36,10 +36,10 @@ index 5fa846764b2d253a68efd83ca3ef53ae5bac8d43..aa7cb900de2d3a1c3f420da9ce7c5dba
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 68de664f6d8eee93b963425969c278edde326757..a358f68c893e95013a21aecd83d44fcab26e30e4 100644 index 4d7c18796cde467166951374379becc231bbc88c..ab01fd7486d8d068d645a033b5d28f70a313a92c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -45,6 +45,7 @@ import net.minecraft.network.syncher.EntityDataAccessor; @@ -44,6 +44,7 @@ import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
@@ -47,7 +47,7 @@ index 68de664f6d8eee93b963425969c278edde326757..a358f68c893e95013a21aecd83d44fca
import net.minecraft.server.level.ServerChunkCache; import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
@@ -409,6 +410,7 @@ public abstract class LivingEntity extends Entity { @@ -413,6 +414,7 @@ public abstract class LivingEntity extends Entity {
double d1 = this.level.getWorldBorder().getDamagePerBlock(); double d1 = this.level.getWorldBorder().getDamagePerBlock();
if (d1 > 0.0D) { if (d1 > 0.0D) {
@@ -56,7 +56,7 @@ index 68de664f6d8eee93b963425969c278edde326757..a358f68c893e95013a21aecd83d44fca
} }
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index d25af1733601d26b6d2173837a0a5948ae01a6d4..a9a3f13a64cd7d9152f65285a5f5f48f5a31b7a3 100644 index a589ef8be5335bcb5fe8322e21ec407957d0ce63..a28d11edcf87f3e01477e8d7aa70b8a822b76fa6 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -243,6 +243,7 @@ public class PurpurWorldConfig { @@ -243,6 +243,7 @@ public class PurpurWorldConfig {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Squid EAR immunity
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index a9a3f13a64cd7d9152f65285a5f5f48f5a31b7a3..e480e61419a9b83e98fcd0ba8a949c20a241c949 100644 index a28d11edcf87f3e01477e8d7aa70b8a822b76fa6..ecb950c9e43e952b95d47e49c5c4d64199e49398 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1410,6 +1410,7 @@ public class PurpurWorldConfig { @@ -1410,6 +1410,7 @@ public class PurpurWorldConfig {
@@ -25,7 +25,7 @@ index a9a3f13a64cd7d9152f65285a5f5f48f5a31b7a3..e480e61419a9b83e98fcd0ba8a949c20
public boolean spiderRidable = false; public boolean spiderRidable = false;
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 06467a5af27a9afeba383c4f9704f5106827af97..3b67e9a9e0a0dc8ca19ea7b20c676fae3cf64a11 100644 index 1ae88964fc3c05493516278d150537fd6699df2d..222cde68f466156eecdb2f3bfbed46e26800d3dd 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -15,6 +15,7 @@ import net.minecraft.world.entity.ambient.AmbientCreature; @@ -15,6 +15,7 @@ import net.minecraft.world.entity.ambient.AmbientCreature;
@@ -36,7 +36,7 @@ index 06467a5af27a9afeba383c4f9704f5106827af97..3b67e9a9e0a0dc8ca19ea7b20c676fae
import net.minecraft.world.entity.animal.WaterAnimal; import net.minecraft.world.entity.animal.WaterAnimal;
import net.minecraft.world.entity.animal.horse.Llama; import net.minecraft.world.entity.animal.horse.Llama;
import net.minecraft.world.entity.boss.EnderDragonPart; import net.minecraft.world.entity.boss.EnderDragonPart;
@@ -391,6 +392,7 @@ public class ActivationRange @@ -372,6 +373,7 @@ public class ActivationRange
*/ */
public static boolean checkIfActive(Entity entity) public static boolean checkIfActive(Entity entity)
{ {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Phantoms burn in light
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index 843c5bdc58a09aadab8d90f254e61a5cebe6388f..e5305246287739232d6b7873a17884bffdf03514 100644 index 6d8847b2019c87f2cf152a0939753ed604bf14e1..056a7487e265182f7b50eba30aa6adaa4ba39eba 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java --- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -50,6 +50,7 @@ public class Phantom extends FlyingMob implements Enemy { @@ -50,6 +50,7 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -53,7 +53,7 @@ index 843c5bdc58a09aadab8d90f254e61a5cebe6388f..e5305246287739232d6b7873a17884bf
list.sort(Comparator.comparing((Entity e) -> { return e.getY(); }).reversed()); // CraftBukkit - decompile error list.sort(Comparator.comparing((Entity e) -> { return e.getY(); }).reversed()); // CraftBukkit - decompile error
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e480e61419a9b83e98fcd0ba8a949c20a241c949..249368f0808871eafa8b3dfd48f631a8d55a74f0 100644 index ecb950c9e43e952b95d47e49c5c4d64199e49398..02c170ca3cba59ad673cfa4f976ca6927067499c 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1085,6 +1085,9 @@ public class PurpurWorldConfig { @@ -1085,6 +1085,9 @@ public class PurpurWorldConfig {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable villager breeding
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index 2c99eda984bd147e5ce7d32dd11b818d8b8561aa..094fd4289bc42df6af6740acacd4f51ab6b668e0 100644 index 6dd8e9c7d1999552b4b39a038cd733d695469e99..5e82e82ab3afd8dba8588d84a02f4a6d626db51a 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -774,7 +774,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -767,7 +767,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override @Override
public boolean canBreed() { public boolean canBreed() {
@@ -18,21 +18,21 @@ index 2c99eda984bd147e5ce7d32dd11b818d8b8561aa..094fd4289bc42df6af6740acacd4f51a
private boolean hungry() { private boolean hungry() {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 249368f0808871eafa8b3dfd48f631a8d55a74f0..2784edf4fb34f90e46ca693427e8861e15fb97bc 100644 index 02c170ca3cba59ad673cfa4f976ca6927067499c..9b5a45643f288cab8725d1d9050b9d97ea9f97ae 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1563,6 +1563,7 @@ public class PurpurWorldConfig { @@ -1561,6 +1561,7 @@ public class PurpurWorldConfig {
public boolean villagerUseBrainTicksOnlyWhenLagging = true;
public boolean villagerFollowEmeraldBlock = false;
public boolean villagerCanBeLeashed = false; public boolean villagerCanBeLeashed = false;
public int villagerSpawnIronGolemRadius = 0;
public int villagerSpawnIronGolemLimit = 0;
+ public boolean villagerCanBreed = true; + public boolean villagerCanBreed = true;
private void villagerSettings() { private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable); villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater); villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1579,6 +1580,7 @@ public class PurpurWorldConfig { @@ -1575,6 +1576,7 @@ public class PurpurWorldConfig {
villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
villagerFollowEmeraldBlock = getBoolean("mobs.villager.follow-emerald-blocks", villagerFollowEmeraldBlock);
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed); villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
villagerSpawnIronGolemRadius = getInt("mobs.villager.spawn-iron-golem.radius", villagerSpawnIronGolemRadius);
villagerSpawnIronGolemLimit = getInt("mobs.villager.spawn-iron-golem.limit", villagerSpawnIronGolemLimit);
+ villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed); + villagerCanBreed = getBoolean("mobs.villager.can-breed", villagerCanBreed);
} }

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Redstone deactivates spawners
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 03726227fdd60e9cf77213d50184abff438e01ef..76979991d2ded84161e8a0fc72cbb2d2c3c6c55e 100644 index 51463da77739859aaa6fbc018345659afe16c2ee..740f70c1bd58b4d4c7c8a02b397aba5533ec647a 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -52,6 +52,7 @@ public abstract class BaseSpawner { @@ -52,6 +52,7 @@ public abstract class BaseSpawner {
@@ -17,7 +17,7 @@ index 03726227fdd60e9cf77213d50184abff438e01ef..76979991d2ded84161e8a0fc72cbb2d2
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index ce4d44d130ee3ed5b6925090ffa2b2d8da9c221b..4e7edce9874038b375a92a4e01d9233ecc7a10c1 100644 index 9b5a45643f288cab8725d1d9050b9d97ea9f97ae..c568340555c9c0c45432dea6dbc29adac98c3d92 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -352,6 +352,11 @@ public class PurpurWorldConfig { @@ -352,6 +352,11 @@ public class PurpurWorldConfig {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Totems work in inventory
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ccecf12fa8c5a498f8a7ced421e1084c8f04c194..e39d333c10d74be81da173622b5e033bfde9cf3a 100644 index ab01fd7486d8d068d645a033b5d28f70a313a92c..5ba6377ebf77b78d0bd15c01b302ef33ffdd4200 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1521,6 +1521,19 @@ public abstract class LivingEntity extends Entity { @@ -1537,6 +1537,19 @@ public abstract class LivingEntity extends Entity {
} }
} }
@@ -29,7 +29,7 @@ index ccecf12fa8c5a498f8a7ced421e1084c8f04c194..e39d333c10d74be81da173622b5e033b
event.setCancelled(itemstack == null); event.setCancelled(itemstack == null);
this.level.getCraftServer().getPluginManager().callEvent(event); this.level.getCraftServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 32035757b505e32a09f887e7cf0943764e38c63b..7159461ec4b4563d3fd15c12f7900b70f643592f 100644 index c568340555c9c0c45432dea6dbc29adac98c3d92..bce43c499ef75131ae637ae8d089517f34602357 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -244,6 +244,7 @@ public class PurpurWorldConfig { @@ -244,6 +244,7 @@ public class PurpurWorldConfig {

View File

@@ -5,35 +5,27 @@ Subject: [PATCH] Add vindicator johnny spawn chance
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
index ff62f5ed29a826c4dd53eb6fe04f5aa27de62619..acd4e282841708d7ef0145757899e355a6410a4a 100644 index 656dd2b01250c749db0acfa41992210709f5dcd3..015d0f64e37003907a5ae4e9f5ca11dbe4d7b81a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java --- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java
@@ -7,6 +7,7 @@ import java.util.function.Predicate; @@ -154,6 +154,12 @@ public class Vindicator extends AbstractIllager {
import javax.annotation.Nullable; RandomSource randomSource = world.getRandom();
import net.minecraft.nbt.CompoundTag; this.populateDefaultEquipmentSlots(randomSource, difficulty);
import net.minecraft.network.chat.Component; this.populateDefaultEquipmentEnchantments(randomSource, difficulty);
+import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
@@ -151,6 +152,12 @@ public class Vindicator extends AbstractIllager {
((GroundPathNavigation) this.getNavigation()).setCanOpenDoors(true);
this.populateDefaultEquipmentSlots(difficulty);
this.populateDefaultEquipmentEnchantments(difficulty);
+ // Purpur start + // Purpur start
+ Level level = world.getMinecraftWorld(); + Level level = world.getMinecraftWorld();
+ if (level.purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level.purpurConfig.vindicatorJohnnySpawnChance) { + if (level.purpurConfig.vindicatorJohnnySpawnChance > 0D && random.nextDouble() <= level.purpurConfig.vindicatorJohnnySpawnChance) {
+ setCustomName(new TranslatableComponent("Johnny")); + setCustomName(new TranslatableComponent("Johnny"));
+ } + }
+ // Purpur end + // Purpur end
return groupdataentity1; return spawnGroupData;
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 7159461ec4b4563d3fd15c12f7900b70f643592f..48f8f0447d4612c15b3a9c53b74c593a608bc352 100644 index bce43c499ef75131ae637ae8d089517f34602357..59597a70f60ccad348dfe56985358cbae8c558e7 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1594,6 +1594,7 @@ public class PurpurWorldConfig { @@ -1590,6 +1590,7 @@ public class PurpurWorldConfig {
public boolean vindicatorRidableInWater = false; public boolean vindicatorRidableInWater = false;
public boolean vindicatorControllable = true; public boolean vindicatorControllable = true;
public double vindicatorMaxHealth = 24.0D; public double vindicatorMaxHealth = 24.0D;
@@ -41,7 +33,7 @@ index 7159461ec4b4563d3fd15c12f7900b70f643592f..48f8f0447d4612c15b3a9c53b74c593a
private void vindicatorSettings() { private void vindicatorSettings() {
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable); vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater); vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
@@ -1604,6 +1605,7 @@ public class PurpurWorldConfig { @@ -1600,6 +1601,7 @@ public class PurpurWorldConfig {
set("mobs.vindicator.attributes.max_health", oldValue); set("mobs.vindicator.attributes.max_health", oldValue);
} }
vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max_health", vindicatorMaxHealth); vindicatorMaxHealth = getDouble("mobs.vindicator.attributes.max_health", vindicatorMaxHealth);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add option to disable certain block updates
diff --git a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java
index 2c29c125edac43cdf13da8eababe60fb7a87df15..28c84432d0125dad414e623a317f665bdf7f438f 100644 index a6c25647fb37f59307de0d390f8e8cf55504d7d3..52aae8bd4023b2bb48f12983f54b20fa3c95d403 100644
--- a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java --- a/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ChorusPlantBlock.java
@@ -21,6 +21,7 @@ public class ChorusPlantBlock extends PipeBlock { @@ -21,6 +21,7 @@ public class ChorusPlantBlock extends PipeBlock {
@@ -99,10 +99,10 @@ index 3c6d97b51c6fec130b80e5965afa2c49d48843c9..b456cb8efd8f0be8a6860c82462ce9bd
@Override @Override
diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java
index 0e106bcc1f882877a5e444a2621466c6e4696d42..3992a8dc75ece5f32acde7e229ca1ab5c6bdf70f 100644 index c14eb4f7decdbcd6176d3bff95d595a947d4ec95..58e8905a4b98e2e1ee372b99bdc3de9815063ac9 100644
--- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java --- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java
@@ -34,11 +34,13 @@ public class NoteBlock extends Block { @@ -37,11 +37,13 @@ public class NoteBlock extends Block {
@Override @Override
public BlockState getStateForPlacement(BlockPlaceContext ctx) { public BlockState getStateForPlacement(BlockPlaceContext ctx) {
@@ -116,7 +116,7 @@ index 0e106bcc1f882877a5e444a2621466c6e4696d42..3992a8dc75ece5f32acde7e229ca1ab5
return direction == Direction.DOWN ? (BlockState) state.setValue(NoteBlock.INSTRUMENT, NoteBlockInstrument.byState(neighborState)) : super.updateShape(state, direction, neighborState, world, pos, neighborPos); return direction == Direction.DOWN ? (BlockState) state.setValue(NoteBlock.INSTRUMENT, NoteBlockInstrument.byState(neighborState)) : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
} }
@@ -52,6 +54,7 @@ public class NoteBlock extends Block { @@ -55,6 +57,7 @@ public class NoteBlock extends Block {
state = world.getBlockState(pos); // CraftBukkit - SPIGOT-5617: update in case changed in event state = world.getBlockState(pos); // CraftBukkit - SPIGOT-5617: update in case changed in event
} }

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Dispensers place anvils option
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 4b151444f8d7ed26dc87c9ae55fa8a14a8d84ed7..93f7c056085bbc269ebc764c99fef1a3d2d96d49 100644 index 3d2b5f040715a0e4fac0e6786bd11a4d715330ce..9aef3cfd930594c1a2c92a02a18133d0eab2279c 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -50,6 +50,7 @@ import net.minecraft.world.item.SpawnEggItem; @@ -51,6 +51,7 @@ import net.minecraft.world.item.SpawnEggItem;
import net.minecraft.world.item.alchemy.PotionUtils; import net.minecraft.world.item.alchemy.PotionUtils;
import net.minecraft.world.item.alchemy.Potions; import net.minecraft.world.item.alchemy.Potions;
import net.minecraft.world.level.Level; import net.minecraft.world.level.Level;
@@ -16,7 +16,7 @@ index 4b151444f8d7ed26dc87c9ae55fa8a14a8d84ed7..93f7c056085bbc269ebc764c99fef1a3
import net.minecraft.world.level.block.BaseFireBlock; import net.minecraft.world.level.block.BaseFireBlock;
import net.minecraft.world.level.block.BeehiveBlock; import net.minecraft.world.level.block.BeehiveBlock;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
@@ -1106,6 +1107,23 @@ public interface DispenseItemBehavior { @@ -1145,6 +1146,23 @@ public interface DispenseItemBehavior {
} }
} }
}); });
@@ -41,7 +41,7 @@ index 4b151444f8d7ed26dc87c9ae55fa8a14a8d84ed7..93f7c056085bbc269ebc764c99fef1a3
static void setEntityPokingOutOfBlock(BlockSource pointer, Entity entity, Direction direction) { static void setEntityPokingOutOfBlock(BlockSource pointer, Entity entity, Direction direction) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 48f8f0447d4612c15b3a9c53b74c593a608bc352..e6b649f80931a70e40d1949d964df52ef6517cef 100644 index 59597a70f60ccad348dfe56985358cbae8c558e7..85b4f00796521d007a1b741c5dcc47a6e359d71a 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -313,8 +313,10 @@ public class PurpurWorldConfig { @@ -313,8 +313,10 @@ public class PurpurWorldConfig {

View File

@@ -5,20 +5,10 @@ Subject: [PATCH] Allow anvil colors
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
index a88efd9b435349ae00c4152f09d87ebf4f724659..c26b3f3aec680a92c1361f47b1aa3968f31ffaa5 100644 index c1ed57bae737fca803c2dd8666207dbffc6758c3..10cd589e427f847936f29e33edee3923a4661210 100644
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
@@ -3,6 +3,9 @@ package net.minecraft.world.inventory; @@ -279,6 +279,17 @@ public class AnvilMenu extends ItemCombinerMenu {
import com.mojang.logging.LogUtils;
import java.util.Iterator;
import java.util.Map;
+
+import io.papermc.paper.adventure.PaperAdventure;
+import net.kyori.adventure.text.format.TextDecoration;
import net.minecraft.nbt.IntTag;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.protocol.game.ClientboundContainerSetDataPacket;
@@ -276,6 +279,17 @@ public class AnvilMenu extends ItemCombinerMenu {
} else if (!this.itemName.equals(itemstack.getHoverName().getString())) { } else if (!this.itemName.equals(itemstack.getHoverName().getString())) {
b1 = 1; b1 = 1;
i += b1; i += b1;
@@ -26,18 +16,18 @@ index a88efd9b435349ae00c4152f09d87ebf4f724659..c26b3f3aec680a92c1361f47b1aa3968
+ if (player != null && player.level.purpurConfig.anvilAllowColors && player.getBukkitEntity().hasPermission("purpur.anvil.color")) { + if (player != null && player.level.purpurConfig.anvilAllowColors && player.getBukkitEntity().hasPermission("purpur.anvil.color")) {
+ final net.kyori.adventure.text.Component renameTextComponent; + final net.kyori.adventure.text.Component renameTextComponent;
+ if (itemName.startsWith("&r") && player.getBukkitEntity().hasPermission("purpur.anvil.remove_italics")) { + if (itemName.startsWith("&r") && player.getBukkitEntity().hasPermission("purpur.anvil.remove_italics")) {
+ renameTextComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().deserialize(itemName.substring(2)).decoration(TextDecoration.ITALIC, false); + renameTextComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().deserialize(itemName.substring(2)).decoration(net.kyori.adventure.text.format.TextDecoration.ITALIC, false);
+ } else { + } else {
+ renameTextComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().deserialize(itemName); + renameTextComponent = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacyAmpersand().deserialize(itemName);
+ } + }
+ itemstack1.setHoverName(PaperAdventure.asVanilla(renameTextComponent)); + itemstack1.setHoverName(io.papermc.paper.adventure.PaperAdventure.asVanilla(renameTextComponent));
+ } else + } else
+ // Purpur end + // Purpur end
itemstack1.setHoverName(new TextComponent(this.itemName)); itemstack1.setHoverName(Component.literal(this.itemName));
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e6b649f80931a70e40d1949d964df52ef6517cef..6319654f2560a1d035d13b2a1ada30c91c4d9cdb 100644 index 85b4f00796521d007a1b741c5dcc47a6e359d71a..4d474c2d2f6c1a7a28daba2d9886cf6e5e12b343 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -296,6 +296,11 @@ public class PurpurWorldConfig { @@ -296,6 +296,11 @@ public class PurpurWorldConfig {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add option to disable dolphin treasure searching
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
index 5dfc40bd19c556a5bc481ab9bdcbd19887e7e5c9..4970823d6bed593a646b3b074fcaf53fd4afadb2 100644 index b3e53f922a424a407adb0111c29c8be6f89f8115..b52245d881186f91174819326abb0cf98acb0997 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java --- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java +++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
@@ -486,6 +486,7 @@ public class Dolphin extends WaterAnimal { @@ -486,6 +486,7 @@ public class Dolphin extends WaterAnimal {
@@ -17,7 +17,7 @@ index 5dfc40bd19c556a5bc481ab9bdcbd19887e7e5c9..4970823d6bed593a646b3b074fcaf53f
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 6319654f2560a1d035d13b2a1ada30c91c4d9cdb..8d31e240e3d275e228c6d8c1107a609c3bf04729 100644 index 4d474c2d2f6c1a7a28daba2d9886cf6e5e12b343..83b2b1d04b3df0eaa3ecdca5186f7b36daaec007 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -575,6 +575,7 @@ public class PurpurWorldConfig { @@ -575,6 +575,7 @@ public class PurpurWorldConfig {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Short enderman height
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index e26faaf10a9250d1ab3cd5c3ed98702112b6dd29..262ed82130b3ee8b110698e31f3a4bc78dac1ec1 100644 index f2a59e99e35e5c704bb8399e48d92aebcd17ed35..ad97065699d25567b63811b6e668b32186f828d4 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java --- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -282,7 +282,8 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> { @@ -291,7 +291,8 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
private Component description; private Component description;
@Nullable @Nullable
private ResourceLocation lootTable; private ResourceLocation lootTable;
@@ -19,10 +19,10 @@ index e26faaf10a9250d1ab3cd5c3ed98702112b6dd29..262ed82130b3ee8b110698e31f3a4bc7
private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder type) { // CraftBukkit - decompile error private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder type) { // CraftBukkit - decompile error
return (EntityType) Registry.register(Registry.ENTITY_TYPE, id, (EntityType<T>) type.build(id)); // CraftBukkit - decompile error return (EntityType) Registry.register(Registry.ENTITY_TYPE, id, (EntityType<T>) type.build(id)); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index b5fce127d74ac5958758bfa39551e3e1f33cbc85..c4f5d033e381aa501fd689a297fb40c713f12c2a 100644 index da2f01f44ac24a3b3886436aa7356ebc315f5ed6..d058bafa0b9dff551d5f26f18e1652df250a8de4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -409,6 +409,7 @@ public class EnderMan extends Monster implements NeutralMob { @@ -407,6 +407,7 @@ public class EnderMan extends Monster implements NeutralMob {
if (this.isInvulnerableTo(source)) { if (this.isInvulnerableTo(source)) {
return false; return false;
} else if (getRider() != null && this.isControllable()) { return super.hurt(source, amount); // Purpur - no teleporting on damage } else if (getRider() != null && this.isControllable()) { return super.hurt(source, amount); // Purpur - no teleporting on damage

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Stop squids floating on top of water
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1e9fa0c362d8d2ea6c8da68f266a54dcf35782fb..57cc2597d6e3ed5c00b7befe13409b9b359e9023 100644 index 04e0103c8345741d459a7acea4d30962bbcc0bbd..ecc13aa9328eb02114f7b0db8ff2ca38dee2c608 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3962,6 +3962,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3979,6 +3979,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.yRotO = this.getYRot(); this.yRotO = this.getYRot();
} }
@@ -19,7 +19,7 @@ index 1e9fa0c362d8d2ea6c8da68f266a54dcf35782fb..57cc2597d6e3ed5c00b7befe13409b9b
+ // Purpur end + // Purpur end
+ +
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) { public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
if (false && this.touchingUnloadedChunk()) { // Pufferfish - cost of a lookup here is the same cost as below, so skip if (this.touchingUnloadedChunk()) {
return false; return false;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
index 99248a9e2769a573839b199150da312d33344f95..709aaa9dc834d91219ce1087d8f89ef5bf3d915c 100644 index 99248a9e2769a573839b199150da312d33344f95..709aaa9dc834d91219ce1087d8f89ef5bf3d915c 100644
@@ -54,7 +54,7 @@ index 68cc6f2a78a06293a29317fda72ab3ee79b3533a..cfb2e46b34b2982d6724f18214557fc8
+ // Purpur + // Purpur
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 8d31e240e3d275e228c6d8c1107a609c3bf04729..b631a21ee4eb646d86532dd11784bd7c705eb3ee 100644 index 83b2b1d04b3df0eaa3ecdca5186f7b36daaec007..68451f2c85e723dcb4835b4c0aeaffaf2f79bc3a 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1433,6 +1433,7 @@ public class PurpurWorldConfig { @@ -1433,6 +1433,7 @@ public class PurpurWorldConfig {

View File

@@ -5,10 +5,10 @@ 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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 57cc2597d6e3ed5c00b7befe13409b9b359e9023..3ee9202676d3add9054fbd72bbbf1e44afd2597d 100644 index ecc13aa9328eb02114f7b0db8ff2ca38dee2c608..1b2edc78ca8b0c734d4fb1e9dfa369c1c1abede6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2785,7 +2785,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -2799,7 +2799,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public void handleInsidePortal(BlockPos pos) { public void handleInsidePortal(BlockPos pos) {
if (this.isOnPortalCooldown()) { if (this.isOnPortalCooldown()) {
this.setPortalCooldown(); this.setPortalCooldown();
@@ -17,7 +17,7 @@ index 57cc2597d6e3ed5c00b7befe13409b9b359e9023..3ee9202676d3add9054fbd72bbbf1e44
if (!this.level.isClientSide && !pos.equals(this.portalEntrancePos)) { if (!this.level.isClientSide && !pos.equals(this.portalEntrancePos)) {
this.portalEntrancePos = pos.immutable(); this.portalEntrancePos = pos.immutable();
} }
@@ -3451,7 +3451,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -3464,7 +3464,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
} }
public boolean canChangeDimensions() { public boolean canChangeDimensions() {
@@ -27,7 +27,7 @@ index 57cc2597d6e3ed5c00b7befe13409b9b359e9023..3ee9202676d3add9054fbd72bbbf1e44
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { 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 diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b631a21ee4eb646d86532dd11784bd7c705eb3ee..f6d4be9b81b82e7ae46f7694b824a06b3f6272ed 100644 index 68451f2c85e723dcb4835b4c0aeaffaf2f79bc3a..c3546d8e36fecfd5d6c6c767de30fc6634a72416 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -97,6 +97,7 @@ public class PurpurWorldConfig { @@ -97,6 +97,7 @@ public class PurpurWorldConfig {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] LivingEntity#broadcastItemBreak
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1dcfe129ec3633de67404ab5ab72cdcee31d3d9d..eb61eab2b7be4f99b827a0e206db23a858fa2119 100644 index 800192122a596c672bdffbd5ac7c62543d6f45ed..9ce256d6e1c3d502888ebe79ae672f2b4b00652e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -931,5 +931,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -931,5 +931,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Customizable wither health and healing
Adds the ability to customize the health of the wither, as well as the amount that it heals, and how often. Adds the ability to customize the health of the wither, as well as the amount that it heals, and how often.
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 5fdbbf376947e4efd85f02ae978c56de62a0610b..a8698975b368b27c0bb1cab4e0b83d69e773fc6b 100644 index a15fb55ae69fa7255086df336ed8daf016a46a87..b1d0ddcdd7da03d62ef952931ace03c2a0e0bd93 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -519,8 +519,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -519,8 +519,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@@ -23,10 +23,10 @@ index 5fdbbf376947e4efd85f02ae978c56de62a0610b..a8698975b368b27c0bb1cab4e0b83d69
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth()); this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index f6d4be9b81b82e7ae46f7694b824a06b3f6272ed..2a226f91d7afe0489adb4dbe94d69e6fc8e6e4e4 100644 index c3546d8e36fecfd5d6c6c767de30fc6634a72416..7a7bd0fbac184b10dfd2d4a1b210c7c40efc4437 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1662,6 +1662,8 @@ public class PurpurWorldConfig { @@ -1658,6 +1658,8 @@ public class PurpurWorldConfig {
public boolean witherControllable = true; public boolean witherControllable = true;
public double witherMaxY = 320D; public double witherMaxY = 320D;
public double witherMaxHealth = 300.0D; public double witherMaxHealth = 300.0D;
@@ -35,7 +35,7 @@ index f6d4be9b81b82e7ae46f7694b824a06b3f6272ed..2a226f91d7afe0489adb4dbe94d69e6f
private void witherSettings() { private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable); witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater); witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1677,6 +1679,8 @@ public class PurpurWorldConfig { @@ -1673,6 +1675,8 @@ public class PurpurWorldConfig {
set("mobs.wither.attributes.max_health", oldValue); set("mobs.wither.attributes.max_health", oldValue);
} }
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth); witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Allow toggling special MobSpawners per world
In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this. In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ac233f1f6a645a927631efdda15aee91040705d8..40d5196cbb3567d642925cd7f0d2924884c46347 100644 index cc825b8b079d1b18e667159437193d394d0a1b9e..93ac8c5c9594f95a2b9a399f0a4f3f0377ef8753 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -498,7 +498,24 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -503,7 +503,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.dragonParts = new Int2ObjectOpenHashMap(); this.dragonParts = new Int2ObjectOpenHashMap();
this.tickTime = flag1; this.tickTime = flag1;
this.server = minecraftserver; this.server = minecraftserver;
@@ -32,22 +32,22 @@ index ac233f1f6a645a927631efdda15aee91040705d8..40d5196cbb3567d642925cd7f0d29248
+ customSpawners.add(new net.minecraft.world.entity.npc.WanderingTraderSpawner(iworlddataserver)); + customSpawners.add(new net.minecraft.world.entity.npc.WanderingTraderSpawner(iworlddataserver));
+ } + }
+ // Purpur end + // Purpur end
this.serverLevelData = iworlddataserver;
ChunkGenerator chunkgenerator = worlddimension.generator();
// CraftBukkit start // CraftBukkit start
this.serverLevelData = (PrimaryLevelData) iworlddataserver;
this.serverLevelData.setWorld(this);
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
index 4e478c30714a8e4cd95f02e73615d166836d1e4b..17fc1e07069546cdd3a7bd35e900e4c35ed43fd5 100644 index 4ee71a58aff50caf5bd715a4cbe50b134b52c9ff..7cbd1f1409c1b071007629cd349c1d928aad4887 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
@@ -5,6 +5,7 @@ import java.util.Optional; @@ -4,6 +4,7 @@ import java.util.Iterator;
import java.util.Random; import java.util.Optional;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction; +import net.minecraft.core.Direction;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component; import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
@@ -160,7 +161,17 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -162,7 +163,17 @@ public class WanderingTraderSpawner implements CustomSpawner {
int k = pos.getX() + this.random.nextInt(range * 2) - range; int k = pos.getX() + this.random.nextInt(range * 2) - range;
int l = pos.getZ() + this.random.nextInt(range * 2) - range; int l = pos.getZ() + this.random.nextInt(range * 2) - range;
int i1 = world.getHeight(Heightmap.Types.WORLD_SURFACE, k, l); int i1 = world.getHeight(Heightmap.Types.WORLD_SURFACE, k, l);
@@ -67,7 +67,7 @@ index 4e478c30714a8e4cd95f02e73615d166836d1e4b..17fc1e07069546cdd3a7bd35e900e4c3
if (NaturalSpawner.isSpawnPositionOk(SpawnPlacements.Type.ON_GROUND, world, blockposition2, EntityType.WANDERING_TRADER)) { if (NaturalSpawner.isSpawnPositionOk(SpawnPlacements.Type.ON_GROUND, world, blockposition2, EntityType.WANDERING_TRADER)) {
blockposition1 = blockposition2; blockposition1 = blockposition2;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 2a226f91d7afe0489adb4dbe94d69e6fc8e6e4e4..923110da6494664fef30fd20a7d9282eaac825f9 100644 index 7a7bd0fbac184b10dfd2d4a1b210c7c40efc4437..9805b0f7821049c124159cc9fd26cec2bfdae7d2 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -68,6 +68,12 @@ public class PurpurWorldConfig { @@ -68,6 +68,12 @@ public class PurpurWorldConfig {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Raid cooldown setting
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raids.java b/src/main/java/net/minecraft/world/entity/raid/Raids.java diff --git a/src/main/java/net/minecraft/world/entity/raid/Raids.java b/src/main/java/net/minecraft/world/entity/raid/Raids.java
index 17b24f57cc5d63f99eb999cfe3e2362758fe0f4f..95e5ae32e23781cfc1443542dc1ff40ab28eb7be 100644 index fa8fcdfea51a35e4a482d3d7b18159099da62706..38459f822e21601a167edab871b07a851b678d00 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raids.java --- a/src/main/java/net/minecraft/world/entity/raid/Raids.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raids.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raids.java
@@ -28,6 +28,7 @@ import net.minecraft.world.phys.Vec3; @@ -28,6 +28,7 @@ import net.minecraft.world.phys.Vec3;
@@ -34,7 +34,7 @@ index 17b24f57cc5d63f99eb999cfe3e2362758fe0f4f..95e5ae32e23781cfc1443542dc1ff40a
Iterator iterator = this.raidMap.values().iterator(); Iterator iterator = this.raidMap.values().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -128,10 +140,15 @@ public class Raids extends SavedData { @@ -130,10 +142,15 @@ public class Raids extends SavedData {
if (flag) { if (flag) {
// CraftBukkit start // CraftBukkit start
@@ -52,7 +52,7 @@ index 17b24f57cc5d63f99eb999cfe3e2362758fe0f4f..95e5ae32e23781cfc1443542dc1ff40a
if (!this.raidMap.containsKey(raid.getId())) { if (!this.raidMap.containsKey(raid.getId())) {
this.raidMap.put(raid.getId(), raid); this.raidMap.put(raid.getId(), raid);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 923110da6494664fef30fd20a7d9282eaac825f9..347ce89d5ece52cde057e269ace2225bc1462032 100644 index 9805b0f7821049c124159cc9fd26cec2bfdae7d2..886702d54c60921bc7f90ca848d4eeff07825b2e 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -108,6 +108,7 @@ public class PurpurWorldConfig { @@ -108,6 +108,7 @@ public class PurpurWorldConfig {

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Despawn rate config options per projectile type
Default values of -1 respect vanilla behaviour. Default values of -1 respect vanilla behaviour.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index 53d0024daf6963ac4dab575666b0d6a74a39a958..c5cbcf8d6b26bbb7712d3a72f8313f600dfc7c11 100644 index 3a9ecb0b46d541a1dec551d6159414ad253e96ce..1d75abd1659b37deedff794dcf9ff83028d2b738 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -62,7 +62,7 @@ public abstract class AbstractArrow extends Projectile { @@ -63,7 +63,7 @@ public abstract class AbstractArrow extends Projectile {
protected int inGroundTime; protected int inGroundTime;
public AbstractArrow.Pickup pickup; public AbstractArrow.Pickup pickup;
public int shakeTime; public int shakeTime;
@@ -18,7 +18,7 @@ index 53d0024daf6963ac4dab575666b0d6a74a39a958..c5cbcf8d6b26bbb7712d3a72f8313f60
private double baseDamage; private double baseDamage;
public int knockback; public int knockback;
private SoundEvent soundEvent; private SoundEvent soundEvent;
@@ -333,12 +333,28 @@ public abstract class AbstractArrow extends Projectile { @@ -334,12 +334,28 @@ public abstract class AbstractArrow extends Projectile {
} }
@@ -68,7 +68,7 @@ index 6afe37e42d88701af38df5793a9ea9d7d2cda5c5..1de27407c92d496715899fcafb3794df
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index 5a062a19bb2fc427c9391bb4731f071719b72c52..001d252763a689351a4df2ef830b3abb85a09e16 100644 index 5406925cd66f46ab8744123c670d72cea7bfc3a1..2bd14d74fa2fed39dad27b4417794f00eb068328 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -358,4 +358,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { @@ -358,4 +358,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
@@ -84,7 +84,7 @@ index 5a062a19bb2fc427c9391bb4731f071719b72c52..001d252763a689351a4df2ef830b3abb
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index 3789a0db398766f0fbc9e5ac5bf4228a0a0dac88..475ff3c62796306694c76ca5315cd27d2cbe8fbe 100644 index eb62756029ddda53c68d681f70b155df54a2c3ae..8542f21dd362eb002720219467a51e7686f499e8 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -661,4 +661,11 @@ public class FishingHook extends Projectile { @@ -661,4 +661,11 @@ public class FishingHook extends Projectile {
@@ -132,7 +132,7 @@ index 1a945a32c3d3705a318ebca72a365931a8c001b7..c7fdcfae1ba823046fdfe78aa97b4a7a
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 0c7d31c7ffd603e54fb19010331ad220c7b15627..878757f6b5034ed54198102cf8d48ace580f856f 100644 index fcbc5a3aee2e23a0b30b1f774d608f85b85f7d71..877a568b74e9f12decfeb70459e0cc0737f176cf 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -33,6 +33,7 @@ public abstract class Projectile extends Entity { @@ -33,6 +33,7 @@ public abstract class Projectile extends Entity {
@@ -143,9 +143,9 @@ index 0c7d31c7ffd603e54fb19010331ad220c7b15627..878757f6b5034ed54198102cf8d48ace
// CraftBukkit start // CraftBukkit start
protected boolean hitCancelled = false; protected boolean hitCancelled = false;
@@ -72,6 +73,23 @@ public abstract class Projectile extends Entity { @@ -42,6 +43,23 @@ public abstract class Projectile extends Entity {
super(type, world);
} }
// Pufferfish start
+ // Purpur start + // Purpur start
+ protected final void tickDespawnCounter() { + protected final void tickDespawnCounter() {
@@ -167,7 +167,7 @@ index 0c7d31c7ffd603e54fb19010331ad220c7b15627..878757f6b5034ed54198102cf8d48ace
public void setOwner(@Nullable Entity entity) { public void setOwner(@Nullable Entity entity) {
if (entity != null) { if (entity != null) {
this.ownerUUID = entity.getUUID(); this.ownerUUID = entity.getUUID();
@@ -148,6 +166,8 @@ public abstract class Projectile extends Entity { @@ -118,6 +136,8 @@ public abstract class Projectile extends Entity {
this.leftOwner = this.checkLeftOwner(); this.leftOwner = this.checkLeftOwner();
} }
@@ -177,7 +177,7 @@ index 0c7d31c7ffd603e54fb19010331ad220c7b15627..878757f6b5034ed54198102cf8d48ace
} }
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java
index a4591e4dc1a277a2fd0a323f3b54a107fd6598c8..ca0133bcb82df8112b63c7aef3670a8970676ef9 100644 index 0e66418720ca833e676295edc7e28473ce9d9f23..b9ac126103c496c9b23a9f96d5ed1a058aebf667 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java --- a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java
@@ -62,6 +62,13 @@ public class ShulkerBullet extends Projectile { @@ -62,6 +62,13 @@ public class ShulkerBullet extends Projectile {
@@ -195,10 +195,10 @@ index a4591e4dc1a277a2fd0a323f3b54a107fd6598c8..ca0133bcb82df8112b63c7aef3670a89
public Entity getTarget() { public Entity getTarget() {
return this.finalTarget; return this.finalTarget;
diff --git a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java
index 58354671480ce3e677790eb5bebc64a20b36e43d..226b33921c90ca3904a7397a68dc8169948f8faa 100644 index 00ac1cdc4734cc57f15433c5c6e7a3a545739d33..db6ae655400ea75dc8b8d53b31bf27e401518279 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java --- a/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/SmallFireball.java
@@ -98,4 +98,11 @@ public class SmallFireball extends Fireball { @@ -93,4 +93,11 @@ public class SmallFireball extends Fireball {
public boolean hurt(DamageSource source, float amount) { public boolean hurt(DamageSource source, float amount) {
return false; return false;
} }
@@ -307,7 +307,7 @@ index 2867e841e73a3edfdeb83af9d96e0d0cd4116a68..8613008090a9d7cf5cd7c2a598f2c725
+ // Purpur end + // Purpur end
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 347ce89d5ece52cde057e269ace2225bc1462032..8847f78505aa4a9646a3d48a6c8b013bfff9c71f 100644 index 886702d54c60921bc7f90ca848d4eeff07825b2e..932b43c50fce502237e14852d45e58741393c7ee 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -289,6 +289,35 @@ public class PurpurWorldConfig { @@ -289,6 +289,35 @@ public class PurpurWorldConfig {

View File

@@ -21,7 +21,7 @@ index 181abe014baba9ac51064c003381281a8fa43fe4..cfd1dcec3efcd4caf2431cbda99bc9f1
ignored.add("goal_selector_1"); ignored.add("goal_selector_1");
ignored.add("goal_selector_2"); ignored.add("goal_selector_2");
diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
index d966175c84ebb4d9054b8368d14243823d242f80..346c274e81be8541b61c66a0a0574811ddf59ff9 100644 index 968392e9dd124f997d5d5996893363ac7ef2c740..1d57ee963416e784a759f2ecee7b7c380f0597eb 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
@@ -120,7 +120,19 @@ public class Drowned extends Zombie implements RangedAttackMob { @@ -120,7 +120,19 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -46,7 +46,7 @@ index d966175c84ebb4d9054b8368d14243823d242f80..346c274e81be8541b61c66a0a0574811
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Axolotl.class, true, false)); this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Axolotl.class, true, false));
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index c28d0b6ba64a6f7b6aa4ea2df11f10d8a2371718..3cea172a1a54b34f5fbd62ace84661da429c44d6 100644 index 226968c3bcc0d51d9025b3bb17e0051bf4c109e5..72bd61193c3289d7228ab76805eb19c29a4a058d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -154,7 +154,19 @@ public class Zombie extends Monster { @@ -154,7 +154,19 @@ public class Zombie extends Monster {
@@ -71,10 +71,10 @@ index c28d0b6ba64a6f7b6aa4ea2df11f10d8a2371718..3cea172a1a54b34f5fbd62ace84661da
this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR)); this.targetSelector.addGoal(5, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
} }
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 8847f78505aa4a9646a3d48a6c8b013bfff9c71f..f3a4634ccd0a92dfbd2991da0695f4cfb5259d1d 100644 index 932b43c50fce502237e14852d45e58741393c7ee..1cf7929ca439866c613e6b8b5de878fdeb10a180 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1791,6 +1791,7 @@ public class PurpurWorldConfig { @@ -1787,6 +1787,7 @@ public class PurpurWorldConfig {
public boolean zombieJockeyOnlyBaby = true; public boolean zombieJockeyOnlyBaby = true;
public double zombieJockeyChance = 0.05D; public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true; public boolean zombieJockeyTryExistingChickens = true;
@@ -82,7 +82,7 @@ index 8847f78505aa4a9646a3d48a6c8b013bfff9c71f..f3a4634ccd0a92dfbd2991da0695f4cf
private void zombieSettings() { private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -1805,6 +1806,7 @@ public class PurpurWorldConfig { @@ -1801,6 +1802,7 @@ public class PurpurWorldConfig {
zombieJockeyOnlyBaby = getBoolean("mobs.zombie.jockey.only-babies", zombieJockeyOnlyBaby); zombieJockeyOnlyBaby = getBoolean("mobs.zombie.jockey.only-babies", zombieJockeyOnlyBaby);
zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance); zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance);
zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens); zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add predicate to recipe's ExactChoice ingredient
diff --git a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java diff --git a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java
index 8f35445477507bbec3c0cb1dccfd888316951595..2db1b0ec1b4595b80adafd19f398fbcc037c4f72 100644 index 895c0f1600139e340aa22a7c398978add56fa706..4f7e02c8a99ec9012a09baac52717df7504a5049 100644
--- a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java --- a/src/main/java/net/minecraft/world/item/crafting/Ingredient.java
+++ b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java +++ b/src/main/java/net/minecraft/world/item/crafting/Ingredient.java
@@ -38,6 +38,7 @@ public final class Ingredient implements Predicate<ItemStack> { @@ -38,6 +38,7 @@ public final class Ingredient implements Predicate<ItemStack> {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Flying squids! Oh my!
diff --git a/src/main/java/net/minecraft/world/entity/GlowSquid.java b/src/main/java/net/minecraft/world/entity/GlowSquid.java diff --git a/src/main/java/net/minecraft/world/entity/GlowSquid.java b/src/main/java/net/minecraft/world/entity/GlowSquid.java
index 9734ed30af10832fbbede43848fd82591320d1ce..ad93a0516391761f6275c2c04cc63f7f20101ba4 100644 index cb79d2c958fbd34f8c8818e7e1c0db8887dd15ba..b6df98797757462f35c306aa4c6ea1585a9a6ddc 100644
--- a/src/main/java/net/minecraft/world/entity/GlowSquid.java --- a/src/main/java/net/minecraft/world/entity/GlowSquid.java
+++ b/src/main/java/net/minecraft/world/entity/GlowSquid.java +++ b/src/main/java/net/minecraft/world/entity/GlowSquid.java
@@ -43,6 +43,11 @@ public class GlowSquid extends Squid { @@ -43,6 +43,11 @@ public class GlowSquid extends Squid {
@@ -58,7 +58,7 @@ index 709aaa9dc834d91219ce1087d8f89ef5bf3d915c..4850960c7c4f38c7d81b8945f8c87504
float f1 = Mth.cos(f) * 0.2F; float f1 = Mth.cos(f) * 0.2F;
float f2 = -0.1F + this.squid.getRandom().nextFloat() * 0.2F; float f2 = -0.1F + this.squid.getRandom().nextFloat() * 0.2F;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index f3a4634ccd0a92dfbd2991da0695f4cfb5259d1d..8e7a6bba0da7c9d9376ed4a0510255e58a07ed64 100644 index 1cf7929ca439866c613e6b8b5de878fdeb10a180..93d95018b67a31270c2d8b14d156c3c3c2fe9801 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -852,10 +852,12 @@ public class PurpurWorldConfig { @@ -852,10 +852,12 @@ public class PurpurWorldConfig {