aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/gregtech/api/interfaces
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-06-20 02:01:03 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-06-20 02:01:03 +1000
commit92cedd818ccdb57085b14c8ed735e903479ac581 (patch)
tree381e97ba38cdd36359ce5d386bbeec85ba90fe81 /src/Java/miscutil/gregtech/api/interfaces
parent92f6969706a9c8c4cbe1bcc6a96c6d1de4f6185d (diff)
downloadGT5-Unofficial-92cedd818ccdb57085b14c8ed735e903479ac581.tar.gz
GT5-Unofficial-92cedd818ccdb57085b14c8ed735e903479ac581.tar.bz2
GT5-Unofficial-92cedd818ccdb57085b14c8ed735e903479ac581.zip
+Added New Circuits & Components along with recipes.
+Added A complete set of Machine components up to MAX voltage along with recipes. +Started Initial work on multiblock items (Similar to the turbine rotor needed in Large turbines) +Added better support for future recipe additions.
Diffstat (limited to 'src/Java/miscutil/gregtech/api/interfaces')
-rw-r--r--src/Java/miscutil/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java16
-rw-r--r--src/Java/miscutil/gregtech/api/interfaces/internal/Interface_ToolStats.java155
2 files changed, 171 insertions, 0 deletions
diff --git a/src/Java/miscutil/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java b/src/Java/miscutil/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java
new file mode 100644
index 0000000000..83a7a1d1fc
--- /dev/null
+++ b/src/Java/miscutil/gregtech/api/interfaces/internal/Interface_OreRecipeRegistrator.java
@@ -0,0 +1,16 @@
+package miscutil.gregtech.api.interfaces.internal;
+
+import gregtech.api.enums.Materials;
+import miscutil.gregtech.api.enums.GregtechOrePrefixes;
+import net.minecraft.item.ItemStack;
+
+public interface Interface_OreRecipeRegistrator {
+ /**
+ * Contains a Code Fragment, used in the OrePrefix to register Recipes. Better than using a switch/case, like I did before.
+ *
+ * @param aPrefix always != null
+ * @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(GregtechOrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack);
+} \ No newline at end of file
diff --git a/src/Java/miscutil/gregtech/api/interfaces/internal/Interface_ToolStats.java b/src/Java/miscutil/gregtech/api/interfaces/internal/Interface_ToolStats.java
new file mode 100644
index 0000000000..3ac112ecc4
--- /dev/null
+++ b/src/Java/miscutil/gregtech/api/interfaces/internal/Interface_ToolStats.java
@@ -0,0 +1,155 @@
+package miscutil.gregtech.api.interfaces.internal;
+
+import gregtech.api.interfaces.IIconContainer;
+
+import java.util.List;
+
+import miscutil.gregtech.api.items.Gregtech_MetaTool;
+import net.minecraft.block.Block;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.DamageSource;
+import net.minecraftforge.event.world.BlockEvent;
+
+/**
+ * The Stats for GT Tools. Not including any Material Modifiers.
+ * <p/>
+ * And this is supposed to not have any ItemStack Parameters as these are generic Stats.
+ */
+public interface Interface_ToolStats {
+ /**
+ * Called when aPlayer crafts this Tool
+ */
+ public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer);
+
+ /**
+ * Called when this gets added to a Tool Item
+ */
+ public void onStatsAddedToTool(Gregtech_MetaTool gregtech_MetaTool, int aID);
+
+ /**
+ * @return Damage the Tool receives when breaking a Block. 100 is one Damage Point (or 100 EU).
+ */
+ public int getToolDamagePerBlockBreak();
+
+ /**
+ * @return Damage the Tool receives when converting the drops of a Block. 100 is one Damage Point (or 100 EU).
+ */
+ public int getToolDamagePerDropConversion();
+
+ /**
+ * @return Damage the Tool receives when being used as Container Item. 100 is one use, however it is usually 8 times more than normal.
+ */
+ public int getToolDamagePerContainerCraft();
+
+ /**
+ * @return Damage the Tool receives when being used as Weapon, 200 is the normal Value, 100 for actual Weapons.
+ */
+ public int getToolDamagePerEntityAttack();
+
+ /**
+ * @return Basic Quality of the Tool, 0 is normal. If increased, it will increase the general quality of all Tools of this Type. Decreasing is also possible.
+ */
+ public int getBaseQuality();
+
+ /**
+ * @return The Damage Bonus for this Type of Tool against Mobs. 1.0F is normal punch.
+ */
+ public float getBaseDamage();
+
+ /**
+ * @return This gets the Hurt Resistance time for Entities getting hit. (always does 1 as minimum)
+ */
+ public int getHurtResistanceTime(int aOriginalHurtResistance, Entity aEntity);
+
+ /**
+ * @return This is a multiplier for the Tool Speed. 1.0F = no special Speed.
+ */
+ public float getSpeedMultiplier();
+
+ /**
+ * @return This is a multiplier for the Tool Speed. 1.0F = no special Durability.
+ */
+ public float getMaxDurabilityMultiplier();
+
+ public DamageSource getDamageSource(EntityLivingBase aPlayer, Entity aEntity);
+
+ public String getMiningSound();
+
+ public String getCraftingSound();
+
+ public String getEntityHitSound();
+
+ public String getBreakingSound();
+
+ public Enchantment[] getEnchantments(ItemStack aStack);
+
+ public int[] getEnchantmentLevels(ItemStack aStack);
+
+ /**
+ * @return If this Tool can be used for blocking Damage like a Sword.
+ */
+ public boolean canBlock();
+
+ /**
+ * @return If this Tool can be used as an RC Crowbar.
+ */
+ public boolean isCrowbar();
+
+ /**
+ * @return If this Tool can be used as an BC Wrench.
+ */
+ public boolean isWrench();
+
+ /**
+ * @return If this Tool can be used as Weapon i.e. if that is the main purpose.
+ */
+ public boolean isWeapon();
+
+ /**
+ * @return If this Tool is a Ranged Weapon. Return false at isWeapon unless you have a Blade attached to your Bow/Gun or something
+ */
+ public boolean isRangedWeapon();
+
+ /**
+ * @return If this Tool can be used as Weapon i.e. if that is the main purpose.
+ */
+ public boolean isMiningTool();
+
+ /**
+ * aBlock.getHarvestTool(aMetaData) can return the following Values for example.
+ * "axe", "pickaxe", "sword", "shovel", "hoe", "grafter", "saw", "wrench", "crowbar", "file", "hammer", "plow", "plunger", "scoop", "screwdriver", "sense", "scythe", "softhammer", "cutter", "plasmatorch"
+ *
+ * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this check.
+ */
+ public boolean isMinableBlock(Block aBlock, byte aMetaData);
+
+ /**
+ * This lets you modify the Drop List, when this type of Tool has been used.
+ *
+ * @return the Amount of modified Items.
+ */
+ public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent);
+
+ /**
+ * @return Returns a broken Version of the Item.
+ */
+ public ItemStack getBrokenItem(ItemStack aStack);
+
+ /**
+ * @return the Damage actually done to the Mob.
+ */
+ public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer);
+
+ /**
+ * @return the Damage actually done to the Mob.
+ */
+ public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer);
+
+ public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack);
+
+ public short[] getRGBa(boolean aIsToolHead, ItemStack aStack);
+} \ No newline at end of file