added rotation support for anvil and ender chests, part of #1580
This commit is contained in:
parent
ebb4165670
commit
ce6e03a43a
2 changed files with 40 additions and 0 deletions
|
@ -71,6 +71,7 @@ import buildcraft.builders.schematics.SchematicCactus;
|
|||
import buildcraft.builders.schematics.SchematicCustomStack;
|
||||
import buildcraft.builders.schematics.SchematicDirt;
|
||||
import buildcraft.builders.schematics.SchematicDoor;
|
||||
import buildcraft.builders.schematics.SchematicEnderChest;
|
||||
import buildcraft.builders.schematics.SchematicFarmland;
|
||||
import buildcraft.builders.schematics.SchematicFire;
|
||||
import buildcraft.builders.schematics.SchematicFluid;
|
||||
|
@ -194,11 +195,15 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
SchematicRegistry.registerSchematicBlock(Blocks.hay_block, SchematicRotateMeta.class, new int[]{8, 4, 8, 4}, true);
|
||||
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.anvil, SchematicRotateMeta.class, new int[]{0, 1, 2, 3}, true);
|
||||
|
||||
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.dropper, SchematicRotateMeta.class, new int[]{2, 5, 3, 4}, true);
|
||||
|
||||
SchematicRegistry.registerSchematicBlock(Blocks.ender_chest, SchematicEnderChest.class);
|
||||
|
||||
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);
|
||||
|
|
35
common/buildcraft/builders/schematics/SchematicEnderChest.java
Executable file
35
common/buildcraft/builders/schematics/SchematicEnderChest.java
Executable file
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* 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 java.util.LinkedList;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.api.blueprints.IBuilderContext;
|
||||
|
||||
public class SchematicEnderChest extends SchematicRotateMeta {
|
||||
|
||||
public SchematicEnderChest() {
|
||||
super (new int[]{2, 5, 3, 4}, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRequirements(IBuilderContext context, LinkedList<ItemStack> requirements) {
|
||||
requirements.add(new ItemStack(Blocks.obsidian, 8));
|
||||
requirements.add(new ItemStack(Items.ender_eye, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlreadyBuilt(IBuilderContext context, int x, int y, int z) {
|
||||
return block == context.world().getBlock(x, y, z);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue