BloodMagic/src/main/java/WayofTime/bloodmagic/client/IMeshProvider.java

41 lines
1 KiB
Java
Raw Normal View History

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