Skip to content

Commit

Permalink
feat: 0.4.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
JimenezLi committed Feb 23, 2024
1 parent c948357 commit 0c10043
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 86 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.4.2
## Features
- Vedal and Giga Vedal won't be instantly killed by lightning
- Swarm Drone can catch wolf, which is Neuro's [dogcopter project](https://twitter.com/NeurosamaAI/status/1760777880991096872)

# 0.4.1
## Features
- Miyune now spawns in the overworld in every biome
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package jimenezli.neuro21.entity;

import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.animal.Turtle;
import net.minecraft.world.level.Level;

public class GigaVedalEntity extends VedalEntity {
Expand All @@ -12,11 +12,11 @@ public GigaVedalEntity(EntityType<? extends VedalEntity> entityType, Level level
}

public static AttributeSupplier.Builder createAttributes() {
return Mob.createMobAttributes().add(Attributes.ATTACK_DAMAGE, 2.0D).add(Attributes.MOVEMENT_SPEED, 0.3).add(Attributes.MAX_HEALTH, 20.0);
return Turtle.createAttributes().add(Attributes.ATTACK_DAMAGE, 2.0D).add(Attributes.MOVEMENT_SPEED, 0.3).add(Attributes.MAX_HEALTH, 40.0);
}

public void tick() {
super.tick();
this.setSpeed(0.3f);
this.setSpeed(1.0f);
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package jimenezli.neuro21.entity;

import jimenezli.neuro21.entity.ai.goal.NeurosamaFamilyHurtByTargetGoal;
import jimenezli.neuro21.entity.boss.hiyori.HiyoriBossEntity;
import jimenezli.neuro21.handler.EntityHandler;
import jimenezli.neuro21.handler.ItemHandler;
import jimenezli.neuro21.util.NeurosamaType;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.Difficulty;
import net.minecraft.world.entity.AgeableMob;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LightningBolt;
Expand Down Expand Up @@ -67,6 +65,9 @@ public NeurosamaEntity getBreedOffspring(ServerLevel world, AgeableMob ageable)
return NeurosamaType.getNeurosama(type).create(world);
}

/**
* Turtle near thunder dies immediately, so this method doesn't inherit the parent
*/
public void thunderHit(ServerLevel serverLevel, LightningBolt lightningBolt) {
if (this.getClass() == VedalEntity.class) {
GigaVedalEntity gigaVedal = EntityHandler.GIGA_VEDAL.get().create(serverLevel);
Expand All @@ -81,8 +82,6 @@ public void thunderHit(ServerLevel serverLevel, LightningBolt lightningBolt) {
gigaVedal.setPersistenceRequired();
serverLevel.addFreshEntityWithPassengers(gigaVedal);
this.discard();
} else {
super.thunderHit(serverLevel, lightningBolt);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
Expand All @@ -13,10 +14,13 @@
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal;
import net.minecraft.world.entity.ai.navigation.FlyingPathNavigation;
import net.minecraft.world.entity.ai.navigation.PathNavigation;
import net.minecraft.world.entity.animal.Wolf;
import net.minecraft.world.entity.monster.Monster;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;

import java.util.List;

public class SwarmDroneEntity extends Monster {
public SwarmDroneEntity(EntityType<? extends Monster> entityType, Level level) {
super(entityType, level);
Expand Down Expand Up @@ -61,6 +65,28 @@ protected SoundEvent getDeathSound() {
return SoundHandler.EXPLOSION.getOrNull();
}

public double getPassengersRidingOffset() {
return -(double)this.getType().getDimensions().height * 0.5D;
}

/**
* Swarm Drone can catch wolf, which is Neuro's dogcopter project
*/
public void aiStep() {
super.aiStep();
if (!this.level.isClientSide && this.isAlive()) {
if (this.getPassengers().isEmpty()) {
List<Entity> nearbyEntities = this.level.getEntities(this, this.getBoundingBox().inflate(2.0, 1.0, 2.0));
for (Entity entity : nearbyEntities) {
if ((entity instanceof Wolf) && entity.getVehicle() == null) {
entity.startRiding(this);
break;
}
}
}
}
}

public void tick() {
super.tick();
this.setNoGravity(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public class EntityNames {
public static final String NEUROSAMA = "neurosama";
public static final String EVIL_NEUROSAMA = "evil_neurosama";
public static final String HIYORI = "hiyori";
public static final String IRON_COW = "iron_cow";
public static final String HIYORI_BOSS = "hiyori_boss";
public static final String GYMBAG = "gymbag";
public static final String SWARM_DRONE = "swarm_drone";
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.19.2
enabled_platforms=fabric,forge

archives_base_name=neuro21
mod_version=0.4.1
mod_version=0.4.2
maven_group=jimenezli.neuro21

architectury_version=6.5.77
Expand Down

0 comments on commit 0c10043

Please sign in to comment.