-
Notifications
You must be signed in to change notification settings - Fork 497
/
SchematicBlockBase.java
executable file
·58 lines (51 loc) · 2.02 KB
/
SchematicBlockBase.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* 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.api.blueprints;
/**
* This class allow to specify specific behavior for blocks stored in
* blueprints:
*
* - what items needs to be used to create that block - how the block has to be
* built on the world - how to rotate the block - what extra data to store /
* load in the blueprint
*
* Default implementations of this can be seen in the package
* buildcraft.api.schematics. The class SchematicUtils provide some additional
* utilities.
*
* Blueprints perform "id translation" in case the block ids between a blueprint
* and the world installation are different. Mapping is done through the
* builder context.
*
* At blueprint load time, BuildCraft will check that each block id of the
* blueprint corresponds to the block id in the installation. If not, it will
* perform a search through the block list, and upon matching signature, it will
* translate all blocks ids of the blueprint to the installation ones. If no
* such block id is found, BuildCraft will assume that the block is not
* installed and will not load the blueprint.
*/
public class SchematicBlockBase extends Schematic {
/**
* Return true if the block on the world correspond to the block stored in
* the blueprint at the location given by the slot. By default, this
* subprogram is permissive and doesn't take into account metadata.
*/
public boolean isValid(IBuilderContext context, int x, int y, int z) {
return true;
}
public void writeCompleted(IBuilderContext context, int x, int y, int z, double completed) {
}
/**
* Return true if the block should not be placed to the world. Requirements
* will not be asked on such a block, and building will not be called.
*/
public boolean ignoreBuilding() {
return false;
}
}