Skip to content

Commit

Permalink
Release 1.14.5 (#60)
Browse files Browse the repository at this point in the history
* 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 <bonne@bonne.id.lv>
  • Loading branch information
tastybento and BONNe authored Aug 15, 2021
1 parent 8af21d7 commit 1fdf5eb
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 51 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build
on:
push:
branches:
- develop
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 16
uses: actions/setup-java@v1
with:
java-version: 16
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_CaveBlock
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

28 changes: 3 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.14.4</build.version>
<build.version>1.14.5</build.version>
<build.number>-LOCAL</build.number>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<profiles>
Expand Down Expand Up @@ -92,30 +94,6 @@
<!-- GIT_BRANCH -->
</properties>
</profile>
<profile>
<id>sonar</id>
<properties>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>bentobox-world</sonar.organization>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.6.0.1398</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ private void tryToPlaceEntity(World world, Block block, EntityType entity, Mater
}
// Make space for entity based on the entity's size
BoundingBox bb = e.getBoundingBox();
for (int x = (int) bb.getMinX(); x < bb.getMaxX(); x++) {
for (int z = (int) bb.getMinZ(); z < bb.getMaxZ(); z++) {
int y = (int) bb.getMinY();

for (int x = (int) Math.floor(bb.getMinX()); x < bb.getMaxX(); x++) {
for (int z = (int) Math.floor(bb.getMinZ()); z < bb.getMaxZ(); z++) {
int y = (int) Math.floor(bb.getMinY());
Block b = world.getBlockAt(x, y, z);
for (; y < bb.getMaxY(); y++) {
if (addon.getSettings().isDebug()) {
Expand All @@ -148,7 +149,7 @@ private void tryToPlaceEntity(World world, Block block, EntityType entity, Mater
e.remove();
return;
}
b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.CAVE_AIR);
b.setType(WATER_ENTITIES.contains(entity) ? Material.WATER : Material.AIR);
}
// Add air block on top for all water entities (required for dolphin, okay for others)
if (WATER_ENTITIES.contains(entity) && b.getRelative(BlockFace.UP).getType().equals(originalMaterial)) {
Expand Down

0 comments on commit 1fdf5eb

Please sign in to comment.