-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
936c628
commit 137d8ce
Showing
177 changed files
with
30,051 additions
and
2 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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# GregTech5 | ||
GregTech 5 for Minecraft 1.7.X. Required Versions listed in each Release. | ||
# GregTech 5 | ||
GregTech 5 for Minecraft 1.7.2 and 1.7.10. Required Versions listed in each Release. | ||
|
||
The Source Code in this Repository is just the latest API files from back then. | ||
|
||
More Details on the Release Pages | ||
https://github.com/GregTech6/GregTech5/releases/tag/v7.2.50315 | ||
https://github.com/GregTech6/GregTech5/releases/tag/v7.10.50707 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,86 @@ | ||
package gregtech.api.damagesources; | ||
|
||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.util.*; | ||
|
||
public class GT_DamageSources { | ||
public static DamageSource getElectricDamage() { | ||
return ic2.api.info.Info.DMG_ELECTRIC; | ||
} | ||
|
||
public static DamageSource getRadioactiveDamage() { | ||
return ic2.api.info.Info.DMG_RADIATION; | ||
} | ||
|
||
public static DamageSource getNukeExplosionDamage() { | ||
return ic2.api.info.Info.DMG_NUKE_EXPLOSION; | ||
} | ||
|
||
public static DamageSource getExplodingDamage() { | ||
return new DamageSourceExploding(); | ||
} | ||
|
||
public static DamageSource getCombatDamage(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) { | ||
return new DamageSourceCombat(aType, aPlayer, aDeathMessage); | ||
} | ||
|
||
public static DamageSource getHeatDamage() { | ||
return new DamageSourceHeat(); | ||
} | ||
|
||
public static DamageSource getFrostDamage() { | ||
return new DamageSourceFrost(); | ||
} | ||
|
||
private static class DamageSourceCombat extends EntityDamageSource { | ||
private IChatComponent mDeathMessage; | ||
|
||
public DamageSourceCombat(String aType, EntityLivingBase aPlayer, IChatComponent aDeathMessage) { | ||
super(aType, aPlayer); | ||
mDeathMessage = aDeathMessage; | ||
} | ||
|
||
@Override | ||
public IChatComponent func_151519_b(EntityLivingBase aTarget) { | ||
return mDeathMessage == null ? super.func_151519_b(aTarget) : mDeathMessage; | ||
} | ||
} | ||
|
||
private static class DamageSourceFrost extends DamageSource { | ||
public DamageSourceFrost() { | ||
super("frost"); | ||
setDifficultyScaled(); | ||
} | ||
|
||
@Override | ||
public IChatComponent func_151519_b(EntityLivingBase aTarget) { | ||
return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " got frozen"); | ||
} | ||
} | ||
|
||
private static class DamageSourceHeat extends DamageSource { | ||
public DamageSourceHeat() { | ||
super("steam"); | ||
setDifficultyScaled(); | ||
} | ||
|
||
@Override | ||
public IChatComponent func_151519_b(EntityLivingBase aTarget) { | ||
return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " was boiled alive"); | ||
} | ||
} | ||
|
||
public static class DamageSourceExploding extends DamageSource { | ||
public DamageSourceExploding() { | ||
super("exploded"); | ||
setDamageAllowedInCreativeMode(); | ||
setDamageBypassesArmor(); | ||
setDamageIsAbsolute(); | ||
} | ||
|
||
@Override | ||
public IChatComponent func_151519_b(EntityLivingBase aTarget) { | ||
return new ChatComponentText(EnumChatFormatting.RED+aTarget.getCommandSenderName()+EnumChatFormatting.WHITE + " exploded"); | ||
} | ||
} | ||
} |
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,48 @@ | ||
package gregtech.api.enchants; | ||
|
||
import gregtech.api.enums.ConfigCategories; | ||
import gregtech.api.enums.Materials; | ||
import gregtech.api.util.GT_Config; | ||
import gregtech.api.util.GT_LanguageManager; | ||
import net.minecraft.enchantment.EnchantmentDamage; | ||
import net.minecraft.entity.EntityLivingBase; | ||
|
||
public class Enchantment_EnderDamage extends EnchantmentDamage { | ||
public static Enchantment_EnderDamage INSTANCE; | ||
|
||
public Enchantment_EnderDamage() { | ||
super(GT_Config.addIDConfig(ConfigCategories.IDs.enchantments, "Disjunction", 15), 2, -1); | ||
GT_LanguageManager.addStringLocalization(getName(), "Disjunction"); | ||
Materials.Silver .setEnchantmentForTools(this, 2); | ||
Materials.Mercury .setEnchantmentForTools(this, 3); | ||
Materials.Electrum .setEnchantmentForTools(this, 3); | ||
Materials.SterlingSilver .setEnchantmentForTools(this, 4); | ||
Materials.AstralSilver .setEnchantmentForTools(this, 5); | ||
INSTANCE = this; | ||
} | ||
|
||
@Override | ||
public int getMinEnchantability(int aLevel) { | ||
return 5 + (aLevel - 1) * 8; | ||
} | ||
|
||
@Override | ||
public int getMaxEnchantability(int aLevel) { | ||
return this.getMinEnchantability(aLevel) + 20; | ||
} | ||
|
||
@Override | ||
public int getMaxLevel() { | ||
return 5; | ||
} | ||
|
||
@Override | ||
public float calcModifierLiving(int aLevel, EntityLivingBase aEntity) { | ||
return aEntity.getClass().getName().indexOf(".") >= 0 && aEntity.getClass().getName().substring(aEntity.getClass().getName().lastIndexOf(".")).contains("Ender") ? aLevel * 2.5F : 0.0F; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "enchantment.damage.endermen"; | ||
} | ||
} |
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,66 @@ | ||
package gregtech.api.enchants; | ||
|
||
import gregtech.api.enums.ConfigCategories; | ||
import gregtech.api.enums.Materials; | ||
import gregtech.api.util.GT_Config; | ||
import gregtech.api.util.GT_LanguageManager; | ||
import gregtech.api.util.GT_Utility; | ||
import net.minecraft.enchantment.EnchantmentDamage; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.EntityLivingBase; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class Enchantment_Radioactivity extends EnchantmentDamage { | ||
public static Enchantment_Radioactivity INSTANCE; | ||
|
||
public Enchantment_Radioactivity() { | ||
super(GT_Config.addIDConfig(ConfigCategories.IDs.enchantments, "Radioactivity", 14), 0, -1); | ||
GT_LanguageManager.addStringLocalization(getName(), "Radioactivity"); | ||
Materials.Plutonium .setEnchantmentForTools(this, 1).setEnchantmentForArmors(this, 1); | ||
Materials.Uranium235 .setEnchantmentForTools(this, 2).setEnchantmentForArmors(this, 2); | ||
Materials.Plutonium241 .setEnchantmentForTools(this, 3).setEnchantmentForArmors(this, 3); | ||
Materials.NaquadahEnriched .setEnchantmentForTools(this, 4).setEnchantmentForArmors(this, 4); | ||
Materials.Naquadria .setEnchantmentForTools(this, 5).setEnchantmentForArmors(this, 5); | ||
INSTANCE = this; | ||
} | ||
|
||
@Override | ||
public int getMinEnchantability(int aLevel) { | ||
return Integer.MAX_VALUE; | ||
} | ||
|
||
@Override | ||
public int getMaxEnchantability(int aLevel) { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int getMaxLevel() { | ||
return 5; | ||
} | ||
|
||
@Override | ||
public boolean canApply(ItemStack par1ItemStack) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isAllowedOnBooks() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public float calcModifierLiving(int aLevel, EntityLivingBase aEntity) { | ||
return aEntity.getClass().getName().indexOf(".") >= 0 && aEntity.getClass().getName().substring(aEntity.getClass().getName().lastIndexOf(".")).contains("Ender") ? aLevel * 2.5F : 0.0F; | ||
} | ||
|
||
@Override | ||
public void func_151368_a(EntityLivingBase aPlayer, Entity aEntity, int aLevel) { | ||
if (aEntity instanceof EntityLivingBase) GT_Utility.applyRadioactivity((EntityLivingBase)aEntity, aLevel); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "enchantment.damage.radioactivity"; | ||
} | ||
} |
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,69 @@ | ||
package gregtech.api.enums; | ||
|
||
public enum ConfigCategories { | ||
news, | ||
general, | ||
machineconfig, | ||
specialunificationtargets; | ||
|
||
public enum IDs { | ||
crops, | ||
enchantments; | ||
} | ||
|
||
public enum Materials { | ||
oreprocessingoutputmultiplier, | ||
blastfurnacerequirements, | ||
blastinductionsmelter, | ||
UUM_MaterialCost, | ||
UUM_EnergyCost; | ||
} | ||
|
||
public enum Recipes { | ||
researches, | ||
harderrecipes, | ||
gregtechrecipes, | ||
disabledrecipes, | ||
recipereplacements, | ||
storageblockcrafting, | ||
storageblockdecrafting; | ||
} | ||
|
||
public enum Machines { | ||
smelting, | ||
squeezer, | ||
liquidtransposer, | ||
liquidtransposerfilling, | ||
liquidtransposeremptying, | ||
extractor, | ||
sawmill, | ||
compression, | ||
thermalcentrifuge, | ||
orewashing, | ||
inductionsmelter, | ||
rcblastfurnace, | ||
scrapboxdrops, | ||
massfabamplifier, | ||
maceration, | ||
rockcrushing, | ||
pulverization; | ||
} | ||
|
||
public enum Fuels { | ||
boilerfuels; | ||
} | ||
|
||
public enum Tools { | ||
mortar, | ||
hammerrings, | ||
hammerplating, | ||
hammerdoubleingot, | ||
hammertripleingot, | ||
hammerquadrupleingot, | ||
hammerquintupleingot, | ||
hammerdoubleplate, | ||
hammertripleplate, | ||
hammerquadrupleplate, | ||
hammerquintupleplate; | ||
} | ||
} |
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,63 @@ | ||
package gregtech.api.enums; | ||
|
||
import gregtech.api.interfaces.IColorModulationContainer; | ||
import gregtech.api.util.GT_Utility; | ||
|
||
public enum Dyes implements IColorModulationContainer { | ||
/** The valid Colors, see VALUES Array below */ | ||
dyeBlack ( 0, 32, 32, 32, "Black"), | ||
dyeRed ( 1, 255, 0, 0, "Red"), | ||
dyeGreen ( 2, 0, 255, 0, "Green"), | ||
dyeBrown ( 3, 96, 64, 0, "Brown"), | ||
dyeBlue ( 4, 0, 0, 255, "Blue"), | ||
dyePurple ( 5, 128, 0, 128, "Purple"), | ||
dyeCyan ( 6, 0, 255, 255, "Cyan"), | ||
dyeLightGray ( 7, 192, 192, 192, "Light Gray"), | ||
dyeGray ( 8, 128, 128, 128, "Gray"), | ||
dyePink ( 9, 255, 192, 192, "Pink"), | ||
dyeLime (10, 128, 255, 128, "Lime"), | ||
dyeYellow (11, 255, 255, 0, "Yellow"), | ||
dyeLightBlue (12, 128, 128, 255, "Light Blue"), | ||
dyeMagenta (13, 255, 0, 255, "Magenta"), | ||
dyeOrange (14, 255, 128, 0, "Orange"), | ||
dyeWhite (15, 255, 255, 255, "White"), | ||
/** The NULL Color */ | ||
_NULL (-1, 255, 255, 255, "INVALID COLOR"), | ||
/** Additional Colors only used for direct Color referencing */ | ||
CABLE_INSULATION (-1, 64, 64, 64, "Cable Insulation"), | ||
CONSTRUCTION_FOAM (-1, 64, 64, 64, "Construction Foam"), | ||
MACHINE_METAL (-1, 220, 220, 255, "Machine Metal"); | ||
|
||
public static final Dyes VALUES[] = {dyeBlack, dyeRed, dyeGreen, dyeBrown, dyeBlue, dyePurple, dyeCyan, dyeLightGray, dyeGray, dyePink, dyeLime, dyeYellow, dyeLightBlue, dyeMagenta, dyeOrange, dyeWhite}; | ||
|
||
public final byte mIndex; | ||
public final String mName; | ||
public final short[] mRGBa; | ||
|
||
private Dyes(int aIndex, int aR, int aG, int aB, String aName) { | ||
mIndex = (byte)aIndex; | ||
mName = aName; | ||
mRGBa = new short[] {(short)aR, (short)aG, (short)aB, 0}; | ||
} | ||
|
||
public static Dyes get(int aColor) { | ||
if (aColor >= 0 && aColor < 16) return VALUES[aColor]; | ||
return _NULL; | ||
} | ||
|
||
public static short[] getModulation(int aColor, short[] aDefaultModulation) { | ||
if (aColor >= 0 && aColor < 16) return VALUES[aColor].mRGBa; | ||
return aDefaultModulation; | ||
} | ||
|
||
public static Dyes get(String aColor) { | ||
Object tObject = GT_Utility.getFieldContent(Dyes.class, aColor, false, false); | ||
if (tObject != null && tObject instanceof Dyes) return (Dyes)tObject; | ||
return _NULL; | ||
} | ||
|
||
@Override | ||
public short[] getRGBA() { | ||
return mRGBa; | ||
} | ||
} |
Oops, something went wrong.