-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Api Files from Avaritia to fix an issue caused by them not being there
- Loading branch information
1 parent
00640d6
commit 2bbcd6e
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package morph.avaritia.api; | ||
|
||
import net.minecraft.client.renderer.texture.TextureAtlasSprite; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
/** | ||
* Any item implementing this that also binds itself to TODO INPUT MODEL NAME HERE. | ||
* Will automatically have the cosmic shader applied to the mask with the given opacity. | ||
*/ | ||
public interface ICosmicRenderItem { | ||
|
||
/** | ||
* The mask where the cosmic overlay will be. | ||
* | ||
* @param stack The stack being rendered. | ||
* @param player The entity holding the item, May be null, If null assume either inventory, or ground. | ||
* @return The masked area where the cosmic overlay will be. | ||
*/ | ||
@SideOnly (Side.CLIENT) | ||
TextureAtlasSprite getMaskTexture(ItemStack stack, @Nullable EntityLivingBase player); | ||
|
||
/** | ||
* The opacity that the mask overlay will be rendered with. | ||
* | ||
* @param stack The stack being rendered. | ||
* @param player The entity holding the item, May be null, If null assume either inventory, or ground. | ||
* @return The opacity that the mask overlay will be rendered with. | ||
*/ | ||
@SideOnly (Side.CLIENT) | ||
float getMaskOpacity(ItemStack stack, @Nullable EntityLivingBase player); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package morph.avaritia.api; | ||
|
||
import net.minecraft.client.renderer.texture.TextureAtlasSprite; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
public interface IHaloRenderItem { | ||
|
||
@SideOnly (Side.CLIENT) | ||
boolean shouldDrawHalo(ItemStack stack); | ||
|
||
@SideOnly (Side.CLIENT) | ||
TextureAtlasSprite getHaloTexture(ItemStack stack); | ||
|
||
@SideOnly (Side.CLIENT) | ||
int getHaloColour(ItemStack stack); | ||
|
||
@SideOnly (Side.CLIENT) | ||
int getHaloSize(ItemStack stack); | ||
|
||
@SideOnly (Side.CLIENT) | ||
boolean shouldDrawPulse(ItemStack stack); | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/api/java/morph/avaritia/api/registration/IModelRegister.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package morph.avaritia.api.registration; | ||
|
||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
/** | ||
* Implemented on an item for model registration, completely arbitrary. | ||
*/ | ||
public interface IModelRegister { | ||
|
||
/** | ||
* Called when it is time to initialize models in preInit. | ||
*/ | ||
@SideOnly (Side.CLIENT) | ||
void registerModels(); | ||
|
||
} |