@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/raid/EntityRaider.java
|
||||
+++ b/net/minecraft/world/entity/raid/EntityRaider.java
|
||||
@@ -45,6 +45,10 @@
|
||||
@@ -38,6 +38,10 @@
|
||||
import net.minecraft.world.level.WorldAccess;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -11,16 +11,7 @@
|
||||
public abstract class EntityRaider extends EntityMonsterPatrolling {
|
||||
|
||||
protected static final DataWatcherObject<Boolean> IS_CELEBRATING = DataWatcher.defineId(EntityRaider.class, DataWatcherRegistry.BOOLEAN);
|
||||
@@ -166,7 +170,7 @@
|
||||
MobEffect mobeffect1 = new MobEffect(MobEffects.BAD_OMEN, 120000, i, false, false, true);
|
||||
|
||||
if (!this.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_RAIDS)) {
|
||||
- entityhuman.addEffect(mobeffect1);
|
||||
+ entityhuman.addEffect(mobeffect1, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN); // CraftBukkit
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -275,7 +279,7 @@
|
||||
@@ -233,7 +237,7 @@
|
||||
this.onItemPickup(entityitem);
|
||||
this.setItemSlot(enumitemslot, itemstack);
|
||||
this.take(entityitem, itemstack.getCount());
|
||||
@@ -29,7 +20,7 @@
|
||||
this.getCurrentRaid().setLeader(this.getWave(), this);
|
||||
this.setPatrolLeader(true);
|
||||
} else {
|
||||
@@ -324,7 +328,7 @@
|
||||
@@ -282,7 +286,7 @@
|
||||
|
||||
private final T mob;
|
||||
|
||||
@@ -38,7 +29,7 @@
|
||||
this.mob = entityraider1;
|
||||
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
|
||||
}
|
||||
@@ -517,7 +521,7 @@
|
||||
@@ -475,7 +479,7 @@
|
||||
private final float hostileRadiusSqr;
|
||||
public final PathfinderTargetCondition shoutTargeting = PathfinderTargetCondition.forNonCombat().range(8.0D).ignoreLineOfSight().ignoreInvisibilityTesting();
|
||||
|
||||
@@ -47,7 +38,7 @@
|
||||
this.mob = entityillagerabstract;
|
||||
this.hostileRadiusSqr = f * f;
|
||||
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
|
||||
@@ -540,7 +544,7 @@
|
||||
@@ -498,7 +502,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||
|
||||
@@ -56,7 +47,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -557,7 +561,7 @@
|
||||
@@ -515,7 +519,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -180,6 +180,12 @@
|
||||
@@ -177,6 +177,12 @@
|
||||
return this.status == Raid.Status.LOSS;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
public float getTotalHealth() {
|
||||
return this.totalHealth;
|
||||
}
|
||||
@@ -284,6 +290,7 @@
|
||||
@@ -281,6 +287,7 @@
|
||||
|
||||
this.active = this.level.hasChunkAt(this.center);
|
||||
if (this.level.getDifficulty() == EnumDifficulty.PEACEFUL) {
|
||||
@@ -21,7 +21,7 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -303,13 +310,16 @@
|
||||
@@ -300,13 +307,16 @@
|
||||
if (!this.level.isVillage(this.center)) {
|
||||
if (this.groupsSpawned > 0) {
|
||||
this.status = Raid.Status.LOSS;
|
||||
@@ -38,7 +38,7 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -383,6 +393,7 @@
|
||||
@@ -380,6 +390,7 @@
|
||||
}
|
||||
|
||||
if (j > 3) {
|
||||
@@ -46,7 +46,7 @@
|
||||
this.stop();
|
||||
break;
|
||||
}
|
||||
@@ -395,6 +406,7 @@
|
||||
@@ -392,6 +403,7 @@
|
||||
this.status = Raid.Status.VICTORY;
|
||||
Iterator iterator = this.heroesOfTheVillage.iterator();
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
UUID uuid = (UUID) iterator.next();
|
||||
Entity entity = this.level.getEntity(uuid);
|
||||
@@ -409,10 +421,12 @@
|
||||
@@ -406,10 +418,12 @@
|
||||
|
||||
entityplayer.awardStat(StatisticList.RAID_WIN);
|
||||
CriterionTriggers.RAID_WIN.trigger(entityplayer);
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,6 +434,7 @@
|
||||
@@ -417,6 +431,7 @@
|
||||
} else if (this.isOver()) {
|
||||
++this.celebrationTicks;
|
||||
if (this.celebrationTicks >= 600) {
|
||||
@@ -75,7 +75,7 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -556,6 +571,10 @@
|
||||
@@ -553,6 +568,10 @@
|
||||
int j = araid_wave.length;
|
||||
int k = 0;
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
while (k < j) {
|
||||
Raid.Wave raid_wave = araid_wave[k];
|
||||
int l = this.getDefaultNumSpawns(raid_wave, i, flag1) + this.getPotentialBonusSpawns(raid_wave, this.random, i, difficultydamagescaler, flag1);
|
||||
@@ -571,9 +590,11 @@
|
||||
@@ -568,9 +587,11 @@
|
||||
entityraider.setPatrolLeader(true);
|
||||
this.setLeader(i, entityraider);
|
||||
flag = true;
|
||||
@@ -98,7 +98,7 @@
|
||||
if (raid_wave.entityType == EntityTypes.RAVAGER) {
|
||||
EntityRaider entityraider1 = null;
|
||||
|
||||
@@ -592,6 +613,7 @@
|
||||
@@ -589,6 +610,7 @@
|
||||
this.joinRaid(i, entityraider1, blockposition, false);
|
||||
entityraider1.moveTo(blockposition, 0.0F, 0.0F);
|
||||
entityraider1.startRiding(entityraider);
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,6 +631,7 @@
|
||||
@@ -606,6 +628,7 @@
|
||||
++this.groupsSpawned;
|
||||
this.updateBossbar();
|
||||
this.setDirty();
|
||||
@@ -114,16 +114,16 @@
|
||||
}
|
||||
|
||||
public void joinRaid(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
|
||||
@@ -624,7 +647,7 @@
|
||||
@@ -621,7 +644,7 @@
|
||||
entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null);
|
||||
entityraider.applyRaidBuffs(i, false);
|
||||
entityraider.applyRaidBuffs(this.level, i, false);
|
||||
entityraider.setOnGround(true);
|
||||
- this.level.addFreshEntityWithPassengers(entityraider);
|
||||
+ this.level.addFreshEntityWithPassengers(entityraider, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.RAID); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -873,6 +896,12 @@
|
||||
@@ -870,6 +893,12 @@
|
||||
this.heroesOfTheVillage.add(entity.getUUID());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user