fixed entities not using requirements
This commit is contained in:
parent
1548d0fd68
commit
ca3b67880d
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
package buildcraft.api.blueprints;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
|
@ -34,6 +35,13 @@ public class SchematicEntity extends Schematic {
|
|||
*/
|
||||
public ItemStack[] storedRequirements = new ItemStack[0];
|
||||
|
||||
@Override
|
||||
public void addRequirements(IBuilderContext context, LinkedList<ItemStack> requirements) {
|
||||
for (ItemStack s : storedRequirements) {
|
||||
requirements.add(s);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToWorld(IBuilderContext context) {
|
||||
Entity e = EntityList.createEntityFromNBT(cpt, context.world());
|
||||
context.world().spawnEntityInWorld(e);
|
||||
|
|
Loading…
Reference in a new issue