2016-03-15 22:48:01 -07:00
|
|
|
package WayofTime.bloodmagic.client;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.ItemMeshDefinition;
|
2016-03-20 23:21:07 -07:00
|
|
|
import net.minecraft.util.ResourceLocation;
|
2016-03-15 22:48:01 -07:00
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
|
2016-03-20 23:21:07 -07:00
|
|
|
import javax.annotation.Nullable;
|
2016-03-15 22:48:01 -07:00
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides a custom {@link ItemMeshDefinition} for automatic registration of
|
|
|
|
* renders.
|
|
|
|
*/
|
2017-08-15 21:30:48 -07:00
|
|
|
public interface IMeshProvider {
|
2016-03-20 23:21:07 -07:00
|
|
|
/**
|
|
|
|
* Gets the custom ItemMeshDefinition to use for the item.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
2016-03-20 23:21:07 -07:00
|
|
|
* @return - the custom ItemMeshDefinition to use for the item.
|
|
|
|
*/
|
2016-03-15 22:48:01 -07:00
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
ItemMeshDefinition getMeshDefinition();
|
|
|
|
|
2016-03-20 23:21:07 -07:00
|
|
|
/**
|
2017-10-09 12:29:43 -07:00
|
|
|
* Populates a list of all possible variants for this item
|
2016-03-20 23:21:07 -07:00
|
|
|
*/
|
2017-10-09 12:29:43 -07:00
|
|
|
void populateVariants(List<String> variants);
|
2016-03-20 23:21:07 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If a custom ResourceLocation is required, return it here.
|
2017-08-15 21:30:48 -07:00
|
|
|
* <p>
|
2016-03-20 23:21:07 -07:00
|
|
|
* Can be null if unneeded.
|
2017-08-15 21:30:48 -07:00
|
|
|
*
|
2016-03-20 23:21:07 -07:00
|
|
|
* @return - The custom ResourceLocation
|
|
|
|
*/
|
|
|
|
@Nullable
|
2017-10-09 12:29:43 -07:00
|
|
|
default ResourceLocation getCustomLocation() {
|
|
|
|
return null;
|
|
|
|
}
|
2016-03-15 22:48:01 -07:00
|
|
|
}
|