Skip to content

Commit

Permalink
update uranus
Browse files Browse the repository at this point in the history
  • Loading branch information
IAFEnvoy committed Jan 1, 2025
1 parent 3a94a60 commit a95e37e
Show file tree
Hide file tree
Showing 90 changed files with 320 additions and 412 deletions.
2 changes: 1 addition & 1 deletion common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies {
// Architectury API. This is optional, and you can comment it out if you don't need it.
modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version"

modImplementation "maven.modrinth:uranus:r83GL5c6"
modImplementation "maven.modrinth:uranus:oHm2ArPL"
modImplementation "maven.modrinth:jupiter:nhqjUZZy"

modCompileOnly "dev.emi:emi-fabric:${emi_version}:api"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public Identifier getUid() {
@Override
public void appendTooltip(ITooltip iTooltip, EntityAccessor entityAccessor, IPluginConfig iPluginConfig) {
if (entityAccessor.getEntity() instanceof EntityMultipartPart multipart) {
assert MinecraftClient.getInstance().world != null;
Entity parent = MinecraftClient.getInstance().world.getEntityLookup().get(multipart.getParentId());
if (parent instanceof MobEntity mob) {
iTooltip.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import net.minecraft.util.math.random.Random;
import net.minecraft.world.*;

@SuppressWarnings("ALL")
public class EntityAmphithere extends TameableEntity implements ISyncMount, IAnimatedEntity, IPhasesThroughBlock, IFlapable, IDragonFlute, IFlyingMount, IHasCustomizableAttributes, ICustomMoveController {
public static final Animation ANIMATION_BITE = Animation.create(15);
public static final Animation ANIMATION_BITE_RIDER = Animation.create(15);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public EntityAmphithereArrow(EntityType<? extends PersistentProjectileEntity> ty
this.setDamage(2.5F);
}

public EntityAmphithereArrow(EntityType type, LivingEntity shooter, World worldIn) {
public EntityAmphithereArrow(EntityType<? extends PersistentProjectileEntity> type, LivingEntity shooter, World worldIn) {
super(type, shooter, worldIn);
this.setDamage(2.5F);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.*;

@SuppressWarnings("ALL")
public class EntityDeathWorm extends TameableEntity implements ISyncMount, ICustomCollisions, IBlacklistedFromStatues, IAnimatedEntity, IVillagerFear, IAnimalFear, IGroundMount, IHasCustomizableAttributes, ICustomMoveController {
public static final Identifier TAN_LOOT = Identifier.of(IceAndFire.MOD_ID, "entities/deathworm_tan");
public static final Identifier WHITE_LOOT = Identifier.of(IceAndFire.MOD_ID, "entities/deathworm_white");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public abstract class EntityDragonBase extends TameableEntity implements NamedSc
private EntityDragonPart tail4Part;
private boolean isOverAir;

public EntityDragonBase(EntityType t, World world, DragonType type, double minimumDamage, double maximumDamage, double minimumHealth, double maximumHealth, double minimumSpeed, double maximumSpeed) {
public EntityDragonBase(EntityType<? extends EntityDragonBase> t, World world, DragonType type, double minimumDamage, double maximumDamage, double minimumHealth, double maximumHealth, double minimumSpeed, double maximumSpeed) {
super(t, world);
this.dragonType = type;
this.minimumDamage = minimumDamage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ public EntityDragonFireCharge(EntityType<? extends AbstractFireballEntity> type,
super(type, worldIn);
}

public EntityDragonFireCharge(EntityType<? extends AbstractFireballEntity> type, World worldIn, double posX,
double posY, double posZ, double accelX, double accelY, double accelZ) {
public EntityDragonFireCharge(EntityType<? extends AbstractFireballEntity> type, World worldIn, double posX, double posY, double posZ, double accelX, double accelY, double accelZ) {
super(type, worldIn, posX, posY, posZ, accelX, accelY, accelZ);
}

public EntityDragonFireCharge(EntityType type, World worldIn, EntityDragonBase shooter, double accelX, double accelY, double accelZ) {
public EntityDragonFireCharge(EntityType<? extends AbstractFireballEntity> type, World worldIn, EntityDragonBase shooter, double accelX, double accelY, double accelZ) {
super(type, worldIn, shooter, accelX, accelY, accelZ);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class EntityDreadBeast extends EntityDreadMob implements IAnimatedEntity,
private float firstWidth = 1.0F;
private float firstHeight = 1.0F;

public EntityDreadBeast(EntityType type, World worldIn) {
public EntityDreadBeast(EntityType<? extends EntityDreadBeast> type, World worldIn) {
super(type, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class EntityDreadGhoul extends EntityDreadMob implements IAnimatedEntity,
private float firstWidth = 1.0F;
private float firstHeight = 1.0F;

public EntityDreadGhoul(EntityType type, World worldIn) {
public EntityDreadGhoul(EntityType<? extends EntityDreadGhoul> type, World worldIn) {
super(type, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class EntityDreadHorse extends SkeletonHorseEntity implements IDreadMob {
protected static final TrackedData<Optional<UUID>> COMMANDER_UNIQUE_ID = DataTracker.registerData(EntityDreadHorse.class, TrackedDataHandlerRegistry.OPTIONAL_UUID);

public EntityDreadHorse(EntityType type, World worldIn) {
public EntityDreadHorse(EntityType<? extends EntityDreadHorse> type, World worldIn) {
super(type, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class EntityDreadKnight extends EntityDreadMob implements IAnimatedEntity
private int animationTick;
private Animation currentAnimation;

public EntityDreadKnight(EntityType type, World worldIn) {
public EntityDreadKnight(EntityType<? extends EntityDreadKnight> type, World worldIn) {
super(type, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.util.List;

@SuppressWarnings("ALL")
public class EntityDreadLichSkull extends PersistentProjectileEntity {
public EntityDreadLichSkull(EntityType<? extends PersistentProjectileEntity> type, World worldIn) {
super(type, worldIn);
Expand Down Expand Up @@ -166,15 +167,6 @@ protected void damageShield(PlayerEntity player, float damage) {
}
}

public int getBrightnessForRender() {
return 15728880;
}

/* @Override
public float getBrightness() {
return 1.0F;
}*/

@Override
public boolean hasNoGravity() {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class EntityDreadQueen extends EntityDreadMob implements IAnimatedEntity,
private int animationTick;
private Animation currentAnimation;

public EntityDreadQueen(EntityType t, World worldIn) {
public EntityDreadQueen(EntityType<? extends EntityDreadQueen> t, World worldIn) {
super(t, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class EntityDreadScuttler extends EntityDreadMob implements IAnimatedEnti
private float firstWidth = -1.0F;
private float firstHeight = -1.0F;

public EntityDreadScuttler(EntityType type, World worldIn) {
public EntityDreadScuttler(EntityType<? extends EntityDreadScuttler> type, World worldIn) {
super(type, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class EntityDreadThrall extends EntityDreadMob implements IAnimatedEntity
private int animationTick;
private Animation currentAnimation;

public EntityDreadThrall(EntityType type, World worldIn) {
public EntityDreadThrall(EntityType<? extends EntityDreadThrall> type, World worldIn) {
super(type, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import net.minecraft.world.ServerWorldAccess;
import net.minecraft.world.World;

@SuppressWarnings("ALL")
public class EntityGhost extends HostileEntity implements IAnimatedEntity, IVillagerFear, IAnimalFear, IHumanoid, IBlacklistedFromStatues, IHasCustomizableAttributes {
private static final TrackedData<Integer> COLOR = DataTracker.registerData(EntityGhost.class, TrackedDataHandlerRegistry.INTEGER);
private static final TrackedData<Boolean> CHARGING = DataTracker.registerData(EntityGhost.class, TrackedDataHandlerRegistry.BOOLEAN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import java.util.List;

@SuppressWarnings("ALL")
public class EntityGhostSword extends PersistentProjectileEntity {
private IntOpenHashSet piercedEntities;
private List<Entity> hitEntities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public EntityHydraArrow(EntityType<? extends PersistentProjectileEntity> t, Worl
}


public EntityHydraArrow(EntityType t, World worldIn, LivingEntity shooter) {
public EntityHydraArrow(EntityType<? extends EntityHydraArrow> t, World worldIn, LivingEntity shooter) {
super(t, shooter, worldIn);
this.setDamage(5F);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ public void tick() {
}
}


public boolean handleWaterMovement() {
return true;
}

@Override
protected void onCollision(HitResult movingObject) {
this.getWorld().getGameRules().getBoolean(GameRules.DO_MOB_GRIEFING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class EntityMobSkull extends AnimalEntity implements IBlacklistedFromStat
private static final TrackedData<Float> SKULL_DIRECTION = DataTracker.registerData(EntityMobSkull.class, TrackedDataHandlerRegistry.FLOAT);
private static final TrackedData<Integer> SKULL_ENUM = DataTracker.registerData(EntityMobSkull.class, TrackedDataHandlerRegistry.INTEGER);

public EntityMobSkull(EntityType t, World worldIn) {
public EntityMobSkull(EntityType<? extends EntityMobSkull> t, World worldIn) {
super(t, worldIn);
this.ignoreCameraFrustum = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

import java.util.EnumSet;

@SuppressWarnings("ALL")
public class EntityMyrmexRoyal extends EntityMyrmexBase {
public static final Animation ANIMATION_BITE = Animation.create(15);
public static final Animation ANIMATION_STING = Animation.create(15);
Expand All @@ -58,7 +59,7 @@ public class EntityMyrmexRoyal extends EntityMyrmexBase {
private boolean isLandNavigator;
private boolean isMating = false;

public EntityMyrmexRoyal(EntityType<EntityMyrmexRoyal> t, World worldIn) {
public EntityMyrmexRoyal(EntityType<? extends EntityMyrmexRoyal> t, World worldIn) {
super(t, worldIn);
this.switchNavigator(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class EntityMyrmexSentinel extends EntityMyrmexBase {
public int visibleTicks = 0;
public int daylightTicks = 0;

public EntityMyrmexSentinel(EntityType t, World worldIn) {
public EntityMyrmexSentinel(EntityType<? extends EntityMyrmexSentinel> t, World worldIn) {
super(t, worldIn);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class EntityMyrmexSwarmer extends EntityMyrmexRoyal {
private static final TrackedData<Optional<UUID>> SUMMONER_ID = DataTracker.registerData(EntityMyrmexSwarmer.class, TrackedDataHandlerRegistry.OPTIONAL_UUID);
private static final TrackedData<Integer> TICKS_ALIVE = DataTracker.registerData(EntityMyrmexSwarmer.class, TrackedDataHandlerRegistry.INTEGER);

public EntityMyrmexSwarmer(EntityType type, World worldIn) {
public EntityMyrmexSwarmer(EntityType<? extends EntityMyrmexSwarmer> type, World worldIn) {
super(type, worldIn);
this.moveControl = new FlyMoveHelper(this);
this.navigation = this.createNavigator(this.getWorld(), AdvancedPathNavigate.MovementType.FLYING);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import net.minecraft.util.math.random.Random;
import net.minecraft.world.*;

@SuppressWarnings("ALL")
public class EntityPixie extends TameableEntity {
public static final float[][] PARTICLE_RGB = new float[][]{new float[]{1F, 0.752F, 0.792F}, new float[]{0.831F, 0.662F, 1F}, new float[]{0.513F, 0.843F, 1F}, new float[]{0.654F, 0.909F, 0.615F}, new float[]{0.996F, 0.788F, 0.407F}};
public static final int STEAL_COOLDOWN = 3000;
Expand All @@ -58,7 +59,7 @@ public class EntityPixie extends TameableEntity {
private BlockPos housePos;
private boolean isSitting;

public EntityPixie(EntityType type, World worldIn) {
public EntityPixie(EntityType<? extends EntityPixie> type, World worldIn) {
super(type, worldIn);
this.moveControl = new AIMoveControl(this);
this.experiencePoints = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ public EntitySeaSerpentArrow(EntityType<? extends PersistentProjectileEntity> t,
this.setDamage(3F);
}

public EntitySeaSerpentArrow(EntityType<? extends PersistentProjectileEntity> t, World worldIn, double x, double y,
double z) {
public EntitySeaSerpentArrow(EntityType<? extends PersistentProjectileEntity> t, World worldIn, double x, double y, double z) {
this(t, worldIn);
this.setPosition(x, y, z);
this.setDamage(3F);
}

public EntitySeaSerpentArrow(EntityType t, World worldIn, LivingEntity shooter) {
public EntitySeaSerpentArrow(EntityType<? extends PersistentProjectileEntity> t, World worldIn, LivingEntity shooter) {
super(t, shooter, worldIn);
this.setDamage(3F);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ public void autoTarget() {
}
}

public boolean handleWaterMovement() {
return true;
}

@Override
protected ParticleEffect getParticleType() {
return ParticleTypes.BUBBLE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public EntityStymphalianArrow(EntityType<? extends PersistentProjectileEntity> t
this.setDamage(3.5F);
}

public EntityStymphalianArrow(EntityType t, World worldIn, LivingEntity shooter) {
public EntityStymphalianArrow(EntityType<? extends PersistentProjectileEntity> t, World worldIn, LivingEntity shooter) {
super(t, shooter, worldIn);
this.setDamage(3.5F);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.projectile.PersistentProjectileEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ShieldItem;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.world.World;

Expand Down Expand Up @@ -47,12 +46,8 @@ protected void onEntityHit(EntityHitResult entityHit) {
Entity shootingEntity = this.getOwner();
if (!(shootingEntity instanceof EntityStymphalianBird) || entityHit.getEntity() == null || !(entityHit.getEntity() instanceof EntityStymphalianBird)) {
super.onEntityHit(entityHit);
if (entityHit.getEntity() != null && entityHit.getEntity() instanceof EntityStymphalianBird LivingEntity) {
LivingEntity.setStuckArrowCount(LivingEntity.getStuckArrowCount() - 1);
ItemStack itemstack1 = LivingEntity.isUsingItem() ? LivingEntity.getActiveItem() : ItemStack.EMPTY;
if (itemstack1.getItem() instanceof ShieldItem) {
}
}
if (entityHit.getEntity() != null && entityHit.getEntity() instanceof EntityStymphalianBird bird)
bird.setStuckArrowCount(bird.getStuckArrowCount() - 1);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public AmphithereAITargetItems(MobEntity creature, boolean checkSight) {
}

public AmphithereAITargetItems(MobEntity creature, boolean checkSight, boolean onlyNearby) {
this(creature, 20, checkSight, onlyNearby, null);
this(creature, 20, checkSight, onlyNearby);
}

public AmphithereAITargetItems(MobEntity creature, int chance, boolean checkSight, boolean onlyNearby, final Predicate<? super T> targetSelector) {
public AmphithereAITargetItems(MobEntity creature, int chance, boolean checkSight, boolean onlyNearby) {
super(creature, checkSight, onlyNearby);
this.theNearestAttackableTargetSorter = new DragonAITargetItems.Sorter(creature);
this.targetChance = chance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.iafenvoy.iceandfire.entity.ai;

import com.iafenvoy.iceandfire.entity.EntityDeathWorm;
import net.minecraft.entity.Entity;
import net.minecraft.entity.ai.goal.Goal;
import net.minecraft.entity.ai.pathing.Path;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -56,15 +54,21 @@ public BlockPos findSandTarget() {
this.range = 25;
for (int x = this.mob.getWormHome().getX() - this.range; x < this.mob.getWormHome().getX() + this.range; x++)
for (int y = this.mob.getWormHome().getY() - this.range; y < this.mob.getWormHome().getY() + this.range; y++)
for (int z = this.mob.getWormHome().getZ() - this.range; z < this.mob.getWormHome().getZ() + this.range; z++)
if (this.mob.getWorld().getBlockState(new BlockPos(x, y, z)).isIn(BlockTags.SAND) && this.isDirectPathBetweenPoints(this.mob, this.mob.getPos(), new Vec3d(x, y, z)))
sand.add(new BlockPos(x, y, z));
for (int z = this.mob.getWormHome().getZ() - this.range; z < this.mob.getWormHome().getZ() + this.range; z++) {
if (this.mob.getWorld().getBlockState(new BlockPos(x, y, z)).isIn(BlockTags.SAND)) {
this.mob.getPos();
if (true) sand.add(new BlockPos(x, y, z));
}
}
} else
for (int x = (int) this.mob.getX() - this.range; x < (int) this.mob.getX() + this.range; x++)
for (int y = (int) this.mob.getY() - this.range; y < (int) this.mob.getY() + this.range; y++)
for (int z = (int) this.mob.getZ() - this.range; z < (int) this.mob.getZ() + this.range; z++)
if (this.mob.getWorld().getBlockState(new BlockPos(x, y, z)).isIn(BlockTags.SAND) && this.isDirectPathBetweenPoints(this.mob, this.mob.getPos(), new Vec3d(x, y, z)))
sand.add(new BlockPos(x, y, z));
for (int z = (int) this.mob.getZ() - this.range; z < (int) this.mob.getZ() + this.range; z++) {
if (this.mob.getWorld().getBlockState(new BlockPos(x, y, z)).isIn(BlockTags.SAND)) {
this.mob.getPos();
if (true) sand.add(new BlockPos(x, y, z));
}
}

if (!sand.isEmpty()) return sand.get(this.mob.getRandom().nextInt(sand.size()));
} else {
Expand All @@ -73,8 +77,4 @@ public BlockPos findSandTarget() {
}
return null;
}

public boolean isDirectPathBetweenPoints(Entity entity, Vec3d vec1, Vec3d vec2) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
import net.minecraft.entity.ai.goal.ActiveTargetGoal;
import net.minecraft.entity.player.PlayerEntity;

import java.util.function.Predicate;

public class MyrmexAIAttackPlayers extends ActiveTargetGoal {
public class MyrmexAIAttackPlayers extends ActiveTargetGoal<PlayerEntity> {
private final EntityMyrmexBase myrmex;

@SuppressWarnings("unchecked")
public MyrmexAIAttackPlayers(EntityMyrmexBase myrmex) {
super(myrmex, PlayerEntity.class, 10, true, true, (Predicate<PlayerEntity>) entity -> entity != null && (myrmex.getHive() == null
|| myrmex.getHive().isPlayerReputationLowEnoughToFight(entity.getUuid())));
super(myrmex, PlayerEntity.class, 10, true, true, entity -> entity != null && (myrmex.getHive() == null || myrmex.getHive().isPlayerReputationLowEnoughToFight(entity.getUuid())));
this.myrmex = myrmex;
}

Expand Down
Loading

0 comments on commit a95e37e

Please sign in to comment.