mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Rename PonyArmors to be more obvious that it wraps ForgeHooks.
This commit is contained in:
parent
f626345e8c
commit
3b5b4bf011
6 changed files with 14 additions and 11 deletions
|
@ -1,18 +1,21 @@
|
|||
package com.minelittlepony;
|
||||
|
||||
import com.minelittlepony.forge.IPonyArmor;
|
||||
import com.minelittlepony.forge.IForgeHooks;
|
||||
import com.minelittlepony.forge.MLPCommonProxy;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ProxyContainer extends MLPCommonProxy {
|
||||
|
||||
private IPonyArmor ponyArmors;
|
||||
private IForgeHooks ponyArmors;
|
||||
|
||||
@Override
|
||||
public void setPonyArmors(IPonyArmor armors) {
|
||||
public void setForgeHooks(IForgeHooks armors) {
|
||||
this.ponyArmors = armors;
|
||||
}
|
||||
|
||||
public IPonyArmor getPonyArmors() {
|
||||
@Nullable
|
||||
public IForgeHooks getHooks() {
|
||||
return ponyArmors;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
|
||||
public class PonyArmors implements IPonyArmor {
|
||||
public class ForgePonyHooks implements IForgeHooks {
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(EntityLivingBase entity, ItemStack armor, String def, int slot, String type) {
|
|
@ -4,7 +4,7 @@ import net.minecraft.client.model.ModelBase;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IPonyArmor {
|
||||
public interface IForgeHooks {
|
||||
|
||||
String getArmorTexture(EntityLivingBase e, ItemStack item, String def, int slot, String type);
|
||||
|
|
@ -12,5 +12,5 @@ public abstract class MLPCommonProxy {
|
|||
instance = this;
|
||||
}
|
||||
|
||||
public abstract void setPonyArmors(IPonyArmor armors);
|
||||
public abstract void setForgeHooks(IForgeHooks armors);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,6 @@ public class MLPForge {
|
|||
@SuppressWarnings("unused")
|
||||
@EventHandler
|
||||
public void init(FMLPostInitializationEvent init) {
|
||||
MLPCommonProxy.getInstance().setPonyArmors(new PonyArmors());
|
||||
MLPCommonProxy.getInstance().setForgeHooks(new ForgePonyHooks());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package com.minelittlepony.renderer.layer;
|
|||
import com.google.common.collect.Maps;
|
||||
import com.minelittlepony.MineLittlePony;
|
||||
import com.minelittlepony.ducks.IRenderPony;
|
||||
import com.minelittlepony.forge.IPonyArmor;
|
||||
import com.minelittlepony.forge.IForgeHooks;
|
||||
import com.minelittlepony.model.AbstractPonyModel;
|
||||
import com.minelittlepony.model.PlayerModel;
|
||||
import com.minelittlepony.model.pony.ModelHumanPlayer;
|
||||
|
@ -205,7 +205,7 @@ public class LayerPonyArmor implements LayerRenderer<EntityLivingBase> {
|
|||
}
|
||||
|
||||
private static String getArmorTexture(EntityLivingBase entity, ItemStack item, String def, int slot, String type) {
|
||||
IPonyArmor armor = MineLittlePony.getProxy().getPonyArmors();
|
||||
IForgeHooks armor = MineLittlePony.getProxy().getHooks();
|
||||
if (armor != null) {
|
||||
return armor.getArmorTexture(entity, item, def, slot, type);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ public class LayerPonyArmor implements LayerRenderer<EntityLivingBase> {
|
|||
}
|
||||
|
||||
private static AbstractPonyModel getArmorModel(EntityLivingBase entity, ItemStack itemstack, int slot, AbstractPonyModel def) {
|
||||
IPonyArmor armor = MineLittlePony.getProxy().getPonyArmors();
|
||||
IForgeHooks armor = MineLittlePony.getProxy().getHooks();
|
||||
if (armor != null) {
|
||||
ModelBase model = armor.getArmorModel(entity, itemstack, slot, def);
|
||||
if (model instanceof ModelPonyArmor) {
|
||||
|
|
Loading…
Reference in a new issue