More compiler fixes
This commit is contained in:
parent
cfa765437c
commit
4f053c161a
20 changed files with 84 additions and 67 deletions
|
@ -91,7 +91,7 @@ public class CubozoaEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getBucketItemStack() {
|
||||
public ItemStack getBucketItemStack() {
|
||||
ItemStack bucket = EndItems.BUCKET_CUBOZOA.getDefaultInstance();
|
||||
CompoundTag tag = bucket.getOrCreateTag();
|
||||
tag.putByte("Variant", entityData.get(VARIANT));
|
||||
|
|
|
@ -6,11 +6,8 @@ import java.util.Random;
|
|||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.entity.AgeableMob;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.MobSpawnType;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.*;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.entity.ai.control.FlyingMoveControl;
|
||||
|
@ -21,6 +18,8 @@ import net.minecraft.world.entity.ai.goal.FollowParentGoal;
|
|||
import net.minecraft.world.entity.ai.goal.Goal;
|
||||
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;
|
||||
|
@ -98,18 +97,18 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean makeFlySound() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier) {
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMovementNoisy() {
|
||||
return false;
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.EVENTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlying() {
|
||||
return !this.onGround;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -168,11 +167,11 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
private Vec3 getRandomLocation() {
|
||||
int h = BlocksHelper.downRay(DragonflyEntity.this.level, DragonflyEntity.this.blockPosition(), 16);
|
||||
Vec3 rotation = DragonflyEntity.this.getViewVector(0.0F);
|
||||
Vec3 airPos = RandomPos.getAboveLandPos(DragonflyEntity.this, 8, 7, rotation, 1.5707964F, 2, 1);
|
||||
Vec3 airPos = HoverRandomPos.getPos(DragonflyEntity.this, 8, 7, rotation.x, rotation.z, 1.5707964F, 3, 1);
|
||||
if (airPos != null) {
|
||||
if (isInVoid(airPos)) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
airPos = RandomPos.getAboveLandPos(DragonflyEntity.this, 16, 7, rotation, MHelper.PI2, 2, 1);
|
||||
airPos = HoverRandomPos.getPos(DragonflyEntity.this, 16, 7, rotation.x, rotation.z, MHelper.PI2, 3, 1);
|
||||
if (airPos != null && !isInVoid(airPos)) {
|
||||
return airPos;
|
||||
}
|
||||
|
@ -184,7 +183,7 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
return airPos;
|
||||
}
|
||||
return RandomPos.getAirPos(DragonflyEntity.this, 8, 4, -2, rotation, 1.5707963705062866D);
|
||||
return AirAndWaterRandomPos.getPos(DragonflyEntity.this, 8, 4, -2, rotation.x, rotation.z, 1.5707963705062866D);
|
||||
}
|
||||
|
||||
private boolean isInVoid(Vec3 pos) {
|
||||
|
|
|
@ -88,7 +88,7 @@ public class EndFishEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getBucketItemStack() {
|
||||
public ItemStack getBucketItemStack() {
|
||||
ItemStack bucket = EndItems.BUCKET_END_FISH.getDefaultInstance();
|
||||
CompoundTag tag = bucket.getOrCreateTag();
|
||||
tag.putByte("variant", entityData.get(VARIANT));
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.world.entity.*;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -16,11 +17,6 @@ import net.minecraft.server.level.ServerLevel;
|
|||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.AgeableMob;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.Mob;
|
||||
import net.minecraft.world.entity.MobSpawnType;
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
import net.minecraft.world.entity.ai.control.FlyingMoveControl;
|
||||
|
@ -142,18 +138,18 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected boolean makeFlySound() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier) {
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMovementNoisy() {
|
||||
return false;
|
||||
protected Entity.MovementEmission getMovementEmission() {
|
||||
return Entity.MovementEmission.EVENTS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlying() {
|
||||
return !this.onGround;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue