Update for 1.20.4 (requires 1.20.4 to run)

This commit is contained in:
Brokkonaut
2023-12-13 09:33:08 +01:00
parent e3dda845e2
commit da2264481c
4 changed files with 9 additions and 4 deletions

View File

@@ -44,7 +44,7 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version> <version>1.20.4-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -950,6 +950,11 @@ class Updater {
renameMaterial("minecraft:grass_path", Material.DIRT_PATH); renameMaterial("minecraft:grass_path", Material.DIRT_PATH);
} }
if (comparablePreviousMinecraftVersion.compareTo("1.20.4") < 0 && comparableCurrentMinecraftVersion.compareTo("1.20.4") >= 0) {
logblock.getLogger().info("[Updater] Upgrading Materials to 1.20.4");
renameMaterial("minecraft:grass", Material.SHORT_GRASS);
}
config.set("previousMinecraftVersion", currentMinecraftVersion); config.set("previousMinecraftVersion", currentMinecraftVersion);
logblock.saveConfig(); logblock.saveConfig();
} }

View File

@@ -29,7 +29,7 @@ public class BlockSpreadLogging extends LoggingListener {
World world = event.getNewState().getWorld(); World world = event.getNewState().getWorld();
Material type = event.getNewState().getType(); Material type = event.getNewState().getType();
if (type == Material.GRASS) { if (type == Material.SHORT_GRASS) {
if (!isLogging(world, Logging.GRASSGROWTH)) { if (!isLogging(world, Logging.GRASSGROWTH)) {
return; return;
} }

View File

@@ -211,7 +211,7 @@ public class BukkitUtils {
singleBlockPlants = new HashSet<>(); singleBlockPlants = new HashSet<>();
singleBlockPlants.addAll(smallFlowers); singleBlockPlants.addAll(smallFlowers);
singleBlockPlants.add(Material.GRASS); singleBlockPlants.add(Material.SHORT_GRASS);
singleBlockPlants.add(Material.FERN); singleBlockPlants.add(Material.FERN);
singleBlockPlants.add(Material.DEAD_BUSH); singleBlockPlants.add(Material.DEAD_BUSH);
singleBlockPlants.add(Material.BROWN_MUSHROOM); singleBlockPlants.add(Material.BROWN_MUSHROOM);
@@ -314,7 +314,7 @@ public class BukkitUtils {
fallingEntityKillers.add(Material.REPEATER); fallingEntityKillers.add(Material.REPEATER);
fallingEntityKillers.add(Material.COMPARATOR); fallingEntityKillers.add(Material.COMPARATOR);
fallingEntityKillers.add(Material.DAYLIGHT_DETECTOR); fallingEntityKillers.add(Material.DAYLIGHT_DETECTOR);
fallingEntityKillers.remove(Material.GRASS); fallingEntityKillers.remove(Material.SHORT_GRASS);
fallingEntityKillers.remove(Material.NETHER_SPROUTS); fallingEntityKillers.remove(Material.NETHER_SPROUTS);
// Container Blocks // Container Blocks