1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Final changes

This commit is contained in:
Daniel Walsh 2021-06-11 15:30:20 +01:00
parent ede931cdcd
commit 2513b71e6f
No known key found for this signature in database
GPG Key ID: 91C6D8D7C4011D82
5 changed files with 11 additions and 7 deletions

View File

@ -371,8 +371,8 @@
<!-- Shaded packages -->
<dependency>
<groupId>com.github.thebusybiscuit</groupId>
<artifactId>cscorelib2</artifactId>
<version>0.32.0_6</version>
<artifactId>CS-CoreLib</artifactId>
<version>0.32.0</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -118,8 +118,10 @@ public class ProduceCollector extends AContainer implements RecipeDisplayItem {
displayRecipes.add(new CustomItem(Material.BUCKET, null, "&fRequires &bCow &fnearby"));
displayRecipes.add(new ItemStack(Material.MILK_BUCKET));
if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
displayRecipes.add(new CustomItem(Material.BUCKET, null, "&fRequires &bGoat &fnearby"));
displayRecipes.add(new ItemStack(Material.MILK_BUCKET));
}
displayRecipes.add(new CustomItem(Material.BOWL, null, "&fRequires &bMooshroom &fnearby"));
displayRecipes.add(new ItemStack(Material.MUSHROOM_STEW));

View File

@ -9,7 +9,6 @@ import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.utils.WorldUtils;
import org.bukkit.ChatColor;
import org.bukkit.Location;

View File

@ -8,7 +8,6 @@ import java.util.UUID;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.utils.WorldUtils;
import org.bukkit.Bukkit;
import org.bukkit.Effect;

View File

@ -4,10 +4,12 @@ import javax.annotation.Nonnull;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import org.apache.commons.lang.Validate;
import org.bukkit.World;
/**
* Utilities for {@link World}.
* This class holds utilities for {@link World}. This will become especially useful with the changes
* in the "Cliffs and Caves" update.
*
* @author WalshyDev
*/
@ -23,6 +25,8 @@ public final class WorldUtils {
* @return The minimum Y of the given world.
*/
public static int getMinHeight(@Nonnull World world) {
Validate.notNull(world, "World cannot be null!");
return SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)
? world.getMinHeight() : 0;
}