Skip to content

Commit

Permalink
Adjusted backported changes to 1.19.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Majrusz committed May 27, 2023
1 parent f19cf9e commit f165793
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public SpawnPlayerZombie() {
private void spawnZombie( OnDeath.Data data ) {
Player player = ( Player )data.target;
EntityType< ? extends Zombie > zombieType = getZombieType( data.attacker );
Zombie zombie = zombieType.spawn( data.getServerLevel(), ( CompoundTag )null, null, player.blockPosition(), MobSpawnType.EVENT, true, true );
Zombie zombie = zombieType.spawn( data.getServerLevel(), ( CompoundTag )null, null, null, player.blockPosition(), MobSpawnType.EVENT, true, true );
if( zombie == null )
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private void spawnWitherSkeleton( OnDeath.Data data ) {
ParticleHandler.SOUL.spawn( level, position, 100, ParticleHandler.offset( 1.0f ) );
}
if( slider.isFinished() ) {
EntityType.WITHER_SKELETON.spawn( level, ( CompoundTag )null, null, new BlockPos( data.target.position() ), MobSpawnType.EVENT, true, true );
EntityType.WITHER_SKELETON.spawn( level, ( CompoundTag )null, null, null, new BlockPos( data.target.position() ), MobSpawnType.EVENT, true, true );
}
} );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.ai.navigation.PathNavigation;
import net.minecraft.world.phys.Vec3;

public class UndeadArmyAttackPositionGoal extends Goal {
final Mob undead;
Expand Down Expand Up @@ -56,7 +55,7 @@ private boolean hasAnyTarget() {
}

private double getDistanceToAttackPosition() {
return AnyPos.from( this.undead.position() ).dist2d( this.attackPosition.getCenter() ).doubleValue();
return AnyPos.from( this.undead.position() ).dist2d( AnyPos.from( this.attackPosition ).center() ).doubleValue();
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.mlib.animations.Frame;
import com.mlib.animations.InterpolationType;
import com.mlib.math.AnyPos;
import com.mojang.math.Vector3f;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.HierarchicalModel;
import net.minecraft.client.model.geom.ModelPart;
Expand All @@ -14,7 +15,6 @@
import net.minecraft.util.Mth;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import org.joml.Vector3f;

@OnlyIn( Dist.CLIENT )
public class CerberusModel< Type extends CerberusEntity > extends HierarchicalModel< Type > {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void setState( Phase.State state, int ticksLeft ) {
}

public double distanceTo( BlockPos position ) {
return AnyPos.from( position.getCenter() ).dist2d( this.positionToAttack.getCenter() ).doubleValue();
return AnyPos.from( position ).center().dist2d( AnyPos.from( this.positionToAttack ).center() ).doubleValue();
}

public boolean hasFinished() {
Expand Down

0 comments on commit f165793

Please sign in to comment.