Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
Nassim Jahnke
2025-04-12 17:26:44 +02:00
parent 0767902699
commit f00727c57e
2092 changed files with 50551 additions and 48729 deletions

View File

@@ -2,7 +2,7 @@
+++ b/net/minecraft/world/effect/InfestedMobEffect.java
@@ -44,7 +_,11 @@
Vector3f vector3f = entity.getLookAngle().toVector3f().mul(0.3F).mul(1.0F, 1.5F, 1.0F).rotateY(f1);
silverfish.moveTo(x, y, z, level.getRandom().nextFloat() * 360.0F, 0.0F);
silverfish.snapTo(x, y, z, level.getRandom().nextFloat() * 360.0F, 0.0F);
silverfish.setDeltaMovement(new Vec3(vector3f));
- level.addFreshEntity(silverfish);
+ // CraftBukkit start

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/effect/MobEffect.java
+++ b/net/minecraft/world/effect/MobEffect.java
@@ -76,6 +_,7 @@
@@ -86,6 +_,7 @@
public void applyInstantenousEffect(
ServerLevel level, @Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entity, int amplifier, double health
) {

View File

@@ -1,14 +1,15 @@
--- a/net/minecraft/world/effect/MobEffectInstance.java
+++ b/net/minecraft/world/effect/MobEffectInstance.java
@@ -216,6 +_,7 @@
@@ -219,7 +_,7 @@
return false;
} else {
int i = this.isInfiniteDuration() ? entity.tickCount : this.duration;
if (entity.level() instanceof ServerLevel serverLevel
&& this.effect.value().shouldApplyEffectTickThisTick(i, this.amplifier)
+ && new io.papermc.paper.event.entity.EntityEffectTickEvent(entity.getBukkitLivingEntity(), org.bukkit.craftbukkit.potion.CraftPotionEffectType.minecraftHolderToBukkit(this.effect), this.amplifier).callEvent() // Paper - Add EntityEffectTickEvent
&& !this.effect.value().applyEffectTick(serverLevel, entity, this.amplifier)) {
entity.removeEffect(this.effect);
}
@@ -408,7 +_,7 @@
- if (this.effect.value().shouldApplyEffectTickThisTick(i, this.amplifier) && !this.effect.value().applyEffectTick(level, entity, this.amplifier)) {
+ if (this.effect.value().shouldApplyEffectTickThisTick(i, this.amplifier) && new io.papermc.paper.event.entity.EntityEffectTickEvent(entity.getBukkitLivingEntity(), org.bukkit.craftbukkit.potion.CraftPotionEffectType.minecraftHolderToBukkit(this.effect), this.amplifier).callEvent() && !this.effect.value().applyEffectTick(level, entity, this.amplifier)) { // Paper - Add EntityEffectTickEvent
return false;
} else {
this.tickDownDuration();
@@ -415,7 +_,7 @@
.apply(instance, MobEffectInstance.Details::create)
)
);
@@ -17,7 +18,7 @@
codec -> StreamCodec.composite(
ByteBufCodecs.VAR_INT,
MobEffectInstance.Details::amplifier,
@@ -420,7 +_,7 @@
@@ -427,7 +_,7 @@
MobEffectInstance.Details::showParticles,
ByteBufCodecs.BOOL,
MobEffectInstance.Details::showIcon,

View File

@@ -3,7 +3,7 @@
@@ -49,7 +_,7 @@
if (slime != null) {
slime.setSize(2, true);
slime.moveTo(x, y, z, level.getRandom().nextFloat() * 360.0F, 0.0F);
slime.snapTo(x, y, z, level.getRandom().nextFloat() * 360.0F, 0.0F);
- level.addFreshEntity(slime);
+ level.addFreshEntity(slime, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT); // CraftBukkit
}