Code update
This commit is contained in:
parent
eca922058f
commit
5386d2e0f2
8 changed files with 61 additions and 63 deletions
|
@ -101,10 +101,11 @@ public class CubozoaEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.5);
|
||||
return LivingEntity
|
||||
.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.5);
|
||||
}
|
||||
|
||||
public int getVariant() {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.entity;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
|
@ -37,6 +35,8 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.registry.EndEntities;
|
||||
import ru.betterend.registry.EndSounds;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class DragonflyEntity extends DespawnableAnimal implements FlyingAnimal {
|
||||
public DragonflyEntity(EntityType<DragonflyEntity> entityType, Level world) {
|
||||
super(entityType, world);
|
||||
|
@ -48,11 +48,12 @@ public class DragonflyEntity extends DespawnableAnimal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 8.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.FLYING_SPEED, 1.0D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
return LivingEntity
|
||||
.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 8.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.FLYING_SPEED, 1.0D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -129,10 +129,11 @@ public class EndFishEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.75);
|
||||
return LivingEntity
|
||||
.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.75);
|
||||
}
|
||||
|
||||
public int getVariant() {
|
||||
|
|
|
@ -71,11 +71,12 @@ public class EndSlimeEntity extends Slime {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 1.0D)
|
||||
.add(Attributes.ATTACK_DAMAGE, 1.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.15D);
|
||||
return LivingEntity
|
||||
.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 1.0D)
|
||||
.add(Attributes.ATTACK_DAMAGE, 1.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.15D);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,12 +38,13 @@ public class ShadowWalkerEntity extends Monster {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return Monster.createMonsterAttributes()
|
||||
.add(Attributes.FOLLOW_RANGE, 35.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.15)
|
||||
.add(Attributes.ATTACK_DAMAGE, 4.5)
|
||||
.add(Attributes.ARMOR, 2.0)
|
||||
.add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
|
||||
return Monster
|
||||
.createMonsterAttributes()
|
||||
.add(Attributes.FOLLOW_RANGE, 35.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.15)
|
||||
.add(Attributes.ATTACK_DAMAGE, 4.5)
|
||||
.add(Attributes.ARMOR, 2.0)
|
||||
.add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package ru.betterend.entity;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
@ -41,6 +37,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.pathfinder.BlockPathTypes;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.entity.DespawnableAnimal;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.bclib.util.MHelper;
|
||||
|
@ -50,6 +47,8 @@ import ru.betterend.registry.EndBlocks;
|
|||
import ru.betterend.registry.EndEntities;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class SilkMothEntity extends DespawnableAnimal implements FlyingAnimal {
|
||||
private BlockPos hivePos;
|
||||
private BlockPos entrance;
|
||||
|
@ -65,11 +64,12 @@ public class SilkMothEntity extends DespawnableAnimal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.FLYING_SPEED, 0.4D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
return LivingEntity
|
||||
.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.FLYING_SPEED, 0.4D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
}
|
||||
|
||||
public void setHive(Level world, BlockPos hive) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue