diff options
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
45 files changed, 777 insertions, 628 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java index a2e7858fbd..8957f3bbbc 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java +++ b/src/main/java/gregtech/api/interfaces/IBlockOnWalkOver.java @@ -4,5 +4,5 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.world.World; public interface IBlockOnWalkOver { - public void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ); + void onWalkOver(EntityLivingBase aEntity, World aWorld, int aX, int aY, int aZ); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IChunkLoader.java b/src/main/java/gregtech/api/interfaces/IChunkLoader.java new file mode 100644 index 0000000000..adba5e721e --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IChunkLoader.java @@ -0,0 +1,9 @@ +package gregtech.api.interfaces; + +import net.minecraft.world.ChunkCoordIntPair; + +// This interface is implemented by the machines that actively load a working chunk +public interface IChunkLoader { + // return a working chunk coordinates, may be null + ChunkCoordIntPair getActiveChunk(); +} diff --git a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java index ad3aa3c908..d3c312e610 100644 --- a/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java +++ b/src/main/java/gregtech/api/interfaces/IColorModulationContainer.java @@ -1,5 +1,5 @@ package gregtech.api.interfaces; public interface IColorModulationContainer { - public short[] getRGBA(); + short[] getRGBA(); } diff --git a/src/main/java/gregtech/api/interfaces/ICondition.java b/src/main/java/gregtech/api/interfaces/ICondition.java index 9e31da7338..3fb47251c7 100644 --- a/src/main/java/gregtech/api/interfaces/ICondition.java +++ b/src/main/java/gregtech/api/interfaces/ICondition.java @@ -1,11 +1,11 @@ package gregtech.api.interfaces; public interface ICondition<O> { - public boolean isTrue(O aObject); + boolean isTrue(O aObject); // Utility Classes for adding relations between Conditions. - public static class Not<O> implements ICondition<O> { + class Not<O> implements ICondition<O> { private final ICondition<O> mCondition; public Not(ICondition<O> aCondition) { @@ -18,7 +18,7 @@ public interface ICondition<O> { } } - public static class Or<O> implements ICondition<O> { + class Or<O> implements ICondition<O> { private final ICondition<O>[] mConditions; public Or(ICondition<O>... aConditions) { @@ -32,7 +32,7 @@ public interface ICondition<O> { } } - public static class Nor<O> implements ICondition<O> { + class Nor<O> implements ICondition<O> { private final ICondition<O>[] mConditions; public Nor(ICondition<O>... aConditions) { @@ -46,7 +46,7 @@ public interface ICondition<O> { } } - public static class And<O> implements ICondition<O> { + class And<O> implements ICondition<O> { private final ICondition<O>[] mConditions; public And(ICondition<O>... aConditions) { @@ -60,7 +60,7 @@ public interface ICondition<O> { } } - public static class Nand<O> implements ICondition<O> { + class Nand<O> implements ICondition<O> { private final ICondition<O>[] mConditions; public Nand(ICondition<O>... aConditions) { @@ -74,7 +74,7 @@ public interface ICondition<O> { } } - public static class Xor<O> implements ICondition<O> { + class Xor<O> implements ICondition<O> { private final ICondition<O> mCondition1, mCondition2; public Xor(ICondition<O> aCondition1, ICondition<O> aCondition2) { @@ -88,7 +88,7 @@ public interface ICondition<O> { } } - public static class Equal<O> implements ICondition<O> { + class Equal<O> implements ICondition<O> { private final ICondition<O> mCondition1, mCondition2; public Equal(ICondition<O> aCondition1, ICondition<O> aCondition2) { diff --git a/src/main/java/gregtech/api/interfaces/IDamagableItem.java b/src/main/java/gregtech/api/interfaces/IDamagableItem.java index b7ebd6690d..37bb9a2794 100644 --- a/src/main/java/gregtech/api/interfaces/IDamagableItem.java +++ b/src/main/java/gregtech/api/interfaces/IDamagableItem.java @@ -3,5 +3,5 @@ package gregtech.api.interfaces; import net.minecraft.item.ItemStack; public interface IDamagableItem { - public boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); + boolean doDamageToItem(ItemStack aStack, int aVanillaDamage); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java index bdb550ff53..dd72b4d71e 100644 --- a/src/main/java/gregtech/api/interfaces/IDebugableBlock.java +++ b/src/main/java/gregtech/api/interfaces/IDebugableBlock.java @@ -23,5 +23,5 @@ public interface IDebugableBlock { * 3 = Debug ONLY * @return a String-Array containing the DebugInfo, every Index is a separate line (0 = first Line) */ - public ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel); + ArrayList<String> getDebugInfo(EntityPlayer aPlayer, int aX, int aY, int aZ, int aLogLevel); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IDescribable.java b/src/main/java/gregtech/api/interfaces/IDescribable.java index d4bcf58de8..3e72f587db 100644 --- a/src/main/java/gregtech/api/interfaces/IDescribable.java +++ b/src/main/java/gregtech/api/interfaces/IDescribable.java @@ -7,5 +7,5 @@ public interface IDescribable { /** * The Tooltip Text */ - public String[] getDescription(); + String[] getDescription(); } diff --git a/src/main/java/gregtech/api/interfaces/IFoodStat.java b/src/main/java/gregtech/api/interfaces/IFoodStat.java index b6773e9d65..eec89795fd 100644 --- a/src/main/java/gregtech/api/interfaces/IFoodStat.java +++ b/src/main/java/gregtech/api/interfaces/IFoodStat.java @@ -9,27 +9,27 @@ public interface IFoodStat { /** * Warning the "aPlayer" Parameter may be null! */ - public int getFoodLevel(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + int getFoodLevel(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); /** * Warning the "aPlayer" Parameter may be null! */ - public float getSaturation(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + float getSaturation(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); /** * Warning the "aPlayer" Parameter may be null! */ - public boolean alwaysEdible(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + boolean alwaysEdible(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); /** * Warning the "aPlayer" Parameter may be null! */ - public boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + boolean isRotten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); /** * Warning the "aPlayer" Parameter may be null! */ - public EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack); + EnumAction getFoodAction(GT_MetaBase_Item aItem, ItemStack aStack); - public void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); + void onEaten(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IGuiScreen.java b/src/main/java/gregtech/api/interfaces/IGuiScreen.java new file mode 100644 index 0000000000..d0089afbb8 --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/IGuiScreen.java @@ -0,0 +1,35 @@ +package gregtech.api.interfaces; + +import gregtech.api.gui.widgets.GT_GuiTooltip; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.renderer.entity.RenderItem; + + +public interface IGuiScreen { + + interface IGuiElement { + void onInit(); + void draw(int mouseX, int mouseY, float parTicks); + } + + void addToolTip(GT_GuiTooltip toolTip); + + boolean removeToolTip(GT_GuiTooltip toolTip); + + GuiButton getSelectedButton(); + void clearSelectedButton(); + void buttonClicked(GuiButton button); + + int getGuiLeft(); + int getGuiTop(); + + int getXSize(); + int getYSize(); + + void addElement(IGuiElement element); + boolean removeElement(IGuiElement element); + + RenderItem getItemRenderer(); + FontRenderer getFontRenderer(); +} diff --git a/src/main/java/gregtech/api/interfaces/IIconContainer.java b/src/main/java/gregtech/api/interfaces/IIconContainer.java index c8b995e9a7..0b185b387a 100644 --- a/src/main/java/gregtech/api/interfaces/IIconContainer.java +++ b/src/main/java/gregtech/api/interfaces/IIconContainer.java @@ -7,15 +7,15 @@ public interface IIconContainer { /** * @return A regular Icon. */ - public IIcon getIcon(); + IIcon getIcon(); /** * @return Icon of the Overlay (or null if there is no Icon) */ - public IIcon getOverlayIcon(); + IIcon getOverlayIcon(); /** * @return the Default Texture File for this Icon. */ - public ResourceLocation getTextureFile(); + ResourceLocation getTextureFile(); } diff --git a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java index 1d75f41e17..32d0c0948a 100644 --- a/src/main/java/gregtech/api/interfaces/IItemBehaviour.java +++ b/src/main/java/gregtech/api/interfaces/IItemBehaviour.java @@ -14,27 +14,27 @@ import net.minecraft.world.World; import java.util.List; public interface IItemBehaviour<E extends Item> { - public boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); + boolean onLeftClickEntity(E aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity); - public boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + boolean onItemUse(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); - public boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); + boolean onItemUseFirst(E aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ); - public ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); + ItemStack onItemRightClick(E aItem, ItemStack aStack, World aWorld, EntityPlayer aPlayer); - public List<String> getAdditionalToolTips(E aItem, List<String> aList, ItemStack aStack); + List<String> getAdditionalToolTips(E aItem, List<String> aList, ItemStack aStack); - public void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand); + void onUpdate(E aItem, ItemStack aStack, World aWorld, Entity aPlayer, int aTimer, boolean aIsInHand); - public boolean isItemStackUsable(E aItem, ItemStack aStack); + boolean isItemStackUsable(E aItem, ItemStack aStack); - public boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack); + boolean canDispense(E aItem, IBlockSource aSource, ItemStack aStack); - public ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack); + ItemStack onDispense(E aItem, IBlockSource aSource, ItemStack aStack); - public boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack); + boolean hasProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack); - public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); - public EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + EntityArrow getProjectile(E aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IItemContainer.java b/src/main/java/gregtech/api/interfaces/IItemContainer.java index 3c1bd87543..7ce2ad7403 100644 --- a/src/main/java/gregtech/api/interfaces/IItemContainer.java +++ b/src/main/java/gregtech/api/interfaces/IItemContainer.java @@ -5,35 +5,35 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public interface IItemContainer { - public Item getItem(); + Item getItem(); - public Block getBlock(); + Block getBlock(); - public boolean isStackEqual(Object aStack); + boolean isStackEqual(Object aStack); - public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT); + boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT); - public ItemStack get(long aAmount, Object... aReplacements); + ItemStack get(long aAmount, Object... aReplacements); - public ItemStack getWildcard(long aAmount, Object... aReplacements); + ItemStack getWildcard(long aAmount, Object... aReplacements); - public ItemStack getUndamaged(long aAmount, Object... aReplacements); + ItemStack getUndamaged(long aAmount, Object... aReplacements); - public ItemStack getAlmostBroken(long aAmount, Object... aReplacements); + ItemStack getAlmostBroken(long aAmount, Object... aReplacements); - public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements); + ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements); - public IItemContainer set(Item aItem); + IItemContainer set(Item aItem); - public IItemContainer set(ItemStack aStack); + IItemContainer set(ItemStack aStack); - public IItemContainer registerOre(Object... aOreNames); + IItemContainer registerOre(Object... aOreNames); - public IItemContainer registerWildcardAsOre(Object... aOreNames); + IItemContainer registerWildcardAsOre(Object... aOreNames); - public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements); + ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements); - public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); + ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements); - public boolean hasBeenSet(); + boolean hasBeenSet(); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java index 1f0ec91bba..d10c34ef51 100644 --- a/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java +++ b/src/main/java/gregtech/api/interfaces/IOreRecipeRegistrator.java @@ -12,5 +12,5 @@ public interface IOreRecipeRegistrator { * @param aMaterial always != null, and can be == _NULL if the Prefix is Self Referencing or not Material based! * @param aStack always != null */ - public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); + void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IProjectileItem.java b/src/main/java/gregtech/api/interfaces/IProjectileItem.java index 22211a6f0c..6e58d54823 100644 --- a/src/main/java/gregtech/api/interfaces/IProjectileItem.java +++ b/src/main/java/gregtech/api/interfaces/IProjectileItem.java @@ -10,15 +10,15 @@ public interface IProjectileItem { /** * @return if this Item has an Arrow Entity */ - public boolean hasProjectile(SubTag aProjectileType, ItemStack aStack); + boolean hasProjectile(SubTag aProjectileType, ItemStack aStack); /** * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */ - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); + EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, double aX, double aY, double aZ); /** * @return an Arrow Entity to be spawned. If null then this is not an Arrow. Note: Other Projectiles still extend EntityArrow */ - public EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); + EntityArrow getProjectile(SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed); }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java index 8838992c62..73a81cc74b 100644 --- a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java +++ b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java @@ -12,55 +12,55 @@ public interface IRedstoneCircuitBlock { /** * The Output Direction the Circuit Block is Facing */ - public byte getOutputFacing(); + byte getOutputFacing(); /** * sets Output Redstone State at Side */ - public boolean setRedstone(byte aStrength, byte aSide); + boolean setRedstone(byte aStrength, byte aSide); /** * returns Output Redstone State at Side * Note that setRedstone checks if there is a Difference between the old and the new Setting before consuming any Energy */ - public byte getOutputRedstone(byte aSide); + byte getOutputRedstone(byte aSide); /** * returns Input Redstone Signal at Side */ - public byte getInputRedstone(byte aSide); + byte getInputRedstone(byte aSide); /** * If this Side is Covered up and therefor not doing any Redstone */ - public GT_CoverBehavior getCover(byte aSide); + GT_CoverBehavior getCover(byte aSide); - public int getCoverID(byte aSide); + int getCoverID(byte aSide); - public int getCoverVariable(byte aSide); + int getCoverVariable(byte aSide); /** * returns whatever Block-ID is adjacent to the Redstone Circuit Block */ - public Block getBlockAtSide(byte aSide); + Block getBlockAtSide(byte aSide); /** * returns whatever Meta-Value is adjacent to the Redstone Circuit Block */ - public byte getMetaIDAtSide(byte aSide); + byte getMetaIDAtSide(byte aSide); /** * returns whatever TileEntity is adjacent to the Redstone Circuit Block */ - public TileEntity getTileEntityAtSide(byte aSide); + TileEntity getTileEntityAtSide(byte aSide); /** * returns whatever TileEntity is used by the Redstone Circuit Block */ - public ICoverable getOwnTileEntity(); + ICoverable getOwnTileEntity(); /** * returns worldObj.rand.nextInt(aRange) */ - public int getRandom(int aRange); + int getRandom(int aRange); } diff --git a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java index c7ccc45e96..92e4af0469 100644 --- a/src/main/java/gregtech/api/interfaces/ISubTagContainer.java +++ b/src/main/java/gregtech/api/interfaces/ISubTagContainer.java @@ -6,15 +6,15 @@ public interface ISubTagContainer { /** * @return if the Tag is inside the List. */ - p |
