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;
|
2018-03-07 19:43:00 -08:00
|
|
|
import java.util.function.Consumer;
|
2016-03-15 22:48:01 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
/**
|
2018-03-07 19:43:00 -08:00
|
|
|
* Gathers all possible variants for this item
|
2016-03-20 23:21:07 -07:00
|
|
|
*/
|
2018-03-07 19:43:00 -08:00
|
|
|
void gatherVariants(Consumer<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
|
2018-02-13 23:32:15 -08:00
|
|
|
default ResourceLocation getCustomLocation() {
|
|
|
|
return null;
|
|
|
|
}
|
2016-03-15 22:48:01 -07:00
|
|
|
}
|