2019-03-23 20:49:34 +01:00
|
|
|
package com.minelittlepony.client;
|
2017-03-28 08:02:23 +02:00
|
|
|
|
2019-05-27 17:59:15 +02:00
|
|
|
import net.minecraft.client.render.entity.model.BipedEntityModel;
|
2017-03-28 08:02:23 +02:00
|
|
|
import net.minecraft.entity.Entity;
|
2019-05-27 17:59:15 +02:00
|
|
|
import net.minecraft.entity.EquipmentSlot;
|
|
|
|
import net.minecraft.entity.LivingEntity;
|
2017-03-28 08:02:23 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
2017-06-13 05:55:50 +02:00
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
|
|
|
* Proxy class for accessing forge fields and methods.
|
|
|
|
*/
|
2017-03-28 08:02:23 +02:00
|
|
|
public class ForgeProxy {
|
2018-04-27 13:49:33 +02:00
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
2018-05-06 13:34:11 +02:00
|
|
|
* Gets the mod armour texture for an associated item and slot.
|
2018-04-27 13:49:33 +02:00
|
|
|
*
|
2018-04-25 21:29:49 +02:00
|
|
|
* @param entity The entity to get armour for.
|
|
|
|
* @param item The armour item
|
|
|
|
* @param def Default return value if no mods present
|
|
|
|
* @param slot The slot this armour piece is place in.
|
|
|
|
* @param type unknown
|
|
|
|
* @return
|
|
|
|
*/
|
2019-05-27 17:59:15 +02:00
|
|
|
public static String getArmorTexture(Entity entity, ItemStack item, String def, EquipmentSlot slot, @Nullable String type) {
|
|
|
|
/*if (MineLPClient.getInstance().getModUtilities().hasFml())
|
|
|
|
return ForgeHooksClient.getArmorTexture(entity, item, def, slot, type);*/
|
2017-03-28 08:02:23 +02:00
|
|
|
return def;
|
|
|
|
}
|
|
|
|
|
2018-04-25 21:29:49 +02:00
|
|
|
/**
|
2018-05-06 13:34:11 +02:00
|
|
|
* Gets the mod armour model for an associated item and slot.
|
2018-04-27 13:49:33 +02:00
|
|
|
*
|
2018-04-25 21:29:49 +02:00
|
|
|
* @param entity The entity to get armour for.
|
|
|
|
* @param item The armour item
|
|
|
|
* @param slot The slot this armour piece is place in.
|
|
|
|
* @param def Default return value if no mods present
|
|
|
|
*/
|
2019-05-27 17:59:15 +02:00
|
|
|
public static <T extends LivingEntity> BipedEntityModel<T> getArmorModel(T entity, ItemStack item, EquipmentSlot slot, BipedEntityModel<T> def) {
|
|
|
|
/*if (MineLPClient.getInstance().getModUtilities().hasFml()) {
|
2017-03-28 08:02:23 +02:00
|
|
|
return ForgeHooksClient.getArmorModel(entity, item, slot, def);
|
2019-05-27 17:59:15 +02:00
|
|
|
}*/
|
2017-03-28 08:02:23 +02:00
|
|
|
return def;
|
|
|
|
}
|
|
|
|
}
|