mirror of
https://github.com/songoda/EpicHoppers.git
synced 2025-02-16 20:01:42 +01:00
Merge branch 'development'
This commit is contained in:
commit
0e2e2ba216
4
pom.xml
4
pom.xml
@ -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>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user