OSDN Git Service

修正・変更
[chemicraft/ChemiCraftNext.git] / common / pcc / addon / crops / util / MultiBlockData.java
1 package pcc.addon.crops.util;
2
3 import java.util.ArrayList;
4
5 public class MultiBlockData {
6
7         private String worldName;
8         private int dimID;
9         private int x;
10         private int y;
11         private int z;
12         private ArrayList<String> others = new ArrayList<String>();
13
14         public MultiBlockData(String worldName, int dimID, int x, int y, int z) {
15                 super();
16                 this.worldName = worldName;
17                 this.dimID = dimID;
18                 this.x = x;
19                 this.y = y;
20                 this.z = z;
21         }
22
23         public void setWorldName(String worldName) {
24                 this.worldName = worldName;
25         }
26
27         public void setDimID(int dimID) {
28                 this.dimID = dimID;
29         }
30
31         public void setX(int x) {
32                 this.x = x;
33         }
34
35         public void setY(int y) {
36                 this.y = y;
37         }
38
39         public void setZ(int z) {
40                 this.z = z;
41         }
42
43         public String getWorldName() {
44                 return worldName;
45         }
46
47         public int getDimID() {
48                 return this.dimID;
49         }
50
51         public int getX() {
52                 return x;
53         }
54
55         public int getY() {
56                 return y;
57         }
58
59         public int getZ() {
60                 return z;
61         }
62
63         public ArrayList<String> getOthers() {
64                 return others;
65         }
66
67         public void add(String data) {
68                 this.others.add(data);
69         }
70
71         public void addAll(ArrayList<String> datas) {
72                 this.others = datas;
73         }
74
75         @Override
76         public boolean equals(Object obj) {
77                 MultiBlockData p = (MultiBlockData) obj;
78                 if (p.getWorldName().equals(this.worldName)
79                                 && p.getDimID() == this.dimID
80                                 && p.getX() == this.x
81                                 && p.getY() == this.y
82                                 && p.getZ() == this.z) {
83                         return true;
84                 }
85                 return false;
86         }
87
88 }