use of buildcraft.api.statements.IGuiSlot in project BuildCraft by BuildCraft.
the class GuiElementStatementDrag method onMouseClicked.
// IInteractableElement
@Override
public void onMouseClicked(int button) {
if (button != 1) {
return;
}
for (IGuiElement element : gui.getElementsAt(gui.mouse.getX(), gui.mouse.getY())) {
if (element instanceof IReference<?>) {
IReference<?> ref = (IReference<?>) element;
Object obj = ref.get();
if (obj == null || obj instanceof IGuiSlot) {
startDragging((IGuiSlot) obj);
break;
}
}
}
}
Aggregations