Got rid of unwanted API

This commit is contained in:
Henry Mao 2012-11-28 18:27:50 +08:00
parent 2ec75ad736
commit 14295aece6
15 changed files with 25 additions and 526 deletions

View file

@ -5,5 +5,7 @@
@ AssemblyLine_v0.0.6.6.jar
@ AssemblyLine_v0.0.6.7.jar
@ AssemblyLine_v0.0.6.8.jar AssemblyLine_v0.0.6.8_api.zip
stable AssemblyLine_v0.0.6.10.jar AssemblyLine_v0.0.6.10_api.zip
@ AssemblyLine_v0.0.6.10.jar AssemblyLine_v0.0.6.10_api.zip
Minecraft 1.3.2
* AssemblyLine_v0.1.2.10.jar AssemblyLine_v0.1.2.10_api.zip
Minecraft 1.4.2

View file

@ -1,22 +0,0 @@
[
{
"modid": "AssemblyLine",
"name": "Assembly Line",
"description": "A mod that brings conveyor belt transporting systems to Minecraft.",
"version": "0.1.2",
"mcversion": "1.4.4",
"url": "http://calclavia.com/universalelectricity/?m=18",
"updateUrl": "http://calclavia.com/universalelectricity/?m=18",
"authors": [
"Calclavia",
"Darkguardsman"
],
"credits": "Authored by Calclavia and Darkguardsman",
"logoFile": "",
"screenshots": [
],
"parent":"",
"dependencies": [
]
}
]

View file

@ -1 +1 @@
0.1.2
0.1.3

View file

@ -1,6 +1,6 @@
::ASSEMBLY LINE BUILDER
@echo off
echo Promotion Type?
echo Promotion Type? (Choose * for recommended, @ for stable and x for unstable)
set /p PROMOTION=
set /p MODVERSION=<modversion.txt
@ -21,10 +21,7 @@ runtime\bin\python\python_mcp runtime\reobfuscate.py %*
::ZIP-UP
cd reobf\minecraft\
"..\..\..\7za.exe" a "..\..\builds\%FILE_NAME%" "*"
cd ..\..\
"..\7za.exe" a "builds\%FILE_NAME%" "mcmod.info"
cd resources\
"..\..\7za.exe" a "..\builds\%FILE_NAME%" "*"
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*" -pdarkguardsman

19
resources/mcmod.info Normal file
View file

@ -0,0 +1,19 @@
[
{
"modid" : "AssemblyLine",
"name" : "Assembly Line",
"version" : "0.1.3",
"url" : "http://calclavia.com/universalelectricity/?m=18",
"credits" : "",
"authors": [
"Calclavia",
"Darkguardsman"
],
"description": "A mod that brings conveyor belt transporting systems to Minecraft.",
"logoFile" : "/al_logo.png",
"updateUrl" : "http://calclavia.com/universalelectricity/?m=18",
"parent" : "",
"screenshots": [
]
}
]

View file

@ -44,7 +44,7 @@ public class AssemblyLine
@Instance("AssemblyLine")
public static AssemblyLine instance;
public static final String VERSION = "0.1.2";
public static final String VERSION = "0.1.3";
public static final String CHANNEL = "AssemblyLine";

View file

@ -1,35 +0,0 @@
package buildcraft.api.tools;
import net.minecraft.src.EntityPlayer;
/***
* Implement this interface on subclasses of Item to have that item work as a
* wrench for buildcraft
*/
public interface IToolWrench {
/***
* Called to ensure that the wrench can be used. To get the ItemStack that
* is used, check player.inventory.getCurrentItem()
*
* @param player
* - The player doing the wrenching
* @param x
* ,y,z - The coordinates for the block being wrenched
*
* @return true if wrenching is allowed, false if not
*/
public boolean canWrench(EntityPlayer player, int x, int y, int z);
/***
* Callback after the wrench has been used. This can be used to decrease
* durability or for other purposes. To get the ItemStack that was used,
* check player.inventory.getCurrentItem()
*
* @param player
* - The player doing the wrenching
* @param x
* ,y,z - The coordinates of the block being wrenched
*/
public void wrenchUsed(EntityPlayer player, int x, int y, int z);
}

View file

@ -1,22 +0,0 @@
package universalelectricity.prefab.modifier;
import net.minecraft.src.ItemStack;
/**
* This must be applied to an item that acts as a modifier or an upgrade.
*
* @author Calclavia
*
*/
public interface IModifier
{
/**
* @return - The name of the modifier.
*/
public String getName(ItemStack itemstack);
/**
* @return - How much effect does this modifier have?
*/
public int getEffectiveness(ItemStack itemstack);
}

View file

@ -1,29 +0,0 @@
package universalelectricity.prefab.modifier;
import net.minecraft.src.IInventory;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Slot;
/**
* This slot should be used by any container that contains an item that is a modifier. An example of
* this would be upgrade slots.
*
* @author Calclavia
*
*/
public class SlotModifier extends Slot
{
public SlotModifier(IInventory par2IInventory, int par3, int par4, int par5)
{
super(par2IInventory, par3, par4, par5);
}
/**
* Check if the stack is a valid item for this slot. Always true beside for the armor slots.
*/
@Override
public boolean isItemValid(ItemStack par1ItemStack)
{
return par1ItemStack.getItem() instanceof IModifier;
}
}

View file

@ -1,104 +0,0 @@
package universalelectricity.prefab.ore;
import java.util.Random;
import net.minecraft.src.Block;
import net.minecraft.src.IChunkProvider;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
import universalelectricity.core.UEConfig;
import universalelectricity.core.UniversalElectricity;
/**
* This class is used for storing ore generation data. If you are too lazy to generate your own
* ores, you can do {@link #OreGenerator.ORES_TO_GENERATE.add()} to add your ore to the list of ores
* to generate.
*
* @author Calclavia
*
*/
public abstract class OreGenBase
{
public String name;
public String oreDictionaryName;
public boolean shouldGenerate;
public int blockIndexTexture;
public ItemStack oreStack;
public int oreID;
public int oreMeta;
/**
* What harvest level does this machine need to be acquired?
*/
public int harvestLevel;
/**
* The predefined tool classes are "pickaxe", "shovel", "axe". You can add others for custom
* tools.
*/
public String harvestTool;
/**
* @param name
* - The name of the ore for display
* @param textureFile
* - The 16x16 png texture of your ore to override
* @param minGenerateLevel
* - The highest generation level of your ore
* @param maxGenerateLevel
* - The lowest generation level of your ore
* @param amountPerChunk
* - The amount of ores to generate per chunk
* @param amountPerBranch
* - The amount of ores to generate in a clutter. E.g coal generates with a lot of
* other coal next to it. How much do you want?
*/
public OreGenBase(String name, String oreDiectionaryName, ItemStack stack, String harvestTool, int harvestLevel)
{
this.name = name;
this.shouldGenerate = false;
this.harvestTool = harvestTool;
this.harvestLevel = harvestLevel;
this.oreDictionaryName = oreDiectionaryName;
this.oreStack = stack;
this.oreID = stack.itemID;
this.oreMeta = stack.getItemDamage();
OreDictionary.registerOre(oreDictionaryName, stack);
MinecraftForge.setBlockHarvestLevel(Block.blocksList[stack.itemID], stack.getItemDamage(), harvestTool, harvestLevel);
}
public OreGenBase enable()
{
this.shouldGenerate = shouldGenerateOre(name);
return this;
}
// You may inherit from this class and change
// this function if you want a
// custom texture render for your ore.
public int getBlockTextureFromSide(int side)
{
return this.blockIndexTexture;
}
// Checks the config file and see if Universal
// Electricity should generate
// this ore
private static boolean shouldGenerateOre(String oreName)
{
return UEConfig.getConfigData(UniversalElectricity.CONFIGURATION, "Generate " + oreName, true);
}
public abstract void generate(World world, Random random, int varX, int varZ);
public abstract boolean isOreGeneratedInWorld(World world, IChunkProvider chunkGenerator);
}

View file

@ -1,132 +0,0 @@
package universalelectricity.prefab.ore;
import java.util.Random;
import net.minecraft.src.ChunkProviderEnd;
import net.minecraft.src.ChunkProviderGenerate;
import net.minecraft.src.ChunkProviderHell;
import net.minecraft.src.IChunkProvider;
import net.minecraft.src.ItemStack;
import net.minecraft.src.MathHelper;
import net.minecraft.src.World;
/**
* This class is used for storing ore generation data. If you are too lazy to generate your own
* ores, you can do {@link #OreGenerator.ORES_TO_GENERATE.add()} to add your ore to the list of ores
* to generate.
*
* @author Calclavia
*
*/
public class OreGenReplace extends OreGenBase
{
public int minGenerateLevel;
public int maxGenerateLevel;
public int amountPerChunk;
public int amountPerBranch;
public int replaceID;
public boolean generateSurface;
public boolean generateNether;
public boolean generateEnd;
/**
* @param name
* - The name of the ore for display
* @param textureFile
* - The 16x16 png texture of your ore to override
* @param minGenerateLevel
* - The highest generation level of your ore
* @param maxGenerateLevel
* - The lowest generation level of your ore
* @param amountPerChunk
* - The amount of ores to generate per chunk
* @param amountPerBranch
* - The amount of ores to generate in a clutter. E.g coal generates with a lot of
* other coal next to it. How much do you want?
*/
public OreGenReplace(String name, String oreDiectionaryName, ItemStack stack, int replaceID, int minGenerateLevel, int maxGenerateLevel, int amountPerChunk, int amountPerBranch, String harvestTool, int harvestLevel)
{
super(name, oreDiectionaryName, stack, harvestTool, harvestLevel);
this.minGenerateLevel = minGenerateLevel;
this.maxGenerateLevel = maxGenerateLevel;
this.amountPerChunk = amountPerChunk;
this.amountPerBranch = amountPerBranch;
this.replaceID = replaceID;
}
public void generate(World world, Random random, int varX, int varZ)
{
for (int i = 0; i < this.amountPerChunk; i++)
{
int x = varX + random.nextInt(16);
int z = varZ + random.nextInt(16);
int y = random.nextInt(this.maxGenerateLevel - this.minGenerateLevel) + this.minGenerateLevel;
generateReplace(world, random, x, y, z);
}
}
public boolean generateReplace(World par1World, Random par2Random, int par3, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float) Math.PI;
double var7 = (double) ((float) (par3 + 8) + MathHelper.sin(var6) * (float) this.amountPerBranch / 8.0F);
double var9 = (double) ((float) (par3 + 8) - MathHelper.sin(var6) * (float) this.amountPerBranch / 8.0F);
double var11 = (double) ((float) (par5 + 8) + MathHelper.cos(var6) * (float) this.amountPerBranch / 8.0F);
double var13 = (double) ((float) (par5 + 8) - MathHelper.cos(var6) * (float) this.amountPerBranch / 8.0F);
double var15 = (double) (par4 + par2Random.nextInt(3) - 2);
double var17 = (double) (par4 + par2Random.nextInt(3) - 2);
for (int var19 = 0; var19 <= this.amountPerBranch; ++var19)
{
double var20 = var7 + (var9 - var7) * (double) var19 / (double) this.amountPerBranch;
double var22 = var15 + (var17 - var15) * (double) var19 / (double) this.amountPerBranch;
double var24 = var11 + (var13 - var11) * (double) var19 / (double) this.amountPerBranch;
double var26 = par2Random.nextDouble() * (double) this.amountPerBranch / 16.0D;
double var28 = (double) (MathHelper.sin((float) var19 * (float) Math.PI / (float) this.amountPerBranch) + 1.0F) * var26 + 1.0D;
double var30 = (double) (MathHelper.sin((float) var19 * (float) Math.PI / (float) this.amountPerBranch) + 1.0F) * var26 + 1.0D;
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
for (int var38 = var32; var38 <= var35; ++var38)
{
double var39 = ((double) var38 + 0.5D - var20) / (var28 / 2.0D);
if (var39 * var39 < 1.0D)
{
for (int var41 = var33; var41 <= var36; ++var41)
{
double var42 = ((double) var41 + 0.5D - var22) / (var30 / 2.0D);
if (var39 * var39 + var42 * var42 < 1.0D)
{
for (int var44 = var34; var44 <= var37; ++var44)
{
double var45 = ((double) var44 + 0.5D - var24) / (var28 / 2.0D);
int block = par1World.getBlockId(var38, var41, var44);
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (this.replaceID == 0 || block == this.replaceID))
{
par1World.setBlockAndMetadata(var38, var41, var44, this.oreID, this.oreMeta);
}
}
}
}
}
}
}
return true;
}
@Override
public boolean isOreGeneratedInWorld(World world, IChunkProvider chunkGenerator)
{
return ((this.generateSurface && chunkGenerator instanceof ChunkProviderGenerate) || (this.generateNether && chunkGenerator instanceof ChunkProviderHell) || (this.generateEnd && chunkGenerator instanceof ChunkProviderEnd));
}
}

View file

@ -1,18 +0,0 @@
package universalelectricity.prefab.ore;
import net.minecraft.src.ItemStack;
public class OreGenReplaceStone extends OreGenReplace
{
public OreGenReplaceStone(String name, String oreDiectionaryName, ItemStack stack, int replaceID, int minGenerateLevel, int maxGenerateLevel, int amountPerChunk, int amountPerBranch, String harvestTool, int harvestLevel)
{
super(name, oreDiectionaryName, stack, 1, minGenerateLevel, maxGenerateLevel, amountPerChunk, amountPerBranch, harvestTool, harvestLevel);
this.generateSurface = true;
}
// A simplified version of the constructor
public OreGenReplaceStone(String name, String oreDiectionaryName, ItemStack stack, int replaceID, int maxGenerateLevel, int amountPerChunk, int amountPerBranch)
{
this(name, oreDiectionaryName, stack, 0, replaceID, maxGenerateLevel, amountPerChunk, amountPerBranch, "pickaxe", 1);
}
}

View file

@ -1,75 +0,0 @@
package universalelectricity.prefab.ore;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.src.IChunkProvider;
import net.minecraft.src.World;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.registry.GameRegistry;
public class OreGenerator implements IWorldGenerator
{
public static boolean isInitiated = false;
/**
* Add your ore data to this list of ores for it to automatically generate! No hassle indeed!
*/
private static final List<OreGenBase> ORES_TO_GENERATE = new ArrayList<OreGenBase>();
/**
* Adds an ore to the ore generate list. Do this in pre-init.
*/
public static void addOre(OreGenBase data)
{
if (!isInitiated)
{
GameRegistry.registerWorldGenerator(new OreGenerator());
}
ORES_TO_GENERATE.add(data);
}
/**
* Checks to see if this ore
*
* @param oreName
* @return
*/
public static boolean oreExists(String oreName)
{
for (OreGenBase ore : ORES_TO_GENERATE)
{
if (ore.oreDictionaryName == oreName) { return true; }
}
return false;
}
/**
* Removes an ore to the ore generate list. Do this in init.
*/
public static void removeOre(OreGenBase data)
{
ORES_TO_GENERATE.remove(data);
}
@Override
public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
{
chunkX = chunkX << 4;
chunkZ = chunkZ << 4;
// Checks to make sure this is the normal
// world
for (OreGenBase oreData : ORES_TO_GENERATE)
{
if (oreData.shouldGenerate && oreData.isOreGeneratedInWorld(world, chunkGenerator))
{
oreData.generate(world, rand, chunkX, chunkZ);
}
}
}
}

View file

@ -1,41 +0,0 @@
package universalelectricity.prefab.potion;
import net.minecraft.src.Potion;
import cpw.mods.fml.common.registry.LanguageRegistry;
public abstract class CustomPotion extends Potion
{
/**
* Creates a new type of potion
*
* @param id
* - The ID of this potion. Make it greater than 20.
* @param isBadEffect
* - Is this potion a good potion or a bad one?
* @param color
* - The color of this potion.
* @param name
* - The name of this potion.
*/
public CustomPotion(int id, boolean isBadEffect, int color, String name)
{
super(id, isBadEffect, color);
this.setPotionName("potion." + name);
LanguageRegistry.instance().addStringLocalization(this.getName(), name);
}
@Override
public Potion setIconIndex(int par1, int par2)
{
super.setIconIndex(par1, par2);
return this;
}
/**
* You must register all your potion effects during mod initialization!
*/
public void register()
{
Potion.potionTypes[this.getId()] = this;
}
}

View file

@ -1,41 +0,0 @@
package universalelectricity.prefab.potion;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Potion;
import net.minecraft.src.PotionEffect;
public class CustomPotionEffect extends PotionEffect
{
public CustomPotionEffect(int potionID, int duration, int amplifier)
{
super(potionID, duration, amplifier);
}
public CustomPotionEffect(Potion potion, int duration, int amplifier)
{
this(potion.getId(), duration, amplifier);
}
/**
* Creates a potion effect with custom curable items.
*
* @param curativeItems
* - ItemStacks that can cure this potion effect
*/
public CustomPotionEffect(int potionID, int duration, int amplifier, List<ItemStack> curativeItems)
{
super(potionID, duration, amplifier);
if (curativeItems == null)
{
this.setCurativeItems(new ArrayList<ItemStack>());
}
else
{
this.setCurativeItems(curativeItems);
}
}
}