Merge branch '6.4.x' of github.com:BuildCraft/BuildCraft
This commit is contained in:
commit
d6dce9ee44
878 changed files with 4649 additions and 2266 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -26,7 +26,6 @@ import net.minecraftforge.common.util.Constants;
|
|||
import buildcraft.api.core.Position;
|
||||
|
||||
public class SchematicEntity extends Schematic {
|
||||
|
||||
public Class<? extends Entity> entity;
|
||||
|
||||
/**
|
||||
|
@ -43,6 +42,7 @@ public class SchematicEntity extends Schematic {
|
|||
* Schematic.
|
||||
*/
|
||||
public ItemStack[] storedRequirements = new ItemStack[0];
|
||||
public BuildingPermission defaultPermission = BuildingPermission.ALL;
|
||||
|
||||
@Override
|
||||
public void getRequirementsForPlacement(IBuilderContext context, LinkedList<ItemStack> requirements) {
|
||||
|
@ -154,13 +154,11 @@ public class SchematicEntity extends Schematic {
|
|||
|
||||
rqs.add(ItemStack.loadItemStackFromNBT(sub));
|
||||
} else {
|
||||
// TODO: requirement can't be retreived, this blueprint is
|
||||
// only useable in creative
|
||||
defaultPermission = BuildingPermission.CREATIVE_ONLY;
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
// TODO: requirement can't be retreived, this blueprint is
|
||||
// only useable in creative
|
||||
defaultPermission = BuildingPermission.CREATIVE_ONLY;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,4 +213,9 @@ public class SchematicEntity extends Schematic {
|
|||
public int buildTime() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BuildingPermission getBuildingPermission() {
|
||||
return defaultPermission;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@API(apiVersion = "1.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|blueprints")
|
||||
@API(apiVersion = "1.2", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|blueprints")
|
||||
package buildcraft.api.blueprints;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -19,6 +19,7 @@ public abstract class RedstoneBoardRegistry {
|
|||
|
||||
public abstract void registerBoardClass(RedstoneBoardNBT<?> redstoneBoardNBT, float probability);
|
||||
|
||||
@Deprecated
|
||||
public abstract void createRandomBoard(NBTTagCompound nbt);
|
||||
|
||||
public abstract RedstoneBoardNBT getRedstoneBoard(NBTTagCompound nbt);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -27,7 +27,7 @@ public final class 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");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -15,7 +15,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
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> {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -8,17 +8,7 @@
|
|||
*/
|
||||
package buildcraft.api.filler;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import buildcraft.api.statements.IStatement;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IFillerPattern {
|
||||
|
||||
String getUniqueTag();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getIcon();
|
||||
|
||||
String getDisplayName();
|
||||
public interface IFillerPattern extends IStatement {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@API(apiVersion = "2.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|filler")
|
||||
@API(apiVersion = "3.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|filler")
|
||||
package buildcraft.api.filler;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -13,6 +13,7 @@ public final class BuildcraftRecipeRegistry {
|
|||
public static IAssemblyRecipeManager assemblyTable;
|
||||
public static IIntegrationRecipeManager integrationTable;
|
||||
public static IRefineryRecipeManager refinery;
|
||||
public static IProgrammingRecipeManager programmingTable;
|
||||
|
||||
private BuildcraftRecipeRegistry() {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
37
api/buildcraft/api/recipes/IProgrammingRecipe.java
Normal file
37
api/buildcraft/api/recipes/IProgrammingRecipe.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
package buildcraft.api.recipes;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IProgrammingRecipe {
|
||||
String getId();
|
||||
|
||||
/**
|
||||
* Get a list (size at least width*height) of ItemStacks representing options.
|
||||
* @param width The width of the Programming Table panel.
|
||||
* @param height The height of the Programming Table panel.
|
||||
* @return
|
||||
*/
|
||||
List<ItemStack> getOptions(int width, int height);
|
||||
|
||||
/**
|
||||
* Get the energy cost of a given option ItemStack.
|
||||
* @param option
|
||||
* @return
|
||||
*/
|
||||
int getEnergyCost(ItemStack option);
|
||||
|
||||
/**
|
||||
* @param input The input stack.
|
||||
* @return Whether this recipe applies to the given input stack.
|
||||
*/
|
||||
boolean canCraft(ItemStack input);
|
||||
|
||||
/**
|
||||
* Craft the input ItemStack with the given option into an output ItemStack.
|
||||
* @param input
|
||||
* @param option
|
||||
* @return The output ItemStack.
|
||||
*/
|
||||
ItemStack craft(ItemStack input, ItemStack option);
|
||||
}
|
23
api/buildcraft/api/recipes/IProgrammingRecipeManager.java
Normal file
23
api/buildcraft/api/recipes/IProgrammingRecipeManager.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* 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.recipes;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IProgrammingRecipeManager {
|
||||
void addRecipe(IProgrammingRecipe recipe);
|
||||
|
||||
void removeRecipe(String id);
|
||||
|
||||
void removeRecipe(IProgrammingRecipe recipe);
|
||||
|
||||
IProgrammingRecipe getRecipe(String id);
|
||||
|
||||
Collection<IProgrammingRecipe> getRecipes();
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@API(apiVersion = "2.0", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|recipes")
|
||||
@API(apiVersion = "2.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|recipes")
|
||||
package buildcraft.api.recipes;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -148,7 +148,7 @@ public class AIRobot {
|
|||
}
|
||||
|
||||
public final void writeToNBT(NBTTagCompound nbt) {
|
||||
nbt.setString("class", getClass().getCanonicalName());
|
||||
nbt.setString("aiName", RobotManager.getAIRobotName(getClass()));
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
writeSelfToNBT(data);
|
||||
|
@ -169,7 +169,14 @@ public class AIRobot {
|
|||
NBTTagCompound sub = nbt.getCompoundTag("delegateAI");
|
||||
|
||||
try {
|
||||
delegateAI = (AIRobot) Class.forName(sub.getString("class")).getConstructor(EntityRobotBase.class)
|
||||
Class<?> aiRobotClass = null;
|
||||
if (sub.hasKey("class")) {
|
||||
// Migration support for 6.4.x
|
||||
aiRobotClass = RobotManager.getAIRobotByLegacyClassName(sub.getString("class"));
|
||||
} else {
|
||||
aiRobotClass = RobotManager.getAIRobotByName(sub.getString("aiName"));
|
||||
}
|
||||
delegateAI = (AIRobot) aiRobotClass.getConstructor(EntityRobotBase.class)
|
||||
.newInstance(robot);
|
||||
|
||||
if (delegateAI.canLoadFromNBT()) {
|
||||
|
@ -186,7 +193,14 @@ public class AIRobot {
|
|||
AIRobot ai = null;
|
||||
|
||||
try {
|
||||
ai = (AIRobot) Class.forName(nbt.getString("class")).getConstructor(EntityRobotBase.class)
|
||||
Class<?> aiRobotClass = null;
|
||||
if (nbt.hasKey("class")) {
|
||||
// Migration support for 6.4.x
|
||||
aiRobotClass = RobotManager.getAIRobotByLegacyClassName(nbt.getString("class"));
|
||||
} else {
|
||||
aiRobotClass = RobotManager.getAIRobotByName(nbt.getString("aiName"));
|
||||
}
|
||||
ai = (AIRobot) aiRobotClass.getConstructor(EntityRobotBase.class)
|
||||
.newInstance(robot);
|
||||
ai.loadFromNBT(nbt);
|
||||
} catch (Throwable e) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
@ -47,7 +47,7 @@ public abstract class ResourceId {
|
|||
nbt.setTag("index", indexNBT);
|
||||
nbt.setByte("side", (byte) side.ordinal());
|
||||
nbt.setInteger("localId", localId);
|
||||
nbt.setString("class", getClass().getCanonicalName());
|
||||
nbt.setString("resourceName", RobotManager.getResourceIdName(getClass()));
|
||||
}
|
||||
|
||||
protected void readFromNBT(NBTTagCompound nbt) {
|
||||
|
@ -58,9 +58,15 @@ public abstract class ResourceId {
|
|||
|
||||
public static ResourceId load(NBTTagCompound nbt) {
|
||||
try {
|
||||
Class clas = Class.forName(nbt.getString("class"));
|
||||
Class cls = null;
|
||||
if (nbt.hasKey("class")) {
|
||||
// Migration support for 6.4.x
|
||||
cls = RobotManager.getResourceIdByLegacyClassName(nbt.getString("class"));
|
||||
} else {
|
||||
cls = RobotManager.getResourceIdByName("resourceName");
|
||||
}
|
||||
|
||||
ResourceId id = (ResourceId) clas.newInstance();
|
||||
ResourceId id = (ResourceId) cls.newInstance();
|
||||
id.readFromNBT(nbt);
|
||||
|
||||
return id;
|
||||
|
|
80
api/buildcraft/api/robots/RobotManager.java
Normal file
80
api/buildcraft/api/robots/RobotManager.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
/**
|
||||
* 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.robots;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class RobotManager {
|
||||
|
||||
public static ArrayList<Class<? extends AIRobot>> aiRobots = new ArrayList<Class<? extends AIRobot>>();
|
||||
private static Map<Class<? extends AIRobot>, String> aiRobotsNames =
|
||||
new HashMap<Class<? extends AIRobot>, String>();
|
||||
private static Map<String, Class<? extends AIRobot>> aiRobotsByNames =
|
||||
new HashMap<String, Class<? extends AIRobot>>();
|
||||
private static Map<String, Class<? extends AIRobot>> aiRobotsByLegacyClassNames =
|
||||
new HashMap<String, Class<? extends AIRobot>>();
|
||||
|
||||
private static Map<Class<? extends ResourceId>, String> resourceIdNames =
|
||||
new HashMap<Class<? extends ResourceId>, String>();
|
||||
private static Map<String, Class<? extends ResourceId>> resourceIdByNames =
|
||||
new HashMap<String, Class<? extends ResourceId>>();
|
||||
private static Map<String, Class<? extends ResourceId>> resourceIdLegacyClassNames =
|
||||
new HashMap<String, Class<? extends ResourceId>>();
|
||||
|
||||
public static void registerAIRobot(Class<? extends AIRobot> aiRobot, String name) {
|
||||
registerAIRobot(aiRobot, name, null);
|
||||
}
|
||||
|
||||
public static void registerAIRobot(Class<? extends AIRobot> aiRobot, String name, String legacyClassName) {
|
||||
aiRobots.add(aiRobot);
|
||||
aiRobotsByNames.put(name, aiRobot);
|
||||
aiRobotsNames.put(aiRobot, name);
|
||||
if (legacyClassName != null) {
|
||||
aiRobotsByLegacyClassNames.put(legacyClassName, aiRobot);
|
||||
}
|
||||
}
|
||||
|
||||
public static Class<?> getAIRobotByName(String aiRobotName) {
|
||||
return aiRobotsByNames.get(aiRobotName);
|
||||
}
|
||||
|
||||
public static String getAIRobotName(Class<? extends AIRobot> aiRobotClass) {
|
||||
return aiRobotsNames.get(aiRobotClass);
|
||||
}
|
||||
|
||||
public static Class<?> getAIRobotByLegacyClassName(String aiRobotLegacyClassName) {
|
||||
return aiRobotsByLegacyClassNames.get(aiRobotLegacyClassName);
|
||||
}
|
||||
|
||||
public static void registerResourceId(Class<? extends ResourceId> resourceId, String name) {
|
||||
registerResourceId(resourceId, name, null);
|
||||
}
|
||||
|
||||
public static void registerResourceId(Class<? extends ResourceId> resourceId, String name, String legacyClassName) {
|
||||
resourceIdByNames.put(name, resourceId);
|
||||
resourceIdNames.put(resourceId, name);
|
||||
if (legacyClassName != null) {
|
||||
resourceIdLegacyClassNames.put(legacyClassName, resourceId);
|
||||
}
|
||||
}
|
||||
|
||||
public static Class<?> getResourceIdByName(String resourceIdName) {
|
||||
return resourceIdByNames.get(resourceIdName);
|
||||
}
|
||||
|
||||
public static String getResourceIdName(Class<? extends ResourceId> resouceIdClass) {
|
||||
return resourceIdNames.get(resouceIdClass);
|
||||
}
|
||||
|
||||
public static Class<?> getResourceIdByLegacyClassName(String resourceIdLegacyClassName) {
|
||||
return resourceIdLegacyClassNames.get(resourceIdLegacyClassName);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue