mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
More compile fixes
This commit is contained in:
parent
67f1688c30
commit
5999d669ac
@ -5,14 +5,14 @@ Subject: [PATCH] Configurable baby zombie movement speed
|
||||
|
||||
|
||||
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 190a02bce0026b2c6df796a5f14e639b5a84ccf1..37824f2470c7ddb77216ffbf4da02cc10a95a171 100644
|
||||
index 190a02bce0026b2c6df796a5f14e639b5a84ccf1..38403a5bb8569f105056d61ca444d6b3a19becd2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -78,6 +78,7 @@ public class Zombie extends Monster {
|
||||
|
||||
private static final UUID SPEED_MODIFIER_BABY_UUID = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_UUID, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE);
|
||||
+ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.getId(), SPEED_MODIFIER_BABY.getName(), this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.getOperation()); // Paper - Make baby speed configurable
|
||||
+ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.getId(), SPEED_MODIFIER_BABY.name, this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.getOperation()); // Paper - Make baby speed configurable
|
||||
private static final EntityDataAccessor<Boolean> DATA_BABY_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
|
||||
private static final EntityDataAccessor<Integer> DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT);
|
||||
public static final EntityDataAccessor<Boolean> DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN);
|
||||
|
@ -60,7 +60,7 @@ index 96181e8925aef7f3d0a2010305caf1f6d9bcfcc9..6f452605e9dc9ebd9980eae9fdeea344
|
||||
return false;
|
||||
}
|
||||
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 37824f2470c7ddb77216ffbf4da02cc10a95a171..0c9a91990376482bc16f74a8b183ebf049ee1949 100644
|
||||
index 38403a5bb8569f105056d61ca444d6b3a19becd2..2aec8e2f45fe6ba56d84e5a51a6e30d36505df42 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -326,7 +326,7 @@ public class Zombie extends Monster {
|
||||
|
@ -7,7 +7,7 @@ Subject: [PATCH] Add more Zombie API
|
||||
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
|
||||
|
||||
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 0c9a91990376482bc16f74a8b183ebf049ee1949..39a508b2834e554e94d635abd0d4a549f317dee5 100644
|
||||
index 2aec8e2f45fe6ba56d84e5a51a6e30d36505df42..d4f72024c15d03f70a86f09714403ace6e26885a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -96,6 +96,7 @@ public class Zombie extends Monster {
|
||||
|
@ -8,7 +8,7 @@ This allows you to solve an issue in vanilla behavior where:
|
||||
* On normal difficulty they will have a 50% of getting infected or dying.
|
||||
|
||||
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 39a508b2834e554e94d635abd0d4a549f317dee5..93ca1016806103fe688379c99afc57cb02635f65 100644
|
||||
index d4f72024c15d03f70a86f09714403ace6e26885a..79634693899f50e34ffe0898f75e5b31fd11ab53 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -452,12 +452,8 @@ public class Zombie extends Monster {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent headless pistons from being created
|
||||
Prevent headless pistons from being created by explosions or tree/mushroom growth.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index b7cf13fe4a0af243c0e76d75439b28d5018dadb9..4f3b04e62de66c4b18e5e9a988dea7c3e7b85aa1 100644
|
||||
index b7cf13fe4a0af243c0e76d75439b28d5018dadb9..5a2e322d349340fa58f133c2034765f90319b2be 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -206,6 +206,15 @@ public class Explosion {
|
||||
@ -15,7 +15,7 @@ index b7cf13fe4a0af243c0e76d75439b28d5018dadb9..4f3b04e62de66c4b18e5e9a988dea7c3
|
||||
set.add(blockposition);
|
||||
+ // Paper start - prevent headless pistons from forming
|
||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) {
|
||||
+ BlockEntity extension = this.level.getBlockEntity(blockposition);
|
||||
+ net.minecraft.world.level.block.entity.BlockEntity extension = this.level.getBlockEntity(blockposition);
|
||||
+ if (extension instanceof net.minecraft.world.level.block.piston.PistonMovingBlockEntity blockEntity && blockEntity.isSourcePiston()) {
|
||||
+ net.minecraft.core.Direction direction = iblockdata.getValue(net.minecraft.world.level.block.piston.PistonHeadBlock.FACING);
|
||||
+ set.add(blockposition.relative(direction.getOpposite()));
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add zombie targets turtle egg config
|
||||
|
||||
|
||||
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 93ca1016806103fe688379c99afc57cb02635f65..f99e4382b4b191d9bd673a4307c6641857b836ca 100644
|
||||
index 79634693899f50e34ffe0898f75e5b31fd11ab53..c82730d52f2ec6cb4a5e17fa512be6497f3ab6dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -109,7 +109,7 @@ public class Zombie extends Monster {
|
||||
|
@ -25,7 +25,7 @@ index d0b1a419c9bc73066d79459dc3e5998160f8038b..a7783474afef0a2bab7e99e475c6d130
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
|
||||
index b54bd4e85042955448a2e76b379d370eefdff383..e8f03a40db4505c1e7f2aeb8946c207833acd416 100644
|
||||
index b54bd4e85042955448a2e76b379d370eefdff383..92922e8eef7fa4638a01f3cefc4c46a1451e40e7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
|
||||
@@ -161,6 +161,11 @@ public class CraftEnchantment extends Enchantment {
|
||||
@ -35,7 +35,7 @@ index b54bd4e85042955448a2e76b379d370eefdff383..e8f03a40db4505c1e7f2aeb8946c2078
|
||||
+
|
||||
+ @Override
|
||||
+ public String translationKey() {
|
||||
+ return this.target.getDescriptionId();
|
||||
+ return this.handle.getDescriptionId();
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
|
@ -18,7 +18,7 @@ index dadb419a04b343d6ba59353c6caa1a50aa07b67f..6be9e8d693bbb084791d7b30a1891ddb
|
||||
LocalDate localdate = LocalDate.now();
|
||||
int i = localdate.get(ChronoField.DAY_OF_MONTH);
|
||||
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 f99e4382b4b191d9bd673a4307c6641857b836ca..89515078590b2f2c7e73456b7ab5817f44039be5 100644
|
||||
index c82730d52f2ec6cb4a5e17fa512be6497f3ab6dc..8d66d90973931575a6c071965d582da6a9d30b10 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -507,7 +507,7 @@ public class Zombie extends Monster {
|
||||
|
@ -23,7 +23,7 @@ index 9fec5823d99d1ae8e41d9e21f7ddb8b8e94bf887..ad41bbbf5395ed18c2c9e1e692c7661a
|
||||
}
|
||||
|
||||
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 89515078590b2f2c7e73456b7ab5817f44039be5..bcf31d0b784241b4f2b71bced4a431763d538a69 100644
|
||||
index 8d66d90973931575a6c071965d582da6a9d30b10..b31f6b267693c409d58eee688a3b79a1cf14e391 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -100,7 +100,7 @@ public class Zombie extends Monster {
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Empty commands shall not be dispatched
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index b27256d251e5db5781197319f79f89cc7638c80b..dead614bf8153d9039bc59f75ba0eee872d0dcb5 100644
|
||||
index b27256d251e5db5781197319f79f89cc7638c80b..f43baa1f4dbed72bbcf130e180956cfd31998256 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -287,6 +287,7 @@ public class Commands {
|
||||
command = event.getCommand();
|
||||
|
||||
String[] args = command.split(" ");
|
||||
+ if (args.length == 0) return 0; // Paper - empty commands shall not be dispatched
|
||||
+ if (args.length == 0) return; // Paper - empty commands shall not be dispatched
|
||||
|
||||
String cmd = args[0];
|
||||
if (cmd.startsWith("minecraft:")) cmd = cmd.substring("minecraft:".length());
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Send empty commands if tab completion is disabled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index dead614bf8153d9039bc59f75ba0eee872d0dcb5..094eb2d3aff11c861490e04cc054918bff5e2d87 100644
|
||||
index f43baa1f4dbed72bbcf130e180956cfd31998256..1409801946be84e3256748c68ba0c62d42b869de 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -456,7 +456,12 @@ public class Commands {
|
||||
|
@ -9,7 +9,7 @@ public net.minecraft.world.item.enchantment.Enchantment slots
|
||||
Co-authored-by: Luis <luisc99@icloud.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
|
||||
index e8f03a40db4505c1e7f2aeb8946c207833acd416..8f42ee46759b007055b71fd70ab85a3bf4c4c8bc 100644
|
||||
index 92922e8eef7fa4638a01f3cefc4c46a1451e40e7..4daf2c54c7127e8e091ffc49362f288594956143 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
|
||||
@@ -90,7 +90,7 @@ public class CraftEnchantment extends Enchantment {
|
||||
@ -23,42 +23,42 @@ index e8f03a40db4505c1e7f2aeb8946c207833acd416..8f42ee46759b007055b71fd70ab85a3b
|
||||
@Override
|
||||
@@ -166,6 +166,55 @@ public class CraftEnchantment extends Enchantment {
|
||||
public String translationKey() {
|
||||
return this.target.getDescriptionId();
|
||||
return this.handle.getDescriptionId();
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isTradeable() {
|
||||
+ return target.isTradeable();
|
||||
+ return handle.isTradeable();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isDiscoverable() {
|
||||
+ return target.isDiscoverable();
|
||||
+ return handle.isDiscoverable();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getMinModifiedCost(int level) {
|
||||
+ return target.getMinCost(level);
|
||||
+ return handle.getMinCost(level);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getMaxModifiedCost(int level) {
|
||||
+ return target.getMaxCost(level);
|
||||
+ return handle.getMaxCost(level);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public io.papermc.paper.enchantments.EnchantmentRarity getRarity() {
|
||||
+ return fromNMSRarity(target.getRarity());
|
||||
+ return fromNMSRarity(handle.getRarity());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public float getDamageIncrease(int level, org.bukkit.entity.EntityCategory entityCategory) {
|
||||
+ return target.getDamageBonus(level, org.bukkit.craftbukkit.entity.CraftLivingEntity.fromBukkitEntityCategory(entityCategory));
|
||||
+ return handle.getDamageBonus(level, org.bukkit.craftbukkit.entity.CraftLivingEntity.fromBukkitEntityCategory(entityCategory));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public java.util.Set<org.bukkit.inventory.EquipmentSlot> getActiveSlots() {
|
||||
+ return java.util.stream.Stream.of(target.slots).map(org.bukkit.craftbukkit.CraftEquipmentSlot::getSlot).collect(java.util.stream.Collectors.toSet());
|
||||
+ return java.util.stream.Stream.of(handle.slots).map(org.bukkit.craftbukkit.CraftEquipmentSlot::getSlot).collect(java.util.stream.Collectors.toSet());
|
||||
+ }
|
||||
+
|
||||
+ public static io.papermc.paper.enchantments.EnchantmentRarity fromNMSRarity(net.minecraft.world.item.enchantment.Enchantment.Rarity nmsRarity) {
|
||||
|
@ -33,7 +33,7 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b
|
||||
private RedirectModifier<S> modifier = null;
|
||||
private boolean forks;
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 094eb2d3aff11c861490e04cc054918bff5e2d87..154cbcab900f4697f280a88d6307682a26f46bfc 100644
|
||||
index 1409801946be84e3256748c68ba0c62d42b869de..713e665ee962d9e8bebeb13d2621d43849084090 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -257,6 +257,13 @@ public class Commands {
|
||||
|
@ -35,7 +35,7 @@ index e58c2844356c71973d81b460a21aab795b506d77..20b2cbbc73f6420b6ace9746016527b9
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 154cbcab900f4697f280a88d6307682a26f46bfc..0299b79f3643bf8c4f4da176c20fec64f4601228 100644
|
||||
index 713e665ee962d9e8bebeb13d2621d43849084090..c60f7546f260d18f308bf160fb122a1bc036ff8a 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -532,6 +532,7 @@ public class Commands {
|
||||
|
@ -9,7 +9,7 @@ so this resets it after each call to
|
||||
Zombie#getExperienceReward
|
||||
|
||||
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 bcf31d0b784241b4f2b71bced4a431763d538a69..5fdad1600cc7a7c22d1d9a58b6b2dda605521b97 100644
|
||||
index b31f6b267693c409d58eee688a3b79a1cf14e391..753defa8f8b48d004a2a53b2fc322fd9c083d95e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -175,11 +175,16 @@ public class Zombie extends Monster {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions
|
||||
This is a bug accidentally introduced in upstream CB
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 0299b79f3643bf8c4f4da176c20fec64f4601228..6bab6dd39ac316f43768f24fef6490073e6c9bb7 100644
|
||||
index c60f7546f260d18f308bf160fb122a1bc036ff8a..55f3f5396dac2b0bb0cc37b537547e9245042100 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -392,7 +392,7 @@ public class Commands {
|
||||
|
@ -41,7 +41,7 @@ index 8bde8c581796ed11809b80b9a30a33df86116745..4604f8b38460e9113e966889a679d454
|
||||
|
||||
public DamageSource outOfBorder() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 4f3b04e62de66c4b18e5e9a988dea7c3e7b85aa1..a7f9617b1f9777b3eafa719ed898366d192101d6 100644
|
||||
index 5a2e322d349340fa58f133c2034765f90319b2be..dbe679bb81a903668262cdf629469e971b49e088 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -368,7 +368,7 @@ public class Explosion {
|
||||
|
@ -34,7 +34,7 @@ The results indicate that this logic is 5 times faster than Vanilla
|
||||
and 2.3 times faster than Lithium.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index a7f9617b1f9777b3eafa719ed898366d192101d6..f2f54400d096f85ee7249f29e17cc5f2871c0e58 100644
|
||||
index dbe679bb81a903668262cdf629469e971b49e088..c790418ff4584af20db006a3e8770f261bab271e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -111,6 +111,271 @@ public class Explosion {
|
||||
|
Loading…
Reference in New Issue
Block a user