mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 21:56:47 +01:00
Fix blastMiningDropProcessing attempting to create ItemStacks from Materials that don't have valid items. Ref:
com.destroystokyo.paper.exception.ServerEventException: Could not pass event EntityExplodeEvent to mcMMO v2.2.019 at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:71) at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityExplodeEvent(CraftEventFactory.java:2122) at net.minecraft.world.level.Explosion.finalizeExplosion(Explosion.java:856) at net.minecraft.world.level.Level.explode(Level.java:1730) at net.minecraft.server.level.ServerLevel.explode(ServerLevel.java:1767) at net.minecraft.world.level.Level.explode(Level.java:1684) at net.minecraft.world.entity.item.PrimedTnt.explode(PrimedTnt.java:245) at net.minecraft.world.entity.item.PrimedTnt.tick(PrimedTnt.java:195) at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1236) at net.minecraft.world.level.Level.guardEntityTick(Level.java:1632) at net.minecraft.server.level.ServerLevel.lambda$tick$5(ServerLevel.java:736) at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:39) at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:707) at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1798) at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:477) at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1600) at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1307) at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:328) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: java.lang.IllegalArgumentException: FIRE isn't an item at com.google.common.base.Preconditions.checkArgument(Preconditions.java:143) at org.bukkit.inventory.ItemStack.of(ItemStack.java:58) at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:138) at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:117) at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:104) at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:87) at mcMMO.jar//com.gmail.nossr50.skills.mining.MiningManager.blastMiningDropProcessing(MiningManager.java:210) at mcMMO.jar//com.gmail.nossr50.listeners.EntityListener.onEnitityExplode(EntityListener.java:832) at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor381.execute(Unknown Source) at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:53) ... 20 more
This commit is contained in:
parent
c525ac8a8f
commit
b91c05ed3f
@ -204,7 +204,7 @@ public class MiningManager extends SkillManager {
|
|||||||
if (isDropIllegal(blockState.getType()))
|
if (isDropIllegal(blockState.getType()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (Probability.ofPercent(50).evaluate()) {
|
if (blockState.getType().isItem() && Probability.ofPercent(50).evaluate()) {
|
||||||
ItemUtils.spawnItem(getPlayer(),
|
ItemUtils.spawnItem(getPlayer(),
|
||||||
Misc.getBlockCenter(blockState),
|
Misc.getBlockCenter(blockState),
|
||||||
new ItemStack(blockState.getType()),
|
new ItemStack(blockState.getType()),
|
||||||
|
Loading…
Reference in New Issue
Block a user