Merge pull request #188 from CovertJaguar/patch-7
Some API cleanup to help reduce coupling
This commit is contained in:
commit
9f3db1077f
4 changed files with 13 additions and 13 deletions
|
@ -24,5 +24,11 @@ public class BlueprintManager {
|
|||
public static BlockSignature getBlockSignature(Block block) {
|
||||
return BlueprintManager.blockBptProps[0].getSignature(block);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
// Initialize defaults for block properties.
|
||||
for (int i = 0; i < BlueprintManager.blockBptProps.length; ++i) {
|
||||
new BptBlock(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,14 +9,13 @@
|
|||
|
||||
package buildcraft.api.core;
|
||||
|
||||
import buildcraft.api.blueprints.BlueprintManager;
|
||||
import buildcraft.api.blueprints.BptBlock;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
public class BuildCraftAPI {
|
||||
|
||||
|
||||
@Deprecated
|
||||
// To be removed, see LiquidManager
|
||||
public static final int BUCKET_VOLUME = 1000;
|
||||
public static final int LAST_ORIGINAL_BLOCK = 122;
|
||||
public static final int LAST_ORIGINAL_ITEM = 126;
|
||||
|
@ -53,10 +52,5 @@ public class BuildCraftAPI {
|
|||
for (int i = 0; i < softBlocks.length; ++i) {
|
||||
softBlocks[i] = false;
|
||||
}
|
||||
|
||||
// Initialize defaults for block properties.
|
||||
for (int i = 0; i < BlueprintManager.blockBptProps.length; ++i) {
|
||||
new BptBlock(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
package buildcraft.api.liquids;
|
||||
|
||||
import buildcraft.api.core.BuildCraftAPI;
|
||||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.ItemStack;
|
||||
|
||||
|
@ -22,11 +21,11 @@ public class LiquidData {
|
|||
public final ItemStack container;
|
||||
|
||||
public LiquidData(int stillLiquidId, int movingLiquidId, Item filled) {
|
||||
this(new LiquidStack(stillLiquidId, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(movingLiquidId, BuildCraftAPI.BUCKET_VOLUME), new ItemStack(filled, 1), new ItemStack(Item.bucketEmpty));
|
||||
this(new LiquidStack(stillLiquidId, LiquidManager.BUCKET_VOLUME), new LiquidStack(movingLiquidId, LiquidManager.BUCKET_VOLUME), new ItemStack(filled, 1), new ItemStack(Item.bucketEmpty));
|
||||
}
|
||||
|
||||
public LiquidData(int stillLiquidId, int movingLiquidId, ItemStack filled) {
|
||||
this(new LiquidStack(stillLiquidId, BuildCraftAPI.BUCKET_VOLUME), new LiquidStack(movingLiquidId, BuildCraftAPI.BUCKET_VOLUME), filled, new ItemStack(Item.bucketEmpty));
|
||||
this(new LiquidStack(stillLiquidId, LiquidManager.BUCKET_VOLUME), new LiquidStack(movingLiquidId, LiquidManager.BUCKET_VOLUME), filled, new ItemStack(Item.bucketEmpty));
|
||||
}
|
||||
|
||||
public LiquidData(LiquidStack stillLiquid, ItemStack filled, ItemStack container) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import net.minecraft.src.ItemStack;
|
|||
|
||||
public class LiquidManager {
|
||||
|
||||
public static final int BUCKET_VOLUME = 1000;
|
||||
public static LinkedList<LiquidData> liquids = new LinkedList<LiquidData>();
|
||||
|
||||
public static LiquidStack getLiquidForFilledItem(ItemStack filledItem) {
|
||||
|
|
Loading…
Reference in a new issue