Skip to content

Commit

Permalink
Added Api Files from Avaritia
Browse files Browse the repository at this point in the history
added Api Files from Avaritia to fix an issue caused by them not being there
  • Loading branch information
jude123412 committed Dec 21, 2024
1 parent 00640d6 commit 2bbcd6e
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/api/java/morph/avaritia/api/ICosmicRenderItem.java
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);
}
25 changes: 25 additions & 0 deletions src/api/java/morph/avaritia/api/IHaloRenderItem.java
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 src/api/java/morph/avaritia/api/registration/IModelRegister.java
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();

}

0 comments on commit 2bbcd6e

Please sign in to comment.