mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-26 14:53:05 +00:00
Fix #1369 Add button click noise to various buttons
This commit is contained in:
1 parent
a3a1f7720e
commit
6b59736ffe
8 files changed
+23
-3
No files matched your search
@@ -10,9 +10,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.gui.GuiForestryTitled;
|
||||
import forestry.core.gui.buttons.GuiBetterButton;
|
||||
@@ -23,6 +20,8 @@ import forestry.factory.gui.widgets.ClearWorktable;
|
||||
import forestry.factory.gui.widgets.MemorizedRecipeSlot;
|
||||
import forestry.factory.recipes.RecipeMemory;
|
||||
import forestry.factory.tiles.TileWorktable;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class GuiWorktable extends GuiForestryTitled<ContainerWorktable, TileWorktable> {
|
||||
private static final int SPACING = 18;
|
||||
@@ -71,5 +70,6 @@ public class GuiWorktable extends GuiForestryTitled<ContainerWorktable, TileWork
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
int id = 100 + button.id;
|
||||
Proxies.net.sendToServer(new PacketGuiSelectRequest(id, 0));
|
||||
Proxies.common.playButtonClick();
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,7 @@ package forestry.factory.gui.widgets;
|
||||
|
||||
import forestry.core.gui.widgets.Widget;
|
||||
import forestry.core.gui.widgets.WidgetManager;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.factory.gui.ContainerWorktable;
|
||||
|
||||
public class ClearWorktable extends Widget {
|
||||
@@ -29,5 +30,6 @@ public class ClearWorktable extends Widget {
|
||||
@Override
|
||||
public void handleMouseClick(int mouseX, int mouseY, int mouseButton) {
|
||||
ContainerWorktable.clearRecipe();
|
||||
Proxies.common.playButtonClick();
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,7 @@ public class MemorizedRecipeSlot extends ItemStackWidgetBase {
|
||||
public void handleMouseClick(int mouseX, int mouseY, int mouseButton) {
|
||||
if (getItemStack() != null) {
|
||||
ContainerWorktable.sendRecipeClick(mouseButton, slotNumber);
|
||||
Proxies.common.playButtonClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user