refactor: move all robot NBT classes into a single class
This commit is contained in:
parent
b839ba829f
commit
d8b302eee0
40 changed files with 123 additions and 1126 deletions
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -101,42 +101,25 @@ import buildcraft.robotics.ai.AIRobotStraightMoveTo;
|
|||
import buildcraft.robotics.ai.AIRobotUnload;
|
||||
import buildcraft.robotics.ai.AIRobotUnloadFluids;
|
||||
import buildcraft.robotics.ai.AIRobotUseToolOnBlock;
|
||||
import buildcraft.robotics.boards.BCBoardNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotBomber;
|
||||
import buildcraft.robotics.boards.BoardRobotBomberNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotBuilder;
|
||||
import buildcraft.robotics.boards.BoardRobotBuilderNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotButcher;
|
||||
import buildcraft.robotics.boards.BoardRobotButcherNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotCarrier;
|
||||
import buildcraft.robotics.boards.BoardRobotCarrierNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotCrafter;
|
||||
import buildcraft.robotics.boards.BoardRobotCrafterNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotDelivery;
|
||||
import buildcraft.robotics.boards.BoardRobotDeliveryNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotFarmer;
|
||||
import buildcraft.robotics.boards.BoardRobotFarmerNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotFluidCarrier;
|
||||
import buildcraft.robotics.boards.BoardRobotFluidCarrierNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotHarvester;
|
||||
import buildcraft.robotics.boards.BoardRobotHarvesterNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotKnight;
|
||||
import buildcraft.robotics.boards.BoardRobotKnightNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotLeaveCutter;
|
||||
import buildcraft.robotics.boards.BoardRobotLeaveCutterNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotLumberjack;
|
||||
import buildcraft.robotics.boards.BoardRobotLumberjackNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotMiner;
|
||||
import buildcraft.robotics.boards.BoardRobotMinerNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotPicker;
|
||||
import buildcraft.robotics.boards.BoardRobotPickerNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotPlanter;
|
||||
import buildcraft.robotics.boards.BoardRobotPlanterNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotPump;
|
||||
import buildcraft.robotics.boards.BoardRobotPumpNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotShovelman;
|
||||
import buildcraft.robotics.boards.BoardRobotShovelmanNBT;
|
||||
import buildcraft.robotics.boards.BoardRobotStripes;
|
||||
import buildcraft.robotics.boards.BoardRobotStripesNBT;
|
||||
import buildcraft.robotics.map.MapManager;
|
||||
import buildcraft.robotics.statements.ActionRobotFilter;
|
||||
import buildcraft.robotics.statements.ActionRobotFilterTool;
|
||||
|
@ -231,34 +214,34 @@ public class BuildCraftRobotics extends BuildCraftMod {
|
|||
|
||||
// Cheapest, dumbest robot types
|
||||
// Those generally do very simple tasks
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotPickerNBT.instance, 8000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotCarrierNBT.instance, 8000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotFluidCarrierNBT.instance, 8000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotPicker", "picker", BoardRobotPicker.class, "green"), 8000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotCarrier", "carrier", BoardRobotCarrier.class, "green"), 8000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotFluidCarrier", "fluidCarrier", BoardRobotFluidCarrier.class, "green"), 8000);
|
||||
|
||||
// More expensive robot types
|
||||
// Those generally handle block mining/harvesting/placement.
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotLumberjackNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotHarvesterNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotMinerNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotPlanterNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotFarmerNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotLeaveCutterNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotButcherNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotShovelmanNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotPumpNBT.instance, 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotLumberjack", "lumberjack", BoardRobotLumberjack.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotHarvester", "harvester", BoardRobotHarvester.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:miner", "miner", BoardRobotMiner.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotPlanter", "planter", BoardRobotPlanter.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotFarmer", "farmer", BoardRobotFarmer.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:leave_cutter", "leaveCutter", BoardRobotLeaveCutter.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotButcher", "butcher", BoardRobotButcher.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:shovelman", "shovelman", BoardRobotShovelman.class, "blue"), 32000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotPump", "pump", BoardRobotPump.class, "blue"), 32000);
|
||||
|
||||
// Even more expensive
|
||||
// These handle complex multi-step operations.
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotCrafterNBT.instance, 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotDeliveryNBT.instance, 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotKnightNBT.instance, 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotBomberNBT.instance, 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotStripesNBT.instance, 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotCrafter", "crafter", BoardRobotCrafter.class, "blue"), 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotDelivery", "delivery", BoardRobotDelivery.class, "green"), 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotKnight", "knight", BoardRobotKnight.class, "red"), 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotBomber", "bomber", BoardRobotBomber.class, "red"), 128000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotStripes", "stripes", BoardRobotStripes.class, "yellow"), 128000);
|
||||
|
||||
// Most expensive
|
||||
// Overpowered galore!
|
||||
if (Loader.isModLoaded("BuildCraft|Builders")) {
|
||||
RedstoneBoardRegistry.instance.registerBoardType(BoardRobotBuilderNBT.instance, 512000);
|
||||
RedstoneBoardRegistry.instance.registerBoardType(new BCBoardNBT("buildcraft:boardRobotBuilder", "builder", BoardRobotBuilder.class, "yellow"), 512000);
|
||||
}
|
||||
|
||||
StatementManager.registerActionProvider(new RobotsActionProvider());
|
||||
|
|
86
common/buildcraft/robotics/boards/BCBoardNBT.java
Normal file
86
common/buildcraft/robotics/boards/BCBoardNBT.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
package buildcraft.robotics.boards;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public class BCBoardNBT extends RedstoneBoardRobotNBT {
|
||||
public static final Map<String, BCBoardNBT> REGISTRY = new HashMap<String, BCBoardNBT>();
|
||||
private final ResourceLocation texture;
|
||||
private final String id, name, upperName, boardType;
|
||||
private final Constructor<? extends RedstoneBoardRobot> boardInit;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
|
||||
public BCBoardNBT(String id, String name, Class<? extends RedstoneBoardRobot> board, String boardType) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.boardType = boardType;
|
||||
this.upperName = name.substring(0, 1).toUpperCase() + name.substring(1);
|
||||
this.texture = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_" + name + ".png");
|
||||
|
||||
Constructor<? extends RedstoneBoardRobot> boardInitLocal;
|
||||
try {
|
||||
boardInitLocal = board.getConstructor(EntityRobotBase.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
boardInitLocal = null;
|
||||
}
|
||||
this.boardInit = boardInitLocal;
|
||||
|
||||
REGISTRY.put(name, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:" + id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobot" + upperName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
try {
|
||||
return boardInit.newInstance(robot);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/" + boardType);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return texture;
|
||||
}
|
||||
}
|
|
@ -40,7 +40,7 @@ public class BoardRobotBomber extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotBomberNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("bomber");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotBomberNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotBomberNBT instance = new BoardRobotBomberNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_bomber.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotBomber(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotBomber";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotBomber"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/red");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -40,7 +40,7 @@ public class BoardRobotBuilder extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotBuilderNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("builder");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotBuilderNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotBuilderNBT instance = new BoardRobotBuilderNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_builder.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotBuilder(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotBuilder";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotBuilder"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/yellow");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ public class BoardRobotButcher extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotButcherNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("butcher");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotButcherNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotButcherNBT instance = new BoardRobotButcherNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_butcher.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotButcher(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotButcher";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotButcher"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ public class BoardRobotCarrier extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotCarrierNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("carrier");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotCarrierNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotCarrierNBT instance = new BoardRobotCarrierNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_carrier.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotCarrier(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotCarrier";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotCarrier"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/green");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -51,7 +51,7 @@ public class BoardRobotCrafter extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotCrafterNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("crafter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotCrafterNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotCrafterNBT instance = new BoardRobotCrafterNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_crafter.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotCrafter(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotCrafter";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotCrafter"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -36,7 +36,7 @@ public class BoardRobotDelivery extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotDeliveryNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("delivery");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotDeliveryNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotDeliveryNBT instance = new BoardRobotDeliveryNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_delivery.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotDelivery(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotDelivery";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotDelivery"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/green");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -37,7 +37,7 @@ public class BoardRobotFarmer extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotFarmerNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("farmer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotFarmerNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotFarmerNBT instance = new BoardRobotFarmerNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_farmer.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotFarmer(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotFarmer";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotFarmer"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ public class BoardRobotFluidCarrier extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotFluidCarrierNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("fluidCarrier");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotFluidCarrierNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotFluidCarrierNBT instance = new BoardRobotFluidCarrierNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_fluid_carrier.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotFluidCarrier(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotFluidCarrier";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotFluidCarrier"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/green");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ public class BoardRobotHarvester extends BoardRobotGenericBreakBlock {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotHarvesterNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("harvester");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotHarvesterNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotHarvesterNBT instance = new BoardRobotHarvesterNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_harvester.png");
|
||||
|
||||
public IIcon icon;
|
||||
|
||||
private BoardRobotHarvesterNBT() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotHarvester";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotHarvester"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotHarvester(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
}
|
|
@ -32,7 +32,7 @@ public class BoardRobotKnight extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotKnightNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("knight");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotKnightNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotKnightNBT instance = new BoardRobotKnightNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_knight.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotKnight(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotKnight";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotKnight"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/red");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -23,7 +23,7 @@ public class BoardRobotLeaveCutter extends BoardRobotGenericBreakBlock {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotLeaveCutterNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("leaveCutter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotLeaveCutterNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotLeaveCutterNBT instance = new BoardRobotLeaveCutterNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_leave_cutter.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotLeaveCutter(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:leave_cutter";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotLeaveCutter"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ public class BoardRobotLumberjack extends BoardRobotGenericBreakBlock {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotLumberjackNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("lumberjack");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotLumberjackNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotLumberjackNBT instance = new BoardRobotLumberjackNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_lumberjack.png");
|
||||
|
||||
public IIcon icon;
|
||||
|
||||
private BoardRobotLumberjackNBT() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotLumberjack";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotLumberjack"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotLumberjack(robot, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ public class BoardRobotMiner extends BoardRobotGenericBreakBlock {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotMinerNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("miner");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotMinerNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotMinerNBT instance = new BoardRobotMinerNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_miner.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotMiner(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:miner";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotMiner"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -57,16 +57,6 @@ public class BoardRobotPicker extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotPickerNBT.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeSelfToNBT(NBTTagCompound nbt) {
|
||||
super.writeSelfToNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadSelfFromNBT(NBTTagCompound nbt) {
|
||||
super.loadSelfFromNBT(nbt);
|
||||
return BCBoardNBT.REGISTRY.get("picker");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotPickerNBT extends RedstoneBoardRobotNBT {
|
||||
public static BoardRobotPickerNBT instance = new BoardRobotPickerNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_picker.png");
|
||||
|
||||
public IIcon icon;
|
||||
|
||||
private BoardRobotPickerNBT() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotPicker";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotPicker"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase object) {
|
||||
return new BoardRobotPicker(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/green");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
}
|
|
@ -48,7 +48,7 @@ public class BoardRobotPlanter extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotPlanterNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("planter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotPlanterNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotPlanterNBT instance = new BoardRobotPlanterNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_planter.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotPlanter(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotPlanter";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotPlanter"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -42,7 +42,7 @@ public class BoardRobotPump extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotPumpNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("pump");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotPumpNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotPumpNBT instance = new BoardRobotPumpNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_pump.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotPump(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotPump";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotPump"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/blue");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ public class BoardRobotShovelman extends BoardRobotGenericBreakBlock {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotShovelmanNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("shovelman");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,7 +34,7 @@ public class BoardRobotStripes extends RedstoneBoardRobot {
|
|||
|
||||
@Override
|
||||
public RedstoneBoardRobotNBT getNBTHandler() {
|
||||
return BoardRobotStripesNBT.instance;
|
||||
return BCBoardNBT.REGISTRY.get("stripes");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/**
|
||||
* 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.robotics.boards;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import buildcraft.api.boards.RedstoneBoardRobot;
|
||||
import buildcraft.api.boards.RedstoneBoardRobotNBT;
|
||||
import buildcraft.api.robots.EntityRobotBase;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.lib.utils.StringUtils;
|
||||
|
||||
public final class BoardRobotStripesNBT extends RedstoneBoardRobotNBT {
|
||||
|
||||
public static BoardRobotStripesNBT instance = new BoardRobotStripesNBT();
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
DefaultProps.TEXTURE_PATH_ROBOTS + "/robot_stripes.png");
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@Override
|
||||
public RedstoneBoardRobot create(NBTTagCompound nbt, EntityRobotBase robot) {
|
||||
return new BoardRobotStripes(robot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRobotTexture() {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getID() {
|
||||
return "buildcraft:boardRobotStripes";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advanced) {
|
||||
list.add(StringUtils.localize("buildcraft.boardRobotStripes"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icon = iconRegister.registerIcon("buildcraftrobotics:board/yellow");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(NBTTagCompound nbt) {
|
||||
return icon;
|
||||
}
|
||||
}
|
BIN
common/com.zip
BIN
common/com.zip
Binary file not shown.
Loading…
Reference in a new issue