mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Restore ActiveContainer behavior.
This will add lines to TConstruct_at, so doing gradlew clean may be necessary.
This commit is contained in:
1 parent
457ad128f9
commit
e1cc9e6aef
4 files changed
+39
-2
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package tconstruct.smeltery.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import tconstruct.smeltery.inventory.ActiveContainer;
|
||||
import tconstruct.smeltery.inventory.ActiveSlot;
|
||||
|
||||
public abstract class ActiveContainerGui extends GuiContainer
|
||||
{
|
||||
|
||||
public ActiveContainerGui(ActiveContainer p_i1072_1_)
|
||||
{
|
||||
super(p_i1072_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_146977_a (Slot slot)
|
||||
{
|
||||
if (!(slot instanceof ActiveSlot) || ((ActiveSlot) slot).getActive())
|
||||
{
|
||||
super.func_146977_a(slot);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMouseOverSlot (Slot slot, int mouseX, int mouseY)
|
||||
{
|
||||
if (!(slot instanceof ActiveSlot) || ((ActiveSlot) slot).getActive())
|
||||
{
|
||||
return super.isMouseOverSlot(slot, mouseX, mouseY);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import tconstruct.smeltery.component.SmelteryComponent;
|
||||
import tconstruct.smeltery.inventory.*;
|
||||
import tconstruct.smeltery.logic.AdaptiveSmelteryLogic;
|
||||
|
||||
public class AdaptiveSmelteryGui extends GuiContainer
|
||||
public class AdaptiveSmelteryGui extends ActiveContainerGui
|
||||
{
|
||||
public AdaptiveSmelteryLogic logic;
|
||||
String username;
|
||||
|
||||
@@ -18,7 +18,7 @@ import tconstruct.smeltery.inventory.*;
|
||||
import tconstruct.smeltery.logic.SmelteryLogic;
|
||||
import tconstruct.util.network.SmelteryPacket;
|
||||
|
||||
public class SmelteryGui extends GuiContainer
|
||||
public class SmelteryGui extends ActiveContainerGui
|
||||
{
|
||||
public SmelteryLogic logic;
|
||||
private boolean isScrolling = false;
|
||||
|
||||
Reference in new issue
Block a user