From fa7417f87bcc7709f53ab1862b500a2fdb74048d Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 7 Sep 2018 21:16:07 +0200 Subject: [PATCH] Added missing @Override annotations --- .../java/com/minelittlepony/gui/Label.java | 2 ++ .../texture/ISkinAvailableCallback.java | 1 + .../hdskins/util/IndentedToStringStyle.java | 1 + .../minelittlepony/gui/GuiPonySettings.java | 1 + .../model/AbstractPonyModel.java | 1 + .../minelittlepony/model/ModelWrapper.java | 2 ++ .../DefaultPonyArmorTextureResolver.java | 1 + .../model/armour/PonyArmor.java | 22 +++++++++++++------ .../model/components/UnicornHorn.java | 1 + .../model/player/ModelUnicorn.java | 1 + .../model/player/PlayerModels.java | 1 + .../model/ponies/ModelEnderStallion.java | 1 + .../render/ponies/RenderEnderStallion.java | 2 ++ .../render/ponies/RenderPonyGuardian.java | 1 + .../VillagerProfessionTextureCache.java | 1 + .../minelittlepony/util/render/Vertex.java | 1 + 16 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/hdskins/java/com/minelittlepony/gui/Label.java b/src/hdskins/java/com/minelittlepony/gui/Label.java index dac9aba5..a136cd93 100644 --- a/src/hdskins/java/com/minelittlepony/gui/Label.java +++ b/src/hdskins/java/com/minelittlepony/gui/Label.java @@ -28,10 +28,12 @@ public class Label extends GuiButton { this.text = translationString; } + @Override public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) { return false; } + @Override public void drawButton(Minecraft mc, int mouseX, int mouseY, float partialTicks) { if (center) { drawCenteredString(mc.fontRenderer, GameGui.format(text), x, y, color); diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/resources/texture/ISkinAvailableCallback.java b/src/hdskins/java/com/voxelmodpack/hdskins/resources/texture/ISkinAvailableCallback.java index 12f25a30..3f593aa6 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/resources/texture/ISkinAvailableCallback.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/resources/texture/ISkinAvailableCallback.java @@ -6,6 +6,7 @@ import java.awt.image.BufferedImage; @FunctionalInterface public interface ISkinAvailableCallback extends IImageBuffer { + @Override default BufferedImage parseUserSkin(BufferedImage image) { return image; } diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/util/IndentedToStringStyle.java b/src/hdskins/java/com/voxelmodpack/hdskins/util/IndentedToStringStyle.java index e3a584cb..e0e4c467 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/util/IndentedToStringStyle.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/util/IndentedToStringStyle.java @@ -27,6 +27,7 @@ public class IndentedToStringStyle extends ToStringStyle { super(o, IndentedToStringStyle.INSTANCE); } + @Override public String build() { return YELLOW + super.build(); } diff --git a/src/main/java/com/minelittlepony/gui/GuiPonySettings.java b/src/main/java/com/minelittlepony/gui/GuiPonySettings.java index df2f3bc6..6ab1e299 100644 --- a/src/main/java/com/minelittlepony/gui/GuiPonySettings.java +++ b/src/main/java/com/minelittlepony/gui/GuiPonySettings.java @@ -74,6 +74,7 @@ public class GuiPonySettings extends SettingsPanel { LiteLoader.getInstance().writeConfig(config); } + @Override protected String getTitle() { return OPTIONS_PREFIX + "title"; } diff --git a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java index 38a54cbb..6720c9dc 100644 --- a/src/main/java/com/minelittlepony/model/AbstractPonyModel.java +++ b/src/main/java/com/minelittlepony/model/AbstractPonyModel.java @@ -518,6 +518,7 @@ public abstract class AbstractPonyModel extends ModelPlayer implements IModel, P AbstractBoxRenderer.shiftRotationPoint(bipedLeftLeg, 0, 2, -8); } + @Override public void init(float yOffset, float stretch) { boxList.clear(); diff --git a/src/main/java/com/minelittlepony/model/ModelWrapper.java b/src/main/java/com/minelittlepony/model/ModelWrapper.java index 7805dc09..003d6bbb 100644 --- a/src/main/java/com/minelittlepony/model/ModelWrapper.java +++ b/src/main/java/com/minelittlepony/model/ModelWrapper.java @@ -39,11 +39,13 @@ public class ModelWrapper implements IModelWrapper { return armor; } + @Override public void apply(IPonyData meta) { body.metadata = meta; armor.apply(meta); } + @Override public void init() { body.init(0, 0); armor.init(); diff --git a/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java b/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java index 6a07c433..0355f41f 100644 --- a/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java +++ b/src/main/java/com/minelittlepony/model/armour/DefaultPonyArmorTextureResolver.java @@ -22,6 +22,7 @@ public class DefaultPonyArmorTextureResolver impleme private final Map HUMAN_ARMOUR = Maps.newHashMap(); private final Map PONY_ARMOUR = Maps.newHashMap(); + @Override public ResourceLocation getArmorTexture(T entity, ItemStack itemstack, EntityEquipmentSlot slot, ArmorLayer layer, @Nullable String type) { ItemArmor item = (ItemArmor) itemstack.getItem(); String texture = item.getArmorMaterial().getName(); diff --git a/src/main/java/com/minelittlepony/model/armour/PonyArmor.java b/src/main/java/com/minelittlepony/model/armour/PonyArmor.java index fd3f57e9..21cc9a8b 100644 --- a/src/main/java/com/minelittlepony/model/armour/PonyArmor.java +++ b/src/main/java/com/minelittlepony/model/armour/PonyArmor.java @@ -3,10 +3,10 @@ package com.minelittlepony.model.armour; import com.minelittlepony.model.capabilities.IModelWrapper; import com.minelittlepony.pony.data.IPonyData; -public class PonyArmor implements IModelWrapper, IEquestrianArmor { +import javax.annotation.Nonnull; +import javax.annotation.Nullable; - public final ModelPonyArmor outerLayer; - public final ModelPonyArmor innerLayer; +public class PonyArmor implements IModelWrapper, IEquestrianArmor { public PonyArmor(ModelPonyArmor outer, ModelPonyArmor inner) { outerLayer = outer; @@ -25,12 +25,20 @@ public class PonyArmor implements IModelWrapper, IEquestrianArmor { innerLayer.init(0, 0.5F); } - @Override - public ModelPonyArmor getArmorForLayer(ArmorLayer layer) { - if (layer == ArmorLayer.INNER) { + + @Nullable + public ModelPonyArmor outerLayer; + @Nullable + public ModelPonyArmor innerLayer; + + + @Override @Nonnull + public ModelPonyArmor getArmorForLayer(@Nullable ArmorLayer layer) { + + if (layer.ordinal() == ArmorLayer.INNER.ordinal()) { return innerLayer; } - return outerLayer; + return null; } } diff --git a/src/main/java/com/minelittlepony/model/components/UnicornHorn.java b/src/main/java/com/minelittlepony/model/components/UnicornHorn.java index c65edef1..a268386f 100644 --- a/src/main/java/com/minelittlepony/model/components/UnicornHorn.java +++ b/src/main/java/com/minelittlepony/model/components/UnicornHorn.java @@ -62,6 +62,7 @@ public class UnicornHorn implements IModelPart { } } + @Override public void setVisible(boolean visible) { isVisible = visible; } diff --git a/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java b/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java index f9d0a493..4bb22254 100644 --- a/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java +++ b/src/main/java/com/minelittlepony/model/player/ModelUnicorn.java @@ -37,6 +37,7 @@ public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn { unicornArmLeft.rotateAngleY = 0; } + @Override protected float getWobbleAmount() { if (isCasting()) { return 0; diff --git a/src/main/java/com/minelittlepony/model/player/PlayerModels.java b/src/main/java/com/minelittlepony/model/player/PlayerModels.java index 00453089..2cf890b0 100644 --- a/src/main/java/com/minelittlepony/model/player/PlayerModels.java +++ b/src/main/java/com/minelittlepony/model/player/PlayerModels.java @@ -20,6 +20,7 @@ public enum PlayerModels { ALICORN("alicorn", "slimalicorn", () -> PMAPI.alicorn, () -> PMAPI.alicornSmall), ZEBRA("zebra", "slimzebra", () -> PMAPI.zebra, () -> PMAPI.zebraSmall), SEAPONY("seapony", "slimseapony", () -> PMAPI.seapony, () -> PMAPI.seapony) { + @Override public RenderPonyPlayer createRenderer(RenderManager manager, boolean slimArms) { return new RenderSeaponyPlayer(manager, slimArms, PlayerModels.UNICORN.getModel(slimArms), getModel(slimArms)); } diff --git a/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java b/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java index 1bbfc302..13b3bd09 100644 --- a/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java +++ b/src/main/java/com/minelittlepony/model/ponies/ModelEnderStallion.java @@ -44,6 +44,7 @@ public class ModelEnderStallion extends ModelSkeletonPony { rightHorn.rotateAngleX = 0.5F; } + @Override public void setVisible(boolean visible) { super.setVisible(visible); diff --git a/src/main/java/com/minelittlepony/render/ponies/RenderEnderStallion.java b/src/main/java/com/minelittlepony/render/ponies/RenderEnderStallion.java index a18ef4af..c3b0580d 100644 --- a/src/main/java/com/minelittlepony/render/ponies/RenderEnderStallion.java +++ b/src/main/java/com/minelittlepony/render/ponies/RenderEnderStallion.java @@ -28,12 +28,14 @@ public class RenderEnderStallion extends RenderPonyMob implement super(manager, PMAPI.enderman); } + @Override protected void addLayers() { addLayer(createItemHoldingLayer()); addLayer(new LayerArrow(this)); addLayer(new LayerEyeGlow<>(this)); } + @Override protected LayerHeldPonyItem createItemHoldingLayer() { return new LayerHeldPonyItemMagical(this) { @Override diff --git a/src/main/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java b/src/main/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java index d1e20b6e..626f185a 100644 --- a/src/main/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java +++ b/src/main/java/com/minelittlepony/render/ponies/RenderPonyGuardian.java @@ -41,6 +41,7 @@ public class RenderPonyGuardian extends RenderGuardian { ponyRenderer.preRenderCallback(entity, ticks); } + @Override public void doRender(EntityGuardian entity, double x, double y, double z, float entityYaw, float partialTicks) { float origin = entity.height; diff --git a/src/main/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java b/src/main/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java index 0074f006..107a9619 100644 --- a/src/main/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java +++ b/src/main/java/com/minelittlepony/render/ponies/VillagerProfessionTextureCache.java @@ -21,6 +21,7 @@ class VillagerProfessionTextureCache implements ITextureSupplier { this.pool = pool; } + @Override public ResourceLocation supplyTexture(Integer profession) { ResourceLocation texture = getVillagerTexture(profession); diff --git a/src/main/java/com/minelittlepony/util/render/Vertex.java b/src/main/java/com/minelittlepony/util/render/Vertex.java index 6ddd0d24..7475c659 100644 --- a/src/main/java/com/minelittlepony/util/render/Vertex.java +++ b/src/main/java/com/minelittlepony/util/render/Vertex.java @@ -14,6 +14,7 @@ public class Vertex extends PositionTextureVertex { // The MCP name is misleading. // This is meant to return a COPY with the given texture position + @Override public Vertex setTexturePosition(float texX, float texY) { return new Vertex(this, texX, texY); }