mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
mcMMO now requires the latest MC version (currently 1.17.1)
Fixed a few bugs from API breaks
This commit is contained in:
parent
4bf2ad46ea
commit
8eee39b88b
@ -1,3 +1,19 @@
|
|||||||
|
Version 2.1.203
|
||||||
|
mcMMO now requires Java 16
|
||||||
|
mcMMO now requires the newest version of Minecraft (currently 1.17.1)
|
||||||
|
Fixed several API breaks (mostly affected Alchemy)
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
If you want to play mcMMO on older versions, simply use 2.1.202 instead
|
||||||
|
Keeping mcMMO backwards compatible with older versions is getting messy, and I'd rather be able to focus my attention at newer features than having to make an elaborate build process (or alternatively hacky code) to support older versions of the game
|
||||||
|
Furthermore, it seems most people are playing 1.17.1 by a wide margin
|
||||||
|
You may have trouble compiling the source code if your maven is not setup to run JDK16, if you get any errors when compiling this is likely the reason
|
||||||
|
|
||||||
|
The data from bstats went into making this decision (shoutout to Qixils for typing this up too)
|
||||||
|
71.9% of servers are running 1.17.X
|
||||||
|
97.9% of servers are running ≥1.16
|
||||||
|
99.3% of servers are running ≥1.15
|
||||||
|
|
||||||
Version 2.1.202
|
Version 2.1.202
|
||||||
Fixed a bug where mcMMO didn't reward XP for Kelp
|
Fixed a bug where mcMMO didn't reward XP for Kelp
|
||||||
Fixed a bug where mcMMO marked bonemealed Azalea trees as unnatural (and thus did not give XP or get affected by Tree Feller)
|
Fixed a bug where mcMMO marked bonemealed Azalea trees as unnatural (and thus did not give XP or get affected by Tree Feller)
|
||||||
|
26
pom.xml
26
pom.xml
@ -256,27 +256,27 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-text-serializer-gson</artifactId>
|
<artifactId>adventure-text-serializer-gson</artifactId>
|
||||||
<version>4.9.1</version>
|
<version>4.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-api</artifactId>
|
<artifactId>adventure-api</artifactId>
|
||||||
<version>4.9.1</version>
|
<version>4.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-nbt</artifactId>
|
<artifactId>adventure-nbt</artifactId>
|
||||||
<version>4.9.1</version>
|
<version>4.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-key</artifactId>
|
<artifactId>adventure-key</artifactId>
|
||||||
<version>4.9.1</version>
|
<version>4.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
<artifactId>adventure-text-serializer-gson-legacy-impl</artifactId>
|
<artifactId>adventure-text-serializer-gson-legacy-impl</artifactId>
|
||||||
<version>4.9.1</version>
|
<version>4.9.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.kyori</groupId>
|
<groupId>net.kyori</groupId>
|
||||||
@ -291,7 +291,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven.scm</groupId>
|
<groupId>org.apache.maven.scm</groupId>
|
||||||
<artifactId>maven-scm-provider-gitexe</artifactId>
|
<artifactId>maven-scm-provider-gitexe</artifactId>
|
||||||
<version>1.9.4</version>
|
<version>1.12.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
@ -302,7 +302,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.16.5-R0.1-SNAPSHOT</version>
|
<version>1.17.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -332,36 +332,36 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
<version>5.8.0-M1</version>
|
<version>5.8.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<version>3.11.2</version>
|
<version>4.0.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-inline</artifactId>
|
<artifactId>mockito-inline</artifactId>
|
||||||
<version>3.11.2</version>
|
<version>4.0.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tomcat</groupId>
|
<groupId>org.apache.tomcat</groupId>
|
||||||
<artifactId>tomcat-jdbc</artifactId>
|
<artifactId>tomcat-jdbc</artifactId>
|
||||||
<version>10.0.5</version>
|
<version>10.0.12</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains</groupId>
|
<groupId>org.jetbrains</groupId>
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
<version>20.1.0</version>
|
<version>22.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>29.0-jre</version> <!-- At this time Spigot is including 29.0 Guava classes that we are using -->
|
<version>31.0.1-jre</version> <!-- At this time Spigot is including 29.0 Guava classes that we are using -->
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -3,9 +3,12 @@ package com.gmail.nossr50.events.fake;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.event.inventory.BrewEvent;
|
import org.bukkit.event.inventory.BrewEvent;
|
||||||
import org.bukkit.inventory.BrewerInventory;
|
import org.bukkit.inventory.BrewerInventory;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class FakeBrewEvent extends BrewEvent implements FakeEvent {
|
public class FakeBrewEvent extends BrewEvent implements FakeEvent {
|
||||||
public FakeBrewEvent(Block brewer, BrewerInventory contents, int fuelLevel) {
|
public FakeBrewEvent(Block brewer, BrewerInventory contents, List<ItemStack> results, int fuelLevel) {
|
||||||
super(brewer, contents, fuelLevel);
|
super(brewer, contents, results, fuelLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<AlchemyPotion> inputList = new ArrayList<>();
|
List<AlchemyPotion> inputList = new ArrayList<>();
|
||||||
ItemStack[] outputList = new ItemStack[3];
|
var outputList = new ArrayList<ItemStack>();
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
ItemStack item = inventory.getItem(i);
|
ItemStack item = inventory.getItem(i);
|
||||||
@ -129,11 +129,11 @@ public final class AlchemyPotionBrewer {
|
|||||||
inputList.add(input);
|
inputList.add(input);
|
||||||
|
|
||||||
if (output != null) {
|
if (output != null) {
|
||||||
outputList[i] = output.toItemStack(item.getAmount()).clone();
|
outputList.set(i, output.toItemStack(item.getAmount()).clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory, ((BrewingStand) brewingStand).getFuelLevel());
|
FakeBrewEvent event = new FakeBrewEvent(brewingStand.getBlock(), inventory, outputList, ((BrewingStand) brewingStand).getFuelLevel());
|
||||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled() || inputList.isEmpty()) {
|
if (event.isCancelled() || inputList.isEmpty()) {
|
||||||
@ -141,8 +141,8 @@ public final class AlchemyPotionBrewer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
if(outputList[i] != null) {
|
if(outputList.get(i) != null) {
|
||||||
inventory.setItem(i, outputList[i]);
|
inventory.setItem(i, outputList.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ public class Herbalism {
|
|||||||
/**
|
/**
|
||||||
* Convert blocks affected by the Green Thumb & Green Terra abilities.
|
* Convert blocks affected by the Green Thumb & Green Terra abilities.
|
||||||
*
|
*
|
||||||
* @param blockState
|
* @param blockState The {@link BlockState} to check ability activation for
|
||||||
* The {@link BlockState} to check ability activation for
|
*
|
||||||
* @return true if the ability was successful, false otherwise
|
* @return true if the ability was successful, false otherwise
|
||||||
*/
|
*/
|
||||||
protected static boolean convertGreenTerraBlocks(BlockState blockState) {
|
protected static boolean convertGreenTerraBlocks(BlockState blockState) {
|
||||||
@ -22,16 +22,16 @@ public class Herbalism {
|
|||||||
blockState.setType(Material.MOSSY_STONE_BRICKS);
|
blockState.setType(Material.MOSSY_STONE_BRICKS);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case DIRT :
|
case DIRT:
|
||||||
case GRASS_PATH :
|
case DIRT_PATH:
|
||||||
blockState.setType(Material.GRASS_BLOCK);
|
blockState.setType(Material.GRASS_BLOCK);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case COBBLESTONE :
|
case COBBLESTONE:
|
||||||
blockState.setType(Material.MOSSY_COBBLESTONE);
|
blockState.setType(Material.MOSSY_COBBLESTONE);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default :
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,19 +39,19 @@ public class Herbalism {
|
|||||||
/**
|
/**
|
||||||
* Convert blocks affected by the Green Thumb & Green Terra abilities.
|
* Convert blocks affected by the Green Thumb & Green Terra abilities.
|
||||||
*
|
*
|
||||||
* @param blockState
|
* @param blockState The {@link BlockState} to check ability activation for
|
||||||
* The {@link BlockState} to check ability activation for
|
*
|
||||||
* @return true if the ability was successful, false otherwise
|
* @return true if the ability was successful, false otherwise
|
||||||
*/
|
*/
|
||||||
protected static boolean convertShroomThumb(BlockState blockState) {
|
protected static boolean convertShroomThumb(BlockState blockState) {
|
||||||
switch (blockState.getType()) {
|
switch (blockState.getType()) {
|
||||||
case DIRT :
|
case DIRT:
|
||||||
case GRASS_BLOCK:
|
case GRASS_BLOCK:
|
||||||
case GRASS_PATH :
|
case DIRT_PATH:
|
||||||
blockState.setType(Material.MYCELIUM);
|
blockState.setType(Material.MYCELIUM);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default :
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user