diff --git a/src/main/java/net/id/paradiselost/client/model/entity/PopomEntityModel.java b/src/main/java/net/id/paradiselost/client/model/entity/PopomEntityModel.java index 00df62efb..2e843a943 100644 --- a/src/main/java/net/id/paradiselost/client/model/entity/PopomEntityModel.java +++ b/src/main/java/net/id/paradiselost/client/model/entity/PopomEntityModel.java @@ -2,6 +2,7 @@ import com.google.common.collect.ImmutableList; import net.id.paradiselost.entities.passive.PopomEntity; +import net.minecraft.client.model.Dilation; import net.minecraft.client.model.ModelData; import net.minecraft.client.model.ModelPart; import net.minecraft.client.model.ModelPartBuilder; @@ -44,13 +45,13 @@ public static TexturedModelData getTexturedModelData() { ModelData ModelData = new ModelData(); ModelPartData root = ModelData.getRoot(); - ModelPartData body0 = root.addChild("body0", ModelPartBuilder.create().uv(0, 78).cuboid(-5.0F, -9.0F, -8.0F, 10.0F, 6.0F, 15.0F), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); + ModelPartData body0 = root.addChild("body0", ModelPartBuilder.create().uv(0, 78).cuboid(-5.0F, -9.0F, -8.0F, 10.0F, 6.0F, 15.0F, new Dilation(1F)), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); - ModelPartData body1 = root.addChild("body1", ModelPartBuilder.create().uv(0, 54).cuboid(-5.5F, -11.0F, -8.0F, 11.0F, 8.0F, 16.0F), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); + ModelPartData body1 = root.addChild("body1", ModelPartBuilder.create().uv(0, 54).cuboid(-5.5F, -11.0F, -8.0F, 11.0F, 8.0F, 16.0F, new Dilation(1.05F)), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); - ModelPartData body2 = root.addChild("body2", ModelPartBuilder.create().uv(0, 28).cuboid(-6.0F, -12.0F, -8.0F, 12.0F, 9.0F, 17.0F), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); + ModelPartData body2 = root.addChild("body2", ModelPartBuilder.create().uv(0, 28).cuboid(-6.0F, -12.0F, -8.0F, 12.0F, 9.0F, 17.0F, new Dilation(1.1F)), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); - ModelPartData body3 = root.addChild("body3", ModelPartBuilder.create().uv(0, 0).cuboid(-7.0F, -13.0F, -8.0F, 14.0F, 10.0F, 18.0F), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); + ModelPartData body3 = root.addChild("body3", ModelPartBuilder.create().uv(0, 0).cuboid(-7.0F, -13.0F, -8.0F, 14.0F, 10.0F, 18.0F, new Dilation(1.15F)), ModelTransform.pivot(0.0F, 24.0F, 0.0F)); ModelPartData head = root.addChild("head", ModelPartBuilder.create().uv(38, 54).cuboid(-4.0F, -2.0F, -4.0F, 8.0F, 4.0F, 4.0F) .uv(38, 62).cuboid(-3.0F, -5.0F, -5.0F, 6.0F, 3.0F, 3.0F), ModelTransform.pivot(0.0F, 19.0F, -8.0F)); diff --git a/src/main/java/net/id/paradiselost/entities/passive/PopomEntity.java b/src/main/java/net/id/paradiselost/entities/passive/PopomEntity.java index 1100c8f7b..08cd28cf4 100644 --- a/src/main/java/net/id/paradiselost/entities/passive/PopomEntity.java +++ b/src/main/java/net/id/paradiselost/entities/passive/PopomEntity.java @@ -1,7 +1,16 @@ package net.id.paradiselost.entities.passive; +import net.id.paradiselost.tag.ParadiseLostItemTags; import net.id.paradiselost.util.ParadiseLostSoundEvents; import net.minecraft.entity.EntityType; +import net.minecraft.entity.ai.goal.AnimalMateGoal; +import net.minecraft.entity.ai.goal.EscapeDangerGoal; +import net.minecraft.entity.ai.goal.FollowParentGoal; +import net.minecraft.entity.ai.goal.LookAroundGoal; +import net.minecraft.entity.ai.goal.LookAtEntityGoal; +import net.minecraft.entity.ai.goal.SwimGoal; +import net.minecraft.entity.ai.goal.TemptGoal; +import net.minecraft.entity.ai.goal.WanderAroundFarGoal; import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.data.DataTracker; @@ -9,6 +18,7 @@ import net.minecraft.entity.data.TrackedDataHandlerRegistry; import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.entity.passive.PassiveEntity; +import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NbtCompound; import net.minecraft.registry.tag.ItemTags; @@ -30,6 +40,21 @@ protected void initDataTracker(DataTracker.Builder builder) { builder.add(FUR_SIZE, 0); } + @Override + protected void initGoals() { + + this.goalSelector.add(0, new SwimGoal(this)); + this.goalSelector.add(1, new EscapeDangerGoal(this, 1.1)); + this.goalSelector.add(2, new AnimalMateGoal(this, 0.9)); + this.goalSelector.add(3, new TemptGoal(this, 0.8, stack -> stack.isIn(ParadiseLostItemTags.MOA_TEMPTABLES), false)); + this.goalSelector.add(4, new FollowParentGoal(this, 1.05)); + this.goalSelector.add(6, new WanderAroundFarGoal(this, 0.6)); + this.goalSelector.add(7, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F)); + this.goalSelector.add(8, new LookAroundGoal(this)); + + super.initGoals(); + } + // Custom sounds for Popom @Override protected SoundEvent getAmbientSound() { @@ -61,13 +86,13 @@ public PassiveEntity createChild(ServerWorld world, PassiveEntity entity) { @Override public void writeCustomDataToNbt(NbtCompound compound) { super.writeCustomDataToNbt(compound); - compound.putInt("furSize", this.dataTracker.get(FUR_SIZE)); + compound.putInt("FurSize", this.dataTracker.get(FUR_SIZE)); } @Override public void readCustomDataFromNbt(NbtCompound compound) { super.readCustomDataFromNbt(compound); - this.dataTracker.set(FUR_SIZE, compound.getInt("furSize")); + this.dataTracker.set(FUR_SIZE, compound.getInt("FurSize")); } @Override diff --git a/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java b/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java index cd3d75108..a4933a6de 100644 --- a/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java +++ b/src/main/java/net/id/paradiselost/entities/passive/moa/MoaEntity.java @@ -109,7 +109,7 @@ protected void initGoals() { this.goalSelector.add(8, new LookAtEntityGoal(this, LivingEntity.class, 10F, 150f)); this.goalSelector.add(8, new StopAndLookAtEntityGoal(this, LivingEntity.class, 4, 180f)); - //this.goalSelector.add(9, new WanderAroundFarGoal(this, 0.32F, 0.01f)); //WanderGoal + this.goalSelector.add(9, new WanderAroundFarGoal(this, 0.32F, 0.01f)); //WanderGoal this.goalSelector.add(9, new MoaWanderAroundGoal(this, 0.320D, 230)); //this.goalSelector.add(10, new MoaWanderAroundGoal(this, 0.400D, 290)); this.goalSelector.add(10, new LookAroundGoal(this)); //LookGoal diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java index a75149c8f..95d8fd42e 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java @@ -20,10 +20,8 @@ import net.minecraft.fluid.Fluids; import net.minecraft.item.*; import net.minecraft.item.Item.Settings; -import net.minecraft.item.map.MapDecorationTypes; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; -import net.minecraft.registry.TradeRebalanceBuiltinRegistries; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.text.Text; import net.minecraft.util.Formatting; @@ -31,7 +29,6 @@ import net.minecraft.util.Rarity; import net.minecraft.util.Util; import net.minecraft.util.math.Direction; -import net.minecraft.village.TradeOffers; import org.jetbrains.annotations.NotNull; import java.util.Arrays; diff --git a/src/main/java/net/id/paradiselost/mixin/item/FilledMapMixin.java b/src/main/java/net/id/paradiselost/mixin/item/FilledMapMixin.java index 248c9acb3..4582901d3 100644 --- a/src/main/java/net/id/paradiselost/mixin/item/FilledMapMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/item/FilledMapMixin.java @@ -7,7 +7,6 @@ import net.minecraft.block.MapColor; import net.minecraft.item.FilledMapItem; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3i; import net.minecraft.world.BlockView; import net.minecraft.world.World; import org.spongepowered.asm.mixin.Mixin; diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json b/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json index 72bd465f9..b6f7efb6a 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json @@ -79,8 +79,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json b/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json index 6afb05057..21969fc60 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json @@ -81,8 +81,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json index 3540a6a20..2ed3e3c11 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json @@ -78,8 +78,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json index ac583dcb9..b7b6b99d0 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json @@ -78,8 +78,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json index 1602386a0..1594a56de 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json @@ -80,8 +80,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json index 5ec2eeb57..aa9dd457c 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json @@ -88,8 +88,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json index a84872793..5d551a12e 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json @@ -81,8 +81,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json b/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json index 082d03135..7d5340027 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json @@ -75,8 +75,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ], diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json b/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json index 625864e6f..a5c61d741 100644 --- a/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json +++ b/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json @@ -78,8 +78,8 @@ "creature": [ { "type": "paradise_lost:moa", - "maxCount": 13, - "minCount": 5, + "maxCount": 4, + "minCount": 2, "weight": 6 } ],