aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch
new file mode 100644
index 0000000000..30036ad39a
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/EffectCommands.java.patch
@@ -0,0 +1,46 @@
+--- a/net/minecraft/server/commands/EffectCommands.java
++++ b/net/minecraft/server/commands/EffectCommands.java
+@@ -180,9 +82,10 @@
+
+ for (Entity entity : targets) {
+ if (entity instanceof LivingEntity) {
+- MobEffectInstance mobEffectInstance = new MobEffectInstance(mobEffect, i1, amplifier, false, showParticles);
+- if (((LivingEntity)entity).addEffect(mobEffectInstance, source.getEntity())) {
+- i++;
++ MobEffectInstance mobeffect = new MobEffectInstance(mobeffectlist, k, amplifier, false, showParticles);
++
++ if (((LivingEntity) entity).addEffect(mobeffect, source.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
++ ++j;
+ }
+ }
+ }
+@@ -210,9 +111,11 @@
+ private static int clearEffects(CommandSourceStack source, Collection<? extends Entity> targets) throws CommandSyntaxException {
+ int i = 0;
+
+- for (Entity entity : targets) {
+- if (entity instanceof LivingEntity && ((LivingEntity)entity).removeAllEffects()) {
+- i++;
++ while (iterator.hasNext()) {
++ Entity entity = (Entity) iterator.next();
++
++ if (entity instanceof LivingEntity && ((LivingEntity) entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
++ ++i;
+ }
+ }
+
+@@ -235,9 +141,11 @@
+ MobEffect mobEffect = effect.value();
+ int i = 0;
+
+- for (Entity entity : targets) {
+- if (entity instanceof LivingEntity && ((LivingEntity)entity).removeEffect(mobEffect)) {
+- i++;
++ while (iterator.hasNext()) {
++ Entity entity = (Entity) iterator.next();
++
++ if (entity instanceof LivingEntity && ((LivingEntity) entity).removeEffect(mobeffectlist, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
++ ++i;
+ }
+ }
+