Fixed basalt generators

This commit is contained in:
Indyuce 2022-07-04 12:32:13 +02:00
parent 2f85b39083
commit 80b0455fed
3 changed files with 7 additions and 6 deletions

View File

@ -149,7 +149,7 @@
<dependency>
<groupId>io.lumine</groupId>
<artifactId>MythicLib-dist</artifactId>
<version>1.3.1</version>
<version>1.3.3</version>
<scope>provided</scope>
</dependency>

View File

@ -107,7 +107,7 @@ public class MMOCore extends LuminePlugin {
public boolean shouldDebugSQL, hasBungee;
private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7;
private static final int MYTHICLIB_COMPATIBILITY_INDEX = 8;
public MMOCore() {
plugin = this;

View File

@ -1,5 +1,6 @@
package net.Indyuce.mmocore.listener;
import io.lumine.mythic.lib.MythicLib;
import io.lumine.mythic.lib.UtilityMethods;
import io.lumine.mythic.utils.Schedulers;
import net.Indyuce.mmocore.MMOCore;
@ -184,9 +185,9 @@ public class BlockListener implements Listener {
}
}
/*
* Allows to mark cobblestone generated by cobblestone generators so that
* exp is not gained by these blocks
/**
* Allows to mark cobblestone generated by cobblestone generators
* so that experience is not gained by these blocks
*/
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void cobblestoneGeneratorHandling(BlockFormEvent event) {
@ -195,7 +196,7 @@ public class BlockListener implements Listener {
if (MMOCore.plugin.configManager.cobbleGeneratorXP) return;
if (event.getBlock().getType() == Material.WATER || event.getBlock().getType() == Material.LAVA)
if (event.getNewState().getType() == Material.COBBLESTONE || event.getNewState().getType() == Material.OBSIDIAN)
if (MythicLib.plugin.getVersion().getWrapper().isGeneratorOutput(event.getNewState().getType()))
event.getNewState().setMetadata("player_placed", new FixedMetadataValue(MMOCore.plugin, true));
}