Additional compiler fixes

This commit is contained in:
Frank Bauer 2021-06-23 22:23:20 +02:00
parent 4f053c161a
commit e541763ada
10 changed files with 19 additions and 17 deletions

View file

@ -20,7 +20,6 @@ import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation;
import net.minecraft.world.entity.ai.navigation.PathNavigation;
import net.minecraft.world.entity.ai.util.AirAndWaterRandomPos;
import net.minecraft.world.entity.ai.util.HoverRandomPos;
import net.minecraft.world.entity.ai.util.RandomPos;
import net.minecraft.world.entity.animal.Animal;
import net.minecraft.world.entity.animal.FlyingAnimal;
import net.minecraft.world.entity.player.Player;

View file

@ -96,7 +96,7 @@ public class ShadowWalkerEntity extends Monster {
}
@Override
protected float getVoicePitch() {
public float getVoicePitch() {
return MHelper.randRange(0.75F, 1.25F, random);
}

View file

@ -5,6 +5,8 @@ import java.util.List;
import java.util.Random;
import net.minecraft.world.entity.*;
import net.minecraft.world.entity.ai.util.AirAndWaterRandomPos;
import net.minecraft.world.entity.ai.util.HoverRandomPos;
import org.jetbrains.annotations.Nullable;
import net.minecraft.core.BlockPos;
@ -235,8 +237,8 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
@Nullable
private Vec3 getRandomLocation() {
Vec3 vec3d3 = SilkMothEntity.this.getViewVector(0.0F);
Vec3 vec3d4 = RandomPos.getAboveLandPos(SilkMothEntity.this, 8, 7, vec3d3, 1.5707964F, 2, 1);
return vec3d4 != null ? vec3d4 : RandomPos.getAirPos(SilkMothEntity.this, 8, 4, -2, vec3d3, 1.5707963705062866D);
Vec3 vec3d4 = HoverRandomPos.getPos(SilkMothEntity.this, 8, 7, vec3d3.x, vec3d3.z, 1.5707964F, 3, 1);
return vec3d4 != null ? vec3d4 : AirAndWaterRandomPos.getPos(SilkMothEntity.this, 8, 4, -2, vec3d3.x, vec3d3.z, 1.5707963705062866D);
}
}
@ -295,7 +297,7 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
BlocksHelper.setWithUpdate(SilkMothEntity.this.hiveWorld, SilkMothEntity.this.hivePos, state.setValue(EndBlockProperties.FULLNESS, fullness));
}
SilkMothEntity.this.level.playSound(null, SilkMothEntity.this.entrance, SoundEvents.BEEHIVE_ENTER, SoundSource.BLOCKS, 1, 1);
SilkMothEntity.this.remove();
SilkMothEntity.this.discard();
}
else {
SilkMothEntity.this.hivePos = null;