Backported Sun Spirit and Fire Minion fixes.

This commit is contained in:
bconlon 2020-07-27 15:55:26 -07:00
parent 198c5dc2fe
commit 2d72432435
4 changed files with 13 additions and 24 deletions

View file

@ -26,7 +26,7 @@ public class EntityFireMinion extends EntityAetherMob {
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(12.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(25.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(10.0D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D);

View file

@ -56,7 +56,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss {
public EntitySunSpirit(World worldIn) {
super(worldIn);
this.setSize(2.25F, 2.5F);
this.setSize(2.5F, 2.8F);
this.dataWatcher.updateObject(20, AetherNameGen.gen());
}
@ -192,6 +192,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss {
}
if (this.isDead()) {
this.setFreezing(true);
this.chatLine(dungeonTarget, "\u00a7bSuch bitter cold... is this the feeling... of pain?");
this.chatCount = 100;
@ -213,23 +214,6 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss {
}
}
/*
WorldProvider provider = this.worldObj.provider;
if (provider instanceof AetherWorldProvider)
{
AetherWorldProvider aetherProvider = (AetherWorldProvider) provider;
if (!this.worldObj.isRemote)
{
if (aetherProvider.getIsEternalDay())
{
aetherProvider.setIsEternalDay(true);
}
}
}
*/
this.setDoor(Blocks.air);
this.unlockTreasure();
}
@ -481,6 +465,7 @@ public class EntitySunSpirit extends EntityFlying implements IMob, IAetherBoss {
if (flag) {
EntityFireMinion minion = new EntityFireMinion(this.worldObj);
minion.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F);
minion.setAttackTarget(this.getAttackTarget());
if (!this.worldObj.isRemote) {
this.worldObj.spawnEntityInWorld(minion);

View file

@ -1,10 +1,9 @@
package com.legacy.aether.network.packets;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import java.util.Objects;
public class PacketExtendedAttack extends AetherPacket<PacketExtendedAttack>
{
int entityID;
@ -40,6 +39,11 @@ public class PacketExtendedAttack extends AetherPacket<PacketExtendedAttack>
@Override
public void handleServer(PacketExtendedAttack message, EntityPlayer player)
{
player.attackTargetEntityWithCurrentItem(Objects.requireNonNull(player.worldObj.getEntityByID(message.entityID)));
Entity entityFromID = player.worldObj.getEntityByID(message.entityID);
if (entityFromID != null)
{
player.attackTargetEntityWithCurrentItem(entityFromID);
}
}
}

View file

@ -43,11 +43,11 @@ public class AetherWorldProvider extends WorldProvider {
{
if (!data.isShouldCycleCatchup())
{
if (data.getAetherTime() != (worldTime % 24000L))
if (data.getAetherTime() != (worldTime % 24000L) && data.getAetherTime() != (worldTime + 1 % 24000L) && data.getAetherTime() != (worldTime - 1 % 24000L))
{
data.setAetherTime(Math.floorMod(data.getAetherTime() - 1, 24000L));
}
else if (data.getAetherTime() == ((worldTime + 1) % 24000L) || data.getAetherTime() == ((worldTime - 1) % 24000L) || data.getAetherTime() == (worldTime % 24000L))
else
{
data.setShouldCycleCatchup(true);
}