Merge branch 'development'

This commit is contained in:
Christian Koop 2023-04-22 17:48:18 +02:00
commit 0e2e2ba216
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
4 changed files with 12 additions and 7 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>EpicHoppers</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>4.7.8</version>
<version>4.7.9</version>
<build>
<defaultGoal>clean install</defaultGoal>
<finalName>EpicHoppers-${project.version}</finalName>
@ -133,7 +133,7 @@
<dependency>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore</artifactId>
<version>2.6.19-DEV</version>
<version>2.6.20</version>
<scope>compile</scope>
</dependency>

View File

@ -1,7 +1,7 @@
package com.songoda.epichoppers.listeners;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.core.utils.BlockUtils;
import com.songoda.core.nms.NmsManager;
import com.songoda.epichoppers.EpicHoppers;
import com.songoda.epichoppers.hopper.Hopper;
import com.songoda.epichoppers.hopper.levels.modules.Module;
@ -139,10 +139,14 @@ public class HopperListeners implements Listener {
//event.setItem(moveInstead);
// we need to instead cancel and manually remove the item to move
source.removeItem(moveInstead);
BlockUtils.updateAdjacentComparators(sourceLocation);
if (sourceLocation != null) {
NmsManager.getWorld().updateAdjacentComparators(sourceLocation.getBlock());
}
// now add it to the hopper
destination.addItem(moveInstead);
BlockUtils.updateAdjacentComparators(destinationLocation);
if (destinationLocation != null) {
NmsManager.getWorld().updateAdjacentComparators(destinationLocation.getBlock());
}
}
return;
}

View File

@ -2,7 +2,7 @@ package com.songoda.epichoppers.utils;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.core.utils.BlockUtils;
import com.songoda.core.nms.NmsManager;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
@ -112,7 +112,8 @@ public class StorageContainerCache {
inventory.setItem(i, cachedInventory[i]);
}
}
BlockUtils.updateAdjacentComparators(e.getKey().getLocation());
NmsManager.getWorld().updateAdjacentComparators(e.getKey());
});
inventoryCache.clear();
}