fixed requirements for inventories, fix #1557
This commit is contained in:
parent
967650a073
commit
36baf7b108
5 changed files with 6 additions and 83 deletions
|
@ -66,7 +66,6 @@ import buildcraft.builders.schematics.SchematicFluid;
|
|||
import buildcraft.builders.schematics.SchematicHanging;
|
||||
import buildcraft.builders.schematics.SchematicIgnore;
|
||||
import buildcraft.builders.schematics.SchematicIgnoreMeta;
|
||||
import buildcraft.builders.schematics.SchematicInventory;
|
||||
import buildcraft.builders.schematics.SchematicLever;
|
||||
import buildcraft.builders.schematics.SchematicMinecart;
|
||||
import buildcraft.builders.schematics.SchematicPiston;
|
||||
|
@ -74,7 +73,6 @@ import buildcraft.builders.schematics.SchematicPortal;
|
|||
import buildcraft.builders.schematics.SchematicPumpkin;
|
||||
import buildcraft.builders.schematics.SchematicRail;
|
||||
import buildcraft.builders.schematics.SchematicRedstoneDiode;
|
||||
import buildcraft.builders.schematics.SchematicRotateInventory;
|
||||
import buildcraft.builders.schematics.SchematicRotateMeta;
|
||||
import buildcraft.builders.schematics.SchematicSeeds;
|
||||
import buildcraft.builders.schematics.SchematicSign;
|
||||
|
@ -179,12 +177,10 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
SchematicRegistry.registerSchematicBlock(Blocks.quartz_block, SchematicRotateMeta.class, new int[]{4, 3, 4, 3}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.hopper, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.furnace, SchematicRotateInventory.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.lit_furnace, SchematicRotateInventory.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.chest, SchematicRotateInventory.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.dispenser, SchematicRotateInventory.class, new int[]{2, 5, 3, 4}, true);
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.brewing_stand, SchematicInventory.class);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.furnace, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.lit_furnace, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.chest, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.dispenser, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.vine, SchematicRotateMeta.class, new int[]{1, 4, 8, 2}, false);
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.trapdoor, SchematicRotateMeta.class, new int[]{0, 1, 2, 3}, false);
|
||||
|
@ -263,10 +259,8 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
|
||||
// BuildCraft blocks
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(architectBlock, SchematicRotateInventory.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(builderBlock, SchematicRotateInventory.class, new int[]{2, 5, 3, 4}, true);
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(libraryBlock, SchematicInventory.class);
|
||||
SchematicRegistry.registerSchematicBlock(architectBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(builderBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(markerBlock, SchematicWallSide.class);
|
||||
SchematicRegistry.registerSchematicBlock(pathMarkerBlock, SchematicWallSide.class);
|
||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.item.ItemStack;
|
|||
import buildcraft.api.blueprints.SchematicRegistry;
|
||||
import buildcraft.api.recipes.BuildcraftRecipes;
|
||||
import buildcraft.api.transport.PipeWire;
|
||||
import buildcraft.builders.schematics.SchematicInventory;
|
||||
import buildcraft.builders.schematics.SchematicRotateMeta;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.InterModComms;
|
||||
|
@ -95,7 +94,6 @@ public class BuildCraftSilicon extends BuildCraftMod {
|
|||
CoreProxy.proxy.registerTileEntity(TileIntegrationTable.class, "net.minecraft.src.buildcraft.factory.TileIntegrationTable");
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(laserBlock, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
SchematicRegistry.registerSchematicBlock(assemblyTableBlock, SchematicInventory.class);
|
||||
|
||||
if (BuildCraftCore.loadDefaultRecipes) {
|
||||
loadRecipes();
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, 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.builders.schematics;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import buildcraft.api.blueprints.IBuilderContext;
|
||||
import buildcraft.api.blueprints.SchematicTile;
|
||||
|
||||
public class SchematicInventory extends SchematicTile {
|
||||
|
||||
@Override
|
||||
public void writeToWorld(IBuilderContext context, int x, int y, int z) {
|
||||
super.writeToWorld(context, x, y, z);
|
||||
|
||||
IInventory inv = (IInventory) context.world().getTileEntity(x, y, z);
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); ++i) {
|
||||
inv.setInventorySlotContents(i, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, 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.builders.schematics;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import buildcraft.api.blueprints.IBuilderContext;
|
||||
|
||||
public class SchematicRotateInventory extends SchematicRotateMeta {
|
||||
|
||||
public SchematicRotateInventory(int[] rotations, boolean rotateForward) {
|
||||
super(rotations, rotateForward);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToWorld(IBuilderContext context, int x, int y, int z) {
|
||||
super.writeToWorld(context, x, y, z);
|
||||
|
||||
IInventory inv = (IInventory) context.world().getTileEntity(x, y, z);
|
||||
|
||||
for (int i = 0; i < inv.getSizeInventory(); ++i) {
|
||||
inv.setInventorySlotContents(i, null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -8,9 +8,6 @@
|
|||
*/
|
||||
package buildcraft.builders.schematics;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.IBuilderContext;
|
||||
import buildcraft.api.blueprints.SchematicTile;
|
||||
|
||||
|
@ -37,11 +34,6 @@ public class SchematicRotateMeta extends SchematicTile {
|
|||
this.rotateForward = rotateForward;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRequirements(IBuilderContext context, LinkedList<ItemStack> requirements) {
|
||||
requirements.add(new ItemStack(block, 1, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(IBuilderContext context, int x, int y, int z) {
|
||||
return block == context.world().getBlock(x, y, z);
|
||||
|
|
Loading…
Add table
Reference in a new issue