Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Vazkii/Botania
Browse files Browse the repository at this point in the history
  • Loading branch information
Vazkii committed Jun 19, 2015
2 parents f6ad7a7 + ab526a5 commit 455adec
Show file tree
Hide file tree
Showing 84 changed files with 950 additions and 739 deletions.
5 changes: 4 additions & 1 deletion contributors.properties
Expand Up @@ -29,9 +29,12 @@ evrlost=10
belathus=1
vicceyr=0
superfortress=3
nematrec=10
nematrec=15
pika_craft=3
lanman14444=13
noclassdeffound=9
emba=0
jordsta95=6
kei_kouma=15
megatronp=15
thorantin=6
10 changes: 5 additions & 5 deletions src/api/java/buildcraft/api/core/BCLog.java
@@ -1,10 +1,10 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

Expand All @@ -27,7 +27,7 @@ private BCLog() {
public static void initLog() {

logger.info("Starting BuildCraft " + getVersion());
logger.info("Copyright (c) SpaceToad, 2011-2014");
logger.info("Copyright (c) SpaceToad, 2011-2015");
logger.info("http://www.mod-buildcraft.com");
}

Expand Down
12 changes: 6 additions & 6 deletions src/api/java/buildcraft/api/core/BlockIndex.java
@@ -1,10 +1,10 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

Expand All @@ -15,7 +15,7 @@
import net.minecraft.world.World;

/**
* This class is a comparable container for block positions. TODO: should this be merged with position?
* This class is a comparable container for integer block positions.
*/
public class BlockIndex implements Comparable<BlockIndex> {

Expand Down Expand Up @@ -99,7 +99,7 @@ public boolean equals(Object obj) {
return b.x == x && b.y == y && b.z == z;
}

return super.equals(obj);
return false;
}

@Override
Expand Down
53 changes: 0 additions & 53 deletions src/api/java/buildcraft/api/core/BlockMetaPair.java

This file was deleted.

33 changes: 18 additions & 15 deletions src/api/java/buildcraft/api/core/BuildCraftAPI.java
@@ -1,13 +1,14 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

Expand All @@ -19,24 +20,26 @@ public final class BuildCraftAPI {
public static ICoreProxy proxy;

public static final Set<Block> softBlocks = new HashSet<Block>();

public static IWorldProperty isSoftProperty;
public static IWorldProperty isWoodProperty;
public static IWorldProperty isLeavesProperty;
public static IWorldProperty[] isOreProperty;
public static IWorldProperty isHarvestableProperty;
public static IWorldProperty isFarmlandProperty;
public static IWorldProperty isDirtProperty;
public static IWorldProperty isShoveled;
public static IWorldProperty isFluidSource;
public static final HashMap<String, IWorldProperty> worldProperties = new HashMap<String, IWorldProperty>();

/**
* Deactivate constructor
*/
private BuildCraftAPI() {
}

public static IWorldProperty getWorldProperty(String name) {
return worldProperties.get(name);
}

public static void registerWorldProperty(String name, IWorldProperty property) {
if (worldProperties.containsKey(name)) {
BCLog.logger.warn("The WorldProperty key '" + name + "' is being overidden with " + property.getClass().getSimpleName() + "!");
}
worldProperties.put(name, property);
}

public static boolean isSoftBlock(World world, int x, int y, int z) {
return isSoftProperty.get(world, x, y, z);
return worldProperties.get("soft").get(world, x, y, z);
}
}
20 changes: 7 additions & 13 deletions src/api/java/buildcraft/api/core/EnumColor.java
@@ -1,20 +1,18 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

import java.util.Locale;
import java.util.Random;

import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand All @@ -36,6 +34,7 @@ public enum EnumColor {
MAGENTA,
ORANGE,
WHITE;

public static final EnumColor[] VALUES = values();
public static final String[] DYES = {
"dyeBlack",
Expand Down Expand Up @@ -191,13 +190,8 @@ public String toString() {
return b.toString().trim();
}

@SideOnly(Side.CLIENT)
public static void registerIcons(IIconRegister iconRegister) {
brushIcons = new IIcon[16];
for (EnumColor c : values()) {
brushIcons[c.ordinal()] = iconRegister.registerIcon("buildcraft:triggers/color_"
+ c.name().toLowerCase(Locale.ENGLISH));
}
public static void setIconArray(IIcon[] icons) {
brushIcons = icons;
}

@SideOnly(Side.CLIENT)
Expand Down
10 changes: 4 additions & 6 deletions src/api/java/buildcraft/api/core/IAreaProvider.java
@@ -1,18 +1,17 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

/**
* To be implemented by TileEntities able to provide a square area on the world, typically BuildCraft markers.
*/
public interface IAreaProvider {

int xMin();

int yMin();
Expand All @@ -29,5 +28,4 @@ public interface IAreaProvider {
* Remove from the world all objects used to define the area.
*/
void removeFromWorld();

}
8 changes: 4 additions & 4 deletions src/api/java/buildcraft/api/core/IBox.java
@@ -1,10 +1,10 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

Expand Down
8 changes: 4 additions & 4 deletions src/api/java/buildcraft/api/core/ICoreProxy.java
@@ -1,10 +1,10 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

Expand Down
9 changes: 4 additions & 5 deletions src/api/java/buildcraft/api/core/IIconProvider.java
@@ -1,16 +1,15 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

Expand Down
10 changes: 6 additions & 4 deletions src/api/java/buildcraft/api/core/IInvSlot.java
@@ -1,10 +1,10 @@
/**
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
* The BuildCraft API is distributed under the terms of the MIT License.
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
package buildcraft.api.core;

Expand All @@ -22,6 +22,8 @@ public interface IInvSlot {

boolean canTakeStackFromSlot(ItemStack stack);

boolean isItemValidForSlot(ItemStack stack);

ItemStack decreaseStackInSlot(int amount);

ItemStack getStackInSlot();
Expand Down
8 changes: 8 additions & 0 deletions src/api/java/buildcraft/api/core/INBTStoreable.java
@@ -0,0 +1,8 @@
package buildcraft.api.core;

import net.minecraft.nbt.NBTTagCompound;

public interface INBTStoreable {
void readFromNBT(NBTTagCompound tag);
void writeToNBT(NBTTagCompound tag);
}
10 changes: 10 additions & 0 deletions src/api/java/buildcraft/api/core/IPathProvider.java
@@ -0,0 +1,10 @@
package buildcraft.api.core;

import java.util.List;

/**
* To be implemented by TileEntities able to provide a path on the world, typically BuildCraft path markers.
*/
public interface IPathProvider {
List<BlockIndex> getPath();
}
30 changes: 30 additions & 0 deletions src/api/java/buildcraft/api/core/ISerializable.java
@@ -0,0 +1,30 @@
/**
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.api.core;

import io.netty.buffer.ByteBuf;

/**
* Implemented by classes representing serializable packet state
*/
public interface ISerializable {
/**
* Serializes the state to the stream
*
* @param data
*/
void writeData(ByteBuf data);

/**
* Deserializes the state from the stream
*
* @param data
*/
void readData(ByteBuf data);
}

0 comments on commit 455adec

Please sign in to comment.