-
Notifications
You must be signed in to change notification settings - Fork 497
/
BptSlotInfo.java
61 lines (50 loc) · 1.57 KB
/
BptSlotInfo.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
59
60
61
/**
* 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;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import buildcraft.core.network.NetworkData;
/**
* This class records a slot, either from a blueprint or from a block placed in
* the world.
*/
public class BptSlotInfo {
@NetworkData
public Block block = null;
@NetworkData
public int x, y, z, meta = 0;
/**
* This field contains requirements for a given block when stored in the
* blueprint. Modders can either rely on this list or compute their own int
* BptBlock.
*/
@NetworkData
public ArrayList<ItemStack> storedRequirements = new ArrayList<ItemStack>();
/**
* This tree contains additional data to be stored in the blueprint. By
* default, it will be initialized from BptBlock.initializeFromWorld with
* the standard readNBT function of the corresponding tile (if any) and will
* be loaded from BptBlock.buildBlock using the standard writeNBT function.
*/
@NetworkData
public NBTTagCompound cpt = new NBTTagCompound();
@Override
public BptSlotInfo clone() {
BptSlotInfo obj = new BptSlotInfo();
obj.x = x;
obj.y = y;
obj.z = z;
obj.block = block;
obj.meta = meta;
obj.cpt = (NBTTagCompound) cpt.copy();
return obj;
}
}