move quarry to Builders module, clean up a few things
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 496 B After Width: | Height: | Size: 496 B |
Before Width: | Height: | Size: 157 B After Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 150 B After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -12,6 +12,10 @@ import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.util.List;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.entity.item.EntityItemFrame;
|
import net.minecraft.entity.item.EntityItemFrame;
|
||||||
import net.minecraft.entity.item.EntityMinecartChest;
|
import net.minecraft.entity.item.EntityMinecartChest;
|
||||||
import net.minecraft.entity.item.EntityMinecartEmpty;
|
import net.minecraft.entity.item.EntityMinecartEmpty;
|
||||||
|
@ -25,6 +29,7 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.launchwrapper.Launch;
|
import net.minecraft.launchwrapper.Launch;
|
||||||
import net.minecraft.stats.Achievement;
|
import net.minecraft.stats.Achievement;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
|
@ -40,6 +45,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||||
|
import net.minecraftforge.common.ForgeChunkManager;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.config.Property;
|
import net.minecraftforge.common.config.Property;
|
||||||
import buildcraft.api.blueprints.BlueprintDeployer;
|
import buildcraft.api.blueprints.BlueprintDeployer;
|
||||||
|
@ -60,10 +66,13 @@ import buildcraft.builders.BlockBlueprintLibrary;
|
||||||
import buildcraft.builders.BlockBuilder;
|
import buildcraft.builders.BlockBuilder;
|
||||||
import buildcraft.builders.BlockConstructionMarker;
|
import buildcraft.builders.BlockConstructionMarker;
|
||||||
import buildcraft.builders.BlockFiller;
|
import buildcraft.builders.BlockFiller;
|
||||||
|
import buildcraft.builders.BlockFrame;
|
||||||
import buildcraft.builders.BlockMarker;
|
import buildcraft.builders.BlockMarker;
|
||||||
import buildcraft.builders.BlockPathMarker;
|
import buildcraft.builders.BlockPathMarker;
|
||||||
|
import buildcraft.builders.BlockQuarry;
|
||||||
import buildcraft.builders.BlueprintServerDatabase;
|
import buildcraft.builders.BlueprintServerDatabase;
|
||||||
import buildcraft.builders.BuilderProxy;
|
import buildcraft.builders.BuilderProxy;
|
||||||
|
import buildcraft.builders.BuilderProxyClient;
|
||||||
import buildcraft.builders.BuildersGuiHandler;
|
import buildcraft.builders.BuildersGuiHandler;
|
||||||
import buildcraft.builders.EventHandlerBuilders;
|
import buildcraft.builders.EventHandlerBuilders;
|
||||||
import buildcraft.builders.HeuristicBlockDetection;
|
import buildcraft.builders.HeuristicBlockDetection;
|
||||||
|
@ -80,6 +89,7 @@ import buildcraft.builders.TileConstructionMarker;
|
||||||
import buildcraft.builders.TileFiller;
|
import buildcraft.builders.TileFiller;
|
||||||
import buildcraft.builders.TileMarker;
|
import buildcraft.builders.TileMarker;
|
||||||
import buildcraft.builders.TilePathMarker;
|
import buildcraft.builders.TilePathMarker;
|
||||||
|
import buildcraft.builders.TileQuarry;
|
||||||
import buildcraft.builders.blueprints.RealBlueprintDeployer;
|
import buildcraft.builders.blueprints.RealBlueprintDeployer;
|
||||||
import buildcraft.builders.schematics.SchematicAir;
|
import buildcraft.builders.schematics.SchematicAir;
|
||||||
import buildcraft.builders.schematics.SchematicBed;
|
import buildcraft.builders.schematics.SchematicBed;
|
||||||
|
@ -93,6 +103,7 @@ import buildcraft.builders.schematics.SchematicFactoryEntity;
|
||||||
import buildcraft.builders.schematics.SchematicFactoryMask;
|
import buildcraft.builders.schematics.SchematicFactoryMask;
|
||||||
import buildcraft.builders.schematics.SchematicFarmland;
|
import buildcraft.builders.schematics.SchematicFarmland;
|
||||||
import buildcraft.builders.schematics.SchematicFire;
|
import buildcraft.builders.schematics.SchematicFire;
|
||||||
|
import buildcraft.core.builders.schematics.SchematicFree;
|
||||||
import buildcraft.builders.schematics.SchematicGlassPane;
|
import buildcraft.builders.schematics.SchematicGlassPane;
|
||||||
import buildcraft.builders.schematics.SchematicGravel;
|
import buildcraft.builders.schematics.SchematicGravel;
|
||||||
import buildcraft.builders.schematics.SchematicHanging;
|
import buildcraft.builders.schematics.SchematicHanging;
|
||||||
|
@ -155,6 +166,8 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
public static BlockArchitect architectBlock;
|
public static BlockArchitect architectBlock;
|
||||||
public static BlockBlueprintLibrary libraryBlock;
|
public static BlockBlueprintLibrary libraryBlock;
|
||||||
public static BlockUrbanist urbanistBlock;
|
public static BlockUrbanist urbanistBlock;
|
||||||
|
public static BlockQuarry quarryBlock;
|
||||||
|
public static BlockFrame frameBlock;
|
||||||
public static ItemBlueprintTemplate templateItem;
|
public static ItemBlueprintTemplate templateItem;
|
||||||
public static ItemBlueprintStandard blueprintItem;
|
public static ItemBlueprintStandard blueprintItem;
|
||||||
|
|
||||||
|
@ -163,6 +176,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
public static Achievement blueprintAchievement;
|
public static Achievement blueprintAchievement;
|
||||||
public static Achievement builderAchievement;
|
public static Achievement builderAchievement;
|
||||||
public static Achievement templateAchievement;
|
public static Achievement templateAchievement;
|
||||||
|
public static Achievement chunkDestroyerAchievement;
|
||||||
|
|
||||||
public static BlueprintServerDatabase serverDB;
|
public static BlueprintServerDatabase serverDB;
|
||||||
public static LibraryDatabase clientDB;
|
public static LibraryDatabase clientDB;
|
||||||
|
@ -170,8 +184,44 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
public static boolean debugPrintSchematicList = false;
|
public static boolean debugPrintSchematicList = false;
|
||||||
public static boolean dropBrokenBlocks = false;
|
public static boolean dropBrokenBlocks = false;
|
||||||
|
|
||||||
|
public static boolean quarryLoadsChunks = true;
|
||||||
|
public static boolean quarryOneTimeUse = false;
|
||||||
|
|
||||||
private String blueprintServerDir, blueprintClientDir;
|
private String blueprintServerDir, blueprintClientDir;
|
||||||
|
|
||||||
|
public class QuarryChunkloadCallback implements ForgeChunkManager.OrderedLoadingCallback {
|
||||||
|
@Override
|
||||||
|
public void ticketsLoaded(List<ForgeChunkManager.Ticket> tickets, World world) {
|
||||||
|
for (ForgeChunkManager.Ticket ticket : tickets) {
|
||||||
|
int quarryX = ticket.getModData().getInteger("quarryX");
|
||||||
|
int quarryY = ticket.getModData().getInteger("quarryY");
|
||||||
|
int quarryZ = ticket.getModData().getInteger("quarryZ");
|
||||||
|
|
||||||
|
Block block = world.getBlock(quarryX, quarryY, quarryZ);
|
||||||
|
if (block == quarryBlock) {
|
||||||
|
TileQuarry tq = (TileQuarry) world.getTileEntity(quarryX, quarryY, quarryZ);
|
||||||
|
tq.forceChunkLoading(ticket);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ForgeChunkManager.Ticket> ticketsLoaded(List<ForgeChunkManager.Ticket> tickets, World world, int maxTicketCount) {
|
||||||
|
List<ForgeChunkManager.Ticket> validTickets = Lists.newArrayList();
|
||||||
|
for (ForgeChunkManager.Ticket ticket : tickets) {
|
||||||
|
int quarryX = ticket.getModData().getInteger("quarryX");
|
||||||
|
int quarryY = ticket.getModData().getInteger("quarryY");
|
||||||
|
int quarryZ = ticket.getModData().getInteger("quarryZ");
|
||||||
|
|
||||||
|
Block block = world.getBlock(quarryX, quarryY, quarryZ);
|
||||||
|
if (block == quarryBlock) {
|
||||||
|
validTickets.add(ticket);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return validTickets;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void loadConfiguration(FMLPreInitializationEvent evt) {
|
public void loadConfiguration(FMLPreInitializationEvent evt) {
|
||||||
BuildCraftCore.mainConfigManager.register("blueprints.serverDatabaseDirectory",
|
BuildCraftCore.mainConfigManager.register("blueprints.serverDatabaseDirectory",
|
||||||
|
@ -211,6 +261,9 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
|
|
||||||
reloadConfig(ConfigManager.RestartRequirement.NONE);
|
reloadConfig(ConfigManager.RestartRequirement.NONE);
|
||||||
} else {
|
} else {
|
||||||
|
quarryOneTimeUse = BuildCraftCore.mainConfigManager.get("general.quarry.oneTimeUse").getBoolean();
|
||||||
|
quarryLoadsChunks = BuildCraftCore.mainConfigManager.get("general.quarry.doChunkLoading").getBoolean();
|
||||||
|
|
||||||
blueprintClientDir = BuildCraftCore.mainConfigManager.get("blueprints.clientDatabaseDirectory").getString();
|
blueprintClientDir = BuildCraftCore.mainConfigManager.get("blueprints.clientDatabaseDirectory").getString();
|
||||||
blueprintClientDir = JavaTools.stripSurroundingQuotes(replacePathVariables(blueprintClientDir));
|
blueprintClientDir = JavaTools.stripSurroundingQuotes(replacePathVariables(blueprintClientDir));
|
||||||
clientDB.init(new String[] {
|
clientDB.init(new String[] {
|
||||||
|
@ -281,6 +334,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void postInit(FMLPostInitializationEvent evt) {
|
public void postInit(FMLPostInitializationEvent evt) {
|
||||||
HeuristicBlockDetection.start();
|
HeuristicBlockDetection.start();
|
||||||
|
ForgeChunkManager.setForcedChunkLoadingCallback(instance, new QuarryChunkloadCallback());
|
||||||
|
|
||||||
if (debugPrintSchematicList) {
|
if (debugPrintSchematicList) {
|
||||||
try {
|
try {
|
||||||
|
@ -456,6 +510,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
schemes.registerSchematicBlock(markerBlock, SchematicIgnore.class);
|
schemes.registerSchematicBlock(markerBlock, SchematicIgnore.class);
|
||||||
schemes.registerSchematicBlock(pathMarkerBlock, SchematicIgnore.class);
|
schemes.registerSchematicBlock(pathMarkerBlock, SchematicIgnore.class);
|
||||||
schemes.registerSchematicBlock(constructionMarkerBlock, SchematicIgnore.class);
|
schemes.registerSchematicBlock(constructionMarkerBlock, SchematicIgnore.class);
|
||||||
|
schemes.registerSchematicBlock(frameBlock, SchematicFree.class);
|
||||||
|
|
||||||
// Factories required to save entities in world
|
// Factories required to save entities in world
|
||||||
|
|
||||||
|
@ -474,6 +529,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
blueprintAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.blueprint", "blueprintAchievement", 11, 4, BuildCraftBuilders.blueprintItem, architectAchievement));
|
blueprintAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.blueprint", "blueprintAchievement", 11, 4, BuildCraftBuilders.blueprintItem, architectAchievement));
|
||||||
templateAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.template", "templateAchievement", 13, 4, BuildCraftBuilders.templateItem, blueprintAchievement));
|
templateAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.template", "templateAchievement", 13, 4, BuildCraftBuilders.templateItem, blueprintAchievement));
|
||||||
libraryAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.blueprintLibrary", "blueprintLibraryAchievement", 15, 2, BuildCraftBuilders.libraryBlock, builderAchievement));
|
libraryAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.blueprintLibrary", "blueprintLibraryAchievement", 15, 2, BuildCraftBuilders.libraryBlock, builderAchievement));
|
||||||
|
chunkDestroyerAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.chunkDestroyer", "chunkDestroyerAchievement", 9, 2, quarryBlock, BuildCraftCore.diamondGearAchievement));
|
||||||
|
|
||||||
if (BuildCraftCore.loadDefaultRecipes) {
|
if (BuildCraftCore.loadDefaultRecipes) {
|
||||||
loadRecipes();
|
loadRecipes();
|
||||||
|
@ -492,6 +548,9 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
blueprintItem.setUnlocalizedName("blueprintItem");
|
blueprintItem.setUnlocalizedName("blueprintItem");
|
||||||
CoreProxy.proxy.registerItem(blueprintItem);
|
CoreProxy.proxy.registerItem(blueprintItem);
|
||||||
|
|
||||||
|
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
||||||
|
CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
||||||
|
|
||||||
markerBlock = (BlockMarker) CompatHooks.INSTANCE.getBlock(BlockMarker.class);
|
markerBlock = (BlockMarker) CompatHooks.INSTANCE.getBlock(BlockMarker.class);
|
||||||
CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock"));
|
CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock"));
|
||||||
|
|
||||||
|
@ -505,6 +564,9 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
||||||
CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
||||||
|
|
||||||
|
frameBlock = new BlockFrame();
|
||||||
|
CoreProxy.proxy.registerBlock(frameBlock.setBlockName("frameBlock"));
|
||||||
|
|
||||||
builderBlock = (BlockBuilder) CompatHooks.INSTANCE.getBlock(BlockBuilder.class);
|
builderBlock = (BlockBuilder) CompatHooks.INSTANCE.getBlock(BlockBuilder.class);
|
||||||
CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock"));
|
CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock"));
|
||||||
|
|
||||||
|
@ -520,6 +582,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
CoreProxy.proxy.registerTileEntity(TileUrbanist.class, "net.minecraft.src.builders.TileUrbanist");
|
CoreProxy.proxy.registerTileEntity(TileUrbanist.class, "net.minecraft.src.builders.TileUrbanist");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoreProxy.proxy.registerTileEntity(TileQuarry.class, "Machine");
|
||||||
CoreProxy.proxy.registerTileEntity(TileMarker.class, "Marker");
|
CoreProxy.proxy.registerTileEntity(TileMarker.class, "Marker");
|
||||||
CoreProxy.proxy.registerTileEntity(TileFiller.class, "Filler");
|
CoreProxy.proxy.registerTileEntity(TileFiller.class, "Filler");
|
||||||
CoreProxy.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
CoreProxy.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
||||||
|
@ -562,6 +625,17 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadRecipes() {
|
public static void loadRecipes() {
|
||||||
|
CoreProxy.proxy.addCraftingRecipe(
|
||||||
|
new ItemStack(quarryBlock),
|
||||||
|
"ipi",
|
||||||
|
"gig",
|
||||||
|
"dDd",
|
||||||
|
'i', "gearIron",
|
||||||
|
'p', "dustRedstone",
|
||||||
|
'g', "gearGold",
|
||||||
|
'd', "gearDiamond",
|
||||||
|
'D', Items.diamond_pickaxe);
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(templateItem, 1), "ppp", "pip", "ppp", 'i',
|
CoreProxy.proxy.addCraftingRecipe(new ItemStack(templateItem, 1), "ppp", "pip", "ppp", 'i',
|
||||||
"dyeBlack", 'p', Items.paper);
|
"dyeBlack", 'p', Items.paper);
|
||||||
|
|
||||||
|
@ -591,7 +665,7 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
new ItemStack(blueprintItem, 1));
|
new ItemStack(blueprintItem, 1));
|
||||||
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), "bbb", "bBb", "bbb", 'b',
|
CoreProxy.proxy.addCraftingRecipe(new ItemStack(libraryBlock, 1), "bbb", "bBb", "bbb", 'b',
|
||||||
new ItemStack(blueprintItem), 'B', Blocks.bookshelf);
|
new ItemStack(blueprintItem), 'B', Blocks.bookshelf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
|
@ -611,14 +685,12 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
||||||
for (FillerPattern pattern : FillerPattern.patterns.values()) {
|
for (FillerPattern pattern : FillerPattern.patterns.values()) {
|
||||||
pattern.registerIcons(evt.map);
|
pattern.registerIcons(evt.map);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
TextureMap terrainTextures = evt.map;
|
||||||
@SideOnly(Side.CLIENT)
|
BuilderProxyClient.drillTexture = terrainTextures.registerIcon("buildcraftbuilders:machineBlock/drill");
|
||||||
public void textureHook(TextureStitchEvent.Pre event) {
|
BuilderProxyClient.drillHeadTexture = terrainTextures.registerIcon("buildcraftbuilders:machineBlock/drill_head");
|
||||||
if (event.map.getTextureType() == 1) {
|
} else if (evt.map.getTextureType() == 1) {
|
||||||
UrbanistToolsIconProvider.INSTANCE.registerIcons(event.map);
|
UrbanistToolsIconProvider.INSTANCE.registerIcons(evt.map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,29 +8,27 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft;
|
package buildcraft;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.texture.TextureMap;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.stats.Achievement;
|
import net.minecraft.stats.Achievement;
|
||||||
import net.minecraft.world.World;
|
|
||||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||||
import net.minecraftforge.common.ForgeChunkManager;
|
|
||||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import buildcraft.api.blueprints.BuilderAPI;
|
import buildcraft.api.blueprints.BuilderAPI;
|
||||||
import buildcraft.api.blueprints.SchematicTile;
|
import buildcraft.api.blueprints.SchematicTile;
|
||||||
|
@ -38,19 +36,17 @@ import buildcraft.core.CompatHooks;
|
||||||
import buildcraft.core.DefaultProps;
|
import buildcraft.core.DefaultProps;
|
||||||
import buildcraft.core.InterModComms;
|
import buildcraft.core.InterModComms;
|
||||||
import buildcraft.core.Version;
|
import buildcraft.core.Version;
|
||||||
import buildcraft.core.builders.schematics.SchematicIgnoreMeta;
|
import buildcraft.core.builders.schematics.SchematicFree;
|
||||||
import buildcraft.core.config.ConfigManager;
|
import buildcraft.core.config.ConfigManager;
|
||||||
import buildcraft.core.lib.network.ChannelHandler;
|
import buildcraft.core.lib.network.ChannelHandler;
|
||||||
import buildcraft.core.lib.network.PacketHandler;
|
import buildcraft.core.lib.network.PacketHandler;
|
||||||
import buildcraft.core.proxy.CoreProxy;
|
import buildcraft.core.proxy.CoreProxy;
|
||||||
import buildcraft.factory.BlockAutoWorkbench;
|
import buildcraft.factory.BlockAutoWorkbench;
|
||||||
import buildcraft.factory.BlockFloodGate;
|
import buildcraft.factory.BlockFloodGate;
|
||||||
import buildcraft.factory.BlockFrame;
|
|
||||||
import buildcraft.factory.BlockHopper;
|
import buildcraft.factory.BlockHopper;
|
||||||
import buildcraft.factory.BlockMiningWell;
|
import buildcraft.factory.BlockMiningWell;
|
||||||
import buildcraft.factory.BlockPlainPipe;
|
import buildcraft.factory.BlockPlainPipe;
|
||||||
import buildcraft.factory.BlockPump;
|
import buildcraft.factory.BlockPump;
|
||||||
import buildcraft.factory.BlockQuarry;
|
|
||||||
import buildcraft.factory.BlockRefinery;
|
import buildcraft.factory.BlockRefinery;
|
||||||
import buildcraft.factory.BlockTank;
|
import buildcraft.factory.BlockTank;
|
||||||
import buildcraft.factory.FactoryGuiHandler;
|
import buildcraft.factory.FactoryGuiHandler;
|
||||||
|
@ -62,7 +58,6 @@ import buildcraft.factory.TileFloodGate;
|
||||||
import buildcraft.factory.TileHopper;
|
import buildcraft.factory.TileHopper;
|
||||||
import buildcraft.factory.TileMiningWell;
|
import buildcraft.factory.TileMiningWell;
|
||||||
import buildcraft.factory.TilePump;
|
import buildcraft.factory.TilePump;
|
||||||
import buildcraft.factory.TileQuarry;
|
|
||||||
import buildcraft.factory.TileRefinery;
|
import buildcraft.factory.TileRefinery;
|
||||||
import buildcraft.factory.TileTank;
|
import buildcraft.factory.TileTank;
|
||||||
import buildcraft.factory.schematics.SchematicAutoWorkbench;
|
import buildcraft.factory.schematics.SchematicAutoWorkbench;
|
||||||
|
@ -76,10 +71,8 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
@Mod.Instance("BuildCraft|Factory")
|
@Mod.Instance("BuildCraft|Factory")
|
||||||
public static BuildCraftFactory instance;
|
public static BuildCraftFactory instance;
|
||||||
|
|
||||||
public static BlockQuarry quarryBlock;
|
|
||||||
public static BlockMiningWell miningWellBlock;
|
public static BlockMiningWell miningWellBlock;
|
||||||
public static BlockAutoWorkbench autoWorkbenchBlock;
|
public static BlockAutoWorkbench autoWorkbenchBlock;
|
||||||
public static BlockFrame frameBlock;
|
|
||||||
public static BlockPlainPipe plainPipeBlock;
|
public static BlockPlainPipe plainPipeBlock;
|
||||||
public static BlockPump pumpBlock;
|
public static BlockPump pumpBlock;
|
||||||
public static BlockFloodGate floodGateBlock;
|
public static BlockFloodGate floodGateBlock;
|
||||||
|
@ -89,61 +82,17 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
|
|
||||||
public static Achievement aLotOfCraftingAchievement;
|
public static Achievement aLotOfCraftingAchievement;
|
||||||
public static Achievement straightDownAchievement;
|
public static Achievement straightDownAchievement;
|
||||||
public static Achievement chunkDestroyerAchievement;
|
|
||||||
public static Achievement refineAndRedefineAchievement;
|
public static Achievement refineAndRedefineAchievement;
|
||||||
|
|
||||||
public static boolean quarryLoadsChunks = true;
|
|
||||||
public static boolean quarryOneTimeUse = false;
|
|
||||||
public static int miningDepth = 256;
|
public static int miningDepth = 256;
|
||||||
public static PumpDimensionList pumpDimensionList;
|
public static PumpDimensionList pumpDimensionList;
|
||||||
|
|
||||||
@Mod.EventHandler
|
|
||||||
public void postInit(FMLPostInitializationEvent evt) {
|
|
||||||
FactoryProxy.proxy.initializeNEIIntegration();
|
|
||||||
ForgeChunkManager.setForcedChunkLoadingCallback(instance, new QuarryChunkloadCallback());
|
|
||||||
}
|
|
||||||
|
|
||||||
public class QuarryChunkloadCallback implements ForgeChunkManager.OrderedLoadingCallback {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void ticketsLoaded(List<Ticket> tickets, World world) {
|
|
||||||
for (Ticket ticket : tickets) {
|
|
||||||
int quarryX = ticket.getModData().getInteger("quarryX");
|
|
||||||
int quarryY = ticket.getModData().getInteger("quarryY");
|
|
||||||
int quarryZ = ticket.getModData().getInteger("quarryZ");
|
|
||||||
|
|
||||||
Block block = world.getBlock(quarryX, quarryY, quarryZ);
|
|
||||||
if (block == quarryBlock) {
|
|
||||||
TileQuarry tq = (TileQuarry) world.getTileEntity(quarryX, quarryY, quarryZ);
|
|
||||||
tq.forceChunkLoading(ticket);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Ticket> ticketsLoaded(List<Ticket> tickets, World world, int maxTicketCount) {
|
|
||||||
List<Ticket> validTickets = Lists.newArrayList();
|
|
||||||
for (Ticket ticket : tickets) {
|
|
||||||
int quarryX = ticket.getModData().getInteger("quarryX");
|
|
||||||
int quarryY = ticket.getModData().getInteger("quarryY");
|
|
||||||
int quarryZ = ticket.getModData().getInteger("quarryZ");
|
|
||||||
|
|
||||||
Block block = world.getBlock(quarryX, quarryY, quarryZ);
|
|
||||||
if (block == quarryBlock) {
|
|
||||||
validTickets.add(ticket);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return validTickets;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void load(FMLInitializationEvent evt) {
|
public void load(FMLInitializationEvent evt) {
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new FactoryGuiHandler());
|
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new FactoryGuiHandler());
|
||||||
|
|
||||||
// EntityRegistry.registerModEntity(EntityMechanicalArm.class, "bcMechanicalArm", EntityIds.MECHANICAL_ARM, instance, 50, 1, true);
|
// EntityRegistry.registerModEntity(EntityMechanicalArm.class, "bcMechanicalArm", EntityIds.MECHANICAL_ARM, instance, 50, 1, true);
|
||||||
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileQuarry.class, "Machine");
|
|
||||||
CoreProxy.proxy.registerTileEntity(TileMiningWell.class, "MiningWell");
|
CoreProxy.proxy.registerTileEntity(TileMiningWell.class, "MiningWell");
|
||||||
CoreProxy.proxy.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench");
|
CoreProxy.proxy.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench");
|
||||||
CoreProxy.proxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
|
CoreProxy.proxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
|
||||||
|
@ -156,16 +105,15 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
|
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(refineryBlock, SchematicRefinery.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(refineryBlock, SchematicRefinery.class);
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(tankBlock, SchematicTileIgnoreState.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(tankBlock, SchematicTileIgnoreState.class);
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(frameBlock, SchematicIgnoreMeta.class);
|
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(pumpBlock, SchematicPump.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(pumpBlock, SchematicPump.class);
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(miningWellBlock, SchematicTileIgnoreState.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(miningWellBlock, SchematicTileIgnoreState.class);
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(floodGateBlock, SchematicTileIgnoreState.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(floodGateBlock, SchematicTileIgnoreState.class);
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(autoWorkbenchBlock, SchematicAutoWorkbench.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(autoWorkbenchBlock, SchematicAutoWorkbench.class);
|
||||||
BuilderAPI.schematicRegistry.registerSchematicBlock(hopperBlock, SchematicTile.class);
|
BuilderAPI.schematicRegistry.registerSchematicBlock(hopperBlock, SchematicTile.class);
|
||||||
|
BuilderAPI.schematicRegistry.registerSchematicBlock(plainPipeBlock, SchematicFree.class);
|
||||||
|
|
||||||
aLotOfCraftingAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.aLotOfCrafting", "aLotOfCraftingAchievement", 1, 2, autoWorkbenchBlock, BuildCraftCore.woodenGearAchievement));
|
aLotOfCraftingAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.aLotOfCrafting", "aLotOfCraftingAchievement", 1, 2, autoWorkbenchBlock, BuildCraftCore.woodenGearAchievement));
|
||||||
straightDownAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.straightDown", "straightDownAchievement", 5, 2, miningWellBlock, BuildCraftCore.ironGearAchievement));
|
straightDownAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.straightDown", "straightDownAchievement", 5, 2, miningWellBlock, BuildCraftCore.ironGearAchievement));
|
||||||
chunkDestroyerAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.chunkDestroyer", "chunkDestroyerAchievement", 9, 2, quarryBlock, BuildCraftCore.diamondGearAchievement));
|
|
||||||
refineAndRedefineAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.refineAndRedefine", "refineAndRedefineAchievement", 10, 0, refineryBlock, BuildCraftCore.diamondGearAchievement));
|
refineAndRedefineAchievement = BuildCraftCore.achievementManager.registerAchievement(new Achievement("achievement.refineAndRedefine", "refineAndRedefineAchievement", 10, 0, refineryBlock, BuildCraftCore.diamondGearAchievement));
|
||||||
|
|
||||||
if (BuildCraftCore.loadDefaultRecipes) {
|
if (BuildCraftCore.loadDefaultRecipes) {
|
||||||
|
@ -201,12 +149,6 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
autoWorkbenchBlock = (BlockAutoWorkbench) CompatHooks.INSTANCE.getBlock(BlockAutoWorkbench.class);
|
autoWorkbenchBlock = (BlockAutoWorkbench) CompatHooks.INSTANCE.getBlock(BlockAutoWorkbench.class);
|
||||||
CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"));
|
CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"));
|
||||||
|
|
||||||
frameBlock = new BlockFrame();
|
|
||||||
CoreProxy.proxy.registerBlock(frameBlock.setBlockName("frameBlock"));
|
|
||||||
|
|
||||||
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
|
||||||
CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
|
||||||
|
|
||||||
tankBlock = (BlockTank) CompatHooks.INSTANCE.getBlock(BlockTank.class);
|
tankBlock = (BlockTank) CompatHooks.INSTANCE.getBlock(BlockTank.class);
|
||||||
CoreProxy.proxy.registerBlock(tankBlock.setBlockName("tankBlock"));
|
CoreProxy.proxy.registerBlock(tankBlock.setBlockName("tankBlock"));
|
||||||
|
|
||||||
|
@ -240,19 +182,6 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
'P', Items.iron_pickaxe);
|
'P', Items.iron_pickaxe);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quarryBlock != null) {
|
|
||||||
CoreProxy.proxy.addCraftingRecipe(
|
|
||||||
new ItemStack(quarryBlock),
|
|
||||||
"ipi",
|
|
||||||
"gig",
|
|
||||||
"dDd",
|
|
||||||
'i', "gearIron",
|
|
||||||
'p', "dustRedstone",
|
|
||||||
'g', "gearGold",
|
|
||||||
'd', "gearDiamond",
|
|
||||||
'D', Items.diamond_pickaxe);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pumpBlock != null) {
|
if (pumpBlock != null) {
|
||||||
CoreProxy.proxy.addCraftingRecipe(
|
CoreProxy.proxy.addCraftingRecipe(
|
||||||
new ItemStack(pumpBlock),
|
new ItemStack(pumpBlock),
|
||||||
|
@ -327,8 +256,6 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
} else if (restartType == ConfigManager.RestartRequirement.WORLD) {
|
} else if (restartType == ConfigManager.RestartRequirement.WORLD) {
|
||||||
reloadConfig(ConfigManager.RestartRequirement.NONE);
|
reloadConfig(ConfigManager.RestartRequirement.NONE);
|
||||||
} else {
|
} else {
|
||||||
quarryOneTimeUse = BuildCraftCore.mainConfigManager.get("general.quarry.oneTimeUse").getBoolean();
|
|
||||||
quarryLoadsChunks = BuildCraftCore.mainConfigManager.get("general.quarry.doChunkLoading").getBoolean();
|
|
||||||
miningDepth = BuildCraftCore.mainConfigManager.get("general.miningDepth").getInt();
|
miningDepth = BuildCraftCore.mainConfigManager.get("general.miningDepth").getInt();
|
||||||
pumpDimensionList = new PumpDimensionList(BuildCraftCore.mainConfigManager.get("general.pumpDimensionControl").getString());
|
pumpDimensionList = new PumpDimensionList(BuildCraftCore.mainConfigManager.get("general.pumpDimensionControl").getString());
|
||||||
|
|
||||||
|
@ -356,15 +283,11 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
if (evt.map.getTextureType() == 0) {
|
if (evt.map.getTextureType() == 0) {
|
||||||
TextureMap terrainTextures = evt.map;
|
TextureMap terrainTextures = evt.map;
|
||||||
FactoryProxyClient.pumpTexture = terrainTextures.registerIcon("buildcraftfactory:pumpBlock/tube");
|
FactoryProxyClient.pumpTexture = terrainTextures.registerIcon("buildcraftfactory:pumpBlock/tube");
|
||||||
FactoryProxyClient.drillTexture = terrainTextures.registerIcon("buildcraftfactory:machineBlock/drill");
|
|
||||||
FactoryProxyClient.drillHeadTexture = terrainTextures.registerIcon("buildcraftfactory:machineBlock/drill_head");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void whiteListAppliedEnergetics(FMLInitializationEvent event) {
|
public void whiteListAppliedEnergetics(FMLInitializationEvent event) {
|
||||||
//FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
|
||||||
// TileQuarry.class.getCanonicalName());
|
|
||||||
//FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
//FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
||||||
// TileMiningWell.class.getCanonicalName());
|
// TileMiningWell.class.getCanonicalName());
|
||||||
FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
||||||
|
@ -380,4 +303,31 @@ public class BuildCraftFactory extends BuildCraftMod {
|
||||||
FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
FMLInterModComms.sendMessage("appliedenergistics2", "whitelist-spatial",
|
||||||
TileHopper.class.getCanonicalName());
|
TileHopper.class.getCanonicalName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Mod.EventHandler
|
||||||
|
public void remap(FMLMissingMappingsEvent event) {
|
||||||
|
for (FMLMissingMappingsEvent.MissingMapping mapping : event.get()) {
|
||||||
|
if (mapping.name.equals("BuildCraft|Factory:machineBlock")) {
|
||||||
|
if (Loader.isModLoaded("BuildCraft|Builders")) {
|
||||||
|
if (mapping.type == GameRegistry.Type.BLOCK) {
|
||||||
|
mapping.remap(Block.getBlockFromName("BuildCraft|Builders:machineBlock"));
|
||||||
|
} else if (mapping.type == GameRegistry.Type.ITEM) {
|
||||||
|
mapping.remap(Item.getItemFromBlock(Block.getBlockFromName("BuildCraft|Builders:machineBlock")));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mapping.warn();
|
||||||
|
}
|
||||||
|
} else if (mapping.name.equals("BuildCraft|Factory:frameBlock")) {
|
||||||
|
if (Loader.isModLoaded("BuildCraft|Builders")) {
|
||||||
|
if (mapping.type == GameRegistry.Type.BLOCK) {
|
||||||
|
mapping.remap(Block.getBlockFromName("BuildCraft|Builders:frameBlock"));
|
||||||
|
} else if (mapping.type == GameRegistry.Type.ITEM) {
|
||||||
|
mapping.remap(Item.getItemFromBlock(Block.getBlockFromName("BuildCraft|Builders:frameBlock")));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mapping.ignore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,17 +313,7 @@ public class BuildCraftTransport extends BuildCraftMod {
|
||||||
Block.blockRegistry.getNameForObject(Blocks.redstone_lamp),
|
Block.blockRegistry.getNameForObject(Blocks.redstone_lamp),
|
||||||
Block.blockRegistry.getNameForObject(Blocks.double_stone_slab),
|
Block.blockRegistry.getNameForObject(Blocks.double_stone_slab),
|
||||||
Block.blockRegistry.getNameForObject(Blocks.double_wooden_slab),
|
Block.blockRegistry.getNameForObject(Blocks.double_wooden_slab),
|
||||||
Block.blockRegistry.getNameForObject(Blocks.sponge),
|
Block.blockRegistry.getNameForObject(Blocks.sponge)
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.architectBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.builderBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.fillerBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftBuilders.libraryBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.autoWorkbenchBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.floodGateBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.miningWellBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.pumpBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftFactory.quarryBlock)),
|
|
||||||
JavaTools.surroundWithQuotes(Block.blockRegistry.getNameForObject(BuildCraftTransport.filteredBufferBlock)),
|
|
||||||
}, "What block types should be blacklisted from being a facade?", ConfigManager.RestartRequirement.GAME);
|
}, "What block types should be blacklisted from being a facade?", ConfigManager.RestartRequirement.GAME);
|
||||||
BuildCraftCore.mainConfigManager.register("general.pipes.facadeBlacklistAsWhitelist", false, "Should the blacklist be treated as a whitelist instead?", ConfigManager.RestartRequirement.GAME);
|
BuildCraftCore.mainConfigManager.register("general.pipes.facadeBlacklistAsWhitelist", false, "Should the blacklist be treated as a whitelist instead?", ConfigManager.RestartRequirement.GAME);
|
||||||
BuildCraftCore.mainConfigManager.register("general.pipes.facadeNoLaserRecipe", false, "Should non-laser (crafting table) facade recipes be forced?", ConfigManager.RestartRequirement.GAME);
|
BuildCraftCore.mainConfigManager.register("general.pipes.facadeNoLaserRecipe", false, "Should non-laser (crafting table) facade recipes be forced?", ConfigManager.RestartRequirement.GAME);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||||
*/
|
*/
|
||||||
package buildcraft.factory;
|
package buildcraft.builders;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -45,7 +45,7 @@ public class BlockFrame extends Block implements IFramePipeConnection {
|
||||||
removeNeighboringFrames(world, x, y, z);
|
removeNeighboringFrames(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void removeNeighboringFrames(World world, int x, int y, int z) {
|
public void removeNeighboringFrames(World world, int x, int y, int z) {
|
||||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
Block nBlock = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
Block nBlock = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
if (nBlock == this) {
|
if (nBlock == this) {
|
||||||
|
@ -206,6 +206,6 @@ public class BlockFrame extends Block implements IFramePipeConnection {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister register) {
|
public void registerBlockIcons(IIconRegister register) {
|
||||||
blockIcon = register.registerIcon("buildcraftfactory:frameBlock/default");
|
blockIcon = register.registerIcon("buildcraftbuilders:frameBlock/default");
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@
|
||||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||||
*/
|
*/
|
||||||
package buildcraft.factory;
|
package buildcraft.builders;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -19,8 +19,9 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import buildcraft.BuildCraftFactory;
|
import buildcraft.BuildCraftBuilders;
|
||||||
import buildcraft.api.tools.IToolWrench;
|
import buildcraft.api.tools.IToolWrench;
|
||||||
|
import buildcraft.core.BlockLEDHatchBase;
|
||||||
|
|
||||||
public class BlockQuarry extends BlockLEDHatchBase {
|
public class BlockQuarry extends BlockLEDHatchBase {
|
||||||
public BlockQuarry() {
|
public BlockQuarry() {
|
||||||
|
@ -55,7 +56,7 @@ public class BlockQuarry extends BlockLEDHatchBase {
|
||||||
|
|
||||||
Block block = world.getBlock(i, j, k);
|
Block block = world.getBlock(i, j, k);
|
||||||
|
|
||||||
if (block != BuildCraftFactory.frameBlock) {
|
if (block != BuildCraftBuilders.frameBlock) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +95,7 @@ public class BlockQuarry extends BlockLEDHatchBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
if (BuildCraftFactory.quarryOneTimeUse) {
|
if (BuildCraftBuilders.quarryOneTimeUse) {
|
||||||
return new ArrayList<ItemStack>();
|
return new ArrayList<ItemStack>();
|
||||||
}
|
}
|
||||||
return super.getDrops(world, x, y, z, metadata, fortune);
|
return super.getDrops(world, x, y, z, metadata, fortune);
|
||||||
|
@ -106,7 +107,7 @@ public class BlockQuarry extends BlockLEDHatchBase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildCraftFactory.frameBlock.removeNeighboringFrames(world, i, j, k);
|
BuildCraftBuilders.frameBlock.removeNeighboringFrames(world, i, j, k);
|
||||||
|
|
||||||
super.breakBlock(world, i, j, k, block, metadata);
|
super.breakBlock(world, i, j, k, block, metadata);
|
||||||
}
|
}
|
|
@ -8,7 +8,9 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.builders;
|
package buildcraft.builders;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
|
import buildcraft.core.lib.EntityBlock;
|
||||||
|
|
||||||
public class BuilderProxy {
|
public class BuilderProxy {
|
||||||
@SidedProxy(clientSide = "buildcraft.builders.BuilderProxyClient", serverSide = "buildcraft.builders.BuilderProxy")
|
@SidedProxy(clientSide = "buildcraft.builders.BuilderProxyClient", serverSide = "buildcraft.builders.BuilderProxy")
|
||||||
|
@ -21,4 +23,14 @@ public class BuilderProxy {
|
||||||
public void registerBlockRenderers () {
|
public void registerBlockRenderers () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EntityBlock newDrill(World w, double i, double j, double k,
|
||||||
|
double l, double d, double e) {
|
||||||
|
return new EntityBlock(w, i, j, k, l, d, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityBlock newDrillHead(World w, double i, double j, double k,
|
||||||
|
double l, double d, double e) {
|
||||||
|
return new EntityBlock(w, i, j, k, l, d, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,12 +8,19 @@
|
||||||
*/
|
*/
|
||||||
package buildcraft.builders;
|
package buildcraft.builders;
|
||||||
|
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||||
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
import buildcraft.builders.urbanism.TileUrbanist;
|
import buildcraft.builders.urbanism.TileUrbanist;
|
||||||
|
import buildcraft.core.lib.EntityBlock;
|
||||||
|
import buildcraft.core.lib.render.RenderVoid;
|
||||||
import buildcraft.core.render.RenderBoxProvider;
|
import buildcraft.core.render.RenderBoxProvider;
|
||||||
import buildcraft.core.render.RenderBuilder;
|
import buildcraft.core.render.RenderBuilder;
|
||||||
|
|
||||||
public class BuilderProxyClient extends BuilderProxy {
|
public class BuilderProxyClient extends BuilderProxy {
|
||||||
|
public static IIcon drillTexture;
|
||||||
|
public static IIcon drillHeadTexture;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerClientHook() {
|
public void registerClientHook() {
|
||||||
|
@ -24,11 +31,29 @@ public class BuilderProxyClient extends BuilderProxy {
|
||||||
public void registerBlockRenderers() {
|
public void registerBlockRenderers() {
|
||||||
super.registerBlockRenderers();
|
super.registerBlockRenderers();
|
||||||
|
|
||||||
|
ClientRegistry.bindTileEntitySpecialRenderer(TileQuarry.class, new RenderBuilder());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileUrbanist.class, new RenderBoxProvider());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileUrbanist.class, new RenderBoxProvider());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileArchitect.class, new RenderArchitect());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileArchitect.class, new RenderArchitect());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileFiller.class, new RenderBuilder());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileFiller.class, new RenderBuilder());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBuilder.class, new RenderBuilder());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileBuilder.class, new RenderBuilder());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TilePathMarker.class, new RenderPathMarker());
|
ClientRegistry.bindTileEntitySpecialRenderer(TilePathMarker.class, new RenderPathMarker());
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileConstructionMarker.class, new RenderConstructionMarker());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileConstructionMarker.class, new RenderConstructionMarker());
|
||||||
|
|
||||||
|
RenderingRegistry.registerEntityRenderingHandler(EntityMechanicalArm.class, new RenderVoid());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityBlock newDrill(World w, double i, double j, double k, double l, double d, double e) {
|
||||||
|
EntityBlock eb = super.newDrill(w, i, j, k, l, d, e);
|
||||||
|
eb.texture = drillTexture;
|
||||||
|
return eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityBlock newDrillHead(World w, double i, double j, double k, double l, double d, double e) {
|
||||||
|
EntityBlock eb = super.newDrillHead(w, i, j, k, l, d, e);
|
||||||
|
eb.texture = drillHeadTexture;
|
||||||
|
return eb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||||
*/
|
*/
|
||||||
package buildcraft.factory;
|
package buildcraft.builders;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
@ -66,11 +66,11 @@ public class EntityMechanicalArm extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void makeParts(World world) {
|
private void makeParts(World world) {
|
||||||
xArm = FactoryProxy.proxy.newDrill(world, 0, 0, 0, 1, 0.5, 0.5);
|
xArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 1, 0.5, 0.5);
|
||||||
yArm = FactoryProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 1, 0.5);
|
yArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 1, 0.5);
|
||||||
zArm = FactoryProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 0.5, 1);
|
zArm = BuilderProxy.proxy.newDrill(world, 0, 0, 0, 0.5, 0.5, 1);
|
||||||
|
|
||||||
head = FactoryProxy.proxy.newDrillHead(world, 0, 0, 0, 0.2, 1, 0.2);
|
head = BuilderProxy.proxy.newDrillHead(world, 0, 0, 0, 0.2, 1, 0.2);
|
||||||
head.shadowSize = 1.0F;
|
head.shadowSize = 1.0F;
|
||||||
|
|
||||||
world.spawnEntityInWorld(xArm);
|
world.spawnEntityInWorld(xArm);
|
|
@ -6,7 +6,7 @@
|
||||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||||
*/
|
*/
|
||||||
package buildcraft.factory;
|
package buildcraft.builders;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -29,8 +29,9 @@ import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||||
import net.minecraftforge.common.util.FakePlayer;
|
import net.minecraftforge.common.util.FakePlayer;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
import buildcraft.BuildCraftBuilders;
|
||||||
import buildcraft.BuildCraftCore;
|
import buildcraft.BuildCraftCore;
|
||||||
import buildcraft.BuildCraftFactory;
|
import buildcraft.BuildCraftBuilders;
|
||||||
import buildcraft.api.blueprints.BuilderAPI;
|
import buildcraft.api.blueprints.BuilderAPI;
|
||||||
import buildcraft.api.core.BuildCraftAPI;
|
import buildcraft.api.core.BuildCraftAPI;
|
||||||
import buildcraft.api.core.IAreaProvider;
|
import buildcraft.api.core.IAreaProvider;
|
||||||
|
@ -146,7 +147,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean areChunksLoaded() {
|
public boolean areChunksLoaded() {
|
||||||
if (BuildCraftFactory.quarryLoadsChunks) {
|
if (BuildCraftBuilders.quarryLoadsChunks) {
|
||||||
// Small optimization
|
// Small optimization
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -333,7 +334,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
Integer[][] columnHeights = new Integer[builder.blueprint.sizeX - 2][builder.blueprint.sizeZ - 2];
|
Integer[][] columnHeights = new Integer[builder.blueprint.sizeX - 2][builder.blueprint.sizeZ - 2];
|
||||||
boolean[][] blockedColumns = new boolean[builder.blueprint.sizeX - 2][builder.blueprint.sizeZ - 2];
|
boolean[][] blockedColumns = new boolean[builder.blueprint.sizeX - 2][builder.blueprint.sizeZ - 2];
|
||||||
|
|
||||||
for (int searchY = yCoord + 3; searchY >= Math.max(yCoord - BuildCraftFactory.miningDepth, 0); --searchY) {
|
for (int searchY = yCoord + 3; searchY >= yCoord; --searchY) {
|
||||||
int startX, endX, incX;
|
int startX, endX, incX;
|
||||||
|
|
||||||
if (searchY % 2 == 0) {
|
if (searchY % 2 == 0) {
|
||||||
|
@ -517,8 +518,8 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
private void setBoundaries(boolean useDefaultI) {
|
private void setBoundaries(boolean useDefaultI) {
|
||||||
boolean useDefault = useDefaultI;
|
boolean useDefault = useDefaultI;
|
||||||
|
|
||||||
if (BuildCraftFactory.quarryLoadsChunks && chunkTicket == null) {
|
if (BuildCraftBuilders.quarryLoadsChunks && chunkTicket == null) {
|
||||||
chunkTicket = ForgeChunkManager.requestTicket(BuildCraftFactory.instance, worldObj, Type.NORMAL);
|
chunkTicket = ForgeChunkManager.requestTicket(BuildCraftBuilders.instance, worldObj, Type.NORMAL);
|
||||||
}
|
}
|
||||||
if (chunkTicket != null) {
|
if (chunkTicket != null) {
|
||||||
chunkTicket.getModData().setInteger("quarryX", xCoord);
|
chunkTicket.getModData().setInteger("quarryX", xCoord);
|
||||||
|
@ -606,7 +607,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
|
|
||||||
private void initializeBlueprintBuilder() {
|
private void initializeBlueprintBuilder() {
|
||||||
Blueprint bpt = ((FillerPattern) FillerManager.registry.getPattern("buildcraft:frame"))
|
Blueprint bpt = ((FillerPattern) FillerManager.registry.getPattern("buildcraft:frame"))
|
||||||
.getBlueprint(box, worldObj, new IStatementParameter[0], BuildCraftFactory.frameBlock, 0);
|
.getBlueprint(box, worldObj, new IStatementParameter[0], BuildCraftBuilders.frameBlock, 0);
|
||||||
|
|
||||||
if (bpt != null) {
|
if (bpt != null) {
|
||||||
builder = new BptBuilderBlueprint(bpt, worldObj, box.xMin, yCoord, box.zMin);
|
builder = new BptBuilderBlueprint(bpt, worldObj, box.xMin, yCoord, box.zMin);
|
||||||
|
@ -697,7 +698,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getStackInSlot(int i) {
|
public ItemStack getStackInSlot(int i) {
|
||||||
if (frameProducer) {
|
if (frameProducer) {
|
||||||
return new ItemStack(BuildCraftFactory.frameBlock);
|
return new ItemStack(BuildCraftBuilders.frameBlock);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -706,7 +707,7 @@ public class TileQuarry extends TileAbstractBuilder implements IHasWork, ISidedI
|
||||||
@Override
|
@Override
|
||||||
public ItemStack decrStackSize(int i, int j) {
|
public ItemStack decrStackSize(int i, int j) {
|
||||||
if (frameProducer) {
|
if (frameProducer) {
|
||||||
return new ItemStack(BuildCraftFactory.frameBlock, j);
|
return new ItemStack(BuildCraftBuilders.frameBlock, j);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package buildcraft.factory;
|
package buildcraft.core;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
|
@ -0,0 +1,28 @@
|
||||||
|
/**
|
||||||
|
* 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.core.builders.schematics;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import buildcraft.api.blueprints.IBuilderContext;
|
||||||
|
import buildcraft.api.blueprints.SchematicBlock;
|
||||||
|
|
||||||
|
public class SchematicFree extends SchematicBlock {
|
||||||
|
@Override
|
||||||
|
public void getRequirementsForPlacement(IBuilderContext context, LinkedList<ItemStack> requirements) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void storeRequirements(IBuilderContext context, int x, int y, int z) {
|
||||||
|
// cancel requirements reading
|
||||||
|
}
|
||||||
|
}
|
|
@ -75,9 +75,13 @@ public class ConfigManager implements IModGuiFactory {
|
||||||
parent.setLanguageKey("config." + parent.getQualifiedName());
|
parent.setLanguageKey("config." + parent.getQualifiedName());
|
||||||
parent = parent.parent;
|
parent = parent.parent;
|
||||||
}
|
}
|
||||||
|
Property p;
|
||||||
Property p = create(suffix, property);
|
if (c.get(suffix) != null) {
|
||||||
c.put(suffix, p);
|
p = c.get(suffix);
|
||||||
|
} else {
|
||||||
|
p = create(suffix, property);
|
||||||
|
c.put(suffix, p);
|
||||||
|
}
|
||||||
p.comment = comment;
|
p.comment = comment;
|
||||||
RestartRequirement r = restartRequirement;
|
RestartRequirement r = restartRequirement;
|
||||||
p.setLanguageKey("config." + name);
|
p.setLanguageKey("config." + name);
|
||||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import buildcraft.BuildCraftFactory;
|
import buildcraft.BuildCraftFactory;
|
||||||
|
import buildcraft.core.BlockLEDHatchBase;
|
||||||
|
|
||||||
public class BlockMiningWell extends BlockLEDHatchBase {
|
public class BlockMiningWell extends BlockLEDHatchBase {
|
||||||
public BlockMiningWell() {
|
public BlockMiningWell() {
|
||||||
|
|
|
@ -28,14 +28,4 @@ public class FactoryProxy {
|
||||||
public EntityBlock newPumpTube(World w) {
|
public EntityBlock newPumpTube(World w) {
|
||||||
return new EntityBlock(w);
|
return new EntityBlock(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityBlock newDrill(World w, double i, double j, double k,
|
|
||||||
double l, double d, double e) {
|
|
||||||
return new EntityBlock(w, i, j, k, l, d, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
public EntityBlock newDrillHead(World w, double i, double j, double k,
|
|
||||||
double l, double d, double e) {
|
|
||||||
return new EntityBlock(w, i, j, k, l, d, e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import buildcraft.BuildCraftFactory;
|
||||||
import buildcraft.api.core.BCLog;
|
import buildcraft.api.core.BCLog;
|
||||||
import buildcraft.core.lib.EntityBlock;
|
import buildcraft.core.lib.EntityBlock;
|
||||||
import buildcraft.core.lib.render.RenderVoid;
|
import buildcraft.core.lib.render.RenderVoid;
|
||||||
import buildcraft.core.render.RenderBuilder;
|
|
||||||
import buildcraft.core.render.RenderingEntityBlocks;
|
import buildcraft.core.render.RenderingEntityBlocks;
|
||||||
import buildcraft.core.render.RenderingEntityBlocks.EntityRenderIndex;
|
import buildcraft.core.render.RenderingEntityBlocks.EntityRenderIndex;
|
||||||
import buildcraft.factory.gui.GuiAutoCrafting;
|
import buildcraft.factory.gui.GuiAutoCrafting;
|
||||||
|
@ -26,10 +25,7 @@ import buildcraft.factory.render.RenderRefinery;
|
||||||
import buildcraft.factory.render.RenderTank;
|
import buildcraft.factory.render.RenderTank;
|
||||||
|
|
||||||
public class FactoryProxyClient extends FactoryProxy {
|
public class FactoryProxyClient extends FactoryProxy {
|
||||||
|
|
||||||
public static IIcon pumpTexture;
|
public static IIcon pumpTexture;
|
||||||
public static IIcon drillTexture;
|
|
||||||
public static IIcon drillHeadTexture;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initializeTileEntities() {
|
public void initializeTileEntities() {
|
||||||
|
@ -48,13 +44,10 @@ public class FactoryProxyClient extends FactoryProxy {
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileHopper.class, new RenderHopper());
|
ClientRegistry.bindTileEntitySpecialRenderer(TileHopper.class, new RenderHopper());
|
||||||
RenderingEntityBlocks.blockByEntityRenders.put(new EntityRenderIndex(BuildCraftFactory.hopperBlock, 0), new RenderHopper());
|
RenderingEntityBlocks.blockByEntityRenders.put(new EntityRenderIndex(BuildCraftFactory.hopperBlock, 0), new RenderHopper());
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer(TileQuarry.class, new RenderBuilder());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initializeEntityRenders() {
|
public void initializeEntityRenders() {
|
||||||
RenderingRegistry.registerEntityRenderingHandler(EntityMechanicalArm.class, new RenderVoid());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -75,18 +68,4 @@ public class FactoryProxyClient extends FactoryProxy {
|
||||||
eb.texture = pumpTexture;
|
eb.texture = pumpTexture;
|
||||||
return eb;
|
return eb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public EntityBlock newDrill(World w, double i, double j, double k, double l, double d, double e) {
|
|
||||||
EntityBlock eb = super.newDrill(w, i, j, k, l, d, e);
|
|
||||||
eb.texture = drillTexture;
|
|
||||||
return eb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EntityBlock newDrillHead(World w, double i, double j, double k, double l, double d, double e) {
|
|
||||||
EntityBlock eb = super.newDrillHead(w, i, j, k, l, d, e);
|
|
||||||
eb.texture = drillHeadTexture;
|
|
||||||
return eb;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|