@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/entity/raid/EntityRaider.java
|
||||
+++ b/net/minecraft/world/entity/raid/EntityRaider.java
|
||||
@@ -38,6 +38,10 @@
|
||||
import net.minecraft.world.level.WorldAccess;
|
||||
@@ -41,6 +41,10 @@
|
||||
import net.minecraft.world.level.pathfinder.PathEntity;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -11,7 +11,7 @@
|
||||
public abstract class EntityRaider extends EntityMonsterPatrolling {
|
||||
|
||||
protected static final DataWatcherObject<Boolean> IS_CELEBRATING = DataWatcher.defineId(EntityRaider.class, DataWatcherRegistry.BOOLEAN);
|
||||
@@ -233,7 +237,7 @@
|
||||
@@ -236,7 +240,7 @@
|
||||
this.onItemPickup(entityitem);
|
||||
this.setItemSlot(enumitemslot, itemstack);
|
||||
this.take(entityitem, itemstack.getCount());
|
||||
@@ -20,16 +20,16 @@
|
||||
this.getCurrentRaid().setLeader(this.getWave(), this);
|
||||
this.setPatrolLeader(true);
|
||||
} else {
|
||||
@@ -282,7 +286,7 @@
|
||||
@@ -290,7 +294,7 @@
|
||||
@Nullable
|
||||
private EntityItem pursuedBannerItemEntity;
|
||||
|
||||
private final T mob;
|
||||
|
||||
- public b(final EntityRaider entityraider, final EntityRaider entityraider1) {
|
||||
+ public b(final EntityRaider entityraider, final T entityraider1) { // CraftBukkit - decompile error
|
||||
this.mob = entityraider1;
|
||||
- public b(final EntityRaider entityraider) {
|
||||
+ public b(final T entityraider) { // CraftBukkit - decompile error
|
||||
this.mob = entityraider;
|
||||
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
|
||||
}
|
||||
@@ -475,7 +479,7 @@
|
||||
@@ -524,7 +528,7 @@
|
||||
private final float hostileRadiusSqr;
|
||||
public final PathfinderTargetCondition shoutTargeting = PathfinderTargetCondition.forNonCombat().range(8.0D).ignoreLineOfSight().ignoreInvisibilityTesting();
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
this.mob = entityillagerabstract;
|
||||
this.hostileRadiusSqr = f * f;
|
||||
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
|
||||
@@ -498,7 +502,7 @@
|
||||
@@ -547,7 +551,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -515,7 +519,7 @@
|
||||
@@ -564,7 +568,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
EntityRaider entityraider = (EntityRaider) iterator.next();
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -380,6 +390,7 @@
|
||||
@@ -374,6 +384,7 @@
|
||||
}
|
||||
|
||||
if (j > 3) {
|
||||
if (j > 5) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(this, org.bukkit.event.raid.RaidStopEvent.Reason.UNSPAWNABLE); // CraftBukkit
|
||||
this.stop();
|
||||
break;
|
||||
}
|
||||
@@ -392,6 +403,7 @@
|
||||
@@ -386,6 +397,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);
|
||||
@@ -406,10 +418,12 @@
|
||||
@@ -400,10 +412,12 @@
|
||||
|
||||
entityplayer.awardStat(StatisticList.RAID_WIN);
|
||||
CriterionTriggers.RAID_WIN.trigger(entityplayer);
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +431,7 @@
|
||||
@@ -411,6 +425,7 @@
|
||||
} else if (this.isOver()) {
|
||||
++this.celebrationTicks;
|
||||
if (this.celebrationTicks >= 600) {
|
||||
@@ -75,7 +75,7 @@
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
@@ -553,6 +568,10 @@
|
||||
@@ -544,6 +559,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);
|
||||
@@ -568,9 +587,11 @@
|
||||
@@ -559,9 +578,11 @@
|
||||
entityraider.setPatrolLeader(true);
|
||||
this.setLeader(i, entityraider);
|
||||
flag = true;
|
||||
@@ -98,7 +98,7 @@
|
||||
if (raid_wave.entityType == EntityTypes.RAVAGER) {
|
||||
EntityRaider entityraider1 = null;
|
||||
|
||||
@@ -589,6 +610,7 @@
|
||||
@@ -580,6 +601,7 @@
|
||||
this.joinRaid(i, entityraider1, blockposition, false);
|
||||
entityraider1.moveTo(blockposition, 0.0F, 0.0F);
|
||||
entityraider1.startRiding(entityraider);
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,6 +628,7 @@
|
||||
@@ -597,6 +619,7 @@
|
||||
++this.groupsSpawned;
|
||||
this.updateBossbar();
|
||||
this.setDirty();
|
||||
@@ -114,8 +114,8 @@
|
||||
}
|
||||
|
||||
public void joinRaid(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
|
||||
@@ -621,7 +644,7 @@
|
||||
entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null);
|
||||
@@ -612,7 +635,7 @@
|
||||
entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EntitySpawnReason.EVENT, (GroupDataEntity) null);
|
||||
entityraider.applyRaidBuffs(this.level, i, false);
|
||||
entityraider.setOnGround(true);
|
||||
- this.level.addFreshEntityWithPassengers(entityraider);
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -870,6 +893,12 @@
|
||||
@@ -865,6 +888,12 @@
|
||||
this.heroesOfTheVillage.add(entity.getUUID());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user