Fix comparator requirements for builder

This commit is contained in:
Prototik 2014-05-08 20:22:30 +08:00
parent 771f42977c
commit 31ac41aae6
2 changed files with 11 additions and 6 deletions

View file

@ -312,10 +312,10 @@ public class BuildCraftBuilders extends BuildCraftMod {
SchematicRegistry.registerSchematicBlock(Blocks.melon_stem, SchematicCustomStack.class, new ItemStack(Items.melon_seeds)); SchematicRegistry.registerSchematicBlock(Blocks.melon_stem, SchematicCustomStack.class, new ItemStack(Items.melon_seeds));
SchematicRegistry.registerSchematicBlock(Blocks.glowstone, SchematicCustomStack.class, new ItemStack(Blocks.glowstone)); SchematicRegistry.registerSchematicBlock(Blocks.glowstone, SchematicCustomStack.class, new ItemStack(Blocks.glowstone));
SchematicRegistry.registerSchematicBlock(Blocks.powered_repeater, SchematicRedstoneDiode.class); SchematicRegistry.registerSchematicBlock(Blocks.powered_repeater, SchematicRedstoneDiode.class, Items.repeater);
SchematicRegistry.registerSchematicBlock(Blocks.unpowered_repeater, SchematicRedstoneDiode.class); SchematicRegistry.registerSchematicBlock(Blocks.unpowered_repeater, SchematicRedstoneDiode.class, Items.repeater);
SchematicRegistry.registerSchematicBlock(Blocks.powered_comparator, SchematicRedstoneDiode.class); SchematicRegistry.registerSchematicBlock(Blocks.powered_comparator, SchematicRedstoneDiode.class, Items.comparator);
SchematicRegistry.registerSchematicBlock(Blocks.unpowered_comparator, SchematicRedstoneDiode.class); SchematicRegistry.registerSchematicBlock(Blocks.unpowered_comparator, SchematicRedstoneDiode.class, Items.comparator);
SchematicRegistry.registerSchematicBlock(Blocks.water, SchematicFluid.class, new ItemStack(Items.water_bucket)); SchematicRegistry.registerSchematicBlock(Blocks.water, SchematicFluid.class, new ItemStack(Items.water_bucket));
SchematicRegistry.registerSchematicBlock(Blocks.flowing_water, SchematicFluid.class, new ItemStack(Items.water_bucket)); SchematicRegistry.registerSchematicBlock(Blocks.flowing_water, SchematicFluid.class, new ItemStack(Items.water_bucket));

View file

@ -10,17 +10,22 @@ package buildcraft.builders.schematics;
import java.util.LinkedList; import java.util.LinkedList;
import net.minecraft.init.Items; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import buildcraft.api.blueprints.IBuilderContext; import buildcraft.api.blueprints.IBuilderContext;
import buildcraft.api.blueprints.SchematicBlock; import buildcraft.api.blueprints.SchematicBlock;
public class SchematicRedstoneDiode extends SchematicBlock { public class SchematicRedstoneDiode extends SchematicBlock {
private Item baseItem;
public SchematicRedstoneDiode(Item baseItem) {
this.baseItem = baseItem;
}
@Override @Override
public void writeRequirementsToBuilder(IBuilderContext context, LinkedList<ItemStack> requirements) { public void writeRequirementsToBuilder(IBuilderContext context, LinkedList<ItemStack> requirements) {
requirements.add(new ItemStack(Items.repeater)); requirements.add(new ItemStack(baseItem));
} }
@Override @Override