Skip to content

Commit 6bb985a

Browse files
committed
Build against 1.21.3
1 parent 52538f3 commit 6bb985a

3 files changed

Lines changed: 31 additions & 30 deletions

File tree

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,21 @@ allprojects {
101101
}
102102

103103
dependencies {
104-
compileOnly 'org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT'
105-
compileOnly 'com.sk89q.worldedit:worldedit-core:7.3.4-SNAPSHOT'
106-
compileOnly 'com.sk89q.worldedit:worldedit-bukkit:7.3.4-SNAPSHOT'
107-
compileOnly 'com.sk89q.worldguard:worldguard-core:7.0.9'
108-
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.9'
104+
compileOnly 'org.spigotmc:spigot-api:1.21.3-R0.1-SNAPSHOT'
105+
compileOnly 'com.sk89q.worldedit:worldedit-core:7.3.8-SNAPSHOT'
106+
compileOnly 'com.sk89q.worldedit:worldedit-bukkit:7.3.8-SNAPSHOT'
107+
compileOnly 'com.sk89q.worldguard:worldguard-core:7.0.11'
108+
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.11'
109109
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
110-
compileOnly 'com.comphenix.protocol:ProtocolLib:5.0.0-SNAPSHOT'
110+
compileOnly 'com.comphenix.protocol:ProtocolLib:5.3.0'
111111
compileOnly 'fr.neatmonster:nocheatplus:3.15.1-RC'
112112

113113
implementation 'com.sk89q:squirrelid:0.1.0'
114114
implementation "io.papermc:paperlib:1.0.7"
115115
implementation 'org.bstats:bstats-bukkit:2.2.1'
116116

117-
testImplementation 'org.spigotmc:spigot-api:1.20.6-R0.1-SNAPSHOT'
118-
testImplementation 'com.sk89q.worldedit:worldedit-core:7.2.14'
117+
testImplementation 'org.spigotmc:spigot-api:1.21.3-R0.1-SNAPSHOT'
118+
testImplementation 'com.sk89q.worldedit:worldedit-core:7.3.8-SNAPSHOT'
119119
testImplementation group: 'junit', name: 'junit', version: '4.12'
120120
testImplementation group: 'org.powermock', name: 'powermock-api-mockito', version: '1.7.4'
121121
testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '1.7.4'

src/main/java/com/sk89q/craftbook/util/SearchArea.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ public Set<Chunk> getChunksInArea() {
204204

205205
if(hasRegion()) {
206206

207-
Chunk c1 = getWorld().getChunkAt(region.getMinimumPoint().getBlockX() >> 4, region.getMinimumPoint().getBlockZ() >> 4);
207+
Chunk c1 = getWorld().getChunkAt(region.getMinimumPoint().x() >> 4, region.getMinimumPoint().z() >> 4);
208208

209-
Chunk c2 = getWorld().getChunkAt(region.getMaximumPoint().getBlockX() >> 4, region.getMaximumPoint().getBlockZ() >> 4);
209+
Chunk c2 = getWorld().getChunkAt(region.getMaximumPoint().x() >> 4, region.getMaximumPoint().z() >> 4);
210210
int xMin = Math.min(c1.getX(), c2.getX());
211211
int xMax = Math.max(c1.getX(), c2.getX());
212212
int zMin = Math.min(c1.getZ(), c2.getZ());
@@ -217,11 +217,11 @@ public Set<Chunk> getChunksInArea() {
217217
chunks.add(getWorld().getChunkAt(x,z));
218218
} else if (hasRadiusAndCenter()) {
219219

220-
int chunkRadiusX = blockRadius.getBlockX() < 16 ? 1 : blockRadius.getBlockX() / 16;
221-
int chunkRadiusZ = blockRadius.getBlockZ() < 16 ? 1 : blockRadius.getBlockZ() / 16;
220+
int chunkRadiusX = blockRadius.x() < 16 ? 1 : blockRadius.x() / 16;
221+
int chunkRadiusZ = blockRadius.z() < 16 ? 1 : blockRadius.z() / 16;
222222

223-
for (int chX = 0 - chunkRadiusX; chX <= chunkRadiusX; chX++) {
224-
for (int chZ = 0 - chunkRadiusZ; chZ <= chunkRadiusZ; chZ++) {
223+
for (int chX = -chunkRadiusX; chX <= chunkRadiusX; chX++) {
224+
for (int chZ = -chunkRadiusZ; chZ <= chunkRadiusZ; chZ++) {
225225

226226
chunks.add(new Location(center.getWorld(), center.getBlockX() + chX * 16, center.getBlockY(), center.getBlockZ() + chZ * 16).getChunk());
227227
}
@@ -241,19 +241,19 @@ public Block getRandomBlockInArea() {
241241
int xMin,xMax,yMin,yMax,zMin,zMax;
242242

243243
if(hasRegion()) {
244-
xMin = region.getMinimumPoint().getBlockX();
245-
xMax = region.getMaximumPoint().getBlockX();
246-
yMin = region.getMinimumPoint().getBlockY();
247-
yMax = region.getMaximumPoint().getBlockY();
248-
zMin = region.getMinimumPoint().getBlockZ();
249-
zMax = region.getMaximumPoint().getBlockZ();
244+
xMin = region.getMinimumPoint().x();
245+
xMax = region.getMaximumPoint().x();
246+
yMin = region.getMinimumPoint().y();
247+
yMax = region.getMaximumPoint().y();
248+
zMin = region.getMinimumPoint().z();
249+
zMax = region.getMaximumPoint().z();
250250
} else if(hasRadiusAndCenter()) {
251-
xMin = Math.min(center.getBlockX() - blockRadius.getBlockX(), center.getBlockX() + blockRadius.getBlockX());
252-
xMax = Math.max(center.getBlockX() - blockRadius.getBlockX(), center.getBlockX() + blockRadius.getBlockX());
253-
yMin = Math.min(center.getBlockY() - blockRadius.getBlockY(), center.getBlockY() + blockRadius.getBlockY());
254-
yMax = Math.max(center.getBlockY() - blockRadius.getBlockY(), center.getBlockY() + blockRadius.getBlockY());
255-
zMin = Math.min(center.getBlockZ() - blockRadius.getBlockZ(), center.getBlockZ() + blockRadius.getBlockZ());
256-
zMax = Math.max(center.getBlockZ() - blockRadius.getBlockZ(), center.getBlockZ() + blockRadius.getBlockZ());
251+
xMin = Math.min(center.getBlockX() - blockRadius.x(), center.getBlockX() + blockRadius.x());
252+
xMax = Math.max(center.getBlockX() - blockRadius.x(), center.getBlockX() + blockRadius.x());
253+
yMin = Math.min(center.getBlockY() - blockRadius.y(), center.getBlockY() + blockRadius.y());
254+
yMax = Math.max(center.getBlockY() - blockRadius.y(), center.getBlockY() + blockRadius.y());
255+
zMin = Math.min(center.getBlockZ() - blockRadius.z(), center.getBlockZ() + blockRadius.z());
256+
zMax = Math.max(center.getBlockZ() - blockRadius.z(), center.getBlockZ() + blockRadius.z());
257257
} else
258258
return null;
259259

@@ -277,9 +277,9 @@ public boolean hasRegion() {
277277
}
278278

279279
/**
280-
* Checks if this SearchArea is a Radius & Center type, compared to other types.
280+
* Checks if this SearchArea is a Radius &amp; Center type, compared to other types.
281281
*
282-
* @return If it is a Radius&Center type.
282+
* @return If it is a Radius &amp; Center type.
283283
*/
284284
public boolean hasRadiusAndCenter() {
285285

src/main/resources/plugin.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: CraftBook
22
main: com.sk89q.craftbook.bukkit.CraftBookPlugin
33
version: "${internalVersion}"
44
dev-url: https://dev.bukkit.org/projects/craftbook
5-
softdepend: [WorldEdit, WorldGuard, ProtocolLib, Vault]
6-
api-version: 1.18
5+
depend: [WorldEdit]
6+
softdepend: [WorldGuard, ProtocolLib, Vault]
7+
api-version: 1.21.3
78
commands:

0 commit comments

Comments
 (0)