Added missing @Override annotations

This commit is contained in:
Sollace 2018-09-07 21:16:07 +02:00
parent c57628a5bd
commit fa7417f87b
16 changed files with 33 additions and 7 deletions

View file

@ -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);

View file

@ -6,6 +6,7 @@ import java.awt.image.BufferedImage;
@FunctionalInterface
public interface ISkinAvailableCallback extends IImageBuffer {
@Override
default BufferedImage parseUserSkin(BufferedImage image) {
return image;
}

View file

@ -27,6 +27,7 @@ public class IndentedToStringStyle extends ToStringStyle {
super(o, IndentedToStringStyle.INSTANCE);
}
@Override
public String build() {
return YELLOW + super.build();
}

View file

@ -74,6 +74,7 @@ public class GuiPonySettings extends SettingsPanel {
LiteLoader.getInstance().writeConfig(config);
}
@Override
protected String getTitle() {
return OPTIONS_PREFIX + "title";
}

View file

@ -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();

View file

@ -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();

View file

@ -22,6 +22,7 @@ public class DefaultPonyArmorTextureResolver<T extends EntityLivingBase> impleme
private final Map<String, ResourceLocation> HUMAN_ARMOUR = Maps.newHashMap();
private final Map<ResourceLocation, ResourceLocation> 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();

View file

@ -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;
}
}

View file

@ -62,6 +62,7 @@ public class UnicornHorn implements IModelPart {
}
}
@Override
public void setVisible(boolean visible) {
isVisible = visible;
}

View file

@ -37,6 +37,7 @@ public class ModelUnicorn extends ModelEarthPony implements IModelUnicorn {
unicornArmLeft.rotateAngleY = 0;
}
@Override
protected float getWobbleAmount() {
if (isCasting()) {
return 0;

View file

@ -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));
}

View file

@ -44,6 +44,7 @@ public class ModelEnderStallion extends ModelSkeletonPony {
rightHorn.rotateAngleX = 0.5F;
}
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);

View file

@ -28,12 +28,14 @@ public class RenderEnderStallion extends RenderPonyMob<EntityEnderman> implement
super(manager, PMAPI.enderman);
}
@Override
protected void addLayers() {
addLayer(createItemHoldingLayer());
addLayer(new LayerArrow(this));
addLayer(new LayerEyeGlow<>(this));
}
@Override
protected LayerHeldPonyItem<EntityEnderman> createItemHoldingLayer() {
return new LayerHeldPonyItemMagical<EntityEnderman>(this) {
@Override

View file

@ -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;

View file

@ -21,6 +21,7 @@ class VillagerProfessionTextureCache implements ITextureSupplier<Integer> {
this.pool = pool;
}
@Override
public ResourceLocation supplyTexture(Integer profession) {
ResourceLocation texture = getVillagerTexture(profession);

View file

@ -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);
}