Jukebox Fix

Fixed a bug where redstone would pop off the top of a jukebox after the record is done playing.
This commit is contained in:
Navoei
2023-05-17 20:12:21 -05:00
parent a70445f383
commit cdb7dca500
2 changed files with 4 additions and 6 deletions

View File

@@ -11,6 +11,6 @@ mod_id=customdiscsplugin
# Target an older API to make it compatible with older versions of Simple Voice Chat
voicechat_api_version=2.3.3
plugin_version=2.3.1
plugin_version=2.3.2
maven_group=me.Navoei.customdiscsplugin
archives_base_name=custom-discs

View File

@@ -82,11 +82,9 @@ public class HopperManager implements Listener {
if (!event.isCancelled()) {
if (!Arrays.toString(hopper.getInventory().getContents()).contains("null")) return;
hopper.getInventory().setItem(hopper.getInventory().firstEmpty(), jukebox.getRecord());
block.setType(Material.AIR);
block.setType(Material.JUKEBOX);
jukebox.setRecord(new ItemStack(Material.AIR));
block.setBlockData(jukebox.getBlockData());
}
}