Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Jan 5, 2022
2 parents 5213a32 + ad152e0 commit 174646a
Show file tree
Hide file tree
Showing 173 changed files with 12,289 additions and 1,220 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/translation-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: 汉化错误
about: 反馈 Slimefun 4 汉化版中错误的汉化文本
title: ''
labels: 📜 Translation wrong | 汉化错误
labels: 📜 Translation | 汉化问题
assignees: 'StarWishsama'

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/translation-lost.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: 汉化缺失
about: 反馈 Slimefun 4 汉化版中未汉化的地方
title: ''
labels: 📜 Translation lost | 汉化缺失
labels: 📜 Translation | 汉化问题
assignees: 'StarWishsama'

---
Expand Down
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
commit-message:
prefix: "🔧"
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:

jobs:
build:
if: startsWith(github.event.head_commit.message, '[build skip]') == false
if: contains(github.event.head_commit.message, '[build skip]') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
java-version: 17
java-package: jdk
architecture: x64
- run: mvn -B package --file pom.xml --errors
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
/.idea/
dependency-reduced-pom.xml
.factorypath

/src/test/
/src/test/implementation/items/autocrafters/TestAutoCrafter.java
41 changes: 39 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Table of contents
- [Release Candidate 30 (TBD)](#release-candidate-30-tbd)
- [Release Candidate 31 (TBD)](#release-candidate-31-tbd)
- [Release Candidate 30 (31 Dec 2021)](#release-candidate-30-31-dec-2021)
- [Release Candidate 29 (07 Nov 2021)](#release-candidate-29-07-nov-2021)
- [Release Candidate 28 (06 Sep 2021)](#release-candidate-28-06-sep-2021)
- [Release Candidate 27 (03 Sep 2021)](#release-candidate-27-03-sep-2021)
Expand Down Expand Up @@ -30,17 +31,51 @@
- [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019)
- [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019)

## Release Candidate 30 (TBD)
## Release Candidate 31 (TBD)

#### Additions
* Added Armored Jetpack
* Added Cocoa Beans as a fuel type for the Bio-Generator
* Added Beetroots and Beetroot seeds as fuel types for the Bio-Generator
* Added small and big dripleaves as fuel types for the Bio-Generator
* Added Glow Berries as a fuel type for the Bio-Generator
* Added Glow Lichen as a fuel type for the Bio-Generator
* Added Spore Blossom as a fuel type for the Bio-Generator

#### Changes

#### Fixes
* Fixed #3390
* Fixed research issues for vanilla items, e.g. Trident or Totem of Undying
* Fixed #3368
* Fixed #1315
* Fixed #3400
* Fixed rare issue where Slimefun would not load at all

## Release Candidate 30 (31 Dec 2021)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#30

#### Additions
* Added a ton of wiki links to the guide
* (API) Added "GRAVITY_AFFECTED_BLOCKS" tag
* (API) Added "Biome-Maps" for more in-depth GEO resource configuration (developers only for now)
* (API) Added some utility methods for Biome-Maps
* Added support for 1.18
* Added Talisman of Farmer

#### Changes
* GEO resource distributions have been slightly adjusted
* Salt can now also generate in the Nether (as a GEO resource)

#### Fixes
* Crimson and Warped Pressure Plates are now properly recognized as pressure plates
* Fixed #3336
* (API) Fixed `Parachute` constructor parameter being ignored
* Fixed #3385
* Fixed (Easter) Apple Pie recipe yielding (Christmas) Apple Pies

## Release Candidate 29 (07 Nov 2021)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#29

#### Additions
* Added support for deepslate ores and copper with the Hercules' Pickaxe
Expand Down Expand Up @@ -69,12 +104,14 @@
* Fixed smithing table issue on 1.15 and lower

## Release Candidate 28 (06 Sep 2021)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#28

#### Fixes
* Fixed Metrics
* Fixed some naming conventions and localization keys for RC-27

## Release Candidate 27 (03 Sep 2021)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#27

### **Breaking Changes (API)**
This RC brings a lot of breaking changes to the API. For more info on why we did this and what happened [please refer to our PSA](https://github.com/Slimefun/Slimefun4/pull/3139)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Slimefun 4 可以在 Releases 页面下 **免费下载**.<br>

| | 开发版 (最新更新) | "稳定版" |
| ------------------ | -------- | -------- |
| **支持的 Minecraft 版本** | :video_game: 1.13.X - 1.17.X | :video_game: 1.13.X - 1.16.X |
| **支持的 Minecraft 版本** | :video_game: 1.14.X - 1.18.X | :video_game: 1.14.X - 1.17.X |
| **自动更新系统** | :heavy_check_mark: | :heavy_check_mark: |
| **频繁更新** | :heavy_check_mark: | :x: |
| **享有最新内容** | :heavy_check_mark: | :x: |
Expand Down
6 changes: 6 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
before_install:
- sdk install java 17.0.1-open
- sdk use java 17.0.1-open

jdk:
- openjdk17
64 changes: 54 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<maven.compiler.target>1.8</maven.compiler.target>

<!-- Spigot properties -->
<spigot.version>1.17</spigot.version>
<spigot.version>1.18.1</spigot.version>
<spigot.javadocs>https://hub.spigotmc.org/javadocs/spigot/</spigot.javadocs>
</properties>

Expand Down Expand Up @@ -164,6 +164,18 @@
</execution>
</executions>
</plugin>

<plugin>
<!-- Plugin for Unit Tests -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>

<configuration>
<junitArtifactName>org.junit.jupiter:junit-jupiter</junitArtifactName>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
</plugins>

<resources>
Expand All @@ -180,7 +192,9 @@

<include>wiki.json</include>
<include>languages/translators.json</include>

<include>tags/*.json</include>
<include>biome-maps/*.json</include>

<include>languages/**/*.yml</include>
</includes>
Expand Down Expand Up @@ -219,7 +233,7 @@
<dependency>
<groupId>io.github.baked-libs</groupId>
<artifactId>dough-api</artifactId>
<version>1.0.3</version>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -243,11 +257,41 @@
</exclusions>
</dependency>

<!-- Testing dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.seeseemelk</groupId>
<artifactId>MockBukkit-v1.18</artifactId>
<version>1.15.0</version>
<scope>test</scope>

<exclusions>
<exclusion>
<!-- We use javax.annotation instead. Excluding this -->
<!-- prevents us from using inconsistent annotations -->
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>


<!-- Third party plugin integrations / soft dependencies -->
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-core</artifactId>
<version>7.2.7</version>
<version>7.2.8</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -261,7 +305,7 @@
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.7</version>
<version>7.2.8</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -275,7 +319,7 @@
<dependency>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.202</version>
<version>2.1.207</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -289,7 +333,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.10</version>
<version>2.11.1</version>
<scope>provided</scope>

<exclusions>
Expand Down Expand Up @@ -317,7 +361,7 @@
<dependency>
<groupId>com.github.LoneDev6</groupId>
<artifactId>itemsadder-api</artifactId>
<version>2.4.21</version>
<version>2.5.0</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -331,7 +375,7 @@
<dependency>
<groupId>net.imprex</groupId>
<artifactId>orebfuscator-api</artifactId>
<version>1.0.0</version>
<version>5.2.2</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -372,7 +416,7 @@
<dependency>
<groupId>org.maxgamer</groupId>
<artifactId>QuickShop</artifactId>
<version>4.0.9.10</version>
<version>5.1.0.2</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -383,4 +427,4 @@
</exclusions>
</dependency>
</dependencies>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,15 @@ public enum MinecraftVersion {
/**
* This constant represents Minecraft (Java Edition) Version 1.17
* (The "Caves and Cliffs: Part I" Update)
*
*/
MINECRAFT_1_17(17, "1.17.x"),

/**
* This constant represents Minecraft (Java Edition) Version 1.18
* (The "Caves and Cliffs: Part II" Update)
*/
MINECRAFT_1_18(18, "1.18.x"),

/**
* This constant represents an exceptional state in which we were unable
* to identify the Minecraft Version we are using
Expand Down Expand Up @@ -150,6 +155,21 @@ public boolean isAtLeast(@Nonnull MinecraftVersion version) {
return false;
}

/**
* Unit-Test only code.
* Running #isAtLeast(...) should always be meaningful.
* If the provided version equals the lowest supported version, then
* this will essentially always return true and result in a tautology.
* This is most definitely an oversight from us and should be fixed, therefore
* we will trigger an exception.
*
* In order to not disrupt server operations, this exception is only thrown during
* unit tests since the oversight itself will be harmless.
*/
if (this == UNIT_TEST && version.ordinal() == 0) {
throw new IllegalArgumentException("Version " + version + " is the lowest supported version already!");
}

return this.ordinal() >= version.ordinal();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package io.github.thebusybiscuit.slimefun4.api.exceptions;

import javax.annotation.ParametersAreNonnullByDefault;

import org.bukkit.NamespacedKey;

import io.github.thebusybiscuit.slimefun4.utils.biomes.BiomeMap;

/**
* A {@link BiomeMapException} is thrown whenever a {@link BiomeMap}
* contains illegal, invalid or unknown values.
*
* @author TheBusyBiscuit
*
*/
public class BiomeMapException extends Exception {

private static final long serialVersionUID = -1894334121194788527L;

/**
* This constructs a new {@link BiomeMapException} for the given
* {@link BiomeMap}'s {@link NamespacedKey} with the provided context.
*
* @param key
* The {@link NamespacedKey} of our {@link BiomeMap}
* @param message
* The message to display
*/
@ParametersAreNonnullByDefault
public BiomeMapException(NamespacedKey key, String message) {
super("Biome Map '" + key + "' has been misconfigured: " + message);
}

/**
* This constructs a new {@link BiomeMapException} for the given
* {@link BiomeMap}'s {@link NamespacedKey} with the provided context.
*
* @param key
* The {@link NamespacedKey} of our {@link BiomeMap}
* @param cause
* The {@link Throwable} which has caused this to happen
*/
@ParametersAreNonnullByDefault
public BiomeMapException(NamespacedKey key, Throwable cause) {
super("Biome Map '" + key + "' has been misconfigured (" + cause.getMessage() + ')', cause);
}
}
Loading

0 comments on commit 174646a

Please sign in to comment.