diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index 8c65692a65..9dbbc613eb 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -6,10 +6,10 @@ orbs: parameters: artifact-name: type: string - default: aether-1.20.2-1.4.0-neoforge.jar + default: aether-1.20.2-1.4.1-neoforge.jar deploy-branch: type: string - default: 1.20.1-develop + default: 1.20.2-develop allow-deploy-and-discord-publish: type: boolean default: false diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bd0b0d895e..c8e3ffb936 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,19 @@ +# The Aether - NeoForge - 1.20.2-1.4.1 + +Changes + +- Rework the follow behavior for Moas now be controlled by shift right-clicking with a Nature Staff instead of by empty hand. +- Split some Moa Skin elements between the saddle layer and a hat layer. +- Make the Berry Bush model opaque with the fast graphics option. + +Fixes + +- Fix Aerbunny boosts sometimes not resetting from jumping on Blue Aerclouds. +- Fix speed effects not working on Swets and Moas. +- Fix the wings of Phygs, Flying Cows, and Valkyries not flashing red when hit. +- Fix gloves letting the sleeve layer clip through them slightly. +- Fix the selected Moa Skin slot texture being missing after 1.20.2. + # The Aether - NeoForge - 1.20.2-1.4.0 Additions diff --git a/gradle.properties b/gradle.properties index cd55211ff3..739c428107 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.daemon=false # Mod mod_id=aether mod_name=The Aether -mod_version=1.4.0 +mod_version=1.4.1 mc_version=1.20.2 neoforge_version=20.2.88 mappings=2023.12.10 diff --git a/src/generated/resources/.cache/1742123cf955ee7ecf092ba55decb836aa65bc2c b/src/generated/resources/.cache/1742123cf955ee7ecf092ba55decb836aa65bc2c index c5136b9b8d..0f805f80e1 100644 --- a/src/generated/resources/.cache/1742123cf955ee7ecf092ba55decb836aa65bc2c +++ b/src/generated/resources/.cache/1742123cf955ee7ecf092ba55decb836aa65bc2c @@ -1,4 +1,4 @@ -// 1.20.2 2024-02-22T19:23:10.0699315 Block States: aether +// 1.20.2 2024-04-24T12:52:28.7386266 Block States: aether 79cb0c0ea34a92e86b03080a209cb60f268cb31e assets/aether/blockstates/aerogel.json 28f7eea22b621bda459b2328c2252cdebe0bcdb9 assets/aether/blockstates/aerogel_slab.json 0866f96b2339b894ff4c8a01aebb3d87103eb0fb assets/aether/blockstates/aether_dirt.json @@ -248,8 +248,8 @@ a8854a5e210ca69e33042bfe746e6971e6a099b4 assets/aether/models/block/mossy_holyst cb2a8ab22c6bfe0e3353c310af35d8e990e9f926 assets/aether/models/block/pillar_horizontal.json 45eca4fd51bdc28e50e4ba3f0587c76d9f7f4450 assets/aether/models/block/pillar_top.json f4e9ea5d483484d62b4b6de8aea208b28a2e485c assets/aether/models/block/pillar_top_horizontal.json -402b62a8443994b9cf239cc5db1a8ddbb30cc007 assets/aether/models/block/potted_berry_bush.json -62591dd2d094bff022d534b7b91295e86a1e649b assets/aether/models/block/potted_berry_bush_stem.json +c555738f3c7edf5fbed00421dda5626335df4be2 assets/aether/models/block/potted_berry_bush.json +60782e46f7fdcad6bb7c691dd203caebc00738fc assets/aether/models/block/potted_berry_bush_stem.json 7c3a50c0820e7cf446e38e18b7cd7ec07d831566 assets/aether/models/block/potted_golden_oak_sapling.json eb9987a5ae084a2563cf1b396202a09d77a8877e assets/aether/models/block/potted_purple_flower.json eda9086f5b2a7381d2f2ef777f0196e2a17af85a assets/aether/models/block/potted_skyroot_sapling.json diff --git a/src/generated/resources/assets/aether/models/block/potted_berry_bush.json b/src/generated/resources/assets/aether/models/block/potted_berry_bush.json index e40401138d..291666951a 100644 --- a/src/generated/resources/assets/aether/models/block/potted_berry_bush.json +++ b/src/generated/resources/assets/aether/models/block/potted_berry_bush.json @@ -153,24 +153,24 @@ "north": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] }, "south": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] } }, "from": [ - 1, + 7, 4, 8 ], @@ -183,6 +183,47 @@ 8 ] }, + "to": [ + 9, + 6, + 8 + ] + }, + { + "faces": { + "north": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + }, + "south": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + } + }, + "from": [ + 1, + 6, + 8 + ], + "rotation": { + "angle": 45.0, + "axis": "y", + "origin": [ + 8, + 8, + 8 + ] + }, "to": [ 15, 16, @@ -194,18 +235,18 @@ "east": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] }, "west": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] } @@ -213,6 +254,47 @@ "from": [ 8, 4, + 7 + ], + "rotation": { + "angle": 45.0, + "axis": "y", + "origin": [ + 8, + 8, + 8 + ] + }, + "to": [ + 8, + 6, + 9 + ] + }, + { + "faces": { + "east": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + }, + "west": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + } + }, + "from": [ + 8, + 6, 1 ], "rotation": { diff --git a/src/generated/resources/assets/aether/models/block/potted_berry_bush_stem.json b/src/generated/resources/assets/aether/models/block/potted_berry_bush_stem.json index 27fb76879c..c3e3cb6c4e 100644 --- a/src/generated/resources/assets/aether/models/block/potted_berry_bush_stem.json +++ b/src/generated/resources/assets/aether/models/block/potted_berry_bush_stem.json @@ -153,24 +153,24 @@ "north": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] }, "south": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] } }, "from": [ - 1, + 7, 4, 8 ], @@ -183,6 +183,47 @@ 8 ] }, + "to": [ + 9, + 6, + 8 + ] + }, + { + "faces": { + "north": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + }, + "south": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + } + }, + "from": [ + 1, + 6, + 8 + ], + "rotation": { + "angle": 45.0, + "axis": "y", + "origin": [ + 8, + 8, + 8 + ] + }, "to": [ 15, 16, @@ -194,18 +235,18 @@ "east": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] }, "west": { "texture": "#stem", "uv": [ - 0.0, - 4.0, - 16.0, + 7.0, + 14.0, + 9.0, 16.0 ] } @@ -213,6 +254,47 @@ "from": [ 8, 4, + 7 + ], + "rotation": { + "angle": 45.0, + "axis": "y", + "origin": [ + 8, + 8, + 8 + ] + }, + "to": [ + 8, + 6, + 9 + ] + }, + { + "faces": { + "east": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + }, + "west": { + "texture": "#stem", + "uv": [ + 1.0, + 4.0, + 15.0, + 14.0 + ] + } + }, + "from": [ + 8, + 6, 1 ], "rotation": { diff --git a/src/main/java/com/aetherteam/aether/api/AetherAdvancementSoundOverrides.java b/src/main/java/com/aetherteam/aether/api/AetherAdvancementSoundOverrides.java index d8b5b99903..dafda21fab 100644 --- a/src/main/java/com/aetherteam/aether/api/AetherAdvancementSoundOverrides.java +++ b/src/main/java/com/aetherteam/aether/api/AetherAdvancementSoundOverrides.java @@ -15,7 +15,6 @@ import net.neoforged.neoforge.registries.RegistryBuilder; import javax.annotation.Nullable; -import java.util.Map; import java.util.function.Supplier; public class AetherAdvancementSoundOverrides { diff --git a/src/main/java/com/aetherteam/aether/block/natural/AetherGrassBlock.java b/src/main/java/com/aetherteam/aether/block/natural/AetherGrassBlock.java index cce83a4b64..34d799813f 100644 --- a/src/main/java/com/aetherteam/aether/block/natural/AetherGrassBlock.java +++ b/src/main/java/com/aetherteam/aether/block/natural/AetherGrassBlock.java @@ -7,7 +7,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; import net.minecraft.core.registries.Registries; -import net.minecraft.data.worldgen.placement.VegetationPlacements; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; import net.minecraft.world.level.LevelReader; diff --git a/src/main/java/com/aetherteam/aether/client/event/hooks/HandRenderHooks.java b/src/main/java/com/aetherteam/aether/client/event/hooks/HandRenderHooks.java index a036a95f8f..89f642f559 100644 --- a/src/main/java/com/aetherteam/aether/client/event/hooks/HandRenderHooks.java +++ b/src/main/java/com/aetherteam/aether/client/event/hooks/HandRenderHooks.java @@ -150,7 +150,7 @@ public static void renderPlayerArm(ICurioRenderer renderer, ItemStack glovesStac if (isSlim) { offset = 5.65F; } - poseStack.translate(f * offset, 0.0F, 0.0F); + poseStack.translate(f * offset, 0.005F, 0.0F); switch (handRenderType) { case GLOVES -> ((GlovesRenderer) renderer).renderFirstPerson(glovesStack, poseStack, buffer, combinedLight, player, arm); case SHIELD_OF_REPULSION -> ((ShieldOfRepulsionRenderer) renderer).renderFirstPerson(glovesStack, poseStack, buffer, combinedLight, player, arm); diff --git a/src/main/java/com/aetherteam/aether/client/gui/screen/perks/MoaSkinsScreen.java b/src/main/java/com/aetherteam/aether/client/gui/screen/perks/MoaSkinsScreen.java index 95c4022e42..b2499df67d 100644 --- a/src/main/java/com/aetherteam/aether/client/gui/screen/perks/MoaSkinsScreen.java +++ b/src/main/java/com/aetherteam/aether/client/gui/screen/perks/MoaSkinsScreen.java @@ -235,7 +235,7 @@ private void renderSlots(GuiGraphics guiGraphics, int mouseX, int mouseY) { // Renders an outline for the player's currently active Moa Skin. if (userSkinsData.containsKey(uuid) && userSkinsData.get(uuid).moaSkin() == skin) { - guiGraphics.blit(SLOT_SELECTED_SPRITE, x, y, 36, 191, 18, 18); // Render golden slot outline. + guiGraphics.blitSprite(SLOT_SELECTED_SPRITE, x, y, 18, 18); // Render golden slot outline. } guiGraphics.blitSprite(skin.getIconLocation(), x + 1, y + 1, 16, 16); // Render Moa skin icon. diff --git a/src/main/java/com/aetherteam/aether/client/renderer/AetherModelLayers.java b/src/main/java/com/aetherteam/aether/client/renderer/AetherModelLayers.java index 10414171bd..666602cd26 100644 --- a/src/main/java/com/aetherteam/aether/client/renderer/AetherModelLayers.java +++ b/src/main/java/com/aetherteam/aether/client/renderer/AetherModelLayers.java @@ -21,6 +21,7 @@ public class AetherModelLayers { public static final ModelLayerLocation SHEEPUFF_WOOL_PUFFED = register("sheepuff", "outer_puffed"); public static final ModelLayerLocation AERBUNNY = register("aerbunny"); public static final ModelLayerLocation MOA = register("moa"); + public static final ModelLayerLocation MOA_HAT = register("moa", "hat"); public static final ModelLayerLocation MOA_SADDLE = register("moa", "saddle"); public static final ModelLayerLocation AERWHALE = register("aerwhale"); public static final ModelLayerLocation AERWHALE_CLASSIC = register("aerwhale", "classic"); diff --git a/src/main/java/com/aetherteam/aether/client/renderer/AetherRenderers.java b/src/main/java/com/aetherteam/aether/client/renderer/AetherRenderers.java index df68bd726a..e13e6254b5 100644 --- a/src/main/java/com/aetherteam/aether/client/renderer/AetherRenderers.java +++ b/src/main/java/com/aetherteam/aether/client/renderer/AetherRenderers.java @@ -12,6 +12,7 @@ import com.aetherteam.aether.client.renderer.accessory.model.CapeModel; import com.aetherteam.aether.client.renderer.accessory.model.GlovesModel; import com.aetherteam.aether.client.renderer.accessory.model.PendantModel; +import com.aetherteam.aether.client.renderer.block.FastModel; import com.aetherteam.aether.client.renderer.blockentity.ChestMimicRenderer; import com.aetherteam.aether.client.renderer.blockentity.SkyrootBedRenderer; import com.aetherteam.aether.client.renderer.blockentity.TreasureChestRenderer; @@ -39,6 +40,9 @@ import net.minecraft.client.renderer.entity.ThrownItemRenderer; import net.minecraft.client.renderer.entity.player.PlayerRenderer; import net.minecraft.client.resources.PlayerSkin; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.decoration.ArmorStand; @@ -47,9 +51,12 @@ import net.neoforged.fml.common.Mod; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.neoforge.client.event.EntityRenderersEvent; +import net.neoforged.neoforge.client.event.ModelEvent; import top.theillusivec4.curios.api.client.CuriosRendererRegistry; +import java.util.ArrayList; import java.util.List; +import java.util.Map; @Mod.EventBusSubscriber(modid = Aether.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD) public class AetherRenderers { @@ -124,7 +131,8 @@ public static void registerLayerDefinitions(EntityRenderersEvent.RegisterLayerDe event.registerLayerDefinition(AetherModelLayers.SHEEPUFF_WOOL_PUFFED, () -> SheepuffWoolModel.createFurLayer(new CubeDeformation(3.75F), 2.0F)); event.registerLayerDefinition(AetherModelLayers.AERBUNNY, AerbunnyModel::createBodyLayer); event.registerLayerDefinition(AetherModelLayers.MOA, () -> MoaModel.createBodyLayer(CubeDeformation.NONE)); - event.registerLayerDefinition(AetherModelLayers.MOA_SADDLE, () -> MoaModel.createBodyLayer(new CubeDeformation(0.25F))); + event.registerLayerDefinition(AetherModelLayers.MOA_HAT, () -> MoaModel.createBodyLayer(new CubeDeformation(0.23F))); + event.registerLayerDefinition(AetherModelLayers.MOA_SADDLE, () -> MoaModel.createBodyLayer(new CubeDeformation(0.27F))); event.registerLayerDefinition(AetherModelLayers.AERWHALE, AerwhaleModel::createBodyLayer); event.registerLayerDefinition(AetherModelLayers.AERWHALE_CLASSIC, ClassicAerwhaleModel::createBodyLayer); @@ -223,4 +231,20 @@ public static void addEntityLayers(EntityRenderersEvent.AddLayers event) { renderer.addLayer(new ArmorStandCapeLayer(renderer)); } } + + @SubscribeEvent + public static void bakeModels(ModelEvent.ModifyBakingResult event) { + List> models = new ArrayList<>(); + for (Map.Entry model : event.getModels().entrySet()) { + if (model.getKey().getNamespace().equals(Aether.MODID)) { + String path = model.getKey().getPath(); + if (path.equals(BuiltInRegistries.BLOCK.getKey(AetherBlocks.BERRY_BUSH.get()).getPath())) { + models.add(model); + } else if (path.equals(BuiltInRegistries.BLOCK.getKey(AetherBlocks.BERRY_BUSH.get()).getPath())) { + models.add(model); + } + } + } + models.forEach(entry -> event.getModels().put(entry.getKey(), new FastModel(entry.getValue()))); + } } diff --git a/src/main/java/com/aetherteam/aether/client/renderer/block/FastModel.java b/src/main/java/com/aetherteam/aether/client/renderer/block/FastModel.java new file mode 100644 index 0000000000..f7f2d923e8 --- /dev/null +++ b/src/main/java/com/aetherteam/aether/client/renderer/block/FastModel.java @@ -0,0 +1,31 @@ +package com.aetherteam.aether.client.renderer.block; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.block.model.BakedQuad; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.Direction; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.client.ChunkRenderTypeSet; +import net.neoforged.neoforge.client.model.BakedModelWrapper; +import net.neoforged.neoforge.client.model.data.ModelData; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +public class FastModel extends BakedModelWrapper { + public FastModel(BakedModel originalModel) { + super(originalModel); + } + + @Override + public List getQuads(@Nullable BlockState state, @Nullable Direction side, RandomSource rand, ModelData extraData, @Nullable RenderType renderType) { + return super.getQuads(state, side, rand, extraData, null); + } + + @Override + public ChunkRenderTypeSet getRenderTypes(BlockState state, RandomSource rand, ModelData data) { + return ChunkRenderTypeSet.of(Minecraft.useFancyGraphics() ? RenderType.cutoutMipped() : RenderType.solid()); + } +} diff --git a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaHatEmissiveLayer.java b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaHatEmissiveLayer.java new file mode 100644 index 0000000000..2f8e61a9a2 --- /dev/null +++ b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaHatEmissiveLayer.java @@ -0,0 +1,75 @@ +package com.aetherteam.aether.client.renderer.entity.layers; + +import com.aetherteam.aether.client.gui.screen.perks.MoaSkinsScreen; +import com.aetherteam.aether.client.renderer.entity.model.MoaModel; +import com.aetherteam.aether.entity.passive.Moa; +import com.aetherteam.aether.perk.data.ClientMoaSkinPerkData; +import com.aetherteam.aether.perk.types.MoaData; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.RenderLayerParent; +import net.minecraft.client.renderer.entity.layers.RenderLayer; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.resources.ResourceLocation; + +import javax.annotation.Nullable; +import java.util.Map; +import java.util.UUID; + +public class MoaHatEmissiveLayer extends RenderLayer { + private final MoaModel hat; + + public MoaHatEmissiveLayer(RenderLayerParent entityRenderer, MoaModel hatModel) { + super(entityRenderer); + this.hat = hatModel; + } + + /** + * Renders an emissive hat layer on a Moa if the texture from a {@link com.aetherteam.aether.perk.types.MoaSkins.MoaSkin} is present. + * + * @param poseStack The rendering {@link PoseStack}. + * @param buffer The rendering {@link MultiBufferSource}. + * @param packedLight The {@link Integer} for the packed lighting for rendering. + * @param moa The {@link Moa} entity. + * @param limbSwing The {@link Float} for the limb swing rotation. + * @param limbSwingAmount The {@link Float} for the limb swing amount. + * @param partialTicks The {@link Float} for the game's partial ticks. + * @param ageInTicks The {@link Float} for the entity's age in ticks. + * @param netHeadYaw The {@link Float} for the head yaw rotation. + * @param headPitch The {@link Float} for the head pitch rotation. + */ + @Override + public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLight, Moa moa, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) { + ResourceLocation texture = this.getMoaSkinLocation(moa); + if (texture != null && !moa.isInvisible()) { + RenderType renderType = RenderType.eyes(texture); + this.getParentModel().copyPropertiesTo(this.hat); + this.hat.prepareMobModel(moa, limbSwing, limbSwingAmount, partialTicks); + this.hat.setupAnim(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); + VertexConsumer consumer = buffer.getBuffer(renderType); + this.hat.renderToBuffer(poseStack, consumer, 15728640, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); + } + } + + /** + * Retrieves the hat emissive texture for the player's {@link com.aetherteam.aether.perk.types.MoaSkins.MoaSkin}, if there is one and the player has a Moa Skin. + * + * @param moa The {@link Moa} to retrieve the skin from. + * @return The {@link ResourceLocation} for the hat texture. + */ + @Nullable + private ResourceLocation getMoaSkinLocation(Moa moa) { + UUID lastRiderUUID = moa.getLastRider(); + UUID moaUUID = moa.getMoaUUID(); + Map userSkinsData = ClientMoaSkinPerkData.INSTANCE.getClientPerkData(); + if (Minecraft.getInstance().screen instanceof MoaSkinsScreen moaSkinsScreen && moaSkinsScreen.getSelectedSkin() != null && moaSkinsScreen.getPreviewMoa() != null && moaSkinsScreen.getPreviewMoa().getMoaUUID() != null && moaSkinsScreen.getPreviewMoa().getMoaUUID().equals(moaUUID)) { + return moaSkinsScreen.getSelectedSkin().getHatEmissiveLocation(); + } else if (userSkinsData.containsKey(lastRiderUUID) && userSkinsData.get(lastRiderUUID).moaUUID() != null && userSkinsData.get(lastRiderUUID).moaUUID().equals(moaUUID)) { + return userSkinsData.get(lastRiderUUID).moaSkin().getHatEmissiveLocation(); + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaHatLayer.java b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaHatLayer.java new file mode 100644 index 0000000000..340e4ff437 --- /dev/null +++ b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaHatLayer.java @@ -0,0 +1,74 @@ +package com.aetherteam.aether.client.renderer.entity.layers; + +import com.aetherteam.aether.client.gui.screen.perks.MoaSkinsScreen; +import com.aetherteam.aether.client.renderer.entity.model.MoaModel; +import com.aetherteam.aether.entity.passive.Moa; +import com.aetherteam.aether.perk.data.ClientMoaSkinPerkData; +import com.aetherteam.aether.perk.types.MoaData; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.RenderLayerParent; +import net.minecraft.client.renderer.entity.layers.RenderLayer; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.resources.ResourceLocation; + +import javax.annotation.Nullable; +import java.util.Map; +import java.util.UUID; + +public class MoaHatLayer extends RenderLayer { + private final MoaModel hat; + + public MoaHatLayer(RenderLayerParent entityRenderer, MoaModel hatModel) { + super(entityRenderer); + this.hat = hatModel; + } + + /** + * Renders a hat layer on a Moa if the texture from a {@link com.aetherteam.aether.perk.types.MoaSkins.MoaSkin} is present. + * + * @param poseStack The rendering {@link PoseStack}. + * @param buffer The rendering {@link MultiBufferSource}. + * @param packedLight The {@link Integer} for the packed lighting for rendering. + * @param moa The {@link Moa} entity. + * @param limbSwing The {@link Float} for the limb swing rotation. + * @param limbSwingAmount The {@link Float} for the limb swing amount. + * @param partialTicks The {@link Float} for the game's partial ticks. + * @param ageInTicks The {@link Float} for the entity's age in ticks. + * @param netHeadYaw The {@link Float} for the head yaw rotation. + * @param headPitch The {@link Float} for the head pitch rotation. + */ + @Override + public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLight, Moa moa, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) { + ResourceLocation texture = this.getMoaSkinLocation(moa); + if (texture != null && !moa.isInvisible()) { + this.getParentModel().copyPropertiesTo(this.hat); + this.hat.prepareMobModel(moa, limbSwing, limbSwingAmount, partialTicks); + this.hat.setupAnim(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); + VertexConsumer consumer = buffer.getBuffer(RenderType.entityCutoutNoCull(texture)); + this.hat.renderToBuffer(poseStack, consumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); + } + } + + /** + * Retrieves the hat texture for the player's {@link com.aetherteam.aether.perk.types.MoaSkins.MoaSkin}, if there is one and the player has a Moa Skin. + * + * @param moa The {@link Moa} to retrieve the skin from. + * @return The {@link ResourceLocation} for the hat texture. + */ + @Nullable + private ResourceLocation getMoaSkinLocation(Moa moa) { + UUID lastRiderUUID = moa.getLastRider(); + UUID moaUUID = moa.getMoaUUID(); + Map userSkinsData = ClientMoaSkinPerkData.INSTANCE.getClientPerkData(); + if (Minecraft.getInstance().screen instanceof MoaSkinsScreen moaSkinsScreen && moaSkinsScreen.getSelectedSkin() != null && moaSkinsScreen.getPreviewMoa() != null && moaSkinsScreen.getPreviewMoa().getMoaUUID() != null && moaSkinsScreen.getPreviewMoa().getMoaUUID().equals(moaUUID)) { + return moaSkinsScreen.getSelectedSkin().getHatLocation(); + } else if (userSkinsData.containsKey(lastRiderUUID) && userSkinsData.get(lastRiderUUID).moaUUID() != null && userSkinsData.get(lastRiderUUID).moaUUID().equals(moaUUID)) { + return userSkinsData.get(lastRiderUUID).moaSkin().getHatLocation(); + } + return null; + } +} \ No newline at end of file diff --git a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaSaddleEmissiveLayer.java b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaSaddleEmissiveLayer.java index cd4e1b580b..92c7dec126 100644 --- a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaSaddleEmissiveLayer.java +++ b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/MoaSaddleEmissiveLayer.java @@ -50,7 +50,7 @@ public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLigh this.saddle.prepareMobModel(moa, limbSwing, limbSwingAmount, partialTicks); this.saddle.setupAnim(moa, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); VertexConsumer consumer = buffer.getBuffer(renderType); - this.saddle.renderToBuffer(poseStack, consumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); + this.saddle.renderToBuffer(poseStack, consumer, 15728640, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); } } } diff --git a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/QuadrupedWingsLayer.java b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/QuadrupedWingsLayer.java index 94360cc4ef..ac97b8cc1e 100644 --- a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/QuadrupedWingsLayer.java +++ b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/QuadrupedWingsLayer.java @@ -7,9 +7,9 @@ import net.minecraft.client.model.QuadrupedModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.layers.RenderLayer; -import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; public class QuadrupedWingsLayer> extends RenderLayer { @@ -44,7 +44,7 @@ public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLigh } this.wings.setupAnim(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch); VertexConsumer consumer = buffer.getBuffer(RenderType.entityCutoutNoCull(this.resourceLocation)); - this.wings.renderToBuffer(poseStack, consumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); + this.wings.renderToBuffer(poseStack, consumer, packedLight, LivingEntityRenderer.getOverlayCoords(entity, 0.0F), 1.0F, 1.0F, 1.0F, 1.0F); } } } diff --git a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/ValkyrieWingsLayer.java b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/ValkyrieWingsLayer.java index 7c64d4dd4a..291327dda3 100644 --- a/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/ValkyrieWingsLayer.java +++ b/src/main/java/com/aetherteam/aether/client/renderer/entity/layers/ValkyrieWingsLayer.java @@ -8,9 +8,9 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.layers.RenderLayer; -import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; @@ -42,7 +42,7 @@ public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLigh this.setupWingRotation(valkyrie, ageInTicks); VertexConsumer consumer = buffer.getBuffer(RenderType.entityCutoutNoCull(this.wingsLocation)); if (!valkyrie.isInvisible()) { - this.wings.renderToBuffer(poseStack, consumer, packedLight, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); + this.wings.renderToBuffer(poseStack, consumer, packedLight, LivingEntityRenderer.getOverlayCoords(valkyrie, 0.0F), 1.0F, 1.0F, 1.0F, 1.0F); } } diff --git a/src/main/java/com/aetherteam/aether/data/providers/AetherBlockStateProvider.java b/src/main/java/com/aetherteam/aether/data/providers/AetherBlockStateProvider.java index 2f2dc04cd0..4e0e66e549 100644 --- a/src/main/java/com/aetherteam/aether/data/providers/AetherBlockStateProvider.java +++ b/src/main/java/com/aetherteam/aether/data/providers/AetherBlockStateProvider.java @@ -215,12 +215,18 @@ public BlockModelBuilder pottedStemModel(Block block, Block stem, String locatio .element().from(6.0F, 0.0F, 6.0F).to(10.0F, 4.0F, 10.0F) .face(Direction.UP).uvs(6.0F, 6.0F, 10.0F, 10.0F).texture("#dirt").end() .face(Direction.DOWN).uvs(6.0F, 12.0F, 10.0F, 16.0F).texture("#flowerpot").cullface(Direction.DOWN).end().end() - .element().from(1.0F, 4.0F, 8.0F).to(15.0F, 16.0F, 8.0F).rotation().angle(45.0F).axis(Direction.Axis.Y).origin(8.0F, 8.0F, 8.0F).end() - .face(Direction.NORTH).uvs(0.0F, 4.0F, 16.0F, 16.0F).texture("#stem").end() - .face(Direction.SOUTH).uvs(0.0F, 4.0F, 16.0F, 16.0F).texture("#stem").end().end() - .element().from(8.0F, 4.0F, 1.0F).to(8.0F, 16.0F, 15.0F).rotation().angle(45.0F).axis(Direction.Axis.Y).origin(8.0F, 8.0F, 8.0F).end() - .face(Direction.EAST).uvs(0.0F, 4.0F, 16.0F, 16.0F).texture("#stem").end() - .face(Direction.WEST).uvs(0.0F, 4.0F, 16.0F, 16.0F).texture("#stem").end().end(); + .element().from(7.0F, 4.0F, 8.0F).to(9.0F, 6.0F, 8.0F).rotation().angle(45.0F).axis(Direction.Axis.Y).origin(8.0F, 8.0F, 8.0F).end() + .face(Direction.NORTH).uvs(7.0F, 14.0F, 9.0F, 16.0F).texture("#stem").end() + .face(Direction.SOUTH).uvs(7.0F, 14.0F, 9.0F, 16.0F).texture("#stem").end().end() + .element().from(1.0F, 6.0F, 8.0F).to(15.0F, 16.0F, 8.0F).rotation().angle(45.0F).axis(Direction.Axis.Y).origin(8.0F, 8.0F, 8.0F).end() + .face(Direction.NORTH).uvs(1.0F, 4.0F, 15.0F, 14.0F).texture("#stem").end() + .face(Direction.SOUTH).uvs(1.0F, 4.0F, 15.0F, 14.0F).texture("#stem").end().end() + .element().from(8.0F, 4.0F, 7.0F).to(8.0F, 6.0F, 9.0F).rotation().angle(45.0F).axis(Direction.Axis.Y).origin(8.0F, 8.0F, 8.0F).end() + .face(Direction.EAST).uvs(7.0F, 14.0F, 9.0F, 16.0F).texture("#stem").end() + .face(Direction.WEST).uvs(7.0F, 14.0F, 9.0F, 16.0F).texture("#stem").end().end() + .element().from(8.0F, 6.0F, 1.0F).to(8.0F, 16.0F, 15.0F).rotation().angle(45.0F).axis(Direction.Axis.Y).origin(8.0F, 8.0F, 8.0F).end() + .face(Direction.EAST).uvs(1.0F, 4.0F, 15.0F, 14.0F).texture("#stem").end() + .face(Direction.WEST).uvs(1.0F, 4.0F, 15.0F, 14.0F).texture("#stem").end().end(); } public void pottedStem(Block stem, String location) { diff --git a/src/main/java/com/aetherteam/aether/entity/ai/goal/MoaFollowGoal.java b/src/main/java/com/aetherteam/aether/entity/ai/goal/MoaFollowGoal.java index 99d2334c80..8536fef899 100644 --- a/src/main/java/com/aetherteam/aether/entity/ai/goal/MoaFollowGoal.java +++ b/src/main/java/com/aetherteam/aether/entity/ai/goal/MoaFollowGoal.java @@ -36,6 +36,11 @@ public boolean canUse() { return false; } else { this.player = this.moa.level().getNearestPlayer(this.targetingConditions, this.moa); + if (this.player != null) { + if (this.moa.distanceToSqr(this.player) >= 6.25) { + this.mob.getMoveControl().setWantedPosition(this.player.getX(), this.player.getY(), this.player.getZ(), this.speedModifier); + } + } return this.player != null; } } diff --git a/src/main/java/com/aetherteam/aether/entity/monster/Swet.java b/src/main/java/com/aetherteam/aether/entity/monster/Swet.java index fdc9514d65..af8f94e37e 100644 --- a/src/main/java/com/aetherteam/aether/entity/monster/Swet.java +++ b/src/main/java/com/aetherteam/aether/entity/monster/Swet.java @@ -430,7 +430,7 @@ public boolean canJump() { */ @Override public float getSteeringSpeed() { - return 0.084F; + return (float) (this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 0.21F); } /** diff --git a/src/main/java/com/aetherteam/aether/entity/passive/Aerbunny.java b/src/main/java/com/aetherteam/aether/entity/passive/Aerbunny.java index b42aaf9be9..e7d503e19f 100644 --- a/src/main/java/com/aetherteam/aether/entity/passive/Aerbunny.java +++ b/src/main/java/com/aetherteam/aether/entity/passive/Aerbunny.java @@ -35,7 +35,10 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.VoxelShape; import net.neoforged.neoforge.common.NeoForgeMod; import javax.annotation.Nullable; @@ -100,7 +103,30 @@ public void tick() { this.setPuffiness(0); } this.handlePlayerInput(); - if (this.getVehicle() != null && (this.getVehicle().onGround() || this.getVehicle().isInFluidType())) { // Reset the last tracked fall position if the Aerbunny touches a surface. + + boolean blockIntersection = false; + if (this.getVehicle() != null) { + AABB vehicleBounds = this.getVehicle().getBoundingBox(); + BlockPos minPos = BlockPos.containing(vehicleBounds.minX, vehicleBounds.minY, vehicleBounds.minZ); + BlockPos maxPos = BlockPos.containing(vehicleBounds.maxX, vehicleBounds.maxY, vehicleBounds.maxZ); + for (int x = minPos.getX(); x <= maxPos.getX(); x++) { + for (int y = minPos.getY(); y <= maxPos.getY(); y++) { + for (int z = minPos.getZ(); z <= maxPos.getZ(); z++) { + BlockPos pos = BlockPos.containing(x, y, z); + BlockState blockState = this.level().getBlockState(pos); + VoxelShape shape = blockState.getShape(this.getVehicle().level(), this.getVehicle().blockPosition()); + for (AABB aabb : shape.toAabbs()) { + AABB offset = aabb.move(pos); + if (vehicleBounds.intersects(offset)) { + blockIntersection = true; + } + } + } + } + } + } + + if (this.getVehicle() != null && (this.getVehicle().onGround() || this.getVehicle().isInFluidType() || blockIntersection)) { // Reset the last tracked fall position if the Aerbunny this.lastPos = null; } } diff --git a/src/main/java/com/aetherteam/aether/entity/passive/Moa.java b/src/main/java/com/aetherteam/aether/entity/passive/Moa.java index 40968f25c4..daaadfd887 100644 --- a/src/main/java/com/aetherteam/aether/entity/passive/Moa.java +++ b/src/main/java/com/aetherteam/aether/entity/passive/Moa.java @@ -362,15 +362,16 @@ public void onJump(Mob mob) { public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemStack = player.getItemInHand(hand); if (this.isPlayerGrown() && itemStack.is(AetherItems.NATURE_STAFF.get())) { // Sits a tamed Moa down when right-clicked with a Nature Staff. - itemStack.hurtAndBreak(1, player, (p) -> p.broadcastBreakEvent(hand)); - this.setSitting(!this.isSitting()); - this.spawnExplosionParticle(); - return InteractionResult.sidedSuccess(this.level().isClientSide()); - } else if (this.isPlayerGrown() && itemStack.isEmpty() && player.isShiftKeyDown()) { // Toggles whether a tamed Moa will follow the player. - if (this.getFollowing() == null) { - this.setFollowing(player.getUUID()); - } else { - this.setFollowing(null); + if (player.isShiftKeyDown()) { // Toggles whether a tamed Moa will follow the player. + if (this.getFollowing() == null) { + this.setFollowing(player.getUUID()); + } else { + this.setFollowing(null); + } + } else { // Sits a tamed Moa down when right-clicked with a Nature Staff. + itemStack.hurtAndBreak(1, player, (p) -> p.broadcastBreakEvent(hand)); + this.setSitting(!this.isSitting()); + this.spawnExplosionParticle(); } return InteractionResult.sidedSuccess(this.level().isClientSide()); } else if (!this.level().isClientSide() && this.isPlayerGrown() && this.isBaby() && this.isHungry() && this.getAmountFed() < 3 && itemStack.is(AetherTags.Items.MOA_FOOD_ITEMS)) { // Feeds a hungry baby Moa. @@ -741,8 +742,12 @@ public boolean canBeAffected(MobEffectInstance effect) { */ @Override public float getSpeed() { - MoaType moaType = this.getMoaType(); - return moaType != null ? moaType.getSpeed() : AetherMoaTypes.BLUE.get().getSpeed(); + if (this.isVehicle()) { + return this.getSteeringSpeed(); + } else { + MoaType moaType = this.getMoaType(); + return moaType != null ? (float) (this.getAttributeValue(Attributes.MOVEMENT_SPEED) * moaType.getSpeed()) : 0.155F; + } } /** @@ -772,7 +777,7 @@ public double getMountJumpStrength() { @Override public float getSteeringSpeed() { MoaType moaType = this.getMoaType(); - return moaType != null ? moaType.getSpeed() : AetherMoaTypes.BLUE.get().getSpeed(); + return moaType != null ? (float) (this.getAttributeValue(Attributes.MOVEMENT_SPEED) * moaType.getSpeed()) : 0.155F; } /** diff --git a/src/main/java/com/aetherteam/aether/perk/types/MoaSkins.java b/src/main/java/com/aetherteam/aether/perk/types/MoaSkins.java index c8bbad108e..42d0b0b95e 100644 --- a/src/main/java/com/aetherteam/aether/perk/types/MoaSkins.java +++ b/src/main/java/com/aetherteam/aether/perk/types/MoaSkins.java @@ -44,6 +44,7 @@ public static void registerMoaSkins() { .userPredicate((user) -> PerkUtil.hasLifetimeAscentanMoaSkins().test(user)) .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/boko_yellow_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/boko_yellow/boko_yellow.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_saddle.png")) .info(new MoaSkin.Info(User.Tier.ASCENTAN, true)) )); @@ -53,6 +54,7 @@ public static void registerMoaSkins() { .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/crookjaw_purple_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple.png")) .emissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_emissive.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_saddle.png")) .info(new MoaSkin.Info(User.Tier.ASCENTAN, true)) )); @@ -69,6 +71,7 @@ public static void registerMoaSkins() { .userPredicate((user) -> PerkUtil.hasLifetimeAscentanMoaSkins().test(user)) .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/halcian_pink_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/halcian_pink/halcian_pink.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_saddle.png")) .info(new MoaSkin.Info(User.Tier.ASCENTAN, true)) )); @@ -85,6 +88,7 @@ public static void registerMoaSkins() { .userPredicate((user) -> PerkUtil.hasAscentanMoaSkins().test(user)) .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/gilded_gharrix_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_saddle.png")) .info(new MoaSkin.Info(User.Tier.ASCENTAN, false)) )); @@ -93,6 +97,7 @@ public static void registerMoaSkins() { .userPredicate((user) -> PerkUtil.hasAscentanMoaSkins().test(user)) .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/gargoyle_moa_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_saddle.png")) .info(new MoaSkin.Info(User.Tier.ASCENTAN, false)) )); @@ -101,6 +106,7 @@ public static void registerMoaSkins() { .userPredicate((user) -> PerkUtil.hasAscentanMoaSkins().test(user)) .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/construction_bot_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/construction_bot/construction_bot.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/construction_bot/construction_bot_hat.png")) .emissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/construction_bot/construction_bot_emissive.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/construction_bot/construction_bot_saddle.png")) .info(new MoaSkin.Info(User.Tier.ASCENTAN, false)) @@ -161,6 +167,7 @@ public static void registerMoaSkins() { .userPredicate((user) -> PerkUtil.hasLifetimeValkyrieMoaSkins().test(user)) .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/valkyrie_moa_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_saddle.png")) .info(new MoaSkin.Info(User.Tier.VALKYRIE, true)) )); @@ -170,6 +177,8 @@ public static void registerMoaSkins() { .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/battle_sentry_moa_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa.png")) .emissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_emissive.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat.png")) + .hatEmissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat_emissive.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle.png")) .saddleEmissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle_emissive.png")) .info(new MoaSkin.Info(User.Tier.VALKYRIE, false)) @@ -189,6 +198,7 @@ public static void registerMoaSkins() { .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/molten_moa_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/molten_moa/molten_moa.png")) .emissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/molten_moa/molten_moa_emissive.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/molten_moa/molten_moa_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/molten_moa/molten_moa_saddle.png")) .info(new MoaSkin.Info(User.Tier.VALKYRIE, false)) )); @@ -198,6 +208,7 @@ public static void registerMoaSkins() { .iconLocation(new ResourceLocation(Aether.MODID, "skins/icons/undead_moa_icon")) .skinLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/undead_moa/undead_moa.png")) .emissiveLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/undead_moa/undead_moa_emissive.png")) + .hatLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/undead_moa/undead_moa_hat.png")) .saddleLocation(new ResourceLocation(Aether.MODID, "textures/entity/mobs/moa/skins/undead_moa/undead_moa_saddle.png")) .info(new MoaSkin.Info(User.Tier.VALKYRIE, false)) )); @@ -227,22 +238,28 @@ public static class MoaSkin { private final ResourceLocation skinLocation; @Nullable private final ResourceLocation emissiveLocation; + @Nullable + private final ResourceLocation hatLocation; + @Nullable + private final ResourceLocation hatEmissiveLocation; private final ResourceLocation saddleLocation; @Nullable private final ResourceLocation saddleEmissiveLocation; private final Info info; protected MoaSkin(String id, Properties properties) { - this(id, properties.displayName, properties.userPredicate, properties.iconLocation, properties.skinLocation, properties.emissiveLocation, properties.saddleLocation, properties.saddleEmissiveLocation, properties.info); + this(id, properties.displayName, properties.userPredicate, properties.iconLocation, properties.skinLocation, properties.emissiveLocation, properties.hatLocation, properties.hatEmissiveLocation, properties.saddleLocation, properties.saddleEmissiveLocation, properties.info); } - protected MoaSkin(String id, Component displayName, Predicate userPredicate, ResourceLocation iconLocation, ResourceLocation skinLocation, ResourceLocation emissiveLocation, ResourceLocation saddleLocation, ResourceLocation saddleEmissiveLocation, Info info) { + protected MoaSkin(String id, Component displayName, Predicate userPredicate, ResourceLocation iconLocation, ResourceLocation skinLocation, ResourceLocation emissiveLocation, ResourceLocation hatLocation, ResourceLocation hatEmissiveLocation, ResourceLocation saddleLocation, ResourceLocation saddleEmissiveLocation, Info info) { this.id = id; this.displayName = displayName; this.userPredicate = userPredicate; this.iconLocation = iconLocation; this.skinLocation = skinLocation; this.emissiveLocation = emissiveLocation; + this.hatLocation = hatLocation; + this.hatEmissiveLocation = hatEmissiveLocation; this.saddleLocation = saddleLocation; this.saddleEmissiveLocation = saddleEmissiveLocation; this.info = info; @@ -291,6 +308,20 @@ public ResourceLocation getEmissiveLocation() { return this.emissiveLocation; } + /** + * @return The {@link ResourceLocation} of the {@link MoaSkin}'s hat texture. + */ + public ResourceLocation getHatLocation() { + return this.hatLocation; + } + + /** + * @return The {@link ResourceLocation} of the {@link MoaSkin}'s hat emissive overlay texture. + */ + public ResourceLocation getHatEmissiveLocation() { + return this.hatEmissiveLocation; + } + /** * @return The {@link ResourceLocation} of the {@link MoaSkin}'s saddle texture. */ @@ -339,6 +370,10 @@ public static class Properties { private ResourceLocation skinLocation; @Nullable private ResourceLocation emissiveLocation = null; + @Nullable + private ResourceLocation hatLocation = null; + @Nullable + private ResourceLocation hatEmissiveLocation = null; private ResourceLocation saddleLocation; @Nullable private ResourceLocation saddleEmissiveLocation = null; @@ -384,6 +419,22 @@ public Properties emissiveLocation(@Nullable ResourceLocation emissiveLocation) return this; } + /** + * @see MoaSkin#getHatLocation() + */ + public Properties hatLocation(ResourceLocation hatLocation) { + this.hatLocation = hatLocation; + return this; + } + + /** + * @see MoaSkin#getHatEmissiveLocation() + */ + public Properties hatEmissiveLocation(ResourceLocation hatEmissiveLocation) { + this.hatEmissiveLocation = hatEmissiveLocation; + return this; + } + /** * @see MoaSkin#getSaddleLocation() */ diff --git a/src/main/resources/assets/aether/textures/block/natural/berry_bush.png b/src/main/resources/assets/aether/textures/block/natural/berry_bush.png index 08efd715b7..aa838984e5 100644 Binary files a/src/main/resources/assets/aether/textures/block/natural/berry_bush.png and b/src/main/resources/assets/aether/textures/block/natural/berry_bush.png differ diff --git a/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush.png b/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush.png index ae64bba710..55db0ccdba 100644 Binary files a/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush.png and b/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush.png differ diff --git a/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush_stem.png b/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush_stem.png index 53e0fa374b..dc5da677b6 100644 Binary files a/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush_stem.png and b/src/main/resources/assets/aether/textures/block/natural/potted_berry_bush_stem.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat.png new file mode 100644 index 0000000000..ea9ac87f9f Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat_emissive.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat_emissive.png new file mode 100644 index 0000000000..c7f4ac2d7b Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_hat_emissive.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle.png index 2eee20b97f..a98504bcf2 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle_emissive.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle_emissive.png index fa683390eb..ed08bc5cd0 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle_emissive.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/battle_sentry_moa/battle_sentry_moa_saddle_emissive.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_hat.png new file mode 100644 index 0000000000..ba04d8ba62 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_saddle.png index d7b595b9f0..634a3595e1 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/boko_yellow/boko_yellow_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_hat.png new file mode 100644 index 0000000000..71b2b9f9cc Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_saddle.png index 71b2b9f9cc..69a0960c59 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/construction_bot/construction_bot_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_hat.png new file mode 100644 index 0000000000..88c0f4b592 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_saddle.png index 3c796b70b9..2af2bd86c3 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/crookjaw_purple/crookjaw_purple_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_hat.png new file mode 100644 index 0000000000..b59b5972c4 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_saddle.png index 3de4b7629a..14ff74e691 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gargoyle_moa/gargoyle_moa_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_hat.png new file mode 100644 index 0000000000..e8138fd4c7 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_saddle.png index b5afdd0cc5..e53628e9a0 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/gilded_gharrix/gilded_gharrix_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_hat.png new file mode 100644 index 0000000000..4a0784f5c6 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_saddle.png index edd0efd6a9..7f7cd6cd48 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/halcian_pink/halcian_pink_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_hat.png new file mode 100644 index 0000000000..61b3c5844f Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_saddle.png index d47bb1cdb9..e096ace452 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/molten_moa/molten_moa_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_hat.png new file mode 100644 index 0000000000..0c779b1b26 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_saddle.png index 9ad0083a30..4eaf45e59a 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/undead_moa/undead_moa_saddle.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_hat.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_hat.png new file mode 100644 index 0000000000..87e5e41811 Binary files /dev/null and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_hat.png differ diff --git a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_saddle.png b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_saddle.png index dd7bbd2a59..3d381dcf3d 100644 Binary files a/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_saddle.png and b/src/main/resources/assets/aether/textures/entity/mobs/moa/skins/valkyrie_moa/valkyrie_moa_saddle.png differ diff --git a/update.json b/update.json index b5544e21cd..c353597a5c 100644 --- a/update.json +++ b/update.json @@ -1,10 +1,10 @@ { "homepage": "https://modrinth.com/mod/aether", "promos": { - "1.19.2-recommended": "1.19.2-1.4.0-forge", - "1.19.4-recommended": "1.19.4-1.4.0-forge", - "1.20.1-recommended": "1.20.1-1.4.0-neoforge", - "1.20.2-recommended": "1.20.2-1.4.0-neoforge", - "1.20.4-recommended": "1.20.4-1.4.0-neoforge" + "1.19.2-recommended": "1.19.2-1.4.1-forge", + "1.19.4-recommended": "1.19.4-1.4.1-forge", + "1.20.1-recommended": "1.20.1-1.4.1-neoforge", + "1.20.2-recommended": "1.20.2-1.4.1-neoforge", + "1.20.4-recommended": "1.20.4-1.4.1-neoforge" } }