Skip to content

Commit 1fdf5eb

Browse files
tastybentoBONNe
andauthored
Release 1.14.5 (#60)
* Version 1.14.4 * Implement options for linking nether portals and crating end obsidian platform. * Implement onRespawnCommands() option from BentoBox 1.14. * Fixes copy-paste issue * Init 1.14.5 version * Fix for mobs in negative coords. Fixes #59 * Remove unused Sonar profile. * Shift to Github Actions * Add correct properties for SonarCloud * Now with correct CaveBlock reference. Co-authored-by: BONNe <[email protected]>
1 parent 8af21d7 commit 1fdf5eb

File tree

4 files changed

+45
-51
lines changed

4 files changed

+45
-51
lines changed

.github/workflows/build.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
17+
- name: Set up JDK 16
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 16
21+
- name: Cache SonarCloud packages
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/.sonar/cache
25+
key: ${{ runner.os }}-sonar
26+
restore-keys: ${{ runner.os }}-sonar
27+
- name: Cache Maven packages
28+
uses: actions/cache@v1
29+
with:
30+
path: ~/.m2
31+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
32+
restore-keys: ${{ runner.os }}-m2
33+
- name: Build and analyze
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_CaveBlock

.travis.yml

-22
This file was deleted.

pom.xml

+3-25
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@
5050
<!-- Revision variable removes warning about dynamic version -->
5151
<revision>${build.version}-SNAPSHOT</revision>
5252
<!-- This allows to change between versions and snapshots. -->
53-
<build.version>1.14.4</build.version>
53+
<build.version>1.14.5</build.version>
5454
<build.number>-LOCAL</build.number>
55+
<sonar.organization>bentobox-world</sonar.organization>
56+
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
5557
</properties>
5658

5759
<profiles>
@@ -92,30 +94,6 @@
9294
<!-- GIT_BRANCH -->
9395
</properties>
9496
</profile>
95-
<profile>
96-
<id>sonar</id>
97-
<properties>
98-
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
99-
<sonar.organization>bentobox-world</sonar.organization>
100-
</properties>
101-
<build>
102-
<plugins>
103-
<plugin>
104-
<groupId>org.sonarsource.scanner.maven</groupId>
105-
<artifactId>sonar-maven-plugin</artifactId>
106-
<version>3.6.0.1398</version>
107-
<executions>
108-
<execution>
109-
<phase>verify</phase>
110-
<goals>
111-
<goal>sonar</goal>
112-
</goals>
113-
</execution>
114-
</executions>
115-
</plugin>
116-
</plugins>
117-
</build>
118-
</profile>
11997
</profiles>
12098

12199
<repositories>

src/main/java/world/bentobox/caveblock/generators/populators/EntitiesPopulator.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,10 @@ private void tryToPlaceEntity(World world, Block block, EntityType entity, Mater
134134
}
135135
// Make space for entity based on the entity's size
136136
BoundingBox bb = e.getBoundingBox();
137-
for (int x = (int) bb.getMinX(); x < bb.getMaxX(); x++) {
138-
for (int z = (int) bb.getMinZ(); z < bb.getMaxZ(); z++) {
139-
int y = (int) bb.getMinY();
137+
138+
for (int x = (int) Math.floor(bb.getMinX()); x < bb.getMaxX(); x++) {
139+
for (int z = (int) Math.floor(bb.getMinZ()); z < bb.getMaxZ(); z++) {
140+
int y = (int) Math.floor(bb.getMinY());
140141
Block b = world.getBlockAt(x, y, z);
141142
for (; y < bb.getMaxY(); y++) {
142143
if (addon.getSettings().isDebug()) {
@@ -148,7 +149,7 @@ private void tryToPlaceEntity(World world, Block block, EntityType entity, Mater
148149
e.remove();
149150
return;
150151
}
151-
b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.CAVE_AIR);
152+
b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.AIR);
152153
}
153154
// Add air block on top for all water entities (required for dolphin, okay for others)
154155
if (WATER_ENTITIES.contains(entity) && b.getRelative(BlockFace.UP).getType().equals(originalMaterial)) {

0 commit comments

Comments
 (0)