almost all blocks and TEs are now CompatHookable
This commit is contained in:
parent
59473de6c0
commit
5f4c49b83c
6 changed files with 35 additions and 29 deletions
|
@ -120,6 +120,8 @@ import buildcraft.builders.statements.BuildersActionProvider;
|
|||
import buildcraft.builders.urbanism.BlockUrbanist;
|
||||
import buildcraft.builders.urbanism.TileUrbanist;
|
||||
import buildcraft.builders.urbanism.UrbanistToolsIconProvider;
|
||||
import buildcraft.compat.CompatHooks;
|
||||
import buildcraft.core.BlockBuildCraft;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
import buildcraft.core.Version;
|
||||
|
@ -137,6 +139,7 @@ import buildcraft.core.builders.patterns.PatternHorizon;
|
|||
import buildcraft.core.builders.patterns.PatternPyramid;
|
||||
import buildcraft.core.builders.patterns.PatternStairs;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.silicon.BlockLaser;
|
||||
|
||||
@Mod(name = "BuildCraft Builders", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Builders", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
public class BuildCraftBuilders extends BuildCraftMod {
|
||||
|
@ -461,26 +464,26 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
buildToolBlock.setBlockName("buildToolBlock");
|
||||
CoreProxy.proxy.registerBlock(buildToolBlock);
|
||||
|
||||
markerBlock = new BlockMarker();
|
||||
markerBlock = (BlockMarker) CompatHooks.INSTANCE.getBlock(BlockMarker.class);
|
||||
CoreProxy.proxy.registerBlock(markerBlock.setBlockName("markerBlock"));
|
||||
|
||||
pathMarkerBlock = new BlockPathMarker();
|
||||
pathMarkerBlock = (BlockPathMarker) CompatHooks.INSTANCE.getBlock(BlockPathMarker.class);
|
||||
CoreProxy.proxy.registerBlock(pathMarkerBlock.setBlockName("pathMarkerBlock"));
|
||||
|
||||
constructionMarkerBlock = new BlockConstructionMarker();
|
||||
constructionMarkerBlock = (BlockConstructionMarker) CompatHooks.INSTANCE.getBlock(BlockConstructionMarker.class);
|
||||
CoreProxy.proxy.registerBlock(constructionMarkerBlock.setBlockName("constructionMarkerBlock"),
|
||||
ItemConstructionMarker.class);
|
||||
|
||||
fillerBlock = new BlockFiller();
|
||||
fillerBlock = (BlockFiller) CompatHooks.INSTANCE.getBlock(BlockFiller.class);
|
||||
CoreProxy.proxy.registerBlock(fillerBlock.setBlockName("fillerBlock"));
|
||||
|
||||
builderBlock = new BlockBuilder();
|
||||
builderBlock = (BlockBuilder) CompatHooks.INSTANCE.getBlock(BlockBuilder.class);
|
||||
CoreProxy.proxy.registerBlock(builderBlock.setBlockName("builderBlock"));
|
||||
|
||||
architectBlock = new BlockArchitect();
|
||||
architectBlock = (BlockArchitect) CompatHooks.INSTANCE.getBlock(BlockArchitect.class);
|
||||
CoreProxy.proxy.registerBlock(architectBlock.setBlockName("architectBlock"));
|
||||
|
||||
libraryBlock = new BlockBlueprintLibrary();
|
||||
libraryBlock = (BlockBlueprintLibrary) CompatHooks.INSTANCE.getBlock(BlockBlueprintLibrary.class);
|
||||
CoreProxy.proxy.registerBlock(libraryBlock.setBlockName("libraryBlock"));
|
||||
|
||||
if (!BuildCraftCore.NONRELEASED_BLOCKS) {
|
||||
|
@ -489,13 +492,13 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
CoreProxy.proxy.registerTileEntity(TileUrbanist.class, "net.minecraft.src.builders.TileUrbanist");
|
||||
}
|
||||
|
||||
GameRegistry.registerTileEntity(TileMarker.class, "Marker");
|
||||
GameRegistry.registerTileEntity(TileFiller.class, "Filler");
|
||||
GameRegistry.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
||||
GameRegistry.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
|
||||
GameRegistry.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
|
||||
GameRegistry.registerTileEntity(TileConstructionMarker.class, "net.minecraft.src.builders.TileConstructionMarker");
|
||||
GameRegistry.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
|
||||
CoreProxy.proxy.registerTileEntity(TileMarker.class, "Marker");
|
||||
CoreProxy.proxy.registerTileEntity(TileFiller.class, "Filler");
|
||||
CoreProxy.proxy.registerTileEntity(TileBuilder.class, "net.minecraft.src.builders.TileBuilder");
|
||||
CoreProxy.proxy.registerTileEntity(TileArchitect.class, "net.minecraft.src.builders.TileTemplate");
|
||||
CoreProxy.proxy.registerTileEntity(TilePathMarker.class, "net.minecraft.src.builders.TilePathMarker");
|
||||
CoreProxy.proxy.registerTileEntity(TileConstructionMarker.class, "net.minecraft.src.builders.TileConstructionMarker");
|
||||
CoreProxy.proxy.registerTileEntity(TileBlueprintLibrary.class, "net.minecraft.src.builders.TileBlueprintLibrary");
|
||||
|
||||
SchematicRegistry.INSTANCE.readConfiguration(BuildCraftCore.mainConfiguration);
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ import buildcraft.api.fuels.BuildcraftFuelRegistry;
|
|||
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
|
||||
import buildcraft.api.statements.ITriggerExternal;
|
||||
import buildcraft.api.statements.StatementManager;
|
||||
import buildcraft.compat.CompatHooks;
|
||||
import buildcraft.core.BlockSpring;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
|
@ -177,7 +178,7 @@ public class BuildCraftEnergy extends BuildCraftMod {
|
|||
biomeOilOcean = BiomeGenOilOcean.makeBiome(oilOceanBiomeId);
|
||||
}
|
||||
|
||||
engineBlock = new BlockEngine();
|
||||
engineBlock = (BlockEngine) CompatHooks.INSTANCE.getBlock(BlockEngine.class);
|
||||
CoreProxy.proxy.registerBlock(engineBlock, ItemEngine.class);
|
||||
|
||||
// Oil and fuel
|
||||
|
|
|
@ -148,8 +148,8 @@ public class BuildCraftFactory extends BuildCraftMod {
|
|||
|
||||
// EntityRegistry.registerModEntity(EntityMechanicalArm.class, "bcMechanicalArm", EntityIds.MECHANICAL_ARM, instance, 50, 1, true);
|
||||
|
||||
CoreProxy.proxy.registerTileEntity(CompatHooks.INSTANCE.getTile(TileQuarry.class), "Machine");
|
||||
CoreProxy.proxy.registerTileEntity(CompatHooks.INSTANCE.getTile(TileMiningWell.class), "MiningWell");
|
||||
CoreProxy.proxy.registerTileEntity(TileQuarry.class, "Machine");
|
||||
CoreProxy.proxy.registerTileEntity(TileMiningWell.class, "MiningWell");
|
||||
CoreProxy.proxy.registerTileEntity(TileAutoWorkbench.class, "AutoWorkbench");
|
||||
CoreProxy.proxy.registerTileEntity(TilePump.class, "net.minecraft.src.buildcraft.factory.TilePump");
|
||||
CoreProxy.proxy.registerTileEntity(TileFloodGate.class, "net.minecraft.src.buildcraft.factory.TileFloodGate");
|
||||
|
@ -200,7 +200,7 @@ public class BuildCraftFactory extends BuildCraftMod {
|
|||
plainPipeBlock = new BlockPlainPipe();
|
||||
CoreProxy.proxy.registerBlock(plainPipeBlock.setBlockName("plainPipeBlock"));
|
||||
|
||||
autoWorkbenchBlock = new BlockAutoWorkbench();
|
||||
autoWorkbenchBlock = (BlockAutoWorkbench) CompatHooks.INSTANCE.getBlock(BlockAutoWorkbench.class);
|
||||
CoreProxy.proxy.registerBlock(autoWorkbenchBlock.setBlockName("autoWorkbenchBlock"));
|
||||
|
||||
frameBlock = new BlockFrame();
|
||||
|
@ -209,19 +209,19 @@ public class BuildCraftFactory extends BuildCraftMod {
|
|||
quarryBlock = (BlockQuarry) CompatHooks.INSTANCE.getBlock(BlockQuarry.class);
|
||||
CoreProxy.proxy.registerBlock(quarryBlock.setBlockName("machineBlock"));
|
||||
|
||||
tankBlock = new BlockTank();
|
||||
tankBlock = (BlockTank) CompatHooks.INSTANCE.getBlock(BlockTank.class);
|
||||
CoreProxy.proxy.registerBlock(tankBlock.setBlockName("tankBlock"));
|
||||
|
||||
pumpBlock = new BlockPump();
|
||||
pumpBlock = (BlockPump) CompatHooks.INSTANCE.getBlock(BlockPump.class);
|
||||
CoreProxy.proxy.registerBlock(pumpBlock.setBlockName("pumpBlock"));
|
||||
|
||||
floodGateBlock = new BlockFloodGate();
|
||||
floodGateBlock = (BlockFloodGate) CompatHooks.INSTANCE.getBlock(BlockFloodGate.class);
|
||||
CoreProxy.proxy.registerBlock(floodGateBlock.setBlockName("floodGateBlock"));
|
||||
|
||||
refineryBlock = new BlockRefinery();
|
||||
refineryBlock = (BlockRefinery) CompatHooks.INSTANCE.getBlock(BlockRefinery.class);
|
||||
CoreProxy.proxy.registerBlock(refineryBlock.setBlockName("refineryBlock"));
|
||||
|
||||
hopperBlock = new BlockHopper();
|
||||
hopperBlock = (BlockHopper) CompatHooks.INSTANCE.getBlock(BlockHopper.class);
|
||||
CoreProxy.proxy.registerBlock(hopperBlock.setBlockName("blockHopper"));
|
||||
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ import buildcraft.commander.BlockRequester;
|
|||
import buildcraft.commander.BlockZonePlan;
|
||||
import buildcraft.commander.TileRequester;
|
||||
import buildcraft.commander.TileZonePlan;
|
||||
import buildcraft.compat.CompatHooks;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
import buildcraft.core.ItemBuildCraft;
|
||||
|
@ -139,19 +140,19 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
laserBlock = new BlockLaser();
|
||||
laserBlock = (BlockLaser) CompatHooks.INSTANCE.getBlock(BlockLaser.class);
|
||||
laserBlock.setBlockName("laserBlock");
|
||||
CoreProxy.proxy.registerBlock(laserBlock);
|
||||
|
||||
assemblyTableBlock = new BlockLaserTable();
|
||||
assemblyTableBlock = (BlockLaserTable) CompatHooks.INSTANCE.getBlock(BlockLaserTable.class);
|
||||
assemblyTableBlock.setBlockName("laserTableBlock");
|
||||
CoreProxy.proxy.registerBlock(assemblyTableBlock, ItemLaserTable.class);
|
||||
|
||||
zonePlanBlock = new BlockZonePlan();
|
||||
zonePlanBlock = (BlockZonePlan) CompatHooks.INSTANCE.getBlock(BlockZonePlan.class);
|
||||
zonePlanBlock.setBlockName("zonePlan");
|
||||
CoreProxy.proxy.registerBlock(zonePlanBlock);
|
||||
|
||||
requesterBlock = new BlockRequester();
|
||||
requesterBlock = (BlockRequester) CompatHooks.INSTANCE.getBlock(BlockRequester.class);
|
||||
requesterBlock.setBlockName("requester");
|
||||
CoreProxy.proxy.registerBlock(requesterBlock);
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.api.core.ICoreProxy;
|
||||
import buildcraft.compat.CompatHooks;
|
||||
import buildcraft.core.EntityBlock;
|
||||
import buildcraft.core.ItemBlockBuildCraft;
|
||||
import buildcraft.core.LaserKind;
|
||||
|
@ -101,7 +102,7 @@ public class CoreProxy implements ICoreProxy {
|
|||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public void registerTileEntity(Class clas, String ident) {
|
||||
GameRegistry.registerTileEntity(clas, ident);
|
||||
GameRegistry.registerTileEntity(CompatHooks.INSTANCE.getTile(clas), ident);
|
||||
}
|
||||
|
||||
public void onCraftingPickup(World world, EntityPlayer player, ItemStack stack) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public class TransportProxy {
|
|||
public void registerTileEntities() {
|
||||
// The first name here is the current TE name; the remaining names are old names used for backwards compatibility
|
||||
GameRegistry.registerTileEntityWithAlternatives(CompatHooks.INSTANCE.getTile(TileGenericPipe.class), "net.minecraft.src.buildcraft.transport.GenericPipe", "net.minecraft.src.buildcraft.GenericPipe", "net.minecraft.src.buildcraft.transport.TileGenericPipe");
|
||||
GameRegistry.registerTileEntity(TileFilteredBuffer.class, "net.minecraft.src.buildcraft.transport.TileFilteredBuffer");
|
||||
GameRegistry.registerTileEntity(CompatHooks.INSTANCE.getTile(TileFilteredBuffer.class), "net.minecraft.src.buildcraft.transport.TileFilteredBuffer");
|
||||
}
|
||||
|
||||
public void registerRenderers() {
|
||||
|
|
Loading…
Reference in a new issue