Skip to content

Commit

Permalink
Update StatueBatEntity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Dec 29, 2023
1 parent 09b8e11 commit ab427bd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ public static AttributeSupplier.Builder createAttributes() {
@Nullable
@Override
public SpawnGroupData finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficultyIn, MobSpawnType reason, @Nullable SpawnGroupData spawnDataIn, @Nullable CompoundTag dataTag) {
SpawnGroupData data = super.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);
int random = getRandom().nextInt(10);
if (random < 5) {
addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 2000 * 20, 2, true, false));
}
return super.finalizeSpawn(level, difficultyIn, reason, spawnDataIn, dataTag);
return data;
}

@Override
Expand Down

0 comments on commit ab427bd

Please sign in to comment.